成员变量
方法
# _toMercGeometry(polygon)
获取合并后的点集
参数:
名称 | 类型 | 描述 |
---|---|---|
polygon |
Array.<Array.<Array.<Number>>> | 面 |
计算像素坐标系点
Array.<Array.<Array.<Number>>>
# fixPosition()
拖动的时候和放大缩小的时候自定义图层不见得会和地图的像素坐标同步计算 因此再绘制自定义图层的时候需要重新计算对应的位置,这里主要是对齐左上角
# getBounds(layer)
获取地图范围,仅在4326相关坐标系下生效,其他坐标系在地图视图的坐标系中设置了范围
参数:
名称 | 类型 | 描述 |
---|---|---|
layer |
Object | 基础图层对象 |
leaflet的范围对象
Object
# refreshClusters(layers)
Updates the icon of all clusters which are parents of the given marker(s). In singleMarkerMode, also updates the given marker(s) icon.
参数:
名称 | 类型 | 描述 |
---|---|---|
layers |
L.MarkerClusterGroup|L.LayerGroup|Array(L.Marker)|Map(L.Marker)| L.MarkerCluster|L.Marker (optional) list of markers (or single marker) whose parent clusters need to be updated. If not provided, retrieves all child markers of this. |
L.MarkerClusterGroup
# refreshIconOptions(options, directlyRefreshClusters)
Updates the given options in the marker's icon and refreshes the marker.
参数:
名称 | 类型 | 描述 |
---|---|---|
options |
map object of icon options. |
|
directlyRefreshClusters |
boolean (optional) true to trigger MCG.refreshClustersOf() right away with this single marker. |
L.Marker
类型定义
# complete(result)
绘制完成的回调函数
参数:
名称 | 类型 | 描述 |
---|---|---|
result |
Object | 回调参数 |
type |
String | 几何类型 |
feature |
Feature | 绘制完成后返回的要素对象 |
drawConfig |
Object | 绘制配置 |