1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    44
    Vote Rating
    0
    Tamuha is on a distinguished road

      0  

    Default Unanswered: Index.html: Possible to add/load something in it while the app is running?

    Unanswered: Index.html: Possible to add/load something in it while the app is running?


    Hello everyone,

    I have the following problem:
    I'm using Google Maps v3 in my app and so I have the following lines in my index.html:
    Code:
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
    I implemented an Offline-Mode in my app that lets it also start when there is no WiFi/UMTS available.

    But the problem is, when I start my app in the offline-mode, the google maps part in the index.html is not loaded of course. But when I activity my WiFi then and render my google maps view, I cannot use the map because Google Maps wasnt loaded in the index.html. I have to restart the whole app (with WiFi-activated) to be able to use the map.

    So is there a way, to add/load code into the index.html? I would like to update the Google Maps Code in it, as soon as the Wifi/UMTS becomes activated again.

    Thanks in advance,
    Florian

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,677
    Answers
    3355
    Vote Rating
    749
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    If online, you could add the <script> tag to the head element. On load of that <script> tag you can set a property on a namespace that says the google maps have been loaded. Then throughout your app you can check this property and if it is false or undefined then create the <script> element.

    Disclaimer, this may or may not work
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    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.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar