Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

map view loading event not firing

On https://developer.appcelerator.com/apidoc/mobile/1.2/Titanium.Map.MapView.html is a list of the events I can attach to the map view. I want a function to run when the map starts to load, but when I test the app on the android emulator, it doesn't seem to fire the event.

Have I misinterpreted the documentation, or just coded incorrectly? My event code is below.
Thanks for any help,
Dan

mapView.addEventListener('loading',function(evt)
{
    Titanium.API.info('Map loading');

    // Update local map data
    getMapData();

    // Grab map data from local DB and display current annotations
});
— asked April 15th 2010 by Dan Duke
  • android
  • event
  • listener
  • map
  • view
  • win32
0 Comments

2 Answers

  • Accepted Answer

    We currently don't fire the loading or complete events on Android. I could synthesize loading and complete, but those actions are handled by the native API and it's transparent. You can set the annotations at any time. You don't have to wait for it to be loading.

    — answered April 15th 2010 by Don Thorp
    permalink
    1 Comment
    • 2 years passed and these events are still not implemented for Android… Add notes, that these events are fired only on iPhone and iPad…

      — commented February 13th 2012 by Paul Annekov
  • Thanks for that, good to know those don't work, I am trying to get the annotations to update to only show the 10 nearest to map center. I can get this to run when the map is moved though, so there are other events I can use (eg. regionChanged).

    Also, just as a thought, would there be a consideration to put an icon next to some of the calls/events in the docs with the android/iphone app (with a cross through them) to show which ones dont yet work on certain platforms, as this could cause hours of wasted time, or is there already a place to quickly check this?

    — answered April 16th 2010 by Dan Duke
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.