Skip to content

Instantly share code, notes, and snippets.

@ahaywood
Created August 26, 2016 03:57
Show Gist options
  • Save ahaywood/8c312e92f97374f8b487e4ba429916ca to your computer and use it in GitHub Desktop.
Save ahaywood/8c312e92f97374f8b487e4ba429916ca to your computer and use it in GitHub Desktop.
Disable scroll zoom on embedded Google Maps
<div class="overlay" onClick="style.pointerEvents='none'"></div>
<iframe src="https://mapsengine.google.com/map/embed?mid=some_map_id" width="640" height="480"></iframe>
.overlay {
background:transparent;
position:relative;
width:640px;
height:480px; /* your iframe height */
top:480px; /* your iframe height */
margin-top:-480px; /* your iframe height */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment