One issue I encountered on my website was that when I included an iframe
, the map would zoom in and out while scrolling. To try to fix this, I set pointer-events
to none
. However, this caused all actions on the map to be disabled, making it impossible to navigate properly!
Here is the HTML code for the map:
<div class="map">
<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d29618050.62001087!2d63.250335576086215!3d25.017620133523653!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x30635ff06b92b791%3A0xd78c4fa1854213a6!2sIndia!5e0!3m2!1sen!2sin!4v1450871870014" width="600" height="450" frameborder="0" style="border:0" allowfullscreen></iframe>
</div>
And here is the CSS code that caused the problem:
.map iframe {pointer-events: none;}