Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable map controls in Google Maps embed

Is it possible to disable map controls by adding some variables to the Google Maps embed code?

like image 393
panoptican Avatar asked Oct 21 '11 01:10

panoptican


2 Answers

no you can't, but if you use the javascript api you can do this:

 map = new google.maps.Map(document.getElementById("map_canvas"), {
      panControl: false,
      zoomControl: false,
      scaleControl: false,
 });
like image 141
douwe Avatar answered Oct 10 '22 14:10

douwe


This can be done in one step in V3: Add this to your mapOptions:

disableDefaultUI: true

like image 25
Ben Taliadoros Avatar answered Oct 10 '22 15:10

Ben Taliadoros