谷歌map删除自定义控件的问题
initialize: function() {
lat = 83.14746;
lng = 93.34175376;
var myLatLng = new google.maps.LatLng(lat, lng);
var myOptions = {
zoom: 4,
center: new google.maps.LatLng(-33, 151),
mapTypeControl: true,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
},
disableDefaultUI: true,
panControl: false,
zoomControl: false,
scaleControl: true,
zoomControl: true,
zoomControlOptions: {
style: google.maps.ZoomControlStyle.SMALL
},
mapTypeId: google.maps.MapTypeId.ROADMAP
}
var map = new GMap2(document.getElementById("map_canvas"), myOptions);
map.setCenter(new GLatLng(39.9493, 116.3975), 13);
map.RemoveControl("GMapTypeControl");
}
myOptions参数好像都没生效。默认控件还是存在
cgbugs
10 years, 2 months ago