我正在编写一个应用程序,该应用程序将使用 javascript api 显示新闻项目在 Google 地球中的位置。这很有效,但我们希望防止用户手动拖动地球仪。
我知道谷歌地图有一个函数disableDragging可以完成这个任务,但是在Earth api中我找不到类似的函数。
我还尝试在 GE 容器上放置一个(几乎)透明的 div,但任何具有非实心背景的 div 都会消失在容器上。
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)
Api 中有一个标准方法可以禁用地球仪的鼠标控制。
以下是工作示例。
我不是 100% 确定“GE 容器上的透明 div”是什么意思,但可能是 iframe shim 技术 是您正在寻找的吗?
There is a standard method in the Api to disable mouse control of the globe.
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?