familledac
Messages postés6Date d'inscriptionmardi 10 juin 2008StatutMembreDernière intervention26 juin 2008
-
25 juin 2008 à 16:54
apprenti -
29 août 2010 à 16:47
Bonjour,
Je viens de mettre en place une carte de mes clients sur mon site (google map API)
J'aimerais proposer diverses icones en fonction du type de client (par ex hopital et ecole)
Voici le code de ma page (seulement 2 clients apparaissent)
Si quelqu'un a la solution, je suis preneur
Merci d'avance
Daniel
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Google Maps JavaScript API Example</title>
<script src="http://maps.google.com/..."
type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(46.85, 1.75), 6, G_SATELLITE_TYPE);
map.addMapType(G_PHYSICAL_MAP);
map.addMapType(G_SATELLITE_3D_MAP);
function createMarker(point,html) {
var marker = new GMarker(point);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
});
return marker;
}
"DEBUT VARIABLES"
var point = new GLatLng(45.194013,0.730981);
var marker = createMarker(point,'<div class="texte-8"><font face="Verdana" size="1"><b>Perigueux ( 24)</b><br>Construction de la cuisine centrale de l\'hopital<br> 2500 repas<br>CO TRAIT. MOE - Mission achevee ( 1993)<br><img src="http://novorest.free.fr/infos/goph/00.jpg" border="0" height="135" width="100"><br><a href="http://novorest.free.fr/ref/hosp/peri1.htm">Infos + >></a><br></font></div>')
map.addOverlay(marker);
var point = new GLatLng(48.894290,2.236727);
var marker = createMarker(point,'<div class="texte-8"><font face="Verdana" size="1"><b>Paris ( 75)</b><br>APS pour les restaurants de la Tour sans Fins a la Defense<br> 2000 repas<br>SS TRAIT. MOE - Mission achevee ( 1991)<br><img src="http://novorest.free.fr/infos/goph/00.jpg" border="0" height="135" width="100"><br><a href="http://novorest.free.fr/ref/trav.htm">Infos + >></a><br></font></div>')
map.addOverlay(marker);