Re: Sidebar Html
geocodezip@gmail.com wrote:
> See Mike Williams' tutorial:
> http://www.econym.demon.co.uk/googlemaps/examples/map3.htm
>
> -- Larry
Hey Larry,
That's what I've been trying to accomplish, but I can't merge (and
don't know exactly how) his tutorial:
for (var i = 0; i < markers.length; i++) {
// obtain the attribues of each marker
var lat = parseFloat(markers[i].getAttribute("lat"));
var lng = parseFloat(markers[i].getAttribute("lng"));
var point = new GPoint(lng,lat);
var html = markers[i].getAttribute("html");
var label = markers[i].getAttribute("label");
// create the marker
var marker = createMarker(point,label,html);
map.addOverlay(marker);
}
with this, so I can keep my icons and icon string:
markers = xmlDoc.documentElement.getElementsByTagName("marker");
for (var i=0; i < markers.length; i++) {
var color= markers[i].getAttribute("icon");
addMarker(parseFloat(markers[i].getAttribute("lng")),
parseFloat(markers[i].getAttribute("lat")),
markers[i].getAttribute("title"), color);
// since all the markers are loaded by default, make sure all the
boxes are checked
document.getElementById(color).checked=true;
}
It's very tough for me, because I just don't know how! I know that it
comes very easily to you guys, but not to an old retired person like
me....
Ken
0 Comments:
Yorum Gönder
<< Home