aide pour google map
2 messages • Page 1 sur 1
Consultez la formation au référencement naturel Google de WebRankInfo / Ranking Metrics
aide pour google map
Salut a tous je galere un peu sur google map
voicic mon code
voila j'ai trois markeur et je voufrais qu'ils aient tous un icon spécial ... j'y arrive pas (j'arrive a avoir un icone diff mais pour tous)
comment faire
Pareil je veux créer une ligne entre c'est 3 points mais cela fait planter l'affichage qqun pour m'aider SVP
Merci
voicic mon code
- Code: Tout sélectionner
<body onunload="GUnload()">
<!-- the div where the map will be displayed -->
<center> <div id="map" style="width: 500px; height: 600px"></div></center>
<script type="text/javascript">
//<![CDATA[
// Check to see if this browser can run the Google API
if (GBrowserIsCompatible()) {
var gmarkers = [];
var htmls = [];
var to_htmls = [];
var from_htmls = [];
var i=0;
// A function to create the marker and set up the event window
function createMarker(point,name,html) {
var marker = new GMarker(point);
// The info window version with the "to here" form open
to_htmls[i] = html + '<br>Itinéraire <b></b> vers ce lieu- <a href="javascript:fromhere(' + i + ')">depuis ce lieu</a>' +
'<br>Lieu de départ: <form action="http://maps.google.com/maps" method="get" target="_blank">' +
'<input type="text" SIZE=40 MAXLENGTH=40 name="saddr" id="saddr" value="" /><br>' +
'<INPUT value="Itinéraire" TYPE="SUBMIT">' +
'<input type="hidden" name="daddr" value="' + point.lat() + ',' + point.lng() +
// "(" + name + ")" +
'"/>';
// The info window version with the "to here" form open
from_htmls[i] = html + '<br>Itinéraire <a href="javascript:tohere(' + i + ')">vers ce lieu</a> - <b>depuis ce lieu</b>' +
'<br>Lieu arrivée:<form action="http://maps.google.com/maps" method="get"" target="_blank">' +
'<input type="text" SIZE=40 MAXLENGTH=40 name="daddr" id="daddr" value="" /><br>' +
'<INPUT value="Itinéraire" TYPE="SUBMIT">' +
'<input type="hidden" name="saddr" value="' + point.lat() + ',' + point.lng() +
// "(" + name + ")" +
'"/>';
// The inactive version of the direction info
html = html + '<br>Itinéraire: <a href="javascript:tohere('+i+')">vers ce lieu</a> - <a href="javascript:fromhere('+i+')">depuis ce lieu</a>';
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
});
gmarkers[i] = marker;
htmls[i] = html;
i++;
return marker;
}
// functions that open the directions forms
function tohere(i) {
gmarkers[i].openInfoWindowHtml(to_htmls[i]);
}
function fromhere(i) {
gmarkers[i].openInfoWindowHtml(from_htmls[i]);
}
// Display the map, with some controls and set the initial location
var map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(43.626954,1.447449), 14);
map.setMapType(G_HYBRID_MAP); // Vue mixte
map.openInfoWindow(map.getCenter(),document.createTextNode("cliquer sur les marqueurs"));
// Set up three markers with info windows
var point = new GLatLng( 43.626954,1.447449);
var marker = createMarker(point,'bbb',"<div style='font-family:arial;'><b><a href='http://www.lebbb.org'>bbb</a></b><br>96 rue Michel Ange<br>31500 Toulouse<br>tel 0561133714<br>fax 0561133598</div>")
map.addOverlay(marker);
var point = new GLatLng( 43.63672,1.441054);
var marker = createMarker(point,'Renan',"<div style='font-family:arial;'><b>galerie de l'école renan</b><br>che d'Audibert<br>31200 Toulouse</div>")
map.addOverlay(marker);
var point = new GLatLng(43.628807,1.444155);
var marker = createMarker(point,'friche',"<div style='font-family:arial;'><b>La future friche Renan</b><br>14 rue Ernest-Renan 31200<br> Toulouse</div>")
map.addOverlay(marker);
}
// display a warning if the browser was not compatible
else {
alert("Sorry, the Google Maps API is not compatible with this browser");
}
</script>
voila j'ai trois markeur et je voufrais qu'ils aient tous un icon spécial ... j'y arrive pas (j'arrive a avoir un icone diff mais pour tous)
comment faire
Pareil je veux créer une ligne entre c'est 3 points mais cela fait planter l'affichage qqun pour m'aider SVP
Merci
2 messages • Page 1 sur 1
Formation recommandée sur ce thème :
Formation Référencement naturel Google : apprenez une méthode efficace pour optimiser à fond le référencement naturel dans Google de façon durable... Formation animée par Olivier Duffez et Fabien Facériès, experts en référencement naturel.
Tous les détails sur le site Ranking Metrics : programme, prix, dates et lieux, inscription en ligne.
Lectures recommandées sur ce thème :
- Google achète Measure Map
- Accord stratégique entre Google et TeleAtlas (TomTom)
- Tutorial Google Maps API
- Nouvelle version de Google Analytics : interface beaucoup plus claire
- Google Labs lance Google Alternate Views
- Keyword Search Engine : le choix des bons mots-clés
- Liste des sociétés rachetées par Google
- Plein de chiffres incroyables sur Google Maps
- WebRankInfo analyse le logiciel AgentWebRanking
- Google Apps Edition Premium : une suite bureautique en ligne professionnelle
Consultez la description détaillée des produits ou services de Google suivants : Google Measure Map
Qui est en ligne
Utilisateurs parcourant ce forum: sky et 0 invités


le forum