On May 24, 2:20 am, a jay <[email protected]> wrote: > ok you were right, after deleting the marked i forgot to delete the closing > bracket of the if. > now the map does initialize but i still can place my marker only on the land > what am i doing wrong ?
You're using the geocoder to geocode the point clicked and using the coordinates it returns. It can't return an address and its coordinates if there isn't one near to the click. Note: the coordinates you're using are not the coordinates of the click, they are the coordinates of the address returned by the geocoder. You already have the location of the click in the global variable pendingLatLng, so if the geocoder doesn't return a location then use that instead. You may want to use the click's coordinates anyway, together with whatever address is returned by the geocoder. -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
