I found a code from Marina on another topic (https://getsatisfaction.com/apperyio/...
) and change the geolocation1 javascript to include it and make sure the map is loaded first:
I am going to make some test and return with the results.
geolocation1 javascript:
function addMarkersAfterMapReady(mapName)
{
if (!Appery(mapName).gmap)
{
setTimeout(function () {addMarkersAfterMapReady(mapName);
}, 100);
} else
{
//Original geolocation javascript code
Code: Select all
var markerLatLng = new google.maps.LatLng(Apperyio.storage.currentLat.get(), Apperyio.storage.currentLng.get());
var marker = new google.maps.Marker({
position: markerLatLng,
map: map,
icon: 'http://i.imgur.com/fDUI8bZ.png'
});
map.setCenter(markerLatLng);
map.setZoom(15);
}
addMarkersAfterMapReady('google_map');