Thanks for the suggestion. I tried that and all variables shown as expected (please see my detailed description in steps below) on debug console. However I cannot see the location markers displayed on the map (multiGoogleMap). I have described the necessary steps to recreate the issue below. Can you please provide feedback?
I suspect that the problem is manifesting because of the issues I have pointed earlier. The console gives these error messages (even in vanilla version of your tutorial below):
http://docs.appery.io/tutorials/addin...
Cannot refresh, map is not initialized! appery.js:2242
Uncaught TypeError: Cannot call method 'getBounds' of undefined
**Steps to recreate issue:
------------------------------
On loading of main page, locations from backend (as in tutorial) are fetched and stored in localStorage via associated JS as follows:
var temp = localStorage.getItem('locationResponses');
if (temp) {
temp = temp + ',' + JSON.stringify(value);
} else {
temp = JSON.stringify(value);
}
localStorage.setItem('locationResponses', temp);
Things work fine and expected.
On loading of a separate Page-2, I attempt to display locations on multiGoogleMap (as in tutorial) on that page via associated JS (onload) as follows:
var locationStrings = localStorage.getItem('locationResponses');
var locationsList = $.parseJSON('[' + locationStrings + ']');
for(var c = 0; c < locationsList.length; c++) {
var locationItem = locationsList[c];
for (var i in locationItem) {
if(i == 'location') {
console.log(locationItem.location);
getCoords.execute({
'data' : {
'address' : locationItem.location,
'sensor' : true
}
});
}
}
}
var map = Appery('multiGoogleMap');
map.refresh();
getCoords and mutiGoogleMap above is same as in your tutorial:
http://docs.appery.io/tutorials/addin...
Although all variables have values as expected, I do not see anything displayed on the map.
Will highly appreciate your feedback..
Thanks