I'm using the google maps in one of my projects but I don't want to have zooming affect in the map so I disabled it via
zoomControl: false,
however, this only works for desktops and laptops as they dont support multi touch.
when i view my map in a device that supports multi touch like tablets or smart phones, I can zoom in using pinch and zoom on the device.
I did try map2.getUiSettings().setZoomControlsEnabled(false);
which has no affect on it and I still can pinch and zoom!
I also tried map.getUiSettings().setZoomControlsEnabled(false);
to see if that makes any different but it doesn't!
could someone please advise on this issue?
This is my full code:
<script>
function showCurrentLocation(position) {
var latitude = <?php echo $curLat; ?>;
var longitude = <?php echo $curLon; ?>;
var coords2 = new google.maps.LatLng(latitude, longitude);
var mapOptions2 = {
zoom: 10,
center: coords2,
mapTypeControl: false,
streetViewControl: false,
panControl: false,
zoomControl: false,
scrollwheel: false,
navigationControl: false,
mapTypeControl: false,
scaleControl: false,
draggable: true,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
//create the map, and place it in the HTML map div
map2 = new google.maps.Map(
document.getElementById("mapPlaceholder"), mapOptions2);
//place the initial marker
var marker2 = new google.maps.Marker({
position: coords2,
map: map2,
title2: "Current location!"
});
}
google.maps.event.addDomListener(window,'load',showCurrentLocation);
map2.getUiSettings().setZoomControlsEnabled(false);
</script>
any help would be appreciated.