Bryan Taylor
Posts: 0
Joined: Wed Mar 12, 2014 2:01 am

Map works on iOS but not on Android. Cannot refresh. map is not initialized

Anybody see any reason why this works on iOS but not on Android, Android throws up the error: Cannot refresh, map is not initialized in file appery.js, It's a pretty simple page, open map, get your location, center on it, draw the kmz file on it as an overlay, one button to show your current location. everything works perfectly on iOS, but not on Android... stumped now for weeks trying to figure this out... Thanks for any help

Here is the code I am using:

var map;

function initializewestern() {

Code: Select all

 var divs = $("[dsid=western_map]"); 

 if (divs.length) { 

     var mapDiv = divs.eq(0); 

     mapDiv.css("margin", "0"); 

     mapDiv.css("display", "none"); 

     mapDiv.height(mapDiv.parents('[data-role="content"]').height()); 

     mapDiv.css("display", "block"); 

 } 

 var mapOptions = 
 { 
 zoom: 10, 
 }; 

 var map = Appery("map").gmap, mapOptions; 

 var ctaLayer = new google.maps.KmlLayer( 
                                         '[url=http://dl.dropboxusercontent.com/u/31740387/western_only.kmz]http://dl.dropboxusercontent.com/u/31...[/url]', 
                                         {preserveViewport:true} 
                                         ); 

 ctaLayer.setMap(map); 

 google.maps.event.addListener('geolocation_error', function(e) { 
                               alert('There was an error obtaining your position. Message: ' + e.message); 
                               }); 

 google.maps.event.addDomListener(window, 'load', initialize);      

}

Bryan Taylor
Posts: 0
Joined: Wed Mar 12, 2014 2:01 am

Map works on iOS but not on Android. Cannot refresh. map is not initialized

tried that six ways of Sunday, still will not load the kmz files on the map, still getting error map not initialized...
Thanks anyway

Bryan Taylor
Posts: 0
Joined: Wed Mar 12, 2014 2:01 am

Map works on iOS but not on Android. Cannot refresh. map is not initialized

ok, got the map and kmz drawing, but the map takes up the full screen, the header and footer are not on the page, any ideas on that? the header and footer work fine in ios... not on Android

Alena Prykhodko
Posts: 0
Joined: Tue Apr 09, 2013 7:36 am

Map works on iOS but not on Android. Cannot refresh. map is not initialized

Hi Bryan,

Please show us screen shot.

Bryan Taylor
Posts: 0
Joined: Wed Mar 12, 2014 2:01 am

Map works on iOS but not on Android. Cannot refresh. map is not initialized

Here is a screen shot from a galaxy S4Image

Bryan Taylor
Posts: 0
Joined: Wed Mar 12, 2014 2:01 am

Map works on iOS but not on Android. Cannot refresh. map is not initialized

There should be a button on top "show my location" and a footer with a back button

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

Map works on iOS but not on Android. Cannot refresh. map is not initialized

Hello Bryan,

Could you please share your app with the support and tell us its name and steps to reproduce the issue?

Bryan Taylor
Posts: 0
Joined: Wed Mar 12, 2014 2:01 am

Map works on iOS but not on Android. Cannot refresh. map is not initialized

app name is snowrtrailsnl-android and is shared with support

open the app on an iphone and click one of the four map region buttons and it works properly finds your location, puts the marker on the map and draws the kmz overlay on the map, open it on an android device and the header and footer disappears, it does not find your current location and does not display the marker, it does show the kmz overlay on the map correctly...

It works perfectly in the simulator but not on an actual android device

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Map works on iOS but not on Android. Cannot refresh. map is not initialized

Hi Bryan - We can see SnowTrailsNL-iphone is this it?

Return to “Issues”