How to remove a MapType from google map using Google Maps Javascript V3 API?

前端 未结 4 810

Here is the snippet I am using to display Google map on my app using their V3 Javascript API.

var myOptions = {
            zoom: 15,
            mapTypeId:          


        
4条回答
  •  感动是毒
    2020-12-24 15:04

    You can remove all the default UI

    var mapOptions = {
                zoom: 15,
                mapTypeId: google.maps.MapTypeId.ROADMAP,
                disableDefaultUI: true
            };
    
    var map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
    

    And then you can add your own controls

    Or you can just add mapTypeControl: false

提交回复
热议问题