6、使用infowindow
来源:互联网 发布:前端开发必备软件 编辑:程序博客网 时间:2024/06/16 11:30
ESRI公司提供的infowindow既美观用实用,而且可定制性强,是时时获取信息的好窗口,用好它可以使工作量大大的减少。
他的使用方法介绍如下:
1、 主要属性
Property
Type
Description
anchor
String
Placement of the InfoWindow with respect to the graphic. See the Constants table for values.
Infowindow的显示位置,具体请看其“常量“设置
coords
Point
The anchor point of the InfoWindow in screen coordinates.
信息窗口所在的坐标点
fixedAnchor
String
InfoWindow always show with the specified anchor. See the Constants table for values.
指定的显示位置
isShowing
Boolean
Determines whether the InfoWindow is currently shown on the map.
判断信息窗口的显示状态
2、 常量:
ANCHOR_LOWERLEFT
窗口位于点的左下
ANCHOR_LOWERRIGHT
InfoWindow is anchored to the lower right of the point. 右下
ANCHOR_UPPERLEFT
InfoWindow is anchored to the upper left of the point.左上
ANCHOR_UPPERRIGHT
InfoWindow is anchored to the upper right of the point.右上
3、 方法:
Method
Return Value
Description
hide()
none
隐藏信息窗口
move(point)
none
Moves the InfoWindow to the specified screen point.
移动信息框到指定点
resize(width, height)
none
Resizes the InfoWindow to the specified height and width in pixels.改变信息框大小
setContent(stringOrDOMNode)
InfoWindow
Sets the content in the InfoWindow.设置信息窗口的内容
setFixedAnchor(anchor)
none
Sets the fixed location of the InfoWindow anchor. Valid values are listed in the Constants table.设置显示位置
Anchor参数为上面的常量类型
setTitle(title)
InfoWindow
Sets the title for the InfoWindow.
设置窗口的标题
show(point, anchor)
none
Shows the InfoWindow at the specified screen point and anchor. Valid values are listed in the Constants table.
显示信息框(位置点,位置)
4、 事件:
onHide()
隐藏窗口时的事件
onShow()
显示窗口时的事件
5、 使用实例:
function infowindow(evt)
{
map.infoWindow.setTitle("Coordinates");
map.infoWindow.setContent("lat/lon : " + evt.mapPoint.y + ", " + evt.mapPoint.x +
"<br />screen x/y : " + evt.screenPoint.x + ", " + evt.screenPoint.y);
map.infoWindow.show(evt.screenPoint,map.getInfoWindowAnchor(evt.screenPoint));
}
map.getInfoWindowAnchor(evt.screenPoint):为获取系统建议的显示位置,这样写可以使窗口尽量显示在屏幕中最佳位置!!
- 6、使用infowindow
- 使用RelativeLayout代替Infowindow
- InfoWindow 使用介绍
- ESRI使用infowindow
- 百度地图3.2.0InfoWindow使用总结
- 百度地图覆盖物Marker与infoWindow的使用
- android 百度地图API 使用Marker和InfoWindow
- 使用google map显示地图,并标注InfoWindow
- 使用百度地图BMap.InfoWindow,分别显示不同的信息窗口
- Android 百度地图 SDK v3.0.0 (三) 添加覆盖物Marker与InfoWindow的使用
- Android 百度地图 SDK v3.0.0 (三) 添加覆盖物Marker与InfoWindow的使用
- Android 百度地图 SDK v3.0.0 (三) 添加覆盖物Marker与InfoWindow的使用
- Android 百度地图 SDK v3.0.0 (三) 添加覆盖物Marker与InfoWindow的使用
- Android 百度地图 SDK v3.0.0 (三) 添加覆盖物Marker与InfoWindow的使用
- Android 百度地图 SDK v3.0.0 (三) 添加覆盖物Marker与InfoWindow的使用
- 【百度地图】 SDK v3.0.0 (三) 添加覆盖物Marker与InfoWindow的使用
- Android 百度地图 SDK v3.0.0 (三) 添加覆盖物Marker与InfoWindow的使用
- Android 百度地图 SDK v3.0.0 (三) 添加覆盖物Marker与InfoWindow的使用
- button与submit的使用
- struts.xml常用配置解析
- 堆栈--程序的存储分配
- SQL数据库管理系统的优化方案(表的主键、外键、索引设计)
- C#异步委托概述(一)
- 6、使用infowindow
- 偶然间碰到了一个vc的一个bug,太有意思了
- undefined method `paginate' 安装了will_paginate还报这个错误
- websphere6.1升级
- 流程管理信息化对于企业管理体系整合与优化的价值
- 开发定制标签库-1
- 开发定制标签库-2
- SQL语句导入导出大全
- 开发定制标签库-3