On Feb 6, 8:09 am, brdnwi <[email protected]> wrote: > Hey, I'm using the map to get the latitude longitude coordinates by > address. It works perfectly, but I'd also like to know if there is a > way to put another marker point on the same map with another address. > This is the simple code I'm using. I just want to know if it's easy to > add another marker point.
Yes. See Mike Williams' tutorial. http://econym.org.uk/gmap/ If the address doesn't move or isn't dynamically entered by the user, you should geocode it "off-line" and use the resulting coordinates in your page rather than wasting the processing to geocode them every time. -- Larry > > function load(addy) { > if (GBrowserIsCompatible()) { > var map = new GMap2(document.getElementById("map")); > map.setCenter(new GLatLng(60, 100), 10); > } > var address = addy; > var geocoder = new GClientGeocoder; > geocoder.getLatLng(address, function(point) { > if (point) { > map.clearOverlays(); > map.addOverlay(new GMarker(point)); > map.setCenter(point, 15); > }} > > ); > > > > }- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
