Skip to content

Commit 30cb40e

Browse files
committed
修改openlayers webmap对接
1 parent 4c98fa2 commit 30cb40e

File tree

4 files changed

+6
-35
lines changed

4 files changed

+6
-35
lines changed

dist/iclient9-openlayers.js

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33970,9 +33970,9 @@ var WebMap = function (_ol$Observable) {
3397033970
}
3397133971
me.createLayer(type, layerInfo);
3397233972
}
33973-
me.dispatchEvent({ type: _olDebug2.default.supermap.WebMap.EventType.WEBMAPLOADEND, value: this.map });
33973+
me.dispatchEvent({ type: _olDebug2.default.supermap.WebMap.EventType.WEBMAPLOADEND, value: this });
3397433974
});
33975-
view.fit(options.extent);
33975+
view.fit(viewOptions.extent);
3397633976
}
3397733977
}
3397833978
}, {
@@ -33986,9 +33986,6 @@ var WebMap = function (_ol$Observable) {
3398633986
* @param options -{Object} 创建图层所需参数
3398733987
*/
3398833988
value: function addLayer(layer, options) {
33989-
if (!this.map) {
33990-
this.createMap(options);
33991-
}
3399233989
return this.map.addLayer(layer);
3399333990
}
3399433991
}, {
@@ -34014,18 +34011,6 @@ var WebMap = function (_ol$Observable) {
3401434011
return 'EPSG:' + epsgCode;
3401534012
}
3401634013

34017-
/**
34018-
* @function ol.supermap.WebMap.prototype.createMap
34019-
* @description 创建地图
34020-
* @param options - {Object} 创建地图所需参数
34021-
*/
34022-
34023-
}, {
34024-
key: 'createMap',
34025-
value: function createMap(options) {
34026-
if (!this.map) {}
34027-
}
34028-
3402934014
/**
3403034015
* @function ol.supermap.WebMap.prototype.getResolutionsFromScales
3403134016
* @description 通过比例尺获取分辨率

dist/iclient9-openlayers.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/include-leaflet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
inputScript("http://cdn.bootcss.com/elasticsearch/13.0.1/elasticsearch.min.js");
5353
}
5454
if (!inArray(excludes, 'iclient9-leaflet')) {
55-
inputScript("../../dist/iclient9-leaflet.js");
55+
inputScript("../../dist/iclient9-leaflet.min.js");
5656
}
5757
if (inArray(includes, 'iclient9-leaflet-css')) {
5858
inputCSS("../../dist/iclient9-leaflet.min.css");

src/openlayers/mapping/WebMap.js

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@ export default class WebMap extends ol.Observable {
110110
}
111111
me.createLayer(type, layerInfo);
112112
}
113-
me.dispatchEvent({type: ol.supermap.WebMap.EventType.WEBMAPLOADEND, value: this.map});
113+
me.dispatchEvent({type: ol.supermap.WebMap.EventType.WEBMAPLOADEND, value: this});
114114
})
115-
view.fit(options.extent);
115+
view.fit(viewOptions.extent);
116116

117117
}
118118

@@ -126,9 +126,6 @@ export default class WebMap extends ol.Observable {
126126
* @param options -{Object} 创建图层所需参数
127127
*/
128128
addLayer(layer, options) {
129-
if (!this.map) {
130-
this.createMap(options);
131-
}
132129
return this.map.addLayer(layer);
133130
}
134131

@@ -153,17 +150,6 @@ export default class WebMap extends ol.Observable {
153150
return 'EPSG:' + epsgCode;
154151
}
155152

156-
/**
157-
* @function ol.supermap.WebMap.prototype.createMap
158-
* @description 创建地图
159-
* @param options - {Object} 创建地图所需参数
160-
*/
161-
createMap(options) {
162-
if (!this.map) {
163-
164-
}
165-
}
166-
167153
/**
168154
* @function ol.supermap.WebMap.prototype.getResolutionsFromScales
169155
* @description 通过比例尺获取分辨率

0 commit comments

Comments
 (0)