I followed further instruction from Bruce.
he suggested reseting the map on the event of leaving the page.
preApperyio("google_mapN").gmap = undefined ;
/pre
this caused my app to crash and even after removing the code and map component, and adding a new map component, the error persists.
in appery.js:
pre
refresh: function () {
if (this.isInitialized) {
var _that = this;
if (this.options.address != "") {
this.geocoder.geocode({ 'address': this.options.address}, function (results, status) {
if (status == google.maps.GeocoderStatus.OK) {
_that.options.latitude = results[0].geometry.location.lat();
_that.options.longitude = results[0].geometry.location.lng();
that.gmap.set("center", new google.maps.LatLng(that.options.latitude, _that.options.longitude));
_that.renderMarkers();
_that.options.mapElement.gmap('refresh');
} else {
console.log("Geocode was not successful for the following reason: " + status);
}
});
} else {
this.gmap.set("center", new google.maps.LatLng(this.options.latitude, this.options.longitude)); // THIS LINE IS HIGHLIGHTED IN DEV TOOLS WHEN I LOAD THE PAGE
//refresh markers
this.renderMarkers();
this.options.mapElement.gmap('refresh');
}
} else {
console.log("Cannot refresh, map is not initialized!");
}
}/pre
any idea how to fix this?
I'm having serious problems with my map.