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); }
