1. It's not good practice to re-geocode a fixed address every time
someone opens your page. It wastes resources and slows down your page.
2. You have two maps in the same div. One associated with the global
variable "map" and one associated with the "map" variable that's local
to showAddress(). With the second of those maps, you attempt to call
map.addOverlay(marker) without having called map.setCenter() on that
map, which doesn't work.
Try deleting the second
var map = new GMap2(document.getElementById("map_canvas"));
line. Deleting that line will cause showAddress() to use the global map,
which has been centred.
--
Mike Williams
--
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.