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.

1

2 Answers 2

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
});
Sign up to request clarification or add additional context in comments.

Comments

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

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.