Google地图缩放控件中没有滑块

时间:2015-08-11 07:50:34

标签: google-maps dictionary controls zoom

我在google.maps文档中读到了:

  

google.maps.ZoomControlStyle.LARGE - 显示标准缩放滑块控件

创建Google地图我将zoomControlOptions.style设为ZoomControlStyle.LARGE

this_m_map = new google.maps.Map(document.getElementById(this_m_div_map), { 
    zoom: this_m_zoomLevel,
    panControl : true,
    mapTypeControl: true,
    mapTypeControlOptions: {
        style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
        position: google.maps.ControlPosition.BOTTOM_CENTER,
    },

    zoomControl : true,
    zoomControlOptions: {
        style: google.maps.ZoomControlStyle.LARGE,
    },

    scaleControl: true,
    streetViewControl: false,
    streetViewControlOptions: {
        position: google.maps.ControlPosition.LEFT_TOP
    },

    center: new google.maps.LatLng(this_m_defaultLocationLat, this_m_defaultLocationLng),
    //mapTypeId: google.maps.MapTypeId.ROADMAP,
    //styles: selectedStyle
});

但我仍然在地图上看不到滑块: http://s020.radikal.ru/i714/1508/fe/74fbd1abdeeb.png

什么是王?任何其他选项可以影响滑块吗?

1 个答案:

答案 0 :(得分:0)

地图显然是已登录地图,缩放控件无法在此类地图中配置,请参阅:https://developers.google.com/maps/documentation/javascript/signedin#changes_to_map_controls

您唯一的选择是不使用已登录 -map(从API-URL中删除signed_in - 参数)