javascript - Disable zoom and links on google map -
i have disabled controls on google map , using following parameters ,
var mapoptions = { zoom: 15, center: new google.maps.latlng(latitude,longitude), maptypeid: google.maps.maptypeid.roadmap, disabledefaultui: true, draggable: false, zoomcontrol: false, scrollwheel: false, };
but user can still zoom in , zoom out map using double click. there popups on map displays information place. how can disable double click zoom in , popups gives information. there missed in settings ?
update
finally got solution disabling popups , links on google map here.
here demo
call function when map finished loading.
function fixinfowindow() { var set = google.maps.infowindow.prototype.set; google.maps.infowindow.prototype.set = function (key, val) { if (key === 'map') { if (!this.get('nosupress')) { return; } } set.apply(this, arguments); } }
disabledefaultui: true, scrollwheel: false, navigationcontrol: false, maptypecontrol: false, scalecontrol: false,
should if you're using v3 of google maps. if not, can call map.disablescrollwheelzoom();
to disable popups use like..
markeroptions : { visible: true, clickable: false }
Comments
Post a Comment