+ Start a Discussion

apex:map scrolling="false" ??

Hi there,

My map uses width="100%" so when users use the mouse wheel to scroll down, they get "stuck" on the map zooming in and out.

In JavaScript you simply set scrollwheel: false but I'm using <apex:map> as follows:

<apex:map width="100%" height="400px" mapType="roadmap" center="{.....}">

Articles such as: https://www.salesforce.com/docs/developer/pages/Content/pages_compref_map.htm say: "Display an interactive, JavaScript-based map, complete with zooming, scrolling, and markers based on your Salesforce or other data.", but, what's the scrolling attribute?

I tried scrolling="false", scroll="false", scrollwheel="false" and nothing. I don't seem to find this option.

Any help I would appreciate it.



At this time, there's no way to set scrollwheel: false in the JavaScript output of the <apex:map> component. We're taking this as a feature request, and (safe harbor) hope to add it in a future release.

Regarding your note of the word "scrolling" in the docs (which I wrote), I used the wrong term, and that should have been "panning". We're fixing that, too. You'll find the change here (better URL to the docs):


The intent of the sentence was to explain that <apex:maps> behave just like the interactive maps you get on all the usual places, like Google Maps, etc., where you can zoom in and out, pan around the map by dragging, etc.

That same functionality does, by default, include zooming by scroll wheel events. If you get "stuck" by scrolling into a map that then starts capturing your scroll events, just move your mouse cursor outside the map area, and you can continue scrolling with the wheel. Or worst case, you can always use the scroll bars on the browser window.

I hope this helps!