mapAddressHandler not working?

Hi,

Has anyone used mapView lately? I was trying out the sample code on my device and the pop-up alert never appears though the device can center my location w/in the map. I’m guessing something’s up with “mapAddressHandler” because it never gets triggered.

http://developer.coronalabs.com/content/mapview

I’m running the sample app on an iOS6 device btw.

Thanks in advance! [import]uid: 44127 topic_id: 31302 reply_id: 331302[/import]

I took a quick look at our MapView sample code and I think I see a possible race condition in it. In the [lua]mapAddressHandler[/lua] function where it is building a string for the alert dialog, try replacing [lua]currentLatitude[/lua] with [lua]tostring(currentLatitude)[/lua] in case it is nil. Do the same with [lua]currentLongitude[/lua] as well. Does that solve the problem? [import]uid: 32256 topic_id: 31302 reply_id: 125181[/import]

It worked Joshua! Thanks for the tip! :slight_smile:

Since I will be using MapViews in my next Corona-powered app I’m just curious–will there be any effect or difference for people running iOS6 Maps versus the previous Google Maps? [import]uid: 44127 topic_id: 31302 reply_id: 125221[/import]

Corona’s map views do work on iOS 6. We just re-confirmed it today. [import]uid: 32256 topic_id: 31302 reply_id: 125321[/import]

Thanks Joshua! :slight_smile: [import]uid: 44127 topic_id: 31302 reply_id: 125405[/import]

I took a quick look at our MapView sample code and I think I see a possible race condition in it. In the [lua]mapAddressHandler[/lua] function where it is building a string for the alert dialog, try replacing [lua]currentLatitude[/lua] with [lua]tostring(currentLatitude)[/lua] in case it is nil. Do the same with [lua]currentLongitude[/lua] as well. Does that solve the problem? [import]uid: 32256 topic_id: 31302 reply_id: 125181[/import]

It worked Joshua! Thanks for the tip! :slight_smile:

Since I will be using MapViews in my next Corona-powered app I’m just curious–will there be any effect or difference for people running iOS6 Maps versus the previous Google Maps? [import]uid: 44127 topic_id: 31302 reply_id: 125221[/import]

Corona’s map views do work on iOS 6. We just re-confirmed it today. [import]uid: 32256 topic_id: 31302 reply_id: 125321[/import]

Thanks Joshua! :slight_smile: [import]uid: 44127 topic_id: 31302 reply_id: 125405[/import]