OpenLayers部分方法事件

一、设置中心坐标
map.setCenter(point, zoom);
二、删除标记
markers.removeMarker(marker);
三、移动标记
marker.moveTo(map.getLayerPxFromViewPortPx(e.xy));
四。获取中心坐标
map.getCenter();
五、获取扩大倍数
map.getZoom();
六、地图添加单击时间
map.events.register("click", null, move);
七、地图取消单击时间
map.events.unregister("click", null, move);
八、标记添加鼠标移动时间
marker.events.register("mousemove", feature, markerMove);
九、标记添加鼠标移动时间
marker.events.register("mouseout", feature, function markerOut(){map.removePopup(popup);});
十、获取当前坐标
map.getLonLatFromPixel(e.xy).transform(new OpenLayers.Projection("EPSG:900913"),new OpenLayers.Projection("EPSG:4326"));
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值