我需要在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
});
有什么方法,如何启用按钮并禁用缩放滚动?
刚刚在上周将其添加到V8控件的实验分支中。要使用此功能,您首先需要在地图脚本网址中添加“&branch = experimental”。然后,您可以将disableScrollWheelZoom: true
添加为地图选项。它将在月底附近合并到主发行分支中。