@mapgis/webclient-mapboxgl-plugin 17.0.6 → 17.2.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 +11 -35
- package/dist/es5/webclient-common.min.js +15 -4
- package/dist/es5/webclient-mapboxgl-plugin.min.js +1 -1
- package/dist/webclient-mapboxgl-plugin-es6.min.js +1 -1
- package/documention/MapViewMapboxgl.html +1233 -8
- package/documention/Popup.html +3 -3
- package/documention/Screenshot.html +0 -11
- package/documention/SketchEditorMapboxgl.html +31 -2
- package/documention/index.html +4 -4
- package/documention/scripts/sideBar.js +16 -2
- package/package.json +3 -4
- package/documention/document_ArcGISVectorTileLayerView.js.html +0 -265
- package/documention/document_EchartsLayerView.js.html +0 -246
- package/documention/document_GraphicsLayerView.js.html +0 -314
- package/documention/document_IGSFeatureLayerView.js.html +0 -218
- package/documention/document_IGSMapImageLayerView.js.html +0 -240
- package/documention/document_IGSTileLayerView.js.html +0 -236
- package/documention/document_IGSVectorTileLayerView.js.html +0 -264
- package/documention/document_MapVLayerView.js.html +0 -247
- package/documention/document_WMSLayerView.js.html +0 -240
- package/documention/document_WMTSLayerView.js.html +0 -234
- package/documention/document_WebTileLayerView.js.html +0 -240
- package/documention/document_support_FeatureRenderView.js.html +0 -682
- package/documention/document_support_MapboxglGraphicsLayer.js.html +0 -1184
- package/documention/document_support_SourceMetaData.js.html +0 -223
- package/documention/document_support_Utils.js.html +0 -624
- package/documention/document_support_mapbox_mapboxCustomUtil.js.html +0 -322
- package/documention/sketchEditor_SketchEditorMapboxgl.js.html +0 -875
- package/documention/util_ConvertRendererToStyleLayerUtil.js.html +0 -844
- package/documention/util_MapboxglFeatureRender.js.html +0 -225
- package/documention/util_MapboxglPlugin.js.html +0 -284
- package/documention/view_MapViewMapboxgl.js.html +0 -1882
- package/documention/view_utils_ArcGISVectorTileLayerUtil.js.html +0 -382
- package/documention/view_utils_EchartsLayerUtil.js.html +0 -194
- package/documention/view_utils_IGSMapImageUtil.js.html +0 -373
- package/documention/view_utils_IGSTileLayerUtil.js.html +0 -285
- package/documention/view_utils_IGSVectorTileLayerUtil.js.html +0 -379
- package/documention/view_utils_MapVLayerUtil.js.html +0 -197
- package/documention/view_utils_Popup.js.html +0 -525
- package/documention/view_utils_Screenshot.js.html +0 -320
- package/documention/view_utils_WMSLayerUtil.js.html +0 -337
- package/documention/view_utils_WMTSLayerUtil.js.html +0 -331
- package/documention/view_utils_WebTileLayerUtil.js.html +0 -284
- package/documention/view_utils_echarts_EchartsLayerPlugin.js.html +0 -419
- package/documention/view_utils_mapV_MapVLayerPlugin.js.html +0 -527
- package/documention/view_utils_mapV_MapvBaseLayer.js.html +0 -477
- package/documention/view_utils_support_rasterLayerUtil.js.html +0 -244
- package/documention/view_utils_support_vectorLayerUtil.js.html +0 -503
|
@@ -1,225 +0,0 @@
|
|
|
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 util/MapboxglFeatureRender.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">util/MapboxglFeatureRender.js</span>
|
|
125
|
-
</header>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
<section>
|
|
132
|
-
<article>
|
|
133
|
-
<pre class="prettyprint source linenums"><code>import { FeatureRender } from '@mapgis/webclient-common'
|
|
134
|
-
|
|
135
|
-
class MapboxglFeatureRender extends FeatureRender {
|
|
136
|
-
/**
|
|
137
|
-
* @description: 绘制要素
|
|
138
|
-
* @param {*} innerLayer
|
|
139
|
-
* @param {*} features
|
|
140
|
-
* @return {*}
|
|
141
|
-
*/
|
|
142
|
-
drawFeature(innerLayer, features) {
|
|
143
|
-
if (innerLayer) {
|
|
144
|
-
innerLayer.add(features)
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* @description: 更新样式
|
|
150
|
-
* @param {Object} innerLayer
|
|
151
|
-
* @param {Array<Feature>} features
|
|
152
|
-
* @param {Array<Object>} updateDetail 要素更新细节
|
|
153
|
-
* @return {*}
|
|
154
|
-
*/
|
|
155
|
-
updateFeature(innerLayer, features, updateDetail) {
|
|
156
|
-
if (innerLayer) {
|
|
157
|
-
innerLayer.update(features, updateDetail)
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* @description: 清除要素
|
|
163
|
-
* @param {*} innerLayer
|
|
164
|
-
* @param {*} features
|
|
165
|
-
* @return {*}
|
|
166
|
-
*/
|
|
167
|
-
clearFeature(innerLayer, features) {
|
|
168
|
-
if (innerLayer) {
|
|
169
|
-
innerLayer.remove(features)
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/**
|
|
174
|
-
* @description: 清空上下文图层
|
|
175
|
-
* @param {*} innerLayer
|
|
176
|
-
* @return {*}
|
|
177
|
-
*/
|
|
178
|
-
clear(innerLayer) {
|
|
179
|
-
if (innerLayer) {
|
|
180
|
-
innerLayer.removeAll()
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
export default MapboxglFeatureRender
|
|
185
|
-
</code></pre>
|
|
186
|
-
</article>
|
|
187
|
-
</section>
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
</div>
|
|
193
|
-
|
|
194
|
-
<footer class="footer">
|
|
195
|
-
<div class="content has-text-centered">
|
|
196
|
-
<p>文档生成<a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a></p>
|
|
197
|
-
<p class="sidebar-created-by">
|
|
198
|
-
<a href="http://www.smaryun.com" target="_blank">司马云</a> <span>© 2023 云生态圈</span>
|
|
199
|
-
<a href="http://192.168.82.89:8086/#/index" target="_blank">MapGIS Client for JavaScript</a>
|
|
200
|
-
</p>
|
|
201
|
-
</div>
|
|
202
|
-
</footer>
|
|
203
|
-
|
|
204
|
-
</div>
|
|
205
|
-
<div id="side-nav" class="side-nav">
|
|
206
|
-
<div style="margin-bottom: 10px;">
|
|
207
|
-
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#page-title">构造函数</a>
|
|
208
|
-
</div>
|
|
209
|
-
<div style="margin-bottom: 10px;">
|
|
210
|
-
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#member">成员变量</a>
|
|
211
|
-
</div>
|
|
212
|
-
<div style="margin-bottom: 10px;">
|
|
213
|
-
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#function">方法</a>
|
|
214
|
-
</div>
|
|
215
|
-
<div>
|
|
216
|
-
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#event">事件</a>
|
|
217
|
-
</div>
|
|
218
|
-
</div>
|
|
219
|
-
</div>
|
|
220
|
-
<script src="scripts/linenumber.js"> </script>
|
|
221
|
-
|
|
222
|
-
<script src="scripts/search.js"> </script>
|
|
223
|
-
|
|
224
|
-
</body>
|
|
225
|
-
</html>
|
|
@@ -1,284 +0,0 @@
|
|
|
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 util/MapboxglPlugin.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">util/MapboxglPlugin.js</span>
|
|
125
|
-
</header>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
<section>
|
|
132
|
-
<article>
|
|
133
|
-
<pre class="prettyprint source linenums"><code>import {
|
|
134
|
-
Projection,
|
|
135
|
-
SpatialReference,
|
|
136
|
-
editGeometryByArc3,
|
|
137
|
-
Color
|
|
138
|
-
} from '@mapgis/webclient-common'
|
|
139
|
-
|
|
140
|
-
// mapbox expressions操作符
|
|
141
|
-
const MAPBOXEXPRESSIONS = `== != > < >= <= array at boolean case coalesce collator format image in interpolate interpolate-hcl interpolate-lab
|
|
142
|
-
length let literal match number number-format object step string to-boolean to-color to-number to-string var within`
|
|
143
|
-
|
|
144
|
-
class MapboxglPlugin {
|
|
145
|
-
// 判断是否为mapbox expressions
|
|
146
|
-
static isMapboxExpression(expression) {
|
|
147
|
-
return (
|
|
148
|
-
Array.isArray(expression) &&
|
|
149
|
-
expression.length > 0 &&
|
|
150
|
-
typeof expression[0] === 'string' &&
|
|
151
|
-
MAPBOXEXPRESSIONS.indexOf(expression[0]) > -1
|
|
152
|
-
)
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
static convertLineStyle(lineStyle, isButt) {
|
|
156
|
-
switch (lineStyle) {
|
|
157
|
-
case 'dash':
|
|
158
|
-
case 'esriSLSDash':
|
|
159
|
-
return isButt ? [4, 3] : [3, 4]
|
|
160
|
-
case 'dash-dot':
|
|
161
|
-
case 'esriSLSDashDot':
|
|
162
|
-
return isButt ? [4, 3, 1, 3] : [3, 4, 0, 4]
|
|
163
|
-
case 'dot':
|
|
164
|
-
case 'esriSLSDot':
|
|
165
|
-
return isButt ? [1, 3] : [0, 4]
|
|
166
|
-
case 'long-dash':
|
|
167
|
-
case 'esriSLSLongDash':
|
|
168
|
-
return isButt ? [8, 3] : [7, 4]
|
|
169
|
-
case 'long-dash-dot':
|
|
170
|
-
case 'esriSLSLongDashDot':
|
|
171
|
-
return isButt ? [8, 3, 1, 3] : [7, 4, 0, 4]
|
|
172
|
-
case 'long-dash-dot-dot':
|
|
173
|
-
case 'esriSLSDashDotDot':
|
|
174
|
-
return isButt ? [8, 3, 1, 3, 1, 3] : [7, 4, 0, 4, 0, 4]
|
|
175
|
-
case 'short-dash':
|
|
176
|
-
case 'esriSLSShortDash':
|
|
177
|
-
return isButt ? [4, 1] : [3, 2]
|
|
178
|
-
case 'short-dash-dot':
|
|
179
|
-
case 'esriSLSShortDashDot':
|
|
180
|
-
return isButt ? [4, 1, 1, 1] : [3, 2, 0, 2]
|
|
181
|
-
case 'short-dash-dot-dot':
|
|
182
|
-
case 'esriSLSShortDashDotDot':
|
|
183
|
-
return isButt ? [4, 1, 1, 1, 1, 1] : [3, 2, 0, 2, 0, 2]
|
|
184
|
-
case 'short-dot':
|
|
185
|
-
case 'esriSLSShortDot':
|
|
186
|
-
return isButt ? [1, 1] : [0, 2]
|
|
187
|
-
case 'solid':
|
|
188
|
-
case 'esriSLSSolid':
|
|
189
|
-
case 'none':
|
|
190
|
-
return undefined
|
|
191
|
-
default:
|
|
192
|
-
return undefined
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* @description: 转换为geojson feature
|
|
198
|
-
* @param {*} feature
|
|
199
|
-
* @return {*}
|
|
200
|
-
*/
|
|
201
|
-
static convertToGeoJSON(feature) {
|
|
202
|
-
let graphic = feature
|
|
203
|
-
const geometry = graphic.geometry
|
|
204
|
-
const spatialReference = geometry.spatialReference
|
|
205
|
-
|
|
206
|
-
if (String(spatialReference.wkid) !== '4326') {
|
|
207
|
-
graphic = feature.clone()
|
|
208
|
-
graphic.geometry = Projection.project(
|
|
209
|
-
geometry,
|
|
210
|
-
new SpatialReference('EPSG:4326')
|
|
211
|
-
)
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
// 处理三点弧问题
|
|
215
|
-
if (feature.additional && feature.additional.arc3) {
|
|
216
|
-
feature.geometry = editGeometryByArc3(
|
|
217
|
-
feature.geometry,
|
|
218
|
-
feature.additional
|
|
219
|
-
)
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
// 转换为geojson
|
|
223
|
-
const geojson = graphic.toGeoJSON()
|
|
224
|
-
return geojson
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
/**
|
|
228
|
-
* @description: 作用显示或隐藏和透明度到颜色通道
|
|
229
|
-
* @param {*} colorString
|
|
230
|
-
* @param {*} visible
|
|
231
|
-
* @param {*} opacity
|
|
232
|
-
* @return {Color}
|
|
233
|
-
*/
|
|
234
|
-
static applyVisibleAndOpacityToColor(colorString, visible, opacity){
|
|
235
|
-
const color = Color.fromColor(colorString)
|
|
236
|
-
const cloneColor = color.clone()
|
|
237
|
-
const alpha = opacity * (visible ? 1 : 0)
|
|
238
|
-
cloneColor.alpha *= alpha
|
|
239
|
-
return cloneColor
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
export default MapboxglPlugin
|
|
244
|
-
</code></pre>
|
|
245
|
-
</article>
|
|
246
|
-
</section>
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
</div>
|
|
252
|
-
|
|
253
|
-
<footer class="footer">
|
|
254
|
-
<div class="content has-text-centered">
|
|
255
|
-
<p>文档生成<a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a></p>
|
|
256
|
-
<p class="sidebar-created-by">
|
|
257
|
-
<a href="http://www.smaryun.com" target="_blank">司马云</a> <span>© 2023 云生态圈</span>
|
|
258
|
-
<a href="http://192.168.82.89:8086/#/index" target="_blank">MapGIS Client for JavaScript</a>
|
|
259
|
-
</p>
|
|
260
|
-
</div>
|
|
261
|
-
</footer>
|
|
262
|
-
|
|
263
|
-
</div>
|
|
264
|
-
<div id="side-nav" class="side-nav">
|
|
265
|
-
<div style="margin-bottom: 10px;">
|
|
266
|
-
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#page-title">构造函数</a>
|
|
267
|
-
</div>
|
|
268
|
-
<div style="margin-bottom: 10px;">
|
|
269
|
-
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#member">成员变量</a>
|
|
270
|
-
</div>
|
|
271
|
-
<div style="margin-bottom: 10px;">
|
|
272
|
-
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#function">方法</a>
|
|
273
|
-
</div>
|
|
274
|
-
<div>
|
|
275
|
-
<img style="vertical-align: middle;margin-right: 10px;width: 30px;" src="./styles/anchor.png"/><a href="#event">事件</a>
|
|
276
|
-
</div>
|
|
277
|
-
</div>
|
|
278
|
-
</div>
|
|
279
|
-
<script src="scripts/linenumber.js"> </script>
|
|
280
|
-
|
|
281
|
-
<script src="scripts/search.js"> </script>
|
|
282
|
-
|
|
283
|
-
</body>
|
|
284
|
-
</html>
|