类名 Global

成员变量

# constant canvasProto

L.Canvas

# constant divOverlayProto

L.DivOverlay

# constant domUtilProto

L.DomUtil

# constant gridLayerProto

L.GridLayer

# constant ImageOverlay

L.ImageOverlay

# constant mapProto

L.Map

# constant markerProto

L.Marker

# constant popupProto

L.Popup

# constant rendererProto

L.Renderer

# constant tooltipProto

L.Tooltip

方法

# _adjustClusterOrMarkerStatus(marker, rbush, zoom)

参数:

名称 类型 描述
marker *
rbush *
zoom *
*

# _animationCreateMarkerIcon(nm)

参数:

名称 类型 描述
nm *
*

# _calcAdjustPoint(rbush, point, rbushItem, cell)

参数:

名称 类型 描述
rbush *
point *
rbushItem *
cell *
*

# _calcRotateOffset()

*

# _getAdjustPoint(p1, p2, cell)

参数:

名称 类型 描述
p1 *
p2 *
cell *
*

# _getClippingAreaPx()

计算裁剪区几何对象并缓存

裁剪区几何对象

Array.<Object> | null

# _getLevelValue(level)

获取level

参数:

名称 类型 描述
level Number
String

# _initCRS()

*

# _isValidTile(coords)

参数:

名称 类型 描述
coords *
*

# _isValidTileZoom(tileZoom)

参数:

名称 类型 描述
tileZoom *
*

# _resetGrid()

*

# _setZoomTransform(level, center, zoom)

参数:

名称 类型 描述
level *
center *
zoom *

地图的zoom

*

# _tileCoordsToBounds(coords)

参数:

名称 类型 描述
coords *
*

# _tileCoordsToNwSe(coords)

参数:

名称 类型 描述
coords *
*

# _toMapZoom(zoom)

参数:

名称 类型 描述
zoom *
*

# _toTileZoom(zoom)

参数:

名称 类型 描述
zoom *
*

# _toTurfGeometry(geojson)

获取turf几何体

参数:

名称 类型 描述
geojson Object

geojson对象

turf几何对象

Array.<Geometry>

# _updateLevels()

*

# buildRequestImageSrc()

构建图片Src地址

请求对象

Promise

# buildRequestImageSrc(url)

构建图片Src地址

参数:

名称 类型 描述
url String

服务基地址

请求对象

Promise

# buildRequestImageSrc(url, params)

构建图片Src地址

参数:

名称 类型 描述
url String

服务基地址

params Object

需要请求地址后面拼接的参数

请求对象

Promise

# buildRequestImageSrc()

构建图片Src地址

请求对象

Promise

# buildRequestParamsObject()

构建请求参数对象

请求对象

Promise

# convertClusterSymbol(symbol)

参数:

名称 类型 描述
symbol *
*

# convertFeature(feature)

转换要素为几何图形

参数:

名称 类型 描述
feature Feature
*

# createGraphic(type, coords, style)

根据类型创建marker

参数:

名称 类型 描述
type *
coords *
style *
*

# createTile(coords, done)

创建瓦片图片对象

参数:

名称 类型 描述
coords Object

瓦片行列号对象

done function

绘制完成的回调函数

瓦片图片对象

Image

# findClusterInfo(clusterInfos, value)

参数:

名称 类型 描述
clusterInfos *
value *
*

# fixPosition()

拖动的时候和放大缩小的时候自定义图层不见得会和地图的像素坐标同步计算 因此再绘制自定义图层的时候需要重新计算对应的位置,这里主要是对齐左上角

# getBoundByExtent(extent)

根据common的Extent计算出Leaflet的范围对象

参数:

名称 类型 描述
extent Extent

范围对象

Leaflet的范围对象

L.latLngBounds

# getBounds(layer)

获取地图范围,仅在4326相关坐标系下生效,其他坐标系在地图视图的坐标系中设置了范围

参数:

名称 类型 描述
layer Object

基础图层对象

leaflet的范围对象

Object

# getClippingArea()

GeoJSON对象

Object

# getCrsOptionsByLayer(layer)

参数:

名称 类型 描述
layer *
*

# getMapImageLayerOptions(layer)

获取地图图片图层的初始化参数

参数:

名称 类型 描述
layer IGSMapImageLayer

IGSMapImageLayer对象

地图图片图层的初始化参数

Object

# getMapRotateBounds(leafletMap)

参数:

名称 类型 描述
leafletMap *
*

# getParamsString(params)

获取请求参数链接,空值的请求参数不会出现在链接中

参数:

名称 类型 描述
params Object

请求参数

请求参数链接字符串

String

# getPixelWorldBounds(zoom)

参数:

名称 类型 描述
zoom *
*

# getScaleZoom(scale, fromZoom)

参数:

名称 类型 描述
scale *
fromZoom *
*

# getSpatialReferenceFromCRS(crs)

通过L.CRS获取SpatialReference对象

参数:

名称 类型 描述
crs Object

L.CRS对象

SpatialReference对象

SpatialReference | null

# getTextByLabelSymbolExpression(textExpressionEx, clusterCount)

参数:

名称 类型 描述
textExpressionEx Expression

数值表达式解析器

clusterCount Number
*

# getTileUrl(coords)

构造并获取瓦片请求的URL

参数:

名称 类型 描述
coords Object

瓦片行列号对象

瓦片请求的URL

string

# getTileUrl(coords)

构造并获取瓦片请求的URL

参数:

名称 类型 描述
coords Object

瓦片行列号对象

瓦片请求的URL

String

# getTileUrl(coords)

构造并获取瓦片请求的URL

参数:

名称 类型 描述
coords Object

瓦片行列号对象

瓦片请求的URL

String

# getTileUrl(coords)

重写父类的获取出图地址方法

参数:

名称 类型 描述
coords object

瓦片行列号对象

# getTileUrl(coords)

获取瓦片的请求地址

参数:

名称 类型 描述
coords Object

当前地图中心点

当请求类型为get时返回请求地址,当请求类型为post时返回的时post的请求参数对象

String | Object

# getTileUrl(coords)

获取瓦片的请求地址

参数:

名称 类型 描述
coords Object

当前地图中心点

当请求类型为get时返回请求地址,当请求类型为post时返回的时post的请求参数对象

String | Object

# getTileUrl(coords)

构造并获取瓦片请求的URL,重写父类的方法

参数:

名称 类型 描述
coords Object

瓦片行列号对象

瓦片请求的URL

string

# getTileUrl(coords)

构造并获取瓦片请求的URL

参数:

名称 类型 描述
coords Object

瓦片行列号对象

瓦片请求的URL

string

# getTileUrl(coords)

构造并获取瓦片请求的URL

参数:

名称 类型 描述
coords Object

瓦片行列号对象

瓦片请求的URL

String

# getValueByValueExpression()

*

# getZoomScale(toZoom, fromZoom)

参数:

名称 类型 描述
toZoom *
fromZoom *
*

# initialize(url, options)

初始化函数

参数:

名称 类型 描述
url String

服务基地址

options Object

额外构造参数

# initializeCRS(layer, allLayers)

使用图层对象来构造Leaflet视图的CRS参数对象

参数:

名称 类型 描述
layer Layer

参考图层,使用其裁图原点、地图范围、级数和分辨率来构造CRS参数对象,支持ArcGISMapImageLayer、ArcGISTileLayer、ArcGISVectorTileLayer、 IGSFeatureLayer、IGSMapImageLayer、IGSTileLayer、MapGISVectorTileLayer、WMSLayer、WMTSLayer、WFSLayer、WebTileLayer

allLayers Array.<Layer>

可选参数,当需要在地图视图中,叠加多个裁图原点相同,裁图方案不同的图层时,可使用此参数,使用多个图层来构配合参考图层构造CRS参数对象

Leaflet视图的CRS参数

Object

# onAdd()

leaflet修改说明:GridLayer上支持同空间参考系不同裁图方式瓦片的叠加,因改动范围较大,将内核库内重写的代码全部放置在此注释段内 此部分统改的包含两部分 1、投影关系的改变,采用瓦片独立的像素系 map.project => this.project map.unproject => this.unproject 2、视图zoom层级的改变,把触发视图刷新入口的地图zoom换算成当前zoom this._toMapZoom this._toTileZoom 修改人:赵凯 2024年5月17日 ------------------------- 同空间参考系不同裁图方式扩展 ------------------------------

# onAdd(map)

图层添加事件

参数:

名称 类型 描述
map L.map

leaflet地图视图对象

# project(latlng, zoom)

参数:

名称 类型 描述
latlng *
zoom *
*

# 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

# setClippingArea(图层空间裁剪区域,需要传入geojson对象。仅支持多多边形裁剪、多边形裁剪。)

参数:

名称 类型 描述
图层空间裁剪区域,需要传入geojson对象。仅支持多多边形裁剪、多边形裁剪。 Object
*

# setClippingArea(图层空间裁剪区域,需要传入geojson对象。仅支持多多边形裁剪、多边形裁剪。)

参数:

名称 类型 描述
图层空间裁剪区域,需要传入geojson对象。仅支持多多边形裁剪、多边形裁剪。 Object
*

# setVisible(visible)

参数:

名称 类型 描述
visible Boolean

图层是否可见

*

# setZIndex(index)

参数:

名称 类型 描述
index Number
*

# unproject(point, zoom)

参数:

名称 类型 描述
point *
zoom *
*

# wrapLatLngBounds(latlng)

参数:

名称 类型 描述
latlng *
*

类型定义

# complete(result)

绘制完成的回调函数

参数:

名称 类型 描述
result Object

回调参数

type String

几何类型

feature Feature

绘制完成后返回的要素对象

drawConfig Object

绘制配置

构造函数
成员变量
方法
事件