Andree
Andree

Reputation: 1199

Disable scroll zoom in Bing Maps v8

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

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

Upvotes: 2

Views: 3341

Answers (2)

LeeC
LeeC

Reputation: 331

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

disableScrollWheelZoom: true

See the docs here: MapOptions Object

Upvotes: 2

rbrundritt
rbrundritt

Reputation: 17954

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.

Upvotes: 5

Related Questions