@hzab/map-combine 0.3.0-beta1 → 1.0.0-alpha.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/package.json +9 -2
- package/src/amap/AMap.ts +6 -0
package/package.json
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hzab/map-combine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0-alpha.0",
|
|
4
4
|
"description": "地图组件",
|
|
5
5
|
"main": "src",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"dev": "npm run prepare && webpack serve -c ./config/webpack.config.js --env local",
|
|
8
8
|
"build": "webpack -c ./config/webpack.config.js --env production",
|
|
9
|
-
"
|
|
9
|
+
"version:alpha": "npm version prerelease --preid=alpha",
|
|
10
|
+
"publish:alpha": "npm publish --tag alpha",
|
|
11
|
+
"version:beta": "npm version prerelease --preid=beta",
|
|
12
|
+
"publish:beta": "npm publish --tag beta",
|
|
13
|
+
"version:patch": "npm version patch",
|
|
14
|
+
"version:minior": "npm version minor",
|
|
15
|
+
"version:major": "npm version major",
|
|
16
|
+
"publish:stable": "npm publish --access public",
|
|
10
17
|
"publish-patch": "npm version patch && npm publish --access public",
|
|
11
18
|
"publish-minor": "npm version minor && npm publish --access public",
|
|
12
19
|
"publish-major": "npm version major && npm publish --access public",
|
package/src/amap/AMap.ts
CHANGED
|
@@ -26,6 +26,10 @@ export interface IAMapOption {
|
|
|
26
26
|
securityJsCode: string;
|
|
27
27
|
/** 加载的插件列表 */
|
|
28
28
|
plugins?: [string];
|
|
29
|
+
/** loader 配置参数 */
|
|
30
|
+
loaderOpt?: Object;
|
|
31
|
+
/** 地图初始化 配置参数 */
|
|
32
|
+
mapOpt?: Object;
|
|
29
33
|
}
|
|
30
34
|
|
|
31
35
|
export interface IFlyToViewerOpt {
|
|
@@ -108,6 +112,7 @@ export class AMap extends MapCombine {
|
|
|
108
112
|
|
|
109
113
|
this.loadPromise = new Promise((resolve, reject) => {
|
|
110
114
|
AMapLoader({
|
|
115
|
+
...opt.loaderOpt,
|
|
111
116
|
key,
|
|
112
117
|
securityJsCode,
|
|
113
118
|
plugins,
|
|
@@ -116,6 +121,7 @@ export class AMap extends MapCombine {
|
|
|
116
121
|
this.LbsAMap = LbsAMap;
|
|
117
122
|
let _urls = Array.isArray(url) ? url : [url];
|
|
118
123
|
this.viewer = new LbsAMap.Map(container, {
|
|
124
|
+
...opt.mapOpt,
|
|
119
125
|
zoom: zoom || 14,
|
|
120
126
|
center: center || [120.160217, 30.243861],
|
|
121
127
|
doubleClickZoom: false,
|