Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable Google Map's Satellite view?

I am working on Google Maps Javascript API V 3.

Everything is working fine but I want to disable the MAP button which appears in the top right area with SATELLITE button.

How can I do this?

like image 233
Jatin Dhoot Avatar asked May 12 '11 10:05

Jatin Dhoot


People also ask

How do I turn on satellite mode in Google Maps?

Go to “Settings” from the navigation menu. Next, scroll to the “Map Type” section. Finally, select the “Satellite” map type. Next, you can open any route on your route planner in satellite map mode.

Can you turn off satellite view in Google Earth?

You do not actually turn off aerial. When Google earth is fully loaded there is a little man that will appear when you move your cursor over the map tools in the right top corner of the screen. Click on the man and drag him to where you want to have a streetview.


2 Answers

var myOptions = {     zoom: 2,     center: **Your LatLng object**,     mapTypeControlOptions: {       mapTypeIds: [google.maps.MapTypeId.ROADMAP, google.maps.MapTypeId.HYBRID]     }, // here´s the array of controls     disableDefaultUI: true, // a way to quickly hide all controls     mapTypeControl: true,     scaleControl: true,     zoomControl: true,     zoomControlOptions: {       style: google.maps.ZoomControlStyle.LARGE      },     mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); // displays in <article id="map_canvas"></article> //map.mapTypeControl = false; // OPTIONAL: hides the map control 
like image 137
blomman9 Avatar answered Oct 21 '22 10:10

blomman9


When you enable the map and passes the options to it, you have the chance to specify a mapTypeControlOptions. These have an Array that specifies what kind of maptype's you will allow the user to be able to see. It can be seen here http://code.google.com/apis/maps/documentation/javascript/reference.html#MapTypeControlOptions.

If you don't want the user to have any options as to the maptypes, you can also specify that by setting the maps mapTypeControl to false.

like image 32
Kasper Vesth Avatar answered Oct 21 '22 12:10

Kasper Vesth