For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub
- This topic has 18 replies, 4 voices, and was last updated 13 years, 3 months ago by
support-octavio.
-
AuthorPosts
-
Unknown AuthorParticipantedit 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 nativeMarch 1, 2013 at 9:56 am #336125
BrandonMembermaybe use the preprocessDOM(‘#screenId’) to update it?
March 1, 2013 at 10:17 am #336126
support-michaelKeymaster>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.
March 1, 2013 at 10:25 am #336130
BrandonMemberThats why I had the question mark, wasnt sure if it would work or not.
March 1, 2013 at 10:33 am #336132
Unknown AuthorParticipantMy 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
March 1, 2013 at 11:18 am #336136
support-octavioMember@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?
March 1, 2013 at 12:17 pm #336138
Unknown AuthorParticipantThe 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…
March 1, 2013 at 6:15 pm #336156
Unknown AuthorParticipantAfter 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!
March 1, 2013 at 7:04 pm #336157
Unknown AuthorParticipantWell – 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.
March 2, 2013 at 11:09 pm #336170
Unknown AuthorParticipantOk…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.
March 3, 2013 at 9:35 am #336172
Unknown AuthorParticipantIt 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.
March 8, 2013 at 10:08 am #336417
Unknown AuthorParticipantIt 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.
March 13, 2013 at 5:48 pm #336609
support-octavioMember@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.
March 13, 2013 at 7:30 pm #336612
Unknown AuthorParticipantThank you! I appreciate it. It will make a world of difference to my app.
-1TCMarch 14, 2013 at 12:12 pm #336628
support-octavioMember@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.
-
AuthorPosts
