Maps

Thanks for posting this information. I’m sure it will help us track this issue down.

I’ve noticed that this issue is not happening on my Galaxy SII, which is running Android 2.3. Can you tell me which Android OS version yours is running please? This might help us narrow it down. [import]uid: 32256 topic_id: 24293 reply_id: 125324[/import]

not sure the exact version but I think its 4.04 [import]uid: 8697 topic_id: 24293 reply_id: 125327[/import]

Does anybody know how to create an indoor map to work on iOS app [import]uid: 183472 topic_id: 24293 reply_id: 126223[/import]

Does anybody know how to create an indoor map to work on iOS app [import]uid: 183472 topic_id: 24293 reply_id: 126223[/import]

nearestAddress() on Android

I can not seem to get nearestAddress() to work on Android. When build for iOS I get a mapAddress event returned, When I build for Android I get nothing.

The same goes for the MapView sample code. I don’t get an alertBox with the mapAddress Event details on Android.

Is nearestAddress() supported on Android? [import]uid: 91886 topic_id: 24293 reply_id: 126784[/import]

Yes, Android supports all of the MapView APIs, including [lua]nearestAddress()[/lua]. I’ve personally confirmed that the [lua]nearestAddress()[/lua] function does work. Now, that function will return [lua]event.isError[/lua] set to true if it fails to find address information for the given coordinates or if it failed to connect to the Google Maps server (note that this API requires Internet access). You should be getting something back. Check if it is returning an error. Also, double check that your device has Internet access. [import]uid: 32256 topic_id: 24293 reply_id: 126821[/import]

Thanks for the response Joshua.

I have both an iPhone (5) and an Android phone (HTC Sensation XL running 4.0.3) running exactly the same code built seconds apart with the latest daily build (929). Both devices are on the same wireless network with Internet access. The build.settings has android permissions for internet and both coarse and fine location access.

The app running on the iOS device returns a mapAddress event with address details and on the Android device the mapAddress handler code is never called.

I get exactly the same problem when running the MapView sample code.
[import]uid: 91886 topic_id: 24293 reply_id: 126834[/import]

I’m not sure how to help you further here. I’ve just built our MapView sample project using build #929 and ran it on my Galaxy Nexus and all of the map functionality is working. We’ve all tested it on several other devices without issue.

You Lua listener should be called even if there is an Internet connection error. It may take longer in that case since you have to wait for a connection timeout, but we have tested for that case too.

Perhaps the problem here is that Location services is disabled on your device? Does the GPS icon show up on your Android device’s status bar? Can you verify that they are checked on in the Settings window please? Now, you should still receive an error in your Lua listener, which is what I’m getting on my end. [import]uid: 32256 topic_id: 24293 reply_id: 126841[/import]

nearestAddress() on Android

I can not seem to get nearestAddress() to work on Android. When build for iOS I get a mapAddress event returned, When I build for Android I get nothing.

The same goes for the MapView sample code. I don’t get an alertBox with the mapAddress Event details on Android.

Is nearestAddress() supported on Android? [import]uid: 91886 topic_id: 24293 reply_id: 126784[/import]

Yes, Android supports all of the MapView APIs, including [lua]nearestAddress()[/lua]. I’ve personally confirmed that the [lua]nearestAddress()[/lua] function does work. Now, that function will return [lua]event.isError[/lua] set to true if it fails to find address information for the given coordinates or if it failed to connect to the Google Maps server (note that this API requires Internet access). You should be getting something back. Check if it is returning an error. Also, double check that your device has Internet access. [import]uid: 32256 topic_id: 24293 reply_id: 126821[/import]

Thanks for the response Joshua.

I have both an iPhone (5) and an Android phone (HTC Sensation XL running 4.0.3) running exactly the same code built seconds apart with the latest daily build (929). Both devices are on the same wireless network with Internet access. The build.settings has android permissions for internet and both coarse and fine location access.

The app running on the iOS device returns a mapAddress event with address details and on the Android device the mapAddress handler code is never called.

I get exactly the same problem when running the MapView sample code.
[import]uid: 91886 topic_id: 24293 reply_id: 126834[/import]

I’m not sure how to help you further here. I’ve just built our MapView sample project using build #929 and ran it on my Galaxy Nexus and all of the map functionality is working. We’ve all tested it on several other devices without issue.

You Lua listener should be called even if there is an Internet connection error. It may take longer in that case since you have to wait for a connection timeout, but we have tested for that case too.

Perhaps the problem here is that Location services is disabled on your device? Does the GPS icon show up on your Android device’s status bar? Can you verify that they are checked on in the Settings window please? Now, you should still receive an error in your Lua listener, which is what I’m getting on my end. [import]uid: 32256 topic_id: 24293 reply_id: 126841[/import]

I also want to remove a newMapView and I don’t know how I can remove it or how I can make it invisible.

Any ideas?

Thanks!!! [import]uid: 171051 topic_id: 24293 reply_id: 127052[/import]

David,

You can remove a map view by calling its [lua]removeSelf()[/lua] function.
http://docs.coronalabs.com/api/type/DisplayObject/removeSelf.html

You can show/hide a map view by using its [lua]isVisible[/lua] property.
http://docs.coronalabs.com/api/type/DisplayObject/isVisible.html

Map views have the same core functions and properties that all other display objects have with some limitations:

  • Does not support hasBackground.
  • Does not support masks.
  • Does not support blend mode.
  • You can’t rotate a map view on Android. (It’s an Android limitation with all native fields.)
    [import]uid: 32256 topic_id: 24293 reply_id: 127062[/import]

hello!
Is it possible to change the marker image??

I want to develop a map with different markers (for hospitals , schools , etc… ) [import]uid: 185094 topic_id: 24293 reply_id: 127102[/import]

Thank you very much Joshua!

I was getting crazy, because if you have a look to the reference page (http://docs.coronalabs.com/api/type/Map/index.html) you can see that the property isVisible is not allowed. But you are right, it works perfectly!

One more question: How can I make a route from the actual location to a predefined point? I need to make the route from the user location to one point (I know obviously the latitude and longitude), like the indications provided by GoogleMaps.

Thank you very much! [import]uid: 171051 topic_id: 24293 reply_id: 127113[/import]

Currently, Corona’s map view does does not support routes or custom markers. Custom markers is on our feature request list and is the most highly demanded feature.

Regarding routes, the only work-around that I can think of is to use a web view and create your own html file to render the map route via JavaScript. You would have to use Google’s map overlays to render the route. Probably not the answer that you were looking for, but that’s the only solution that I can think of at the moment. [import]uid: 32256 topic_id: 24293 reply_id: 127126[/import]

I also want to remove a newMapView and I don’t know how I can remove it or how I can make it invisible.

Any ideas?

Thanks!!! [import]uid: 171051 topic_id: 24293 reply_id: 127052[/import]

David,

You can remove a map view by calling its [lua]removeSelf()[/lua] function.
http://docs.coronalabs.com/api/type/DisplayObject/removeSelf.html

You can show/hide a map view by using its [lua]isVisible[/lua] property.
http://docs.coronalabs.com/api/type/DisplayObject/isVisible.html

Map views have the same core functions and properties that all other display objects have with some limitations:

  • Does not support hasBackground.
  • Does not support masks.
  • Does not support blend mode.
  • You can’t rotate a map view on Android. (It’s an Android limitation with all native fields.)
    [import]uid: 32256 topic_id: 24293 reply_id: 127062[/import]

hello!
Is it possible to change the marker image??

I want to develop a map with different markers (for hospitals , schools , etc… ) [import]uid: 185094 topic_id: 24293 reply_id: 127102[/import]