Google Maps V3: How to disable "street view"?

Google Maps

Google Maps Problem Overview


There is a "person" icon which allows user to view "Street View". I don't want this functionality on my map, is there a way to remove it or disable it?

Street View

Google Maps Solutions


Solution 1 - Google Maps

The answer is actually in the 2nd paragraph you linked to, but your code should look something like this:

 var mapOptions = {
      center: mapCenter,
      zoom: 10,
      streetViewControl: false,
      mapTypeId: google.maps.MapTypeId.ROADMAP
   };
 

Solution 2 - Google Maps

I'd like to add to the chosen answer and say that if you want to remove the zoom controls (plus-minus buttons) too, then change

  streetViewControl: false,

with

   disableDefaultUI: true,

It was more useful for a mobile touchscreen, since you can zoom in with two fingers.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionevilReikoView Question on Stackoverflow
Solution 1 - Google Mapsuser3378View Answer on Stackoverflow
Solution 2 - Google MapsperfectminimalistView Answer on Stackoverflow