facebook

Map issue for intermittent network connection: CLOSED

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MobiOne Archive
  2.  > 
  3. Getting Help – General
Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #336100 Reply

    Unknown Author
    Participant

    edit by support-octavio: I’ve renamed the topic to better represent the problem.
    How do I reinitialize the map widget after it’s gone to a white screen — iOS native

    #336125

    Brandon
    Member

    maybe use the preprocessDOM(‘#screenId’) to update it?

    #336126

    support-michael
    Keymaster

    >How do I reinitialize the map widget after it’s gone to a white screen — iOS native

    Before talking about recovering from an error do you know what causes the map widget to fail, e.g., syntax or logic error using map api, network failure, phoneui.js error, …? It is important to understand the source of the issue in order to: 1) prevent it if possible and 2) know the map widget’s state to discuss recovery

    >maybe use the preprocessDOM(‘#screenId’) to update it?

    I’m pretty sure preprocessDOM() will not reset a map widget.

    I’m discussing with Octavio and one of devs later this morning on this for additional inputs.

    #336130

    Brandon
    Member

    Thats why I had the question mark, wasnt sure if it would work or not.

    #336132

    Unknown Author
    Participant

    My initialize function not being called – deliberately not being called as the app has sensed there’s no network connection. Once there’s a network connection again, reboot the map widget. preprocessDOM doesnt do it

    #336136

    @1thinchip,

    I was discussing this topic with our lead developer. Can’t say how to proceed without more info. We need to see how you have implemented the map initialization mgmt to understand how to provide guidance. Can you provide a minimal example project that illustrates the problem?

    #336138

    Unknown Author
    Participant

    The root of my issue seems to be the initialization not being called because a CurrentPageId is not being updated when a gotopage is called from a button.

    Will know more later…

    #336156

    Unknown Author
    Participant

    After more troubleshooting, it appears that the button debounce issue may be at the heart of the problem here. As others have reported, your buttons often trigger events twice, rather than once. In my app, the map initialization function in my app is being called twice!

    #336157

    Unknown Author
    Participant

    Well – that issue has been solved and the problem persists. I’ll send you all the project soon, as it’s still got the “jumping” issue, too.

    If there has always been a network connection, I can initialize the map widget.

    If the network has gone and come back, the map widget is white screen of death.

    If the map widget has already been initialized, and the network goes out and comes back, no problem.

    #336170

    Unknown Author
    Participant

    Ok…so…

    I’ve narrowed it down to this code not firing in certain situations.

    
    navigator.geolocation.getCurrentPosition(
        function(geoPosition) {
          var mapPos = new google.maps.LatLng(geoPosition.coords.latitude,
          geoPosition.coords.longitude); alert("Test Point: It's working");
          Googlepos=mapPos; //global variable position capture for google query
         showLocation(gmap,mapPos);
                               },
         
        function() {
           alert('Unable to find current position.');
                   });
         });
    

    The specific line that isn’t firing is:

    
     var mapPos = new google.maps.LatLng(geoPosition.coords.latitude,
    geoPosition.coords.longitude);
    

    Working: Homescreen–>Check Screen Size–>Check Network–>Map Page, Network ok

    Not Working: Homescreen–>Check Screen Size–>Check Network–>No Network Page–>Try again (button)–>Map Page, White Screen in Map Widget

    I emailed you all the code last night.

    UPDATE: Investigating that the iconfile used in showLocation (var iconFile = ‘http://maps.google.com/mapfiles/ms/icons/blue-dot.png’;) is set to null when the app starts w/o a network connection. Would a marker icon value of null cause the map widget to go white?

    UPDATE: Nope, that’s not it.

    #336172

    Unknown Author
    Participant

    It appears that for a map widget to function properly, the app needs network access when the app first loads.

    Map widget works: Load app (network access)–>access lost–> access regained

    Map widget doesn’t work: Load app (no network access) –> accss regained

    The google.maps.LatLng does not fire.

    #336417

    Unknown Author
    Participant

    It seems that, if an iOS app containing a map widget is started without a network connection, the map widget goes white and never recovers — even if the map widget is not on the homesceen.

    #336609

    @1thinchip,

    I’ve opened a bug for this problem, It is in dev team queue. I’ll follow up with you as soon as I have more information.

    #336612

    Unknown Author
    Participant

    Thank you! I appreciate it. It will make a world of difference to my app.
    -1TC

    #336628

    @1thinchip,

    I have been discussing this with the dev team. We have opened an enhancement bug on the map widget to support operation in an intermittent network environment.

Viewing 15 posts - 1 through 15 (of 19 total)
Reply To: Map issue for intermittent network connection: CLOSED

You must be logged in to post in the forum log in