Map is not centered
Hi,
Map is not centering and therefore the objects on the map can be seen on the current interface.
Is there anything wrong at below?
When it loads at first time;
function showPropertiesInMap(res){
if(!map)
map = Appery("listmap").gmap;
$("#j_64").css({height:screen.height});
$("#j_64").attr("width","100%");
$("#j_65").attr("width","100%");
$("#j_65").css({height:screen.height});
This is how it re-sets;
function saveMapCenter(){
if(map){
var cen = map.getCenter();
localStorage.setItem('mapCenter', cen.lat()+','+cen.lng());
}
}
function resetMap(){
$("#j_64").css({height:screen.height});
$("#j_64").attr("width","100%");
$("#j_65").attr("width","100%");
$("#j_65").css({height:screen.height});
if(!map) return;
var mc = localStorage.getItem('mapCenter');
if(mc){
mc = mc.split(',');
map.setCenter(new google.maps.LatLng(mc[0], mc[1]));
Thank you,
Bachi Nyangar