How can I disable scroll on an embedded Google Maps iframe in Webflow?

TL;DR
  • Copy and modify Google Maps embed code iframe, adding scrollwheel="no" and optionally gestureHandling="none".
  • Embed modified code in Webflow via Embed Component, preview, and test to ensure scrolling is disabled.

To disable scroll on an embedded Google Maps iframe in Webflow, you'll need to adjust the iframe parameters. This prevents users from inadvertently zooming or moving the map using their scroll wheel.

1. Add Google Maps Embed Code

  • Copy the Google Maps embed code with the iframe source where you want the map to appear.
  • If you don't have the embed code, go to Google Maps, find your desired location, click on Share, and choose Embed a map.

2. Modify the iframe Parameters

  • Add scrollwheel="no" to your iframe tag parameters to disable scroll.
  • Additionally, you can incorporate gestureHandling="none" for setting fixed map control.

3. Implement Changes in Webflow

  • Go to the page in Webflow where you want the map embedded.
  • Select the Embed Component from the Add Elements panel.
  • Paste the modified iframe code into the Embed Code Editor.
  • Make sure to publish the changes for them to take effect.

4. Preview and Test

  • Preview your Webflow site and navigate to the page containing the embedded map.
  • Test the page to ensure scrolling is disabled, preventing map manipulation via scroll wheel.

Summary

To disable scroll on a Google Maps iframe embedded in Webflow, adjust the parameters in the iframe code, incorporating scrollwheel="no" and potentially gestureHandling="none", then integrate it via Webflow's Embed Component. Make sure to test your web page to ensure the settings work as intended.

Rate this answer

Other Webflow Questions