Google maps 禁用不包括地图视图Gmap2的所有其他视图
我正在使用谷歌地图v2,我只想要地图视图,没有更多。我还想去掉放大和缩小按钮 如果有人知道我需要补充什么,那就太好了Google maps 禁用不包括地图视图Gmap2的所有其他视图,google-maps,google-maps-api-2,Google Maps,Google Maps Api 2,我正在使用谷歌地图v2,我只想要地图视图,没有更多。我还想去掉放大和缩小按钮 如果有人知道我需要补充什么,那就太好了 function stores() { $('#storelist ul#stores').html(""); fetch(203,"task=location&location=vic"); map = new GMap2(document.getElementById("map_canvas")); map.setCenter(new
function stores()
{
$('#storelist ul#stores').html("");
fetch(203,"task=location&location=vic");
map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(-37.810013, 144.962683), 8);
map.setUIToDefault();
yellowIcon.image = "http://gmaps-samples.googlecode.com/svn/trunk/markers/orange/blank.png";
markerOptions = { icon:yellowIcon };
}
删除
map.setUIToDefault()
。它将默认的外观添加到地图中。
(参考文件:)
如果需要,还可以自定义与地图交互的方式。例如
map.disableDoubleClickZoom()
或map.disableDraging()
。有关详细信息,请参见上面的参考。您确实应该考虑迁移到Google Maps API的V3。您正在使用不推荐使用的API。