I am having trouble with pan
function. Its working but not as I want it to.
I have logo over map and would like to pan away from this logo so infowindow would be seen (auto pan left or right).. Here is code:
if(locations[i][0] == 1){
var infowindow = new google.maps.InfoWindow({
content: '<div class="oblacek"><h4>'+locations[i][1]+'</h4>'+locations[i][2]+'</div>',
position: new google.maps.LatLng(locations[i][3], locations[i][4]),
});
map.panTo(marker.getPosition());
infowindow.open(map,marker);
}
A picture will explain it better: