Maps getAddressLocation not working

Hi, I’m using the latest build (1050) and iOS 6
No matter what, any call to getAddressLocation gives me a latitude and longitude of 0.
I’ve also tried with the MapView example in Corona example folders, and it’s doing the same thing.

Can anyone confirm if getAddressLocation works?

Thanks [import]uid: 9158 topic_id: 37550 reply_id: 67550[/import]

I have the same problem. “getAddressLocation” of Mapview just returns 0,0 regardless of whatever it is asked to locate. I am building for Android with build 2012.971. This was working fine just a a few days ago. Corona please help,

Cheers
Russ [import]uid: 205335 topic_id: 37550 reply_id: 145787[/import]

This is currently happening with all apps (IOS and Android) that I have tested so far that use the getAddressLocation() function including the sample Mapview app that ships with Corona. I have reported this as a bug. Hopefully, it will be resolved soon!

This is pretty bad…

My app rely on that feature and I can’t update it because it’s not working…

So OK, checking the network connections when you call getaddresslocation in Corona I’ve found out why it’s not working.

 

Basically, Corona is getting the values using the Google geo api, not Apple maps. Currently, the app is  calling this address

 

maps.google.com/maps/geo?q=Broadway%20and%20Columbus,%20San%20Francisco&output=csv

 

to retrieve the lat/lon

 

However, the google geocoding api 2.0 are deprecated and “guaranteed to work until 8 March 2013”.  https://developers.google.com/maps/documentation/geocoding/v2/

To sum this up, it appears that Google is deprecating the Web API service used by this call.  They have also changed the requirement to use an API Key that they previously did not require.   The engineers are looking into a solution but we are not sure when it will be available.  In the mean time, you can access the same information using a network.request() call.   You can look at this page:

 

https://developers.google.com/maps/documentation/business/geolocation/

 

To figure out how to get the information. 

Crap, this sucks. It means functionality in one of my shipping apps (that costs real money) is broken.

 

Seems like there should be some way to “broadcast” stuff like this so the people who use it can know about it as soon as Corona Labs knows.

 

Maybe some kind of email list that’s used for “emergency purposes” only.

 

 Jay

We feel we have a fix for iOS using corelocation. This should be available in the next few days. It requires a new API call and new listener. We don’t have a solution for Android because we need something that works with Amazon and Nook too. No easy solution.

Everyone,

 

The reason this API stopped working is because Google is in the process of deprecating the web API we were using to fetch location information.  They also imposed an API key requirement on their old web API as of March 8, which we were not supplying (they want to get paid for usage now), and that’s why it broke.

https://developers.google.com/maps/documentation/geocoding/v2/index

 

This issue is currently fixed on iOS in the newest daily build.  iOS is using native APIs to fetch location information now.  No Google API key required (ie: it’s free to use).

 

We’ve also just fixed this issue on Android and this fix will be made available in daily build #1058, coming soon.  No Google API key is required for our Android solution either.

 

We’ve also introduced a new non-blocking version of this function called mapView.requestLocation().  Please see the link below for more details…

http://docs.coronalabs.com/daily/api/type/Map/requestLocation.html

 

Also note that while we did say that mapView.getAddressLocation() is being deprecated, it will still work (as of daily build #1058 containing the above fixes).  This way you’ll have time to transition your code when to the new API when you are ready.

I have the same problem. “getAddressLocation” of Mapview just returns 0,0 regardless of whatever it is asked to locate. I am building for Android with build 2012.971. This was working fine just a a few days ago. Corona please help,

Cheers
Russ [import]uid: 205335 topic_id: 37550 reply_id: 145787[/import]

This is currently happening with all apps (IOS and Android) that I have tested so far that use the getAddressLocation() function including the sample Mapview app that ships with Corona. I have reported this as a bug. Hopefully, it will be resolved soon!

This is pretty bad…

My app rely on that feature and I can’t update it because it’s not working…

So OK, checking the network connections when you call getaddresslocation in Corona I’ve found out why it’s not working.

 

Basically, Corona is getting the values using the Google geo api, not Apple maps. Currently, the app is  calling this address

 

maps.google.com/maps/geo?q=Broadway%20and%20Columbus,%20San%20Francisco&output=csv

 

to retrieve the lat/lon

 

However, the google geocoding api 2.0 are deprecated and “guaranteed to work until 8 March 2013”.  https://developers.google.com/maps/documentation/geocoding/v2/

To sum this up, it appears that Google is deprecating the Web API service used by this call.  They have also changed the requirement to use an API Key that they previously did not require.   The engineers are looking into a solution but we are not sure when it will be available.  In the mean time, you can access the same information using a network.request() call.   You can look at this page:

 

https://developers.google.com/maps/documentation/business/geolocation/

 

To figure out how to get the information. 

Crap, this sucks. It means functionality in one of my shipping apps (that costs real money) is broken.

 

Seems like there should be some way to “broadcast” stuff like this so the people who use it can know about it as soon as Corona Labs knows.

 

Maybe some kind of email list that’s used for “emergency purposes” only.

 

 Jay

We feel we have a fix for iOS using corelocation. This should be available in the next few days. It requires a new API call and new listener. We don’t have a solution for Android because we need something that works with Amazon and Nook too. No easy solution.

Everyone,

 

The reason this API stopped working is because Google is in the process of deprecating the web API we were using to fetch location information.  They also imposed an API key requirement on their old web API as of March 8, which we were not supplying (they want to get paid for usage now), and that’s why it broke.

https://developers.google.com/maps/documentation/geocoding/v2/index

 

This issue is currently fixed on iOS in the newest daily build.  iOS is using native APIs to fetch location information now.  No Google API key required (ie: it’s free to use).

 

We’ve also just fixed this issue on Android and this fix will be made available in daily build #1058, coming soon.  No Google API key is required for our Android solution either.

 

We’ve also introduced a new non-blocking version of this function called mapView.requestLocation().  Please see the link below for more details…

http://docs.coronalabs.com/daily/api/type/Map/requestLocation.html

 

Also note that while we did say that mapView.getAddressLocation() is being deprecated, it will still work (as of daily build #1058 containing the above fixes).  This way you’ll have time to transition your code when to the new API when you are ready.