@mapgis/webclient-mapboxgl-plugin 10.3.4 → 17.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -124
- package/dist/es5/webclient-common.min.js +90 -0
- package/dist/es5/webclient-mapboxgl-plugin.min.js +1 -0
- package/dist/webclient-mapboxgl-plugin-es6.min.js +1 -0
- package/documention/EchartsLayer.html +379 -0
- package/documention/MapViewMapboxgl.html +3587 -0
- package/documention/Popup.html +1523 -0
- package/documention/Screenshot.html +1089 -0
- package/documention/SketchEditorMapboxgl.html +3383 -0
- package/documention/document_ArcGISVectorTileLayerView.js.html +265 -0
- package/documention/document_EchartsLayerView.js.html +246 -0
- package/documention/document_GraphicsLayerView.js.html +314 -0
- package/documention/document_IGSFeatureLayerView.js.html +218 -0
- package/documention/document_IGSMapImageLayerView.js.html +240 -0
- package/documention/document_IGSTileLayerView.js.html +236 -0
- package/documention/document_IGSVectorTileLayerView.js.html +264 -0
- package/documention/document_MapVLayerView.js.html +247 -0
- package/documention/document_WMSLayerView.js.html +240 -0
- package/documention/document_WMTSLayerView.js.html +234 -0
- package/documention/document_WebTileLayerView.js.html +240 -0
- package/documention/document_support_FeatureRenderView.js.html +682 -0
- package/documention/document_support_MapboxglGraphicsLayer.js.html +1184 -0
- package/documention/document_support_SourceMetaData.js.html +223 -0
- package/documention/document_support_Utils.js.html +624 -0
- package/documention/document_support_mapbox_mapboxCustomUtil.js.html +322 -0
- package/documention/global.html +252 -0
- package/documention/index.html +251 -0
- package/documention/module-%E5%AE%A2%E6%88%B7%E7%AB%AF%E5%8F%AF%E8%A7%86%E5%8C%96.MapvLayer.html +445 -0
- package/documention/scripts/app.min.js +1 -0
- package/documention/scripts/linenumber.js +26 -0
- package/documention/scripts/search.js +45 -0
- package/documention/scripts/sideBar.js +11 -0
- package/documention/sketchEditor_SketchEditorMapboxgl.js.html +875 -0
- package/documention/styles/anchor.png +0 -0
- package/documention/styles/app.min.css +1 -0
- package/documention/styles/c.png +0 -0
- package/documention/styles/iframe.css +29 -0
- package/documention/styles/m.png +0 -0
- package/documention/styles/prettify-jsdoc.css +111 -0
- package/documention/styles/prettify-tomorrow.css +132 -0
- package/documention/styles/reset.css +44 -0
- package/documention/styles/up-arrow.png +0 -0
- package/documention/tutorial-1./345/277/253/351/200/237/345/205/245/351/227/250.html +165 -0
- package/documention/util_ConvertRendererToStyleLayerUtil.js.html +844 -0
- package/documention/util_MapboxglFeatureRender.js.html +225 -0
- package/documention/util_MapboxglPlugin.js.html +284 -0
- package/documention/view_MapViewMapboxgl.js.html +1882 -0
- package/documention/view_utils_ArcGISVectorTileLayerUtil.js.html +382 -0
- package/documention/view_utils_EchartsLayerUtil.js.html +194 -0
- package/documention/view_utils_IGSMapImageUtil.js.html +373 -0
- package/documention/view_utils_IGSTileLayerUtil.js.html +285 -0
- package/documention/view_utils_IGSVectorTileLayerUtil.js.html +379 -0
- package/documention/view_utils_MapVLayerUtil.js.html +197 -0
- package/documention/view_utils_Popup.js.html +525 -0
- package/documention/view_utils_Screenshot.js.html +320 -0
- package/documention/view_utils_WMSLayerUtil.js.html +337 -0
- package/documention/view_utils_WMTSLayerUtil.js.html +331 -0
- package/documention/view_utils_WebTileLayerUtil.js.html +284 -0
- package/documention/view_utils_echarts_EchartsLayerPlugin.js.html +419 -0
- package/documention/view_utils_mapV_MapVLayerPlugin.js.html +527 -0
- package/documention/view_utils_mapV_MapvBaseLayer.js.html +477 -0
- package/documention/view_utils_support_rasterLayerUtil.js.html +244 -0
- package/documention/view_utils_support_vectorLayerUtil.js.html +503 -0
- package/package.json +20 -20
- package/core/Base.js +0 -15
- package/core/index.js +0 -5
- package/index.js +0 -6
- package/overlay/D3Layer.js +0 -108
- package/overlay/EchartsLayer.js +0 -242
- package/overlay/ElsCubeLayer.js +0 -125
- package/overlay/MapvLayer.js +0 -296
- package/overlay/StreamLayer.js +0 -83
- package/overlay/TimeSpaceCubeLayer.js +0 -135
- package/overlay/dthree/mapbox-d3.css +0 -9
- package/overlay/echarts/MapCoordSys.js +0 -105
- package/overlay/echarts/MapModel.js +0 -0
- package/overlay/echarts/MapView.js +0 -0
- package/overlay/echarts/index.js +0 -4
- package/overlay/index.js +0 -31
- package/overlay/mapv/MapvBaseLayer.js +0 -299
- package/overlay/mapv/index.js +0 -5
- package/overlay/stream/GeojsonStreamLayer.js +0 -135
- package/overlay/stream/MapvStreamLayer.js +0 -79
- package/overlay/stream/index.js +0 -3
- package/overlay/stream/popup.css +0 -31
- package/service/index.js +0 -1
- package/service/socket/ISocketService.js +0 -121
- package/service/socket/SocketEvent.js +0 -50
- package/service/socket/SocketService.js +0 -90
- package/util/Evented.js +0 -295
- package/util/Util.js +0 -348
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
<!DOCTYPE html>
|
|
4
|
+
<html lang="en">
|
|
5
|
+
|
|
6
|
+
<head>
|
|
7
|
+
|
|
8
|
+
<meta charset="utf-8">
|
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
10
|
+
<title>Client for JavaScript view/utils/IGSVectorTileLayerUtil.js</title>
|
|
11
|
+
<!--[if lt IE 9]>
|
|
12
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
13
|
+
<![endif]-->
|
|
14
|
+
<link type="text/css" rel="stylesheet" href="styles/app.min.css">
|
|
15
|
+
<link type="text/css" rel="stylesheet" href="styles/iframe.css">
|
|
16
|
+
<link type="text/css" rel="stylesheet" href="">
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
</head>
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<body class="layout small-header">
|
|
24
|
+
<div id="stickyNavbarOverlay"></div>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<div class="top-nav">
|
|
28
|
+
<div class="inner">
|
|
29
|
+
<a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
|
|
30
|
+
<span aria-hidden="true"></span>
|
|
31
|
+
<span aria-hidden="true"></span>
|
|
32
|
+
<span aria-hidden="true"></span>
|
|
33
|
+
</a>
|
|
34
|
+
<div class="logo">
|
|
35
|
+
|
|
36
|
+
<h1> MapGIS Client for JavaScript API</h1>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
</div>
|
|
40
|
+
<div class="menu">
|
|
41
|
+
|
|
42
|
+
<div class="navigation">
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
<a
|
|
46
|
+
class="link user-link "
|
|
47
|
+
href="/static/modules/common/api/common-mapgis/index.html"
|
|
48
|
+
>
|
|
49
|
+
Common
|
|
50
|
+
</a>
|
|
51
|
+
|
|
52
|
+
<a
|
|
53
|
+
class="link user-link "
|
|
54
|
+
href="/static/modules/cesium/api/cesium-mapgis/index.html"
|
|
55
|
+
>
|
|
56
|
+
Cesium
|
|
57
|
+
</a>
|
|
58
|
+
|
|
59
|
+
<a
|
|
60
|
+
class="link user-link "
|
|
61
|
+
href="/static/modules/mapboxgl/api/mapboxgl-mapgis/index.html"
|
|
62
|
+
>
|
|
63
|
+
MapboxGL
|
|
64
|
+
</a>
|
|
65
|
+
|
|
66
|
+
<a
|
|
67
|
+
class="link user-link "
|
|
68
|
+
href="/static/modules/leaflet/api/leaflet-mapgis/index.html"
|
|
69
|
+
>
|
|
70
|
+
Leaflet
|
|
71
|
+
</a>
|
|
72
|
+
|
|
73
|
+
<a
|
|
74
|
+
class="link user-link "
|
|
75
|
+
href="/static/modules/openlayers/api/openLayers-mapgis/index.html"
|
|
76
|
+
>
|
|
77
|
+
OpenLayers
|
|
78
|
+
</a>
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div id="main">
|
|
88
|
+
<div
|
|
89
|
+
class="sidebar "
|
|
90
|
+
id="sidebarNav"
|
|
91
|
+
>
|
|
92
|
+
<div>
|
|
93
|
+
<span class="mapgis-api-document-span"><a href="index.html">API文档</a></span>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<div class="search-wrapper">
|
|
97
|
+
<input id="search" type="text" placeholder="搜索文档..." class="input">
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<nav>
|
|
101
|
+
|
|
102
|
+
<div class="category"><div style="font-weight: bold;vertical-align: middle;padding: 0.4rem 0;" class="mapgis-menu-span"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/m.png" alt="">undefined</div><ul class="mapgis-sidebar-menus"><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Popup.html">Popup</a><span style="display: none;"><p>二维场景信息弹窗(leaflet引擎)
|
|
103
|
+
参考示例:
|
|
104
|
+
<a href='#MapView'>[初始化二维场景视图]</a>
|
|
105
|
+
[ES6引入方式]:<br/>
|
|
106
|
+
import { Popup } from '@mapgis/webclient-leaflet-plugin' <br/>
|
|
107
|
+
自定义样式说明:<br/>
|
|
108
|
+
zondy-popup__content 弹窗容器样式<br/>
|
|
109
|
+
zondy-popup__tip 弹窗对话框箭头样式<br/>
|
|
110
|
+
zondy-popup__header 弹窗头部样式<br/>
|
|
111
|
+
zondy-popup__content 弹窗主体样式<br/>
|
|
112
|
+
zondy-popup__footer 弹窗底部样式<br/></p></span></li></ul><div style="font-weight: bold;vertical-align: middle;padding: 0.4rem 0;" class="mapgis-menu-span"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/m.png" alt="">undefined</div><ul class="mapgis-sidebar-menus"><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Screenshot.html">Screenshot</a><span style="display: none;"><p>打印工具</p></span></li></ul><div style="font-weight: bold;vertical-align: middle;padding: 0.4rem 0;" class="mapgis-menu-span"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/m.png" alt="">草图编辑模块</div><ul class="mapgis-sidebar-menus"><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SketchEditorMapboxgl.html">SketchEditorMapboxgl</a><span style="display: none;"><p>二维场景草图编辑类<br/>
|
|
113
|
+
<br>[ES5引入方式]:<br/>
|
|
114
|
+
const { SketchEditorMapboxgl } = Zondy <br/>
|
|
115
|
+
[ES6引入方式]:<br/>
|
|
116
|
+
import { SketchEditorMapboxgl } from "@mapgis/webclient-leaflet-plugin" <br/></p></span></li></ul></div>
|
|
117
|
+
|
|
118
|
+
</nav>
|
|
119
|
+
</div>
|
|
120
|
+
<div class="core" id="main-content-wrapper">
|
|
121
|
+
<div class="content">
|
|
122
|
+
<header id="page-title" class="page-title">
|
|
123
|
+
<span class="page-title-main">类名</span>
|
|
124
|
+
<span class="page-title-sub">view/utils/IGSVectorTileLayerUtil.js</span>
|
|
125
|
+
</header>
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
<section>
|
|
132
|
+
<article>
|
|
133
|
+
<pre class="prettyprint source linenums"><code>import { defaultValue } from '@mapgis/webclient-common'
|
|
134
|
+
import {
|
|
135
|
+
removeLayer,
|
|
136
|
+
setOpacity,
|
|
137
|
+
setVisible,
|
|
138
|
+
getPaintOptions,
|
|
139
|
+
setPaintProperties,
|
|
140
|
+
setLayoutProperties,
|
|
141
|
+
setFilter,
|
|
142
|
+
setLayerZoomRange,
|
|
143
|
+
addSources,
|
|
144
|
+
addLayers,
|
|
145
|
+
getLayers,
|
|
146
|
+
updateStyleLayer
|
|
147
|
+
} from './support/vectorLayerUtil'
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* 实际加载图层的工具类
|
|
151
|
+
* @private
|
|
152
|
+
* */
|
|
153
|
+
class IGSVectorTileLayerUtil {}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* 添加地图图片图层
|
|
157
|
+
* @param {IGSTileLayerView} layerView 图层视图对象
|
|
158
|
+
* @param {Object} options 额外参数
|
|
159
|
+
* @return {Object} 实际的图层对象
|
|
160
|
+
* */
|
|
161
|
+
IGSVectorTileLayerUtil.addIGSVectorTileLayer = function (layerView, options) {
|
|
162
|
+
options = defaultValue(options, {})
|
|
163
|
+
const layer = layerView.layer
|
|
164
|
+
const innerView = layerView.innerView
|
|
165
|
+
|
|
166
|
+
// 先获取地图视图的样式
|
|
167
|
+
const mapStyle = innerView.getStyle()
|
|
168
|
+
|
|
169
|
+
// 判断是否设置了样式
|
|
170
|
+
let isSetStyle = false
|
|
171
|
+
|
|
172
|
+
// 设置字体
|
|
173
|
+
if (mapStyle.glyphs !== layer.style.glyphs) {
|
|
174
|
+
mapStyle.glyphs = layer.style.glyphs
|
|
175
|
+
isSetStyle = true
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
// 设置雪碧图
|
|
179
|
+
if (mapStyle.sprite !== layer.style.sprite) {
|
|
180
|
+
mapStyle.sprite = layer.style.sprite
|
|
181
|
+
isSetStyle = true
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// 更新样式
|
|
185
|
+
if (isSetStyle) {
|
|
186
|
+
innerView.setStyle(mapStyle)
|
|
187
|
+
// 更新样式后设置图层
|
|
188
|
+
innerView.on('style.load', function () {
|
|
189
|
+
// 添加矢量瓦片的Source
|
|
190
|
+
addSources(layerView)
|
|
191
|
+
// 添加矢量瓦片的Layer
|
|
192
|
+
addLayers(layerView)
|
|
193
|
+
// 执行回调函数
|
|
194
|
+
if (options.callback && options.callback instanceof Function) {
|
|
195
|
+
options.callback(getLayers(layerView))
|
|
196
|
+
}
|
|
197
|
+
})
|
|
198
|
+
}
|
|
199
|
+
// 不用更新样式,直接添加图层
|
|
200
|
+
else {
|
|
201
|
+
// 添加矢量瓦片的Source
|
|
202
|
+
addSources(layerView)
|
|
203
|
+
// 添加矢量瓦片的Layer
|
|
204
|
+
addLayers(layerView)
|
|
205
|
+
// 执行回调函数
|
|
206
|
+
if (options.callback && options.callback instanceof Function) {
|
|
207
|
+
options.callback(getLayers(layerView))
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* 根据服务基地址和图层初始化参数,构造最终的URL地址
|
|
214
|
+
* @param {String} url 服务基地址
|
|
215
|
+
* @param {Object} options 图层初始化参数
|
|
216
|
+
* @return {String} 最终的URL地址
|
|
217
|
+
* */
|
|
218
|
+
IGSVectorTileLayerUtil.initLayerUrl = function (url, options) {
|
|
219
|
+
const igsVersion = options.igsVersion
|
|
220
|
+
if (igsVersion === '1.0') {
|
|
221
|
+
url += '/{z}/{y}/{x}'
|
|
222
|
+
if (options.tokenKey && options.tokenValue) {
|
|
223
|
+
url += `?${options.tokenKey}=${options.tokenValue}`
|
|
224
|
+
}
|
|
225
|
+
} else {
|
|
226
|
+
url = `${url}/tileImage/{z}/{y}/{x}?f=image`
|
|
227
|
+
if (options.tokenKey && options.tokenValue) {
|
|
228
|
+
url += `&${options.tokenKey}=${options.tokenValue}`
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
return url
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* 设置图层可见性
|
|
236
|
+
* @param {IGSTileLayerView} layerView 图层视图对象
|
|
237
|
+
* */
|
|
238
|
+
IGSVectorTileLayerUtil.setVisible = function (layerView) {
|
|
239
|
+
setVisible(layerView)
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* 设置图层透明度
|
|
244
|
+
* @param {IGSTileLayerView} layerView 图层视图对象
|
|
245
|
+
* */
|
|
246
|
+
IGSVectorTileLayerUtil.setOpacity = function (layerView) {
|
|
247
|
+
setOpacity(layerView)
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/**
|
|
251
|
+
* 刷新图层
|
|
252
|
+
* @param {IGSTileLayerView} layerView 图层视图对象
|
|
253
|
+
* */
|
|
254
|
+
IGSVectorTileLayerUtil.refresh = function (layerView) {
|
|
255
|
+
// 删除图层
|
|
256
|
+
layerView.innerView.removeLayer(layerView.innerLayer.id)
|
|
257
|
+
// 删除source
|
|
258
|
+
layerView.innerView.removeSource(layerView.innerLayer.sourceID)
|
|
259
|
+
// 重新添加layer和source
|
|
260
|
+
layerView.innerLayer = IGSVectorTileLayerUtil.addIGSVectorTileLayer(
|
|
261
|
+
layerView,
|
|
262
|
+
{}
|
|
263
|
+
)
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* 删除图层
|
|
268
|
+
* @param {IGSTileLayerView} layerView 图层视图对象
|
|
269
|
+
* */
|
|
270
|
+
IGSVectorTileLayerUtil.removeLayer = function (layerView) {
|
|
271
|
+
removeLayer(layerView)
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* 设置图层的绘制属性
|
|
276
|
+
* @param {IGSTileLayerView} layerView 图层视图对象
|
|
277
|
+
* @param {Object} updateContent 事件内容
|
|
278
|
+
* */
|
|
279
|
+
IGSVectorTileLayerUtil.setPaintProperties = function (
|
|
280
|
+
layerView,
|
|
281
|
+
updateContent
|
|
282
|
+
) {
|
|
283
|
+
const paintOptions = getPaintOptions(updateContent)
|
|
284
|
+
setPaintProperties(layerView, paintOptions.layerId, paintOptions.paints)
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* 设置图层的布局属性
|
|
289
|
+
* @param {IGSTileLayerView} layerView 图层视图对象
|
|
290
|
+
* @param {Object} updateContent 事件内容
|
|
291
|
+
* */
|
|
292
|
+
IGSVectorTileLayerUtil.setLayoutProperties = function (
|
|
293
|
+
layerView,
|
|
294
|
+
updateContent
|
|
295
|
+
) {
|
|
296
|
+
const paintOptions = getPaintOptions(updateContent)
|
|
297
|
+
setLayoutProperties(layerView, paintOptions.layerId, paintOptions.paints)
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* 设置图层的过滤条件
|
|
302
|
+
* @param {IGSTileLayerView} layerView 图层视图对象
|
|
303
|
+
* @param {String} layerId 图层id
|
|
304
|
+
* @param {String} filter 过滤条件
|
|
305
|
+
* */
|
|
306
|
+
IGSVectorTileLayerUtil.setStyleLayerFilter = function (
|
|
307
|
+
layerView,
|
|
308
|
+
layerId,
|
|
309
|
+
filter
|
|
310
|
+
) {
|
|
311
|
+
setFilter(layerView, layerId, filter)
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* 设置图层的显示范围
|
|
316
|
+
* @param {IGSTileLayerView} layerView 图层视图对象
|
|
317
|
+
* @param {String} layerId 图层id
|
|
318
|
+
* @param {Number} minZoom 最小显示范围
|
|
319
|
+
* @param {Number} maxZoom 最大显示范围
|
|
320
|
+
* */
|
|
321
|
+
IGSVectorTileLayerUtil.setStyleLayerZoomRange = function (
|
|
322
|
+
layerView,
|
|
323
|
+
layerId,
|
|
324
|
+
minZoom,
|
|
325
|
+
maxZoom
|
|
326
|
+
) {
|
|
327
|
+
setLayerZoomRange(layerView, layerId, minZoom, maxZoom)
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* 更新所有矢量瓦片子图层
|
|
332
|
+
* @param {IGSTileLayerView} layerView 图层视图对象
|
|
333
|
+
* */
|
|
334
|
+
IGSVectorTileLayerUtil.updateStyleLayer = function (layerView) {
|
|
335
|
+
updateStyleLayer(layerView)
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
export default IGSVectorTileLayerUtil
|
|
339
|
+
</code></pre>
|
|
340
|
+
</article>
|
|
341
|
+
</section>
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
</div>
|
|
347
|
+
|
|
348
|
+
<footer class="footer">
|
|
349
|
+
<div class="content has-text-centered">
|
|
350
|
+
<p>文档生成<a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a></p>
|
|
351
|
+
<p class="sidebar-created-by">
|
|
352
|
+
<a href="http://www.smaryun.com" target="_blank">司马云</a> <span>© 2023 云生态圈</span>
|
|
353
|
+
<a href="http://192.168.82.89:8086/#/index" target="_blank">MapGIS Client for JavaScript</a>
|
|
354
|
+
</p>
|
|
355
|
+
</div>
|
|
356
|
+
</footer>
|
|
357
|
+
|
|
358
|
+
</div>
|
|
359
|
+
<div id="side-nav" class="side-nav">
|
|
360
|
+
<div style="margin-bottom: 10px;">
|
|
361
|
+
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#page-title">构造函数</a>
|
|
362
|
+
</div>
|
|
363
|
+
<div style="margin-bottom: 10px;">
|
|
364
|
+
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#member">成员变量</a>
|
|
365
|
+
</div>
|
|
366
|
+
<div style="margin-bottom: 10px;">
|
|
367
|
+
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#function">方法</a>
|
|
368
|
+
</div>
|
|
369
|
+
<div>
|
|
370
|
+
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#event">事件</a>
|
|
371
|
+
</div>
|
|
372
|
+
</div>
|
|
373
|
+
</div>
|
|
374
|
+
<script src="scripts/linenumber.js"> </script>
|
|
375
|
+
|
|
376
|
+
<script src="scripts/search.js"> </script>
|
|
377
|
+
|
|
378
|
+
</body>
|
|
379
|
+
</html>
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
<!DOCTYPE html>
|
|
4
|
+
<html lang="en">
|
|
5
|
+
|
|
6
|
+
<head>
|
|
7
|
+
|
|
8
|
+
<meta charset="utf-8">
|
|
9
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
10
|
+
<title>Client for JavaScript view/utils/MapVLayerUtil.js</title>
|
|
11
|
+
<!--[if lt IE 9]>
|
|
12
|
+
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
|
13
|
+
<![endif]-->
|
|
14
|
+
<link type="text/css" rel="stylesheet" href="styles/app.min.css">
|
|
15
|
+
<link type="text/css" rel="stylesheet" href="styles/iframe.css">
|
|
16
|
+
<link type="text/css" rel="stylesheet" href="">
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
</head>
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<body class="layout small-header">
|
|
24
|
+
<div id="stickyNavbarOverlay"></div>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
<div class="top-nav">
|
|
28
|
+
<div class="inner">
|
|
29
|
+
<a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
|
|
30
|
+
<span aria-hidden="true"></span>
|
|
31
|
+
<span aria-hidden="true"></span>
|
|
32
|
+
<span aria-hidden="true"></span>
|
|
33
|
+
</a>
|
|
34
|
+
<div class="logo">
|
|
35
|
+
|
|
36
|
+
<h1> MapGIS Client for JavaScript API</h1>
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
</div>
|
|
40
|
+
<div class="menu">
|
|
41
|
+
|
|
42
|
+
<div class="navigation">
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
<a
|
|
46
|
+
class="link user-link "
|
|
47
|
+
href="/static/modules/common/api/common-mapgis/index.html"
|
|
48
|
+
>
|
|
49
|
+
Common
|
|
50
|
+
</a>
|
|
51
|
+
|
|
52
|
+
<a
|
|
53
|
+
class="link user-link "
|
|
54
|
+
href="/static/modules/cesium/api/cesium-mapgis/index.html"
|
|
55
|
+
>
|
|
56
|
+
Cesium
|
|
57
|
+
</a>
|
|
58
|
+
|
|
59
|
+
<a
|
|
60
|
+
class="link user-link "
|
|
61
|
+
href="/static/modules/mapboxgl/api/mapboxgl-mapgis/index.html"
|
|
62
|
+
>
|
|
63
|
+
MapboxGL
|
|
64
|
+
</a>
|
|
65
|
+
|
|
66
|
+
<a
|
|
67
|
+
class="link user-link "
|
|
68
|
+
href="/static/modules/leaflet/api/leaflet-mapgis/index.html"
|
|
69
|
+
>
|
|
70
|
+
Leaflet
|
|
71
|
+
</a>
|
|
72
|
+
|
|
73
|
+
<a
|
|
74
|
+
class="link user-link "
|
|
75
|
+
href="/static/modules/openlayers/api/openLayers-mapgis/index.html"
|
|
76
|
+
>
|
|
77
|
+
OpenLayers
|
|
78
|
+
</a>
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
86
|
+
|
|
87
|
+
<div id="main">
|
|
88
|
+
<div
|
|
89
|
+
class="sidebar "
|
|
90
|
+
id="sidebarNav"
|
|
91
|
+
>
|
|
92
|
+
<div>
|
|
93
|
+
<span class="mapgis-api-document-span"><a href="index.html">API文档</a></span>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<div class="search-wrapper">
|
|
97
|
+
<input id="search" type="text" placeholder="搜索文档..." class="input">
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
<nav>
|
|
101
|
+
|
|
102
|
+
<div class="category"><div style="font-weight: bold;vertical-align: middle;padding: 0.4rem 0;" class="mapgis-menu-span"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/m.png" alt="">undefined</div><ul class="mapgis-sidebar-menus"><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Popup.html">Popup</a><span style="display: none;"><p>二维场景信息弹窗(leaflet引擎)
|
|
103
|
+
参考示例:
|
|
104
|
+
<a href='#MapView'>[初始化二维场景视图]</a>
|
|
105
|
+
[ES6引入方式]:<br/>
|
|
106
|
+
import { Popup } from '@mapgis/webclient-leaflet-plugin' <br/>
|
|
107
|
+
自定义样式说明:<br/>
|
|
108
|
+
zondy-popup__content 弹窗容器样式<br/>
|
|
109
|
+
zondy-popup__tip 弹窗对话框箭头样式<br/>
|
|
110
|
+
zondy-popup__header 弹窗头部样式<br/>
|
|
111
|
+
zondy-popup__content 弹窗主体样式<br/>
|
|
112
|
+
zondy-popup__footer 弹窗底部样式<br/></p></span></li></ul><div style="font-weight: bold;vertical-align: middle;padding: 0.4rem 0;" class="mapgis-menu-span"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/m.png" alt="">undefined</div><ul class="mapgis-sidebar-menus"><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="Screenshot.html">Screenshot</a><span style="display: none;"><p>打印工具</p></span></li></ul><div style="font-weight: bold;vertical-align: middle;padding: 0.4rem 0;" class="mapgis-menu-span"><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/m.png" alt="">草图编辑模块</div><ul class="mapgis-sidebar-menus"><li><img style="width: 20px;margin-right: 6px;vertical-align: middle;" src="./styles/c.png" alt=""><a href="SketchEditorMapboxgl.html">SketchEditorMapboxgl</a><span style="display: none;"><p>二维场景草图编辑类<br/>
|
|
113
|
+
<br>[ES5引入方式]:<br/>
|
|
114
|
+
const { SketchEditorMapboxgl } = Zondy <br/>
|
|
115
|
+
[ES6引入方式]:<br/>
|
|
116
|
+
import { SketchEditorMapboxgl } from "@mapgis/webclient-leaflet-plugin" <br/></p></span></li></ul></div>
|
|
117
|
+
|
|
118
|
+
</nav>
|
|
119
|
+
</div>
|
|
120
|
+
<div class="core" id="main-content-wrapper">
|
|
121
|
+
<div class="content">
|
|
122
|
+
<header id="page-title" class="page-title">
|
|
123
|
+
<span class="page-title-main">类名</span>
|
|
124
|
+
<span class="page-title-sub">view/utils/MapVLayerUtil.js</span>
|
|
125
|
+
</header>
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
<section>
|
|
132
|
+
<article>
|
|
133
|
+
<pre class="prettyprint source linenums"><code>import MapvLayer from './mapV/MapVLayerPlugin'
|
|
134
|
+
|
|
135
|
+
class MapVLayerUtil {}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* MapV图层
|
|
139
|
+
* @param {MapVLayer} layer MapV图层基本对象
|
|
140
|
+
* @param {Viewer} innerView MapBoxGl的视图对象
|
|
141
|
+
* */
|
|
142
|
+
MapVLayerUtil.addMapVLayer = function (layer, innerView) {
|
|
143
|
+
const echartsLayer = new MapvLayer(innerView, layer.data, layer.mapVOptions)
|
|
144
|
+
echartsLayer.id = layer.id
|
|
145
|
+
return echartsLayer
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* 删除图层
|
|
150
|
+
* @param {Object} layer 图层对象
|
|
151
|
+
* */
|
|
152
|
+
MapVLayerUtil.removeLayer = function (layer) {
|
|
153
|
+
layer.remove()
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export default MapVLayerUtil
|
|
157
|
+
</code></pre>
|
|
158
|
+
</article>
|
|
159
|
+
</section>
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
</div>
|
|
165
|
+
|
|
166
|
+
<footer class="footer">
|
|
167
|
+
<div class="content has-text-centered">
|
|
168
|
+
<p>文档生成<a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a></p>
|
|
169
|
+
<p class="sidebar-created-by">
|
|
170
|
+
<a href="http://www.smaryun.com" target="_blank">司马云</a> <span>© 2023 云生态圈</span>
|
|
171
|
+
<a href="http://192.168.82.89:8086/#/index" target="_blank">MapGIS Client for JavaScript</a>
|
|
172
|
+
</p>
|
|
173
|
+
</div>
|
|
174
|
+
</footer>
|
|
175
|
+
|
|
176
|
+
</div>
|
|
177
|
+
<div id="side-nav" class="side-nav">
|
|
178
|
+
<div style="margin-bottom: 10px;">
|
|
179
|
+
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#page-title">构造函数</a>
|
|
180
|
+
</div>
|
|
181
|
+
<div style="margin-bottom: 10px;">
|
|
182
|
+
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#member">成员变量</a>
|
|
183
|
+
</div>
|
|
184
|
+
<div style="margin-bottom: 10px;">
|
|
185
|
+
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#function">方法</a>
|
|
186
|
+
</div>
|
|
187
|
+
<div>
|
|
188
|
+
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#event">事件</a>
|
|
189
|
+
</div>
|
|
190
|
+
</div>
|
|
191
|
+
</div>
|
|
192
|
+
<script src="scripts/linenumber.js"> </script>
|
|
193
|
+
|
|
194
|
+
<script src="scripts/search.js"> </script>
|
|
195
|
+
|
|
196
|
+
</body>
|
|
197
|
+
</html>
|