Developer forum

Forum » Development » Maps Module - scrollwheel

Maps Module - scrollwheel

Mikkel Toustrup Olsen
Reply

Hello all,

I have implemented different maps across my solution, however I am not able to set the scrollwheel = false properly.

I've tried to integrate following code to my maps template:

options = $.extend({
    scrollwheel: false,
    navigationControl: false,
    mapTypeControl: false,
    scaleControl: false,
    draggable: false,
    mapTypeId: google.maps.MapTypeId.ROADMAP
}, options);

Though without any luck. In the map.js file I dont really see any "fitting" place for this to be inserted either. Any suggestions on the matter? (As far as I can see it is not possible to set from the backend either) 

Regards,

Mikkel Toustrup Olsen


Replies

 
Mikkel Ricky
Reply
This post has been marked as an answer

You can customize some settings from your Maps template (see Maps-custom.html for an example), and in your case you have to add something like

<script>
Dynamicweb.MapSettings = {
     map: {
         scrollwheel: false,
         navigationControl: false,
         mapTypeControl: false,
         scaleControl: false,
         draggable: false
     }
}</script>
<!--@InitScript-->

at the bottom of your Maps template.

 

Votes for this answer: 1

 

You must be logged in to post in the forum