0
<div id="map"></div>
<script>
function initMap() {
var uluru = {lat: 36.091732, lng: -115.228789};
var map = new google.maps.Map(document.getElementById('map'), {
zoom: 16,
center: uluru
});
var marker = new google.maps.Marker({
position: uluru,
map: map
});
}
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBotunmxwKg65qa-
Yex7o_eAyVZv_2QJo8&callback=initMap">
</script>

I have the map working on my site with this code. I'm trying to disable scrolling and get rid of the map/satellite options in the upper left corner.

BEE EEE
  • 49
  • 2
  • I think you got your correct answer from this link [https://stackoverflow.com/questions/2330197/how-to-disable-mouse-scroll-wheel-scaling-with-google-maps-api][1] – KARAN LAGALWAR Jul 24 '17 at 12:45

2 Answers2

1

In the Version 3 of Google Maps API you can use...

var map = new google.maps.Map(document.getElementById('map'), {
     zoom: 16,
     center: uluru,
     mapTypeControl: false,
     scrollwheel: false
});
Pommesloch
  • 492
  • 5
  • 17
0

Try this:

var mapOptions = {
    zoom: 10,
    scrollwheel: false,
    mapTypeControl: false    
}

map = new google.maps.Map(document.getElementById("map"), mapOptions);

Bonus: To disable StreetView

streetViewControl: false
Saurabh
  • 2,655
  • 1
  • 20
  • 47