map:nearestAddress() , cityDetails always nill

Hi, 

I’m trying to get the neighborhood from nearestAddress() function but it’s always nill. 

myMap:nearestAddress( locationTable.latitude, locationTable.longitude, resultHandler )

My Prints … what can i be doing wrong ?

  print(event.city)

  print(event.cityDetail)

  print(event.postalCode)                                                                               

  print(event.name)                                                                                     

  print(event.regionDetail)                                                                             

  print(event.street)                                                                                   

  print(event.streetDetail)  

  print(event.region)

  print(event.country)                                                                                  

  print(locationText) 

07-09 15:12:18.639  7207  7246 I Corona  : Vitória

07-09 15:12:18.639  7207  7246 I Corona  : nil

07-09 15:12:18.639  7207  7246 I Corona  : 29090-800

07-09 15:12:18.639  7207  7246 I Corona  : nearestAddress

07-09 15:12:18.639  7207  7246 I Corona  : nil

07-09 15:12:18.639  7207  7246 I Corona  : R. Sebastião da Silva Rabello

07-09 15:12:18.639  7207  7246 I Corona  : 100

07-09 15:12:18.639  7207  7246 I Corona  : Espírito Santo

07-09 15:12:18.639  7207  7246 I Corona  : República Federativa do Brasil

07-09 15:12:18.639  7207  7246 I Corona  : nil

Are you certain Google provides that information for every possible address?

I`m not sure, How can I test it outside corona ?!

Maybe start here?

https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding

Thanks a Lot. 

We are going to use our middleware server with latitude and longitude. 

I’m haveing now an other problem with map:requestLocation

I have a list with addresses for requestlocation, and with the event response i need to set the markers with title and subtitle. 

But at event.response i can’t do that because it only return latitude and longitude 

I tried to use getAddressLocation() but the function return NILL to everything. (request location works fine) 

like this 

for _, r in pairs(list_establishment) do

      local latitude, longitude = myMap:requestLocation(r.address )

      local options = { title=r.name, subtitle=r.address }                                              

      myMap:addMarker(latitude, longitude, options)  

end

Are you certain Google provides that information for every possible address?

I`m not sure, How can I test it outside corona ?!

I got an solution. 

I just put the request and the listener function inside a loop.

Performance is just bad . but I can do multiple requests !!!  SOLVED !!!

Maybe start here?

https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding

Thanks a Lot. 

We are going to use our middleware server with latitude and longitude. 

I’m haveing now an other problem with map:requestLocation

I have a list with addresses for requestlocation, and with the event response i need to set the markers with title and subtitle. 

But at event.response i can’t do that because it only return latitude and longitude 

I tried to use getAddressLocation() but the function return NILL to everything. (request location works fine) 

like this 

for _, r in pairs(list_establishment) do

      local latitude, longitude = myMap:requestLocation(r.address )

      local options = { title=r.name, subtitle=r.address }                                              

      myMap:addMarker(latitude, longitude, options)  

end

I got an solution. 

I just put the request and the listener function inside a loop.

Performance is just bad . but I can do multiple requests !!!  SOLVED !!!