H.Banken
(H.Banken)
August 14, 2014, 4:01pm
1
I use a map-action on on my page and have the following problem:
If you scroll the page and the cursor runs into the map, scrolling stops and the map zooms in/out.
How can I stop this (zoom) behavior? (Zoom only with ± Button)
Thanks
Hubert
http://www.ivitu.de/Tour.html#a2
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
Tim_Plumb
(Tim Plumb)
August 14, 2014, 5:19pm
2
Leaflet has a tonne of options that haven’t made it into the Action I suspect to keep the Action easy to work with.
Try adding the following code to the end of your page using Page > HTML Markup > Before ;
<script>
osm_Karte1.scrollWheelZoom.disable();
</script>
This assumes the name of your map remains ‘osm_Karte1’.
Here’s an example;
https://dl.dropboxusercontent.com/u/795566/test/leaflet-map.html
Regards,
Tim.
On 14 Aug 2014, at 17:01, H.Banken wrote:
How can I stop this (zoom) behavior? (Zoom only with ± Button)
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
H.Banken
(H.Banken)
August 14, 2014, 6:46pm
3
Thank you Tim,
your script works fine.
But not with the HTML markup, because it isn’t the last entry.
The last is in this case the leaflet script.
Hubert
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
Tim_Plumb
(Tim Plumb)
August 14, 2014, 7:02pm
4
I suspected that the Action may add the code after your markup item. Try adding this code in Page > HTML Markup > Before in place of that last code;
<script>
function leafletnoscroll(){
osm_Karte1.scrollWheelZoom.disable();
}
</script>
Now go to Page > Extended > Add and add;
name: onload
value: leafletnoscroll()
Now when the page finishes loading the script should patch the map so that it doesn’t scroll;
https://dl.dropboxusercontent.com/u/795566/test/leaflet-map2.html
Regards,
Tim.
On 14 Aug 2014, at 19:46, H.Banken wrote:
But not with the HTML markup, because it isn’t the last entry.
The last is in this case the leaflet script.
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options
H.Banken
(H.Banken)
August 15, 2014, 7:18am
5
Thank you Tim,
this one works great.
Regards,
Hubert
freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options