Hello it to me to show the image but to do click on it I dont get the
information. But if I do it without the image shows the information.
Where can be wrong?
function createMarker(point,html) {
var icon = new GIcon();
icon.iconSize = new GSize(36, 45);
icon.iconAnchor = new GPoint(25, 35);
icon.image="../imagenes/car_032.png";
var marker = new GMarker(point,icon);
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml(html);
});
return marker;
}
function load(x,y) {
var map = new GMap2(document.getElementById("map"));
if (GBrowserIsCompatible()) {
map.setCenter(new GLatLng(x[0],y[0]), 15);
map.addControl(new GLargeMapControl());
map.setMapType(G_HYBRID_MAP);
map.addControl(new GMapTypeControl());
map.addControl(new GScaleControl());
for (i=0;i<x.length;i++){
var latlng =new GLatLng(x[i],y[i]) ;
var marker = createMarker(latlng,'Última
posición
conocida')
var polyline = new GPolyline([new
GLatLng(y[i],x[i]), new
GLatLng(y[i+1],x[i+1])], "#0000dd", 6, 0.4);
//map.addOverlay(new GMarker(latlng,icon));
map.addOverlay(polyline);
map.addOverlay(marker);
}
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---