Disabling user interaction for the Google Earth plugin

583 views Asked by At

I'm putting together an app that will show a news item's location in Google Earth using the javascript api. This is working great but we want to prevent users from manually dragging the globe around.

I know for Google Maps there is a function disableDragging which accomplishes this, but in the Earth api I could find no similar function.

I also tried placing a (nearly) transparent div over the GE container but any div with a non-solid background disappears over the container.

1

There are 1 answers

1
Fraser On BEST ANSWER

There is a standard method in the Api to disable mouse control of the globe.

// where ge is an instance of the plugin object 
ge.getOptions().setMouseNavigationEnabled(false);

Here is a working example.

I am not 100% sure what you mean with 'transparent div over the GE container' but perhaps the iframe shim technique is what you are looking for?