evilReiko
evilReiko

Reputation: 20473

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

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

Upvotes: 130

Views: 91321

Answers (2)

perfectminimalist
perfectminimalist

Reputation: 131

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.

Upvotes: 13

user3378
user3378

Reputation:

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
   };

Upvotes: 295

Related Questions