I have the following code to how a map. Everything works fine except the zoom parameter. No matter what I set for zoom, it always shows the same zoom level. What can I do?
$('#pagemap').live("pageshow", function() {
$('#map_canvas').gmap().bind('init', function(evt, map) {
$('#map_canvas').gmap('getCurrentPosition', function(position, status) {
if ( status === 'OK' ) {
var clientPosition = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
$('#map_canvas').gmap('option', 'mapTypeId', google.maps.MapTypeId.SATELLITE);
$('#map_canvas').gmap('option', 'zoom', 13);
$('#map_canvas').gmap('addMarker', {'position': clientPosition, 'bounds': true});
}
});
});
});
you need to change the ‘bounds’ option of the marker to false.
$('#map_canvas').gmap('addMarker', {'position': clientPosition, 'bounds': false});this is a link for more informations