Hi: I'm just starting with Google Maps.
I understand the process of adding markers and polylines to a map en masse, what I'm having difficulty is adding a single marker, lat/lng to be determined by GeoEncoding, to an already defined map. My web page is http://gooseneckcreek.com/Google/testGeoCoding.asp Operation is as follows: 1) initial load of the page uses a predefined address as the central location. However, the lat/lng values for the predefined location are determined by geoencoding. 2) the user can enter an address into the provided text boxes and click submit. At that point, I'd like to add a second marker to the map as determined via geoencoding. To keep it simple, I've prepopulated the text boxes with an address that is right around the corner from the predefined location and therefore is in the same map bounds. However, it doesn't work. At best, it shows the marker but no underlying map image. My thinking is that I'm replacing the existing map when attempting to add the second marker instead of just modifiying it. Through experiments, the attempt to add the marker behaves as though I haven't centered a new map before adding to it. I guess I'm not clear on exactly what var map = new GMap2(document.getElementById("map_canvas")); actually does in this case. Can/does it return a reference if a map has already been assigned to the container, or does it always have to create and assign a new map? I'm guessing it's the latter and if I want to add the second maker, I have to come up with a mechanism to store both address and create a new map with both markers added at the same time. Any help is appreciated. Thanks, John
-- 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.
