Search code examples
javascriptjquerygoogle-maps-engine

Google Maps Engine - embedding problems


We're embedding a Google Maps Engine (not google maps) and we're having some problems with the following:

  • Opening links in a new window
  • Disabling the scroll wheel when embedding the map (using an iframe)
  • Collapsing the key by default

The only viable option to embed the map seems to be using an iframe, unlike Google Maps which uses a javascript API. The most critical of the items above is the ability to disable the scroll wheel zoom when scrolling the page. Is anyone aware of a way to control this in Google Maps Engine or perhaps a workaround using jQuery or similar?

Effectively we want to disable the scroll wheel whenever the cursor is over the iframe:

setInterval(function(){
if($("#map-iframe").is(":hover")) {
   $("#map-iframe").css("pointer-events:none" );
}
}, 200);

That's not working but even if it was I don't think it's right.

Any thoughts?

Many thanks


Solution

  • If you need additional customization over the default iframe embed, you should use the Google Maps JS API, and the MapsEngineLayer to display your GME data.