Google maps removing controls

前端 未结 4 1080
梦谈多话
梦谈多话 2020-12-15 07:18

I am attempting to create a Google map of my company location. I used the link button on the Google maps page. Everything\'s fine, but when I shrink the map to 200 x 200 all

4条回答
  •  青春惊慌失措
    2020-12-15 07:38

    I don't believe it is possible to hide controls when embedding the map. You will need to create a map in javascript by using Google Maps API - in lines of the following:

    var mapContainer = document.getElementById('mapContainer');
    var mapOptions = {
        panControl: false,
        zoomControl: false,
        scaleControl: false,
    };
    var map = new google.maps.Map(mapContainer, mapOptions);
    

提交回复
热议问题