最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Disable scroll zoom in Bing Maps v8 - Stack Overflow

programmeradmin1浏览0评论

I need to disable zooming by scroll in Bing Maps API v8, but keep the zooming buttons.

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.NavigationBarModepact,
    showZoomButtons: true
});

Is there any way, how to enable the buttons and disable the zoom scrolling?

I need to disable zooming by scroll in Bing Maps API v8, but keep the zooming buttons.

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.pact,
    showZoomButtons: true
});

Is there any way, how to enable the buttons and disable the zoom scrolling?

Share Improve this question asked May 30, 2016 at 7:22 AndreeAndree 1,1993 gold badges17 silver badges32 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

This was just added to the experimental branch of the V8 control last week. To use this you first need to add "&branch=experimental" to the map script URL. You can then add disableScrollWheelZoom: true as a map option. This will be merged into the main release branch near the end of the month.

This is no longer experimental; It is released, and documented.

disableScrollWheelZoom: true

See the docs here: MapOptions Object

发布评论

评论列表(0)

  1. 暂无评论