在Bing Maps v8中禁用滚动缩放

问题描述 投票:1回答:2

我需要在Bing Maps API v8中通过滚动来禁用缩放,但要保留缩放按钮。

map = new Microsoft.Maps.Map(mapPlaceholderElement,
{
    credentials: options.credentials,
    disableZooming: true, //If this is true, the showZoomButtons is not applied
    mapTypeId: Microsoft.Maps.MapTypeId.road,
    navigationBarMode: Microsoft.Maps.NavigationBarMode.compact,
    showZoomButtons: true
});

有什么方法,如何启用按钮并禁用缩放滚动?

javascript bing-maps
2个回答
5
投票

刚刚在上周将其添加到V8控件的实验分支中。要使用此功能,您首先需要在地图脚本网址中添加“&branch = experimental”。然后,您可以将disableScrollWheelZoom: true添加为地图选项。它将在月底附近合并到主发行分支中。


0
投票

这不再是实验性的;它已发布并记录。

disableScrollWheelZoom: true

在此处查看文档:MapOptions Object

© www.soinside.com 2019 - 2024. All rights reserved.