as you can see the marker is way off the center
as you can see the marker is way off the center
Hello! You would need to create two local storage variables with latitude and longitude values. Here is a result http://appery.io/app/mobile-frame?src...
hi the link shows a permission error, could you explain your answer more? regarding the two variables? there already are two local variables that store the lat (shop_lat) and lon (shop_lon) and these we use to center the map
Sorry, disregard that answer. I'll update soon with more details.
Hi again, please refresh the map after you set map center with the following code:
codeAppery("googlemap_22").refresh();/code
hi I did it but still the same,
Working on it...
Hi Dimitris,
1) Delete Page Show event handlers that set Google Maps.
2) On Page Show event create new Run JavaScript action with the following code:
precode
setTimeout( function(){
var shopLocation = new google.maps.LatLng(localStorage.getItem('shop_lat'), localStorage.getItem('shop_lon'));
// add markers
$("[name = 'googlemap_22']").gmap({
'zoom':15,
'center': shopLocation
});
}, 1000);/code/pre
Replace the comment "//add markers" with creating marker as described here: http://docs.appery.io/tutorials/addin...
wow !!! it works, thanks a lot for that, from the solution you propose I take it you introduce a small delay to allow the map to be initialised ? before applying the new center?
Also, another question when I try to debug myself the javascripts produced the debugger (firebug) does not show the scripts to allow me to set break points etc apart from the ones in the main menu screen. It only shows the js code if an undefined value or some other error occurs and then it prepends it with a VM[and a number] is there any way to be able to walk through the js code executed the various pages?
thanks again for your help, effort and support.
rgrds
dimitris