Ecommerce Shopify WordPress Discussion

Two finger scroll on a Leaflet map in WordPress

I am redesigning a page for a client and they use a Leaflet map created in R, after which it was exported in .html format. I was able to simply upload this .html file in Wordpress as a media file and then embed the map with iframe element on a page. It all works, however, I would like to implement a behavior both on desktop and mobile devices where on desktop the map ignores the mouse scroll wheel and a user is is prompted to use ctrl+scroll to zoom the map. On mobile devices, users should be prompted to use two fingers to pan the map. This is the effect I am after: I've tried adding the code below but it doesn't seem to work. Probably because I only have .html format of the leaflet map and it's embedded as an iframe element. L.map('map', { dragging: !L.Browser.mobile, tap: !L.Browser.mobile }) Run code snippetExpand snippet Any ideas how I can make it work, bearing in mind that I only have access to the .html file that the leaflet map was exported in. I could add some javascript in Wordpress but that's about it.
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.