gdmap-utils 1.2.0 → 1.2.2
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/.husky/pre-commit +1 -1
- package/.prettierrc.json +17 -17
- package/README.md +2 -50
- package/dist/index.js +1 -83
- package/dist/index.js.map +1 -1
- package/examples/1_init.html +23 -23
- package/examples/2_mapInit.html +48 -48
- package/examples/3_MarkerLayer.html +565 -565
- package/examples/4_LabelMarkerLayer.html +574 -574
- package/index.html +134 -134
- package/package.json +48 -48
- package/src/LayerManager.ts +49 -49
- package/src/MapSourceImport.ts +23 -23
- package/src/MapUtils.ts +154 -154
- package/src/gdMap/gdHelper.js +194 -194
- package/src/gdMap/gdHelper.ts +85 -85
- package/src/gdMapUtils.js +377 -377
- package/src/index.ts +1 -1
- package/src/layers/baseMarkerLayer/LabelMarkerLayer.ts +238 -238
- package/src/layers/baseMarkerLayer/MarkerLayer.ts +206 -206
- package/src/layers/baseMarkerLayer/index.ts +354 -354
- package/src/{layers copy/MarkerClusterLayer.js → layers/clusterMarkerLayer/MarkerClusterLayer.js} +155 -155
- package/src/layers/{MarkerClusterLayer.ts → clusterMarkerLayer/MarkerClusterLayer.ts} +30 -30
- package/src/layers/index.ts +5 -5
- package/src/types/BaseMarkerLayer.d.ts +87 -87
- package/src/types/MapUtils.d.ts +53 -53
- package/src/types/amap.d.ts +11 -11
- package/src/types/index.d.ts +12 -12
- package/tsconfig.json +26 -26
- package/webpack.config.js +126 -126
- package/src/layers copy/LabelMarkerLayer.js +0 -122
- package/src/layers copy/MarkerLayer.js +0 -267
- package/src/layers copy/OverlayGroupManager.js +0 -254
- package/src/layers copy/index.ts +0 -0
package/examples/2_mapInit.html
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8" />
|
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
-
<meta
|
|
7
|
-
name="viewport"
|
|
8
|
-
content="initial-scale=1.0, user-scalable=no, width=device-width"
|
|
9
|
-
/>
|
|
10
|
-
<link
|
|
11
|
-
rel="stylesheet"
|
|
12
|
-
href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css"
|
|
13
|
-
/>
|
|
14
|
-
<title>地图显示</title>
|
|
15
|
-
<style>
|
|
16
|
-
html,
|
|
17
|
-
body,
|
|
18
|
-
#container {
|
|
19
|
-
width: 100%;
|
|
20
|
-
height: 100%;
|
|
21
|
-
}
|
|
22
|
-
</style>
|
|
23
|
-
</head>
|
|
24
|
-
<body>
|
|
25
|
-
<div id="container"></div>
|
|
26
|
-
<!-- 加载地图JSAPI脚本 -->
|
|
27
|
-
<script src="../dist/index.js"></script>
|
|
28
|
-
<script>
|
|
29
|
-
const { createMapUtils } = MapUtils;
|
|
30
|
-
|
|
31
|
-
const loaderOpts = {
|
|
32
|
-
version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
33
|
-
plugins: ['AMap.MapType', 'AMap.MoveAnimation'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
|
34
|
-
key: '9506c73ed67acb0a09f1aabf88df4819',
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
createMapUtils(
|
|
38
|
-
{
|
|
39
|
-
viewMode: '2D', // 默认使用 2D 模式,如果希望使用带有俯仰角的 3D 模式,请设置 viewMode: '3D'
|
|
40
|
-
zoom: 11, // 初始化地图层级
|
|
41
|
-
center: [116.397428, 39.90923], // 初始化地图中心点
|
|
42
|
-
mountSelector: 'container',
|
|
43
|
-
},
|
|
44
|
-
loaderOpts
|
|
45
|
-
);
|
|
46
|
-
</script>
|
|
47
|
-
</body>
|
|
48
|
-
</html>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta
|
|
7
|
+
name="viewport"
|
|
8
|
+
content="initial-scale=1.0, user-scalable=no, width=device-width"
|
|
9
|
+
/>
|
|
10
|
+
<link
|
|
11
|
+
rel="stylesheet"
|
|
12
|
+
href="https://a.amap.com/jsapi_demos/static/demo-center/css/demo-center.css"
|
|
13
|
+
/>
|
|
14
|
+
<title>地图显示</title>
|
|
15
|
+
<style>
|
|
16
|
+
html,
|
|
17
|
+
body,
|
|
18
|
+
#container {
|
|
19
|
+
width: 100%;
|
|
20
|
+
height: 100%;
|
|
21
|
+
}
|
|
22
|
+
</style>
|
|
23
|
+
</head>
|
|
24
|
+
<body>
|
|
25
|
+
<div id="container"></div>
|
|
26
|
+
<!-- 加载地图JSAPI脚本 -->
|
|
27
|
+
<script src="../dist/index.js"></script>
|
|
28
|
+
<script>
|
|
29
|
+
const { createMapUtils } = MapUtils;
|
|
30
|
+
|
|
31
|
+
const loaderOpts = {
|
|
32
|
+
version: '2.0', // 指定要加载的 JSAPI 的版本,缺省时默认为 1.4.15
|
|
33
|
+
plugins: ['AMap.MapType', 'AMap.MoveAnimation'], // 需要使用的的插件列表,如比例尺'AMap.Scale'等
|
|
34
|
+
key: '9506c73ed67acb0a09f1aabf88df4819',
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
createMapUtils(
|
|
38
|
+
{
|
|
39
|
+
viewMode: '2D', // 默认使用 2D 模式,如果希望使用带有俯仰角的 3D 模式,请设置 viewMode: '3D'
|
|
40
|
+
zoom: 11, // 初始化地图层级
|
|
41
|
+
center: [116.397428, 39.90923], // 初始化地图中心点
|
|
42
|
+
mountSelector: 'container',
|
|
43
|
+
},
|
|
44
|
+
loaderOpts
|
|
45
|
+
);
|
|
46
|
+
</script>
|
|
47
|
+
</body>
|
|
48
|
+
</html>
|