Answer the question
In order to leave comments, you need to log in
How to disable scrolling on map inserted via iframe (by google)?
There is an inserted map in the markup via an iframe (created on google maps) and reacts to scrolling.
When you scroll to it, the mouse switches to it and starts scrolling it, instead of moving normally. But at the same time, without superimposing a stupid layer on top, but leaving the opportunity to "drag" the map with the button held down and zoom in through the buttons.
Answer the question
In order to leave comments, you need to log in
Actually, you can do it in a slightly different way. Using the Google Maps API.
You can look here stackoverflow.com/questions/2330197/how-to-disable...
Or, for example, I did something like this:
google_maps(); // Load google maps onload page
function google_maps() {
var latlng = new google.maps.LatLng(55.736812,37.617574);
var settings = {
zoom: 16,
center: latlng,
mapTypeControl: true,
mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
scrollwheel: false,
disableDoubleClickZoom: true,
navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map"), settings);
var myLatlng = new google.maps.LatLng(55.736812,37.617574);
var myOptions = {
zoom: 16,
center: myLatlng,
scrollwheel: false,
disableDoubleClickZoom: true,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
You can pervert and put a transparent div on top of the iframe, but then the map cannot be controlled at all. Well, although you can get even more perverted and click on the transparent div to remove it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question