Global

Members

(constant) CItemTypeNumber

统计分段类型

Properties:
Name Type Default Description
Unknown Number 0

未知类型

UniqueTheme Number 1

唯一值

RangeTheme Number 2

范围

(constant) CLinAdjustTypeNumber

线型调整方法枚举

Properties:
Name Type Default Description
Adjust Number 0

调整

NoAdjust Number 1

不调整

(constant) CLinHeadTypeNumber

线头类型枚举定义

Properties:
Name Type Default Description
Round Number 0

圆头

Square Number 1

平头

Butt Number 2

尖头

(constant) CLinJointTypeNumber

线拐角类型枚举

Properties:
Name Type Default Description
Round Number 0

圆角

Square Number 1

平角

Butt Number 2

尖角

(constant) CLinStyleMakeTypeNumber

线型生成方法

Properties:
Name Type Default Description
Byrule Number 0

规律性生成线型

Bypoint Number 1

按控制点生成线型

(constant) CoordnateTransform

提供了百度坐标(BD-09)、国测局坐标(火星坐标,GCJ-02)、和 WGS-84 坐标系之间的转换

(constant) EightDirTypeNumber

点八方位注记类型

Properties:
Name Type Default Description
East Number 0

North Number 1

NorthEast Number 2

东北

NorthWest Number 3

西北

South Number 4

SouthEast Number 5

东南

SouthWest Number 6

西南

West Number 7

西

NoDir Number 8

无方位

(constant) FeatureTypeNumber

要素几何类型

Properties:
Name Type Default Description
Unknown Number 0

未知类型

Pnt Number 1

Lin Number 2

线

Reg Number 3

(constant) FontShapeNumber

动态注记字形的类型

Properties:
Name Type Default Description
Positive Number 0

正体

LeftOblique Number 1

左斜

RightOblique Number 2

右斜

LeftTowering Number 3

左耸

RightTowering Number 4

右耸

(constant) ISShowArcNumber

是否显示弧段

Properties:
Name Type Default Description
Reg Number 0

只显示填充区域

Arc Number 1

只显示弧段

All Number 2

两者都显示

(constant) LabelLinTypeNumber

线的动态注记的线方位类型

Properties:
Name Type Default Description
Curved Number 0

弯曲注记

Forward Number 1

笔直注记

Horizontal Number 2

水平注记

Tangent Number 3

正交注记

(constant) LabelPntTypeNumber

点的动态注记的方位类型

Properties:
Name Type Default Description
PntAnyDir Number 0

任意方位

PntEightDir Number 1

八方位

PntOnFea Number 2

压点

(constant) LabelRegTypeNumber

区的动态注记的区方位类型

Properties:
Name Type Default Description
Curved Number 0

沿骨架线弯曲注记

Forward Number 1

沿骨架线笔直注记

Horizontal Number 2

水平注记

Boundray Number 3

边界线注记

Outside Number 4

区域外注记

(constant) LabelSpreadTypeNumber

注记分布的策略

Properties:
Name Type Default Description
AutoSpread Number 0

自动分布策略(全是数字或字符采用集中注记方式,注记中带有汉字采用分散分布注记)

Centralization Number 1

字符集中分布

Decentralization Number 2

字符分散分布

(constant) LayerStatusTypezondy.enum.Map.LayerStatusType

图层状态类型

Properties:
Name Type Default Description
Show zondy.enum.Map.LayerStatusType show

仅仅显示指定了图层序号的图层

Hide zondy.enum.Map.LayerStatusType hide

显示除hide参数指定图层外所有的图层

Include zondy.enum.Map.LayerStatusType include

除显示默认图层(地图文档内图层状态为可见的图层)外,另追加这些被指定的图层显示,追加的这些图层必须为地图中包含的图层。

Exclude zondy.enum.Map.LayerStatusType exclude

从默认图层列表里删除这些被指定的图层后,进行显示

(constant) LineConstrainNumber

偏离线约束

Properties:
Name Type Default Description
Left Number 0

注记在线的左边

Right Number 1

注记在线的右边

Above Number 2

注记在线的上方

Below Number 3

注记在线的下方

Both Number 4

注记在线的两边

NoRes Number 5

没有约束

(constant) MapTypeString

地图类型

Properties:
Name Type Default Description
Doc String mapType

发布的地图文档

Tile String tileType

发布的瓦片地图

(constant) MAX_SAFE_INTEGER

Used as references for various Number constants.

(constant) NetAnalyTypeString

网络分析类型

Properties:
Name Type Default Description
UserMode String UserMode

用户模式

SysModeCommwayPrefer String SysModeCommwayPrefer

系统模式--普通公路优先

SysModeHighWayPrefer String SysModeHighWayPrefer

系统模式--高速公路优先

SysModeMinCost String SysModeMinCost

系统模式--最少花费

SysModeMinDis String SysModeMinDis

系统模式--最短时间

SysModeSysRecommend String SysModeSysRecommend

系统模式--系统推荐

(constant) NetElemTypeNumber

网络元素类型

Properties:
Name Type Default Description
Node Number 1

节点元素

Edge Number 2

边元素

CNode Number 3

复杂结点元素

Chain Number 4

链元素

Center Number 5

中心元素

Source Number 13

Sink Number 13

(constant) reIsNative

Used to detect if a method is native.

(constant) RepeatTypeNumber

线重复注记策略

Properties:
Name Type Default Description
Auto Number 0

自动重复注记(当线长度超过注记长度的2倍时重复注记,否则不重复注记)

NoRep Number 1

从不重复注记

OnStep Number 2

分段注记

(constant) reRegExpChar

Used to match RegExp syntax characters.

(constant) VectClsTypeNumber String

矢量数据类型

Properties:
Name Type Default Description
Unknown Number | String 0

未知类型

SFCls Number | String SFeatureCls

简单要素类

AnnoCls Number | String AnnotationCls

注记类

(constant) XClsTypeString

数据类型

Properties:
Name Type Default Description
SFCls String SFeatureCls

简单要素类

OCls String ObjectCls

对象类

ACls String AnnotationCls

注记类

GnetCls String GNetCls

网络类

RDS String RasterDataset

栅格数据集

SFClsInfo String sfcls_new

简单要素类详细信息

Methods

_decorate(key, value, proto, createInstance, options){Object}

base/Evented.js, line 195

响应式属性传递方法定义

Name Type Description
key String
value any
proto Object

原型

createInstance function
options Object

包装器配置项

Returns:
Type Description
Object 实体

_isValueInClassBreakInfo(classBreakInfo, value, isLast){Boolean}

view/support/RendererUtil.js, line 359

判断value是否再分段范围内

Name Type Description
classBreakInfo Object

分段信息对象

value Number

要判断的值

isLast Boolean

是否是最后一个分段

Returns:
Type Description
Boolean value是否再分段范围内

allSettled(promises){Promise}

util/PromiseUtil.js, line 96
Name Type Description
promises Array.<Promise>
Returns:
Type Description
Promise

appendUrlParams(url, params)

document/layer/support/Utils.js, line 673

将参数添加到URL后面

Name Type Description
url String

服务地址

params Object

要添加的参数对象,{key1:value1,key2:value2}

BaiduProject(options)

base/BaiduProject.js, line 73

百度坐标投影变换

Name Type Description
options *

buildModuleUrl(relativeUrl){String}

util/BuildResourceUtils.js, line 67

Given a relative URL under the MapGIS base URL, returns an absolute URL.

Name Type Description
relativeUrl String

The relative path.

Returns:
Type Description
String The absolutely URL representation of the provided path.

calcExtent(coordinates, hasZ, type, spatialReference){Extent}

base/geometry/Utiles.js, line 155

计算并返回多边形的外包盒

Name Type Description
coordinates Array

坐标点

hasZ Boolean

是否是三维

type GeometryType

几何类型

spatialReference SpatialReference

坐标系

Returns:
Type Description
Extent 外包盒对象

calcGradientInStops(value, stops, func){*}

view/support/RendererUtil.js, line 123
Name Type Description
value *
stops *
func *
Returns:
Type Description
*

calcSpaceRatio(value, spaceMinValue, spaceMaxValue){*}

view/support/RendererUtil.js, line 102
Name Type Description
value *
spaceMinValue *
spaceMaxValue *
Returns:
Type Description
*

compareObject(sourceObj, compareObj){Boolean}

util/Utils.js, line 740

比较对象是否相等(不包括Symbol属性)

Name Type Description
sourceObj *
compareObj *
Returns:
Type Description
Boolean 对象是否相等

converServerArcGISFeatureToMapGISFeature(features, options){Array.<Object>}

service/Utils.js, line 2084

将ArcGIS服务端返回的要素数组转换成MapGIS服务端格式的要素数组

Name Type Description
features Array.<Object>

ArcGIS服务端返回的要素数组

options Object

额外参数

Name Type Description
geometryType String 可选

ArcGIS几何类型

spatialReference Object 可选

ArcGIS的坐标系对象

Returns:
Type Description
Array.<Object> MapGIS服务端格式的要素数组

convertByDateUnit(value, inDateUnit, outDateUnit){Number}

util/DateUtil.js, line 43
Name Type Description
value Numebr

输入的时间数值

inDateUnit String

输入的时间单位

outDateUnit String

输出的时间单位

Returns:
Type Description
Number

convertDataSource(dataSource){Promise.<FeatureSet>}

base/feature/support/Utils.js, line 170
Name Type Description
dataSource String

GeoJSON、TopoJSON等

Returns:
Type Description
Promise.<FeatureSet>

convertGeometryToArcGISGeometryObject(geometry){Object}

service/igs/support/FeatureRequestParamUtils.js, line 36

将geometry转为ArcGIS Objects对象,参考https://services.arcgisonline.com/arcgis/help/en/rest/services-reference/enterprise/geometry-objects/

Name Type Description
geometry Geometry

支持的类型 Point|MultiPoint|LineString|MultiLineString|Extent|Polygon

Returns:
Type Description
Object {geometryType:String, geometry:String|Object}

convertGeometryToIGSGeometryObject(geometry, version, support3d, options){Object}

service/igs/support/FeatureRequestParamUtils.js, line 129

将geometry转换为IGS几何过滤参数

Name Type Description
geometry Geometry

Point|LineString|Circle|Extent|Polygon|MultiPolygon几种类型

version String

默认为2.0

support3d Boolean

默认为false

options Object
Name Type Description
distance Number 可选

当igs版本为1.0时,需要传入此参数

Returns:
Type Description
Object {geometryType:String, geometry:String|Object}

convertIGSClippingString(geometry){*}

service/Utils.js, line 2046
Name Type Description
geometry *
Returns:
Type Description
*

convertImageSourceToBase64(url){String}

util/Utils.js, line 662
Name Type Description
url Object | String

支持Image、HTMLCanvasElement、SVGElement、Svg字符串、基础图像地址、相对路径等

Returns:
Type Description
String base64字符串

convertOutStatisticToArcGISStatisticObject(outStatistic){Object}

service/igs/support/FeatureRequestParamUtils.js, line 296

将OutStatistic转换为ArcGIS统计对象

Name Type Description
outStatistic OutStatistic

OutStatistic对象

Returns:
Type Description
Object ArcGIS统计对象 {statisticType: String, onStatisticField: String, outStatisticFieldName: String}

convertOutStatisticToIGSV1Object(outStatistic, layerIndex){*}

service/igs/support/FeatureRequestParamUtils.js, line 328

将OutStatistic转换为IGS1.O统计对象

Name Type Description
outStatistic *
layerIndex *
Returns:
Type Description
*

convertQueryFeaturesDataToQueryFeaturesResult(data, version, options){QueryFeaturesResult}

service/igs/support/FeatureRequestParamUtils.js, line 375

转换返回的data为QueryFeaturesResult

Name Type Description
data Object | String | JSON
version String

1.0 2.0 arcgis

options QueryFeauresOptions
Returns:
Type Description
QueryFeaturesResult

convertQueryFeaturesInLayersDataToQueryFeaturesResult(data, version, options){QueryFeaturesResult}

service/igs/support/FeatureRequestParamUtils.js, line 443

转换返回的data为QueryFeaturesResult

Name Type Description
data Object | String | JSON
version String

1.0 2.0 arcgis

options QueryFeaturesInLayersOptions
Returns:
Type Description
QueryFeaturesResult

convertSpatialReferenceToIGSString(spatialReference, version){String}

service/igs/support/FeatureRequestParamUtils.js, line 344

转换SpatialReference对象为IGS字符串

Name Type Description
spatialReference SpatialReference
version String
Returns:
Type Description
String

convertSpatialRelationToArcGISSpatialRel(spatialRelation){String}

service/igs/support/FeatureRequestParamUtils.js, line 240

转换spatialRelation为ArcGIS接受的参数

Name Type Description
spatialRelation SpatialRelation
Returns:
Type Description
String esriSpatialRelIntersects | esriSpatialRelContains | esriSpatialRelCrosses | esriSpatialRelEnvelopeIntersects | esriSpatialRelIndexIntersects | esriSpatialRelOverlaps | esriSpatialRelTouches | esriSpatialRelWithin | esriSpatialRelRelation

convertSpatialRelationToIGSV1Rule(spatialRelation){String}

service/igs/support/FeatureRequestParamUtils.js, line 266

转换spatialRelation为IGS1.0 rule接受的参数

Name Type Description
spatialRelation SpatialRelation
Returns:
Type Description
String

createCommonTileInfo(options){TileInfo}

document/layer/support/TileInfoUtil.js, line 560
Name Type Description
options Object

构造参数

Name Type Description
extent Extent

必传。图层范围

origin Extent

可选。裁图原点

tileSize Number

可选。瓦片大小,默认为256

numberOfMinLevelTilesX Number

可选。最小级别数x轴方向瓦片数量

minLevel Number

可选。最小级别数,默认为0级

maxLevel Number

可选。最大级别数,默认为19级

Returns:
Type Description
TileInfo

createLayer(json){*}

document/layer/Utils.js, line 167
Name Type Description
json *
Returns:
Type Description
*

createSublayer(json){*}

document/layer/Utils.js, line 287
Name Type Description
json *
Returns:
Type Description
*

createSublayerOptionsArr(sublayers, serverSublayerInfos, createSublayerOptions, getServerSublayers, extendOptions){*}

document/support/sublayerUtil.js, line 12

创建子图层构造参数数组

Name Type Description
sublayers Collection
serverSublayerInfos Array.<items>
createSublayerOptions function

构建子图层options的方法

getServerSublayers function

获取服务子图层

extendOptions Object

扩展参数

Returns:
Type Description
*

debounce(func, delay, context){function}

util/Utils.js, line 955

防抖函数

Name Type Description
func function
delay Number

毫秒

context Object

上下文

Returns:
Type Description
function

deepClone(value){Object}

util/Utils.js, line 319

深拷贝

Name Type Description
value

被拷贝的对象

Returns:
Type Description
Object 深拷贝后的对象

defined(value){Boolean}

util/Utils.js, line 198
Name Type Description
value *

The object.

Returns:
Type Description
Boolean Returns true if the object is defined, returns false otherwise.

editFeatureByArc3(feature){Feature}

base/geometry/Utiles.js, line 106

通过三点弧段改造要素几何,打散成离散点

Name Type Description
feature Feature

要素对象

Returns:
Type Description
Feature 改造后的要素对象

editGeometryByArc3(geometry, additional){Geometry}

base/geometry/Utiles.js, line 134

通过三点弧段改造几何对象,打散成离散点

Name Type Description
geometry Geometry

几何对象

additional Object

额外参数

Returns:
Type Description
Geometry 改造后的几何对象

extend(destination, source){Object}

util/Utils.js, line 11

将目标对象的值给元对象

Name Type Description
destination Object

源对象

source Object

目标对象

Returns:
Type Description
Object 源对象

flatServerSublayerInfos(serverSublayerInfos, exportArr){*}

document/layer/Utils.js, line 146
Name Type Description
serverSublayerInfos Array
exportArr Array
Returns:
Type Description
*

formatFieldAttToFields(FieldAtt)

document/layer/Utils.js, line 523

将FieldAttT转化为Fields对象,并返回Fields对象,Fields是IGS2.0参数

Name Type Description
FieldAtt Object

字段列表参对象,IGS1.0参数

generateTileInfo(extent, tileSize, spatialReference){*}

document/layer/support/TileInfoUtil.js, line 392
Name Type Description
extent Extent
tileSize Number
spatialReference SpatialReference
Returns:
Type Description
*

getAllStyleLayers(){*}

document/layer/baseLayer/VectorTileSubLayer.js, line 13

获取此图层的所有styleLayers

Returns:
Type Description
*

getCrsOptions(layer, validLayers, options)

view/support/MapViewUtils.js, line 125

获取Crs的构造参数

Name Type Description
layer Layer

参考图层

validLayers Array.<Layer>

和参考图层坐标系相同的图层组成的数组

options Object

额外构造参数

Name Type Description
fullExtent Object 可选

地图视图范围

getCrsOptionsBySpatialReference(spatialReference, extent, tileInfo, 根据空间参考系获取Crs的构造参数)

view/support/MapViewUtils.js, line 95

根据空间参考系获取Crs的构造参数

Name Type Description
spatialReference SpatialReference

空间参考系

extent Extent

显示范围

tileInfo TileInfo 可选

瓦片裁图信息

根据空间参考系获取Crs的构造参数 Object

getDefaultSymbolByGeometryType(geometryType){Symbol}

document/layer/Utils.js, line 430

根据几何类型获取符号

Name Type Description
geometryType String
Returns:
Type Description
Symbol

getDoc(xml)

service/Utils.js, line 574

获取XML的DOM对象

Name Type Description
xml

xml字符串对象

Returns:
string

getExtentBySubLayers(subLayers){Extent|null}

document/layer/support/Utils.js, line 861

通过子图层列表获取范围

Name Type Description
subLayers Array.<SubLayer>
Returns:
Type Description
Extent | null

getFeatureSetFromServerData(options){FeatureSet}

service/Utils.js, line 2233

将服务端返回的要素数据转化为common库的FeatureSet对象

Name Type Description
options Object

构造参数

Name Type Description
serverData Object 可选

服务端返回的数据

igsType String 可选

IGS版本号

outSrs String 可选

输出几何空间参照系,仅IGS2.0服务有效,如果服务端没有返回输出几何空间参照系,则使用查询参数中的输出几何空间参照系

Returns:
Type Description
FeatureSet common库的FeatureSet对象

getFeatureSetFromWFSXML(xmlDoc, originSpatialReference, targetSpatialReference, clientVersion, corporation, isReverseXY){FeatureSet}

service/Utils.js, line 1364

将WFS返回的XML解析为FeatureSet对象

Name Type Default Description
xmlDoc Object

xml的dom对象

originSpatialReference SpatialReference 可选

服务元数据的投影坐标系

targetSpatialReference SpatialReference originSpatialReference 可选

指定的投影坐标系名称

clientVersion String 可选

客户端设置的WFS服务版本号,如果未从服务返回的元信息中获取到WFS的服务版本号,则使用客户端设置的WFS服务版本号

corporation Corporation 可选

可选,WFS服务元的公司类型

isReverseXY Boolean 可选

可选,外部设置(例如WFS图层中设置)的是否反转经纬度参数

Returns:
Type Description
FeatureSet 要素集合对象

getFeaturesFromFeatureSet(featureSet){Array.<Feature>}

base/feature/support/Utils.js, line 47

从FeatureSet中获取要素数组

Name Type Description
featureSet FeatureSet

要素集合对象

Returns:
Type Description
Array.<Feature> 要素数组对象

getFullBaseUrl(layer){String}

document/layer/support/Utils.js, line 708

从基础图层对象上,获取完整的基地址

Name Type Description
layer Layer

基础图层对象

Returns:
Type Description
String 完整的服务基地址

getFunctionArguments(functionObject){Array.<String>}

util/Utils.js, line 789

获取方法的入参数组

Name Type Description
functionObject function

方法对象

Returns:
Type Description
Array.<String> 方法入参数组

getGeometryCenter(geometry){Point}

util/GeometryUtils.js, line 49
Name Type Description
geometry *
Returns:
Type Description
Point

getGeometryFilter(geometry, spatialRelation, spatialReference){Object}

document/layer/support/Utils.js, line 724

将基础对象中的几何对象转为IGS的几何过滤条件对象

Name Type Description
geometry Extent | Polygon | MultiPolygon

几何对象

spatialRelation SpatialRelation

空间判定规则

spatialReference SpatialReference

出图的坐标空间参考系

Returns:
Type Description
Object 几何过滤条件对象

getGeometryTypeByFeatureSet(featureSet){*}

document/layer/support/Utils.js, line 652
Name Type Description
featureSet *
Returns:
Type Description
*

getLayersCollection(layers){*}

document/layer/Utils.js, line 360
Name Type Description
layers *
Returns:
Type Description
*

getLayersExtent(layers, spatialReference){Extent}

view/support/MapViewUtils.js, line 324

根据指定坐标系,获取图层的合并后的范围,如果图层的坐标系和指定坐标系不一致,则将图层范围投影到该坐标系下

Name Type Description
layers Array.<Layer>

要合并范围的图层数组

spatialReference SpatialReference

指定一个参考系,在这个参考下合并范围

Returns:
Type Description
Extent 合并后的范围

getLayerViewsGeographicExtent(layer, validLayers, map){Extent}

view/support/MapViewUtils.js, line 71

获取所有可用图层视图的合并后的经纬度范围

Name Type Description
layer Layer

指定的参考图层

validLayers Array.<Layer>

有效的图层数组

map Map

图层管理容器

Returns:
Type Description
Extent 合并后的范围

getLevelRangeByTileInfo(tileInfo){Array.<Number>}

document/layer/support/TileInfoUtil.js, line 785
Name Type Description
tileInfo TileInfo
Returns:
Type Description
Array.<Number> 层级范围

getLods(firstLod, unit, zoom){Array.<LOD>}

document/layer/support/TileInfoUtil.js, line 632
Name Type Description
firstLod Number

第一级分辨率

unit String

单位,'m' or 'degree'

zoom Number

级数

Returns:
Type Description
Array.<LOD>

getMetersPerSpatialReference(spatialReference){Number}

util/unit/UnitUtils.js, line 27
Name Type Description
spatialReference SpatialReference

空间参考系

Returns:
Type Description
Number 返回对应的米值

getNodeByNodeName(nodeName, nodeName, returnArray){Object|Array.<Object>|null}

service/Utils.js, line 662

根据DOM节点名称获取DOM节点

Name Type Description
nodeName Array.<Object>

DOM节点数组

nodeName String

DOM节点名称

returnArray Boolean

是否返回数组,是:返回找到的所以DOM节点,否:返回找到的第一个

Returns:
Type Description
Object | Array.<Object> | null DOM节点

getParameterString(params){string}

util/Utils.js, line 127

将参数对象转换为HTTP的GEI请求中的参数字符串。例如:"key1=value1&key2=value2&key3=value3"。

Name Type Description
params Object

参数对象。

Returns:
Type Description
string HTTP的GEI请求中的参数字符串。

getProjectionSrs(spatialReference){String}

util/Utils.js, line 539

获取IGS的动态投影参数

Name Type Description
spatialReference SpatialReference
Returns:
Type Description
String 动态投影参数

getReferenceLayer(layerList){Layer}

document/layer/support/TileInfoUtil.js, line 664

根据layer获取其参考图层

Name Type Description
layerList Array.<Layer>

扁平化的图层数组

Returns:
Type Description
Layer 参考图层

getSpatialReferenceBySrsName(srsName){SpatialReference}

document/layer/support/Utils.js, line 887

根据SrsName获取SpatailReference

Name Type Description
srsName String
Returns:
Type Description
SpatialReference

getSublayers(sublayers){*}

document/support/sublayerUtil.js, line 92

扁平化所有子图层

Name Type Description
sublayers *
Returns:
Type Description
*

getTileInfoByLayer(layer){TileInfo}

document/layer/support/TileInfoUtil.js, line 832
Name Type Description
layer Layer
Returns:
Type Description
TileInfo

getTileLayerNearestCenterAndScale(tileInfo, extent, width, height, options){Object}

util/Utils.js, line 859

根据图层TileInfo、图层范围、视图宽高获取瓦片图层最近的比例尺以及中心点

Name Type Description
tileInfo TileInfo
extent Extent
width Number
height Number
options Object
Name Type Description
isCalcGeodesic Object 可选

是否考虑地球曲率影响

globeCoverScale Object 可选

覆盖球体最小比例尺

Returns:
Type Description
Object

getTileLevelByScale(scale, tileInfo){Number}

document/layer/support/TileInfoUtil.js, line 885

获取某一比例尺对应的级别

Name Type Description
scale Number

比例尺

tileInfo TileInfo

瓦片信息对象

Returns:
Type Description
Number 比例尺对应的级别的数组下标

getTileResolution()

document/layer/support/Utils.js, line 423

该函数支持MapGIS IGServer 发布的JWD,MKT瓦片只有一个矩阵集(老版本,地调局原来有用), 支持MapGIS IGServer 发布的JWD 三个矩阵集,MKT 的两个矩阵集(MapGIS发布的WMTS可以再Arcmap 和ArcGIS Server发布的WMTS完美叠加,ArcGIS Online中和地图完美叠加) 支持ArcGIS Server 发布的JWD,MKT瓦片 支持天地图(全国) JWD,MKT两种 支持GeoServer JWD,MKT两种 各个厂家以及MapGIS IGServer发布的关于1逻辑单位代表多少毫米的理解如下: 服务名 坐标系 矩阵集个数/名称 1逻辑单位代表多少毫米 1像素等于多少毫米 IGServer老服务 JWD 一个矩阵集 111194872.221777 25.4/96 IGServer老服务 MKT 一个矩阵集 1000 25.4/96 IGServer新服务 JWD 3个(EPSG:4326_XXXX_028mm_GB) 111319490.79327358 0.28 IGServer新服务 JWD 3个(EPSG:4326_XXXX_arcgis_GB) 111194872.221777 0.28 IGServer新服务 JWD 3个(EPSG:4326_XXXX_dpi96_GB) 111319490.79327358 25.4/96 IGServer新服务 MKT 2个(GoogleMapsCompatible_GB) 1000 0.28 IGServer新服务 MKT 2个(EPSG:3857_XXXX_dpi96_GB) 1000 25.4/96

ArcGIS Server JWD 2个(default028mm) 111194872.221777 25.4000508/96(0.28的比例尺反算96DPI的比例尺后,用96DPI的计算,这种情况下1英寸等于25.4000508毫米) ArcGIS Server JWD 2个(native) 111194872.221777 25.4000508/96 ArcGIS Server MKT 3个(default028mm) 1000 25.4000508/96(0.28的比例尺反算96DPI的比例尺后,用96DPI的计算,这种情况下1英寸等于25.4000508毫米) ArcGIS Server MKT 3个(native) 1000 25.4000508/96 ArcGIS Server MKT 3个(GoogleMapsCompatible) 1000 0.28

GeoServer JWD 一个矩阵集 111319490.79327358 0.28 GeoServer MKT 一个矩阵集 1000 0.28

tianditu JWD 一个矩阵集 111319490.79327358 25.4/96 tianditu MKT 一个矩阵集 1000 25.4/96

getTipTextByEditOption(tipType, tipTextObject, editOption)

sketchEditor/base/Utils.js, line 8

根据编辑配置项获取指定类型的提示文本

Name Type Description
tipType

提示文本类型

tipTextObject

提示文本对象

editOption

编辑配置项

Returns:
提示文本

getTitleByLayerInfo(layerInfo, layerType, defaultTitle){String}

document/layer/Utils.js, line 470

根据图层信息获取标题

Name Type Description
layerInfo Object

图层信息对象

layerType LayerType

图层类型

defaultTitle String

默认标题,可选参数

Returns:
Type Description
String 返回图层的标题信息

getUrlType(url){String}

document/layer/support/Utils.js, line 38

检查url对应的服务类型

Name Type Description
url String

服务地址

Returns:
Type Description
String 服务类型

getValidLayers(layer, allLayers){Array.<Layer>}

view/support/MapViewUtils.js, line 52

在指定图层的空间参考系下,获取所有有效的图层数组

Name Type Description
layer Layer

指定的参考图层

allLayers Array.<Layer>

所有要和参考图层叠加在一起的图层,组成一组底图数组

Returns:
Type Description
Array.<Layer> 有效的图层数组

getWFSInfoFromXML(xmlDoc){Object}

service/Utils.js, line 1180

将XML的Document对象转换为JSON字符串

Name Type Description
xmlDoc

xml的Document对象

Returns:
Type Description
Object WFS的元数据信息

getWMSInfoFromDOM(options){Object}

service/Utils.js, line 692

从DOM元素中获取信息

Name Type Description
options Object

初始化参数

Name Type Default Description
WMSInfo Object {} 可选

要更新的信息对象

version String '1.1.1' 可选

WMS服务版本号

nodes Object {} 可选

要获取信息的DOM集合

Returns:
Type Description
Object 更新好的信息对象

getWMSInfoFromXML(xmlDoc, version){Object}

service/Utils.js, line 836

将XML的Document对象转换为JSON字符串

Name Type Description
xmlDoc

xml的Document对象

version

WMS版本

Returns:
Type Description
Object WMS的元数据信息

getWMSNodes(node){Object}

service/Utils.js, line 783

从一个父节点DOM上获取WMS元信息对应的DOM对象集合

Name Type Description
node Object

父节点DOM

Returns:
Type Description
Object WMS元信息对应的DOM对象集合

getWMTSBoundingBox(BoundingBoxNode){Object}

service/Utils.js, line 957

通过解析BoundingBox的xml的标签,得到BoundingBox对象,坐标顺序有可能是<经度 纬度>或者<纬度 经度>,解析xml的代码不做判断

Name Type Description
BoundingBoxNode DOM

BoundingBox的xml的标签对象,格式为: <标签名> ows:LowerCornerxmin ymin</ows:LowerCorner> ows:UpperCornerxmax ymax</ows:UpperCorner> </标签名>

Returns:
Type Description
Object 解析后的boundingBox对象,格式为: { xmin: xmin, ymin: ymin, xmax: xmax, ymax: ymax, crs: SpatialReference }

getWMTSInfoFromXML(xmlDoc){Object}

service/Utils.js, line 1023

将XML的Document对象转换为JSON字符串

Name Type Description
xmlDoc

xml的Document对象

Returns:
Type Description
Object WMTS的元数据信息

getWMTSXMLInfo(xmlDom){Object}

service/Utils.js, line 994

将WMTS的XML解析为JS的对象

Name Type Description
xmlDom DOM

xml的dom对象

Returns:
Type Description
Object 解析完的JS对象

getZoomOffset(viewLod, layerLod, tolerance){Number}

document/layer/support/Utils.js, line 631

通过比较图层和地图视图的分辨率,来计算ZoomOffset,计算图层的分辨率和地图视图的分辨率之差和图层分辨率的比值

Name Type Description
viewLod Array.<LOD>

地图视图的lod数组

layerLod LOD

图层的第0个Lod对象

tolerance Number

容差

Returns:
Type Description
Number ZoomOffset

identity()

base/feature/support/topojson.js, line 34
License:
  • topojson - https://github.com/topojson/topojson Copyright (c) 2012-2016, Michael Bostock All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. The name Michael Bostock may not be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

initCorporationType(url){WMTSCorporation}

document/layer/support/Utils.js, line 592

根据url获取发布服务的公司

Name Type Description
url String

服务基地址

Returns:
Type Description
WMTSCorporation 公司代码

inOrderPromise(functions){*}

util/PromiseUtil.js, line 77
Name Type Description
functions Array.<function()>

包含多个返回Promise对象的函数的数组

Returns:
Type Description
* : 返回一个Promise对象

inputCss(cssText){*}

util/Utils.js, line 483
Name Type Description
cssText *
Returns:
Type Description
*

is4326(spatialReference){Boolean}

document/layer/support/Utils.js, line 103

是否为4326坐标系

Name Type Description
spatialReference SpatialReference

坐标系对象

Returns:
Type Description
Boolean 是否为4326坐标系

isArray(array){boolean}

util/Utils.js, line 29

判断一个对象是否是数组。

Name Type Description
array Object

对象。

Returns:
Type Description
boolean 是否是数组。

isBoolean(value){boolean}

util/Utils.js, line 222

判断是否为Boolean

Name Type Description
value
Returns:
Type Description
boolean 是否为Boolean

isCustomSP(spatialReference){Boolean}

document/layer/support/Utils.js, line 120

是否为自定义坐标系

Name Type Description
spatialReference SpatialReference

坐标系对象

Returns:
Type Description
Boolean 是否为自定义坐标系

isEncoded(str){Boolean}

service/Utils.js, line 1919

判断字符串是否被encodeURI编码

Name Type Description
str String

要检查的字符串

Returns:
Type Description
Boolean 是否被encodeURI编码

isFunction(){boolean}

util/Utils.js, line 245

判断是否为函数

Returns:
Type Description
boolean

isInTheSameDomain(url){boolean}

util/Utils.js, line 38

判断一个 URL 请求是否在当前域中。

Name Type Description
url string

URL 请求字符串。

Returns:
Type Description
boolean URL请求是否在当前域中。

isLayerViewValid(refSpatialReference, layer){Boolean}

view/support/MapViewUtils.js, line 14

给定的空间参考系下,图层的视图是否有效

Name Type Description
refSpatialReference SpatialReference

空间参考系

layer Layer

图层

Returns:
Type Description
Boolean 图层的视图是否有效

isNull(value){boolean}

util/Utils.js, line 231

判断是否为空

Name Type Description
value

要判断的对象

Returns:
Type Description
boolean 是否为空

isNumber(num){boolean}

util/Utils.js, line 207

判断是否为数字

Name Type Description
num
Returns:
Type Description
boolean 是否为数字。

isSameSpatialReference(spatialReference1, spatialReference1){Boolean}

document/layer/support/TileInfoUtil.js, line 732

两个参考系是否为相同参考系

Name Type Description
spatialReference1 spatialReference | String

参考系1

spatialReference1 spatialReference | String

参考系2

Returns:
Type Description
Boolean 是否相同

isWMSReverse(version, spatialReference){Boolean}

util/Utils.js, line 564

判断WMS服务是否要反转坐标点顺序,默认是XY,反转是YX 目前仅认为当WMS版本是1.3.0版本且坐标系是地理或者高斯时要反转,对应公司数据GeoServer、MapGIS和ArcGIS

Name Type Description
version String

WMS版本号

spatialReference SpatialReference

坐标系对象

Returns:
Type Description
Boolean isReverse 是否要反转坐标点顺序

jsonClone(json){Object}

util/Utils.js, line 520

通过JSON的方式克隆对象

Name Type Description
json Object

要克隆的数据

Returns:
Type Description
Object 克隆后的数据

magnitude(point){Number}

util/MathUtil.js, line 26

进行开根号计算

Name Type Description
point Point

点对象

Returns:
Type Description
Number 开根号后的值

magnitudeSquared(point){Number}

util/MathUtil.js, line 6

计算X、Y、Z的平方和并返回

Name Type Description
point Point

点对象

Returns:
Type Description
Number 平方和

mergeCommonClientCapbilities(capabilities, commonClientCapabilities){Object}

document/layer/Utils.js, line 400

将图层能力对象和图层客户端公共能力(所有引擎都支持的客户端能力)合并,并返回合并后的图层能力对象

Name Type Description
capabilities Object

图层能力对象

commonClientCapabilities Object

图层客户端公共能力(所有引擎都支持的客户端能力)

Returns:
Type Description
Object 图层能力对象

normalize(point){Object}

util/MathUtil.js, line 35

归一化计算

Name Type Description
point Point

点对象

Returns:
Type Description
Object 归一化后的值

parseArcgisTileInfo(tileInfo){TileInfo}

document/layer/support/TileInfoUtil.js, line 301
Name Type Description
tileInfo Object
Returns:
Type Description
TileInfo

parseClassBreakNormalizationType(feature, value, normalizationOptions){*}

view/support/RendererUtil.js, line 60
Name Type Description
feature Feature
value *
normalizationOptions Object
Returns:
Type Description
*

parseExpression(feature, expression){*}

view/support/RendererUtil.js, line 26
Name Type Description
feature *
expression String
Returns:
Type Description
*

parseFieldAndExpression(feature, field, expression){*}

view/support/RendererUtil.js, line 46
Name Type Description
feature *
field *
expression *
Returns:
Type Description
*

parseIGSImageTileInfo(tileInfo){TileInfo}

document/layer/support/TileInfoUtil.js, line 493
Name Type Description
tileInfo Object
Returns:
Type Description
TileInfo

parseTileInfo1(tileInfo){TileInfo}

document/layer/support/TileInfoUtil.js, line 19
Name Type Description
tileInfo Object
Returns:
Type Description
TileInfo

parseTileInfo2(tileInfo){TileInfo}

document/layer/support/TileInfoUtil.js, line 119
Name Type Description
tileInfo Object
Returns:
Type Description
TileInfo

parseVectorTileInfo(tileInfo){TileInfo}

document/layer/support/TileInfoUtil.js, line 231
Name Type Description
tileInfo Object
Returns:
Type Description
TileInfo

parseWebTileLayerInfo(layer, extent, factor){TileInfo}

document/layer/support/TileInfoUtil.js, line 440
Name Type Description
layer WebTileLayer

基础图层对象

extent Extent

图层范围

factor Number

分辨率计算系数

Returns:
Type Description
TileInfo

parseWMSTileInfo(layer){TileInfo}

document/layer/support/TileInfoUtil.js, line 374
Name Type Description
layer WMSLayer
Returns:
Type Description
TileInfo

randomColor(){*}

view/support/RendererUtil.js, line 89
Returns:
Type Description
*

requestIGSDecryptOptions(serviceEncryptInfo, clientDecryptInfo){Promise.<Object>}

document/layer/support/Utils.js, line 819

请求IGS解密参数

Name Type Description
serviceEncryptInfo Object
clientDecryptInfo Object
Returns:
Type Description
Promise.<Object>

setMap()

document/layer/baseLayer/Layer.js, line 606

设置图层管理容器

svgStringToBase64(svgString){String}

util/Utils.js, line 648
Name Type Description
svgString String
Returns:
Type Description
String base64字符串

throttle(fn, time, context){*}

util/Utils.js, line 695
Name Type Description
fn *
time *
context *
Returns:
Type Description
*

toDate(date){Date}

util/DateUtil.js, line 26
Name Type Description
date *
Returns:
Type Description
Date

toJSON(value, construct){Object}

util/Utils.js, line 498

导出json的通用工具函数

Name Type Description
value Object

要导出的对象

construct Object | Array

构造函数或者构造函数数组

Returns:
Type Description
Object json数据

toSublayerArr(collect){*}

document/layer/Utils.js, line 376
Name Type Description
collect Array
Returns:
Type Description
*

transformResult(result){Object}

util/Utils.js, line 94

转换查询结果。

Name Type Description
result Object

查询结果。

Returns:
Type Description
Object 转换后的查询结果。

updateFeatureSymbol(feature, rendererSymbol, visible, 视觉变量){*}

view/support/RendererUtil.js, line 155
Name Type Description
feature *
rendererSymbol *
visible Boolean
视觉变量 Array.<VisualVariable>
Returns:
Type Description
*

updateRandomFeatureSymbol(feature){*}

view/support/RendererUtil.js, line 313
Name Type Description
feature *
Returns:
Type Description
*

updateRenderer(featureSet, renderer){*}

view/support/RendererUtil.js, line 381

渲染要素集

Name Type Description
featureSet FeatureSet | Array.<Feature>
renderer *
Returns:
Type Description
*

urlAppend(url, paramStr){string}

util/Utils.js, line 107

给url追加参数。

Name Type Description
url string

待追加参数的url字符串。

paramStr string

待追加的参数。

Returns:
Type Description
string The new url

Type Definitions

getLegendSuccess(result)

service/igs/MapServer.js, line 499

请求成功时的回调

Name Type Description
result Object

回调参数

Name Type Default Description
msg String 可选

响应信息

succeed Boolean true 可选

接口是否调用成功

data Object 可选

请求成功数据

Name Type Description
layers Array 可选

查询的图例集合

layers[i].layerId String 可选

图层id

layers[i].layerName String 可选

图层名称

layers[i].legend Array 可选

图例数组

layers[i].legend[j].contentType Array 可选

图例类型

layers[i].legend[j].height Number 可选

图例高度

layers[i].legend[j].width Number 可选

图例宽度

layers[i].legend[j].values Array 可选

图例值数组

layers[i].legend[j].label String 可选

注记

layers[i].legend[j].imageData String 可选

图例的BASE64数据

minScale String 可选

图例的最小缩放比

maxScale String 可选

图例的最大缩放比

total Number 可选

图例数量

queryFailure(result)

service/igs/MapServer.js, line 103

请求失败时的回调

Name Type Description
result Object

回调参数

Name Type Default Description
data Object 可选

请求成功数据

msg String 可选

响应信息

succeed Boolean true 可选

接口是否调用成功

errorCode String true 可选

请求失败时的错误码

queryFeaturesSuccess(result)

service/igs/MapServer.js, line 422

请求成功时的回调

Name Type Description
result Object

回调参数

Name Type Default Description
msg String 可选

响应信息

succeed Boolean true 可选

接口是否调用成功

data Object 可选

请求成功数据

Name Type Description
featureSet FeatureSet 可选

查询的要素集合

fields Array 可选

要素属性字段名数组

geomType String 可选

要素的几何类型

id Number 可选

图层id

name String 可选

图层名

spatialReference Object 可选

图层坐标系

queryLayerInfoSuccess(result)

service/igs/MapServer.js, line 287

请求成功时的回调

Name Type Description
result Object

回调参数

Name Type Default Description
msg String 可选

响应信息

succeed Boolean true 可选

接口是否调用成功

data Object 可选

请求成功数据

Name Type Description
childResources String 可选

子资源

index String 可选

图层序号或id

fields Array 可选

要素属性字段名数组

geomType String 可选

要素的几何类型

minScale Number 可选

最小缩放比

maxScale Number 可选

最大缩放比

name String 可选

图层名

range Object 可选

图层范围

spatialReference Object 可选

图层坐标系

supportedMethods Object 可选

图层支持的方法

systemLibGuid String 可选

系统库id

systemLibName String 可选

系统名称

type String 可选

图层类型

type String 可选

图层对应的GDBP地址

visible Boolean 可选

图层是否可见

queryLayerInfoSuccess(result)

service/igs/SceneServer.js, line 115

请求成功时的回调

Name Type Description
result Object

回调参数

Name Type Default Description
msg String 可选

响应信息

succeed Boolean true 可选

接口是否调用成功

data Object 可选

请求成功数据

Name Type Description
beginLevel Number 可选

起始级数

children Array 可选

子图层

dataType String 可选

数据类型

displayGridNet Boolean 可选

是否显示网格点

displaySceneBox Boolean 可选

是否显示外包盒

endLevel Number 可选

结束级数

frameSizes Array 可选

frameSizes

gdbpUrl String 可选

图层对应的GDPB地址

layerIndex String 可选

图层序号

layerLodNum Number 可选

layerLodNum

layerName String 可选

图层名

layerRenderIndex Number 可选

layerRenderIndex

layerRenderType Number 可选

layerRenderType

layerType String 可选

图层类型

lodDistance Number 可选

lodDistance

maxDisplayDistance Number 可选

最大显示距离

minDisplayDistance Number 可选

最小显示距离

minDisplayPixel Number 可选

最小显示像素

originalPoints Array 可选

原点坐标

ownerLayers String 可选

ownerLayers

position Array 可选

position

range Object 可选

图层范围

range3D Object 可选

图层范围(3D)

scale Array 可选

图层缩放

spatialReference Object 可选

图层坐标系

topLevelDataNum Number 可选

topLevelDataNum

transparency Number 可选

图层透明度

url String 可选

图层GDBP地址

version String 可选

版本号

visible Boolean 可选

是否可见

queryLayerListInfoSuccess(result)

service/igs/SceneServer.js, line 77

请求成功时的回调

Name Type Description
result QueryFeaturesResult

回调参数

Name Type Description
data QueryFeaturesInLayersData 可选

响应信息

queryLayerListInfoSuccess(result)

service/is/ISSceneServer.js, line 25

请求成功时的回调

Name Type Description
result Object

回调参数

Name Type Default Description
msg String 可选

响应信息

succeed Boolean true 可选

接口是否调用成功

data Object 可选

请求成功数据

queryLayerListSuccess(result)

service/igs/MapServer.js, line 113

请求成功时的回调

Name Type Description
result Object

回调参数

Name Type Default Description
msg String 可选

响应信息

succeed Boolean true 可选

接口是否调用成功

data Object 可选

请求成功数据

Name Type Description
layers Array 可选

图层信息数组

layers[i].fields Array 可选

要素属性字段名数组

layers[i].geomType String 可选

要素的几何类型

layers[i].minScale Number 可选

最小缩放比

layers[i].maxScale Number 可选

最大缩放比

layers[i].name String 可选

图层名

layers[i].range Object 可选

图层范围

layers[i].spatialReference Object 可选

图层坐标系

layers[i].supportedMethods Object 可选

图层支持的方法

layers[i].systemLibGuid String 可选

系统库id

layers[i].systemLibName String 可选

系统名称

layers[i].type String 可选

图层类型

layers[i].type String 可选

图层对应的GDBP地址

layers[i].visible Boolean 可选

图层是否可见

queryM3DInfoSuccess(result)

service/igs/SceneServer.js, line 247

请求成功时的回调

Name Type Description
result Object

回调参数

Name Type Default Description
msg String 可选

响应信息

succeed Boolean true 可选

接口是否调用成功

data Object 可选

请求成功数据

Name Type Description
WKT String 可选

空间参考系参数

asset Object 可选

M3D信息

Name Type Description
compression Boolean 可选

是否压缩

gltfUpAxis String 可选

模型主轴

guid String 可选

模型的id

layerName String 可选

图层名

lodStrategyType String 可选

lodStrategyType

monomerization Boolean 可选

是否单体化

offset Array 可选

模型偏移

version String 可选

模型版本

root Object 可选

节点信息

Name Type Description
boundingVolume Object 可选

外包盒

children Array 可选

子节点

geometricError Number 可选

几何误差

refine String 可选

数据加载方式,replace或者add

transform Array 可选

矩阵信息

geometricError Array 可选

几何误差

queryNodeInfoSuccess(result)

service/igs/SceneServer.js, line 384

请求成功时的回调

Name Type Description
result Object

回调参数

Name Type Default Description
msg String 可选

响应信息

succeed Boolean true 可选

接口是否调用成功

data Object 可选

请求成功数据

Name Type Description
boundingVolume Object 可选

节点外包盒

childrenNode Array 可选

子节点

lodError Number 可选

lodError

lodLevel Number 可选

lodLevel

lodMode String 可选

lodMode

name String 可选

节点名

nodeId String 可选

节点ID

nodeUrl String 可选

节点URL

parentNode Object 可选

父节点

shared Object 可选

shared

tileDataInfoIndex Number 可选

tileDataInfoIndex

tileDataInfoList Array 可选

[]

transform Array 可选

节点矩阵

queryRootNodeInfoSuccess(result)

service/igs/Cesium3DTilesServer.js, line 66

请求成功时的回调

Name Type Description
result Object

回调参数

Name Type Default Description
msg String 可选

响应信息

succeed Boolean true 可选

接口是否调用成功

data Object 可选

请求成功数据

Name Type Description
copyrightText Object 可选

版权信息

type Array 可选

图层类型

name String 可选

图层名

queryRootNodeInfoSuccess(result)

service/igs/SceneServer.js, line 307

请求成功时的回调

Name Type Description
result Object

回调参数

Name Type Default Description
msg String 可选

响应信息

succeed Boolean true 可选

接口是否调用成功

data Object 可选

请求成功数据

Name Type Description
boundingVolume Object 可选

节点外包盒

childrenNode Array 可选

子节点

lodError Number 可选

lodError

lodLevel Number 可选

lodLevel

lodMode String 可选

lodMode

name String 可选

节点名