Results 1 to 3 of 3

Thread: Unable to fire events from map view until map view is added to the main view.

  1. #1
    Sencha User
    Join Date
    Apr 2011
    Posts
    212
    Vote Rating
    3
      0  

    Default Unable to fire events from map view until map view is added to the main view.

    I structured my code so that my geolocation methods are in the map view. Since I need geolocation information at startup, I call the geolocation methods in the launch section of my controller. However, if the map is not added to the main view, the fireEvent will not work. The obvious workaround is to add the map to the main view before calling the map methods, but my app startup is already slow and I would prefer not to make it slower.

    Is there is another way to get the fireEvent to work from the map view without adding the map to the main view?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,411
    Vote Rating
    1290
      0  

    Default

    You should be able to use fireEvents if the Ext.Map is already created. If the event requires the Google Map rendered then you will need to have it rendered.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Apr 2011
    Posts
    212
    Vote Rating
    3
      0  

    Default

    Quote Originally Posted by mitchellsimoens View Post
    You should be able to use fireEvents if the Ext.Map is already created. If the event requires the Google Map rendered then you will need to have it rendered.
    I create the map when the application starts. If I add the map to the main view, the fireEvents works fine. If I just create the map and don't add it to the main view, the fireEvent returns undefined and not true or false.

    Is this a bug?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •