Hi Everyone,
I am trying to add interactive icons to my google map. What I want it
to show is a user's first name and a hyperlink redirecting the user to
another page. I have looked at the google tutorial but I do not know
where to put the code in as I have structured mine differently. How
can I do this - I have attached my aspx code to this post. Please
help!!!!!
function initialize() {
if (GBrowserIsCompatible()) {
var map = new
GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(51.066573,-0.313765), 09);
map.setUIToDefault();
// Create new geocoding object
geocoder = new GClientGeocoder();
// Download the data in out2.xml and load it on the
map.
GDownloadUrl("./out2.xml", function(data) {
xml = GXml.parse(data);
markers =
xml.documentElement.getElementsByTagName("marker");
for (var i = 0; i < markers.length; i++) {
address = markers[i].getAttribute("address");
geocoder.getLocations(address, addToMap);
}
});
}
// This function adds the point to the map
function addToMap(response) {
// Retrieve the object
place = response.Placemark[0];
// Retrieve the latitude and longitude
point = new GLatLng(place.Point.coordinates[1],
place.Point.coordinates[0]);
// Create a marker
marker = new GMarker(point);
// Add the marker to map
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.