google earth开发(三)鼠标事件处理
来源:互联网 发布:国家标准人体尺寸数据 编辑:程序博客网 时间:2024/04/29 04:19
一般我们会对地标做鼠标事件的处理
主要的事件如下:
click --点击鼠标
mousedown --按下鼠标左键
mouseup --弹起鼠标按键
mouseover --鼠标移入
mouseout --鼠标移出
还有其他事件,参考earth api
(1)定义事件处理函数
google.earth.addEventListener(ge.getWindow(), 'mousedown', eventAction(event)) ;
(2)事件处理函数
function eventAction(event)
{
}
(3)屏蔽缺省事件
地标mousedown、mouseover的缺省处理是弹出球(ballon)。
event.preventDefault(); //屏蔽缺省处理方式
(4)判断事件发生在哪个地标
if (event.getTarget().getType() == 'KmlPlacemark' &&
event.getTarget().getGeometry().getType() == 'KmlPoint') {
var placemark = event.getTarget();
if( placemark.getName() == ‘北京’)
{
........
}
}
- google earth开发(三)鼠标事件处理
- C# 调用 Google Earth Com API开发(三)
- 转:C# 调用 Google Earth Com API开发(三)
- google earth 开发(一)
- Google Earth VS2008开发
- Google Earth web开发
- google earth开发
- Google Earth与ArcGIS数据交互(三)
- google earth开发 (四) 球(ballon)
- C# 调用 Google Earth Com API开发(二)
- C#调用Google Earth COM API开发(一)
- C# 调用 Google Earth Com API开发(二)
- C# 调用 Google Earth Com API开发(四)
- 转:C# 调用 Google Earth Com API开发(四)
- google earth开发(七)KML加载和清除方法
- Google Earth Engine(GEE)学习笔记 三
- 基于GOOGLE EARTH 开发线路设计系统
- Google Earth Com API开发资料3
- 8个常用的字符串哈希函数
- Asp.Net+Jquery.Ajax详解6-$.ajaxSetup
- Asp.net中使用水晶报表
- 如何判断是否开启超线程
- 收集统计信息
- google earth开发(三)鼠标事件处理
- android-多线程设计wait、notify、notifyall、synchronized的使用机制 - 随心
- poj1716 Integer Intervals
- google earth开发 (四) 球(ballon)
- cocos2d-html5教程之重要概念
- mongodb_查询操作使用_条件查询、where子句等
- google earth开发(五) 两点之间画线(显示地球曲线)
- vnc
- 以前的想法——swf加密