I’m using this snippet: https://github.com/bastianallgeier/kirbycms-extensions/blob/master/snippets/map/readme.mdown
But it seems like the map is locked into a measurement. I would like to make it both responsive and also disable the scroll to avoid getting caught in it when scrolling the page or in touch-screen devices.
Any advice? Thanks a lot!
Are you still on Kirby 1? The snippet you mentioned is deprecated and was reported not to work anymore without changes, see this post. Pls. refer to the docs of the new Google Maps API mentioned in that post.
Hi there! No i’m on Kirby 2. I did the two-line code change proposed here and had it working quite nicely. I didn’t realize, however that the disabling the zoom on scroll and making it responsive could be related to which method I used to import the map.
I will continue trying! Thanks for the feedback.
To make the snippet responsive, just change to px values in the snippet to percentages in lines 24/25:
elem.style.width = options.width + '%';
elem.style.height = options.height + '%';
To prevent zooming, add this line after line 38:
That works perfectly! Thank you for your help!!