I'm new to using google maps and trying to figure out how to limit the zoom function so that it doesn't get distorted anywhere except the center of the map, and doesn't grow to the point of the mouse. It basically scales to the center of the returned map, regardless of where the mouse pointer is on the map, rather than scaling where the mouse pointer is on the map. I don’t even know if this is currently possible, some help would be appreciated.
<script type="text/javascript">
function initialize() {
var latlng = new google.maps.LatLng(51.285583, 1.091045);
var myOptions = {
zoom: 15,
center: latlng,
scrollwheel: true,
navigationControl: false,
mapTypeControl: false,
scaleControl: false,
draggable: false,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
var marker = new google.maps.Marker({
position: new google.maps.LatLng(51.285826, 1.089973),
map: map,
title: 'Run of The Mill',
clickable: true
});
}
</script>
source
share