While this typo might just be in your email, it underscores why you
are more likely to get (useful) help if you provide the link to your
map. Then someone could find the typo immediately, rather than just
guessing that you made one.
On Nov 21, 12:38 pm, celso malheiro <celsomalhe...@gmail.com> wrote:
> Eu estou com um problema com o código abaixo:
>
> geocoder.geocode retorna
> status = google.maps.GeocoderStatus.OK
> results[0].geometry.location = ROOFTOP
> results[0].formatted_address = 'R.Voluntários da Pátria, Botafogo, etc...
> results[0].geometry.location.LatLng.lat() =* undefined*
> results[0].geometry.location.LatLng.lngt() =* undefined*
> como isso é possível?
>
> I've got a problem with the code below:
>
> geocoder.geocode returns
> status = google.maps.GeocoderStatus.OK
> results [0]. geometry.location = ROOFTOP
> results[0].formatted_address = 'R.Voluntários da Pátria, Botafogo,
> etc...
> results [0]. geometry.location.LatLng.lat () = *undefined*
> results [0]. geometry.location.LatLng.lngt () = *undefined*
--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
results[0].geometry.location is a LatLng object already.
It doesn't have a LatLng method or property.
Try results[0].geometry.location.lat()
Also note your 'map' variable is locally defined within your init()
function, and won't be available to your geocoding callback when the
results come back later. Put it in global scope, perhaps.
--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.