Titanium Community Questions & Answer Archive

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

Error in second window with mapview

In the application I'm developing I can not open a second window with a map. There is some sort of limit on the number of maps displayed by application?

This show error when adding the map in the second window

— asked July 26th 2010 by Pedro Camarelles
  • android
  • map
  • window

1 Answer

  • Accepted Answer

    That's correct, you can have only one instance of the map view. If you've closed the first window that contained the map view and it's not properly releasing it, there is an undocumented fix to allow you to release that (now unwanted) map view so that you can create another one in the new window. Call onDestroy() on the map view. E.g. …

    var mapview =Ti.Map.createView(...);
    // ... etc etc.
    // Now you want to destroy the map view
    // so you're able to create another one 
    // (like in a different window)

    I hope that helped.

    — answered July 26th 2010 by Bill Dawson
    • Thanks Bill your response has been very helpful

      — commented July 27th 2010 by Pedro Camarelles
    • This function no longer exists…

      — commented October 27th 2011 by Justin Toth
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.