Skip to content

Commit 6488feb

Browse files
committed
【feature】webmap eventname 优化
1 parent 926e321 commit 6488feb

29 files changed

+2388
-1967
lines changed

examples/mapboxgl/webPrintingJob.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ <h4 class="panel-title">
275275
target: 'map',
276276
server: 'https://www.supermapol.com'
277277
});
278-
webMap.on('addlayerssucceeded', function (e) {
278+
webMap.on('mapcreatesucceeded', function (e) {
279279
$('#center').val(e.map.getCenter().toArray().join(','));
280280
var extent = e.map.getCRS().extent;
281281
var res = Math.max(extent[2] - extent[0], extent[3] - extent[2]) / 512 / Math.pow(2, e.map.getZoom());

src/common/mapping/MapBase.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ export function createMapClassExtending(SuperClass = class {}) {
1818
return (this._sourceListModel && this._sourceListModel.getSourceList()) || [];
1919
}
2020

21-
getAppreciableLayers() {
21+
getLayers() {
2222
return (this._sourceListModel && this._sourceListModel.getLayers()) || [];
2323
}
2424

25-
getLegendInfo() {
25+
getLegends() {
2626
return this._legendList;
2727
}
2828

src/common/mapping/MapStyle.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { WebMapService } from './WebMapService';
2-
import { SourceListModel } from './utils/SourceListModelV2';
2+
import { SourceListModelV2 } from './utils/SourceListModelV2';
33

44
export function createMapStyleExtending(SuperClass, { MapManager, mapRepo }) {
55
return class MapStyle extends SuperClass {
@@ -131,12 +131,12 @@ export function createMapStyleExtending(SuperClass, { MapManager, mapRepo }) {
131131

132132
_sendMapToUser() {
133133
const layersFromStyle = this._generateAppreciableLayers();
134-
this._sourceListModel = new SourceListModel({
134+
this._sourceListModel = new SourceListModelV2({
135135
map: this.map,
136136
layers: layersFromStyle,
137137
appendLayers: this._appendLayers
138138
});
139-
this.fire('addlayerssucceeded', {
139+
this.fire('mapcreatesucceeded', {
140140
map: this.map,
141141
mapparams: { title: this.mapOptions.name, description: '' },
142142
layers: this.getSelfAppreciableLayers()

0 commit comments

Comments
 (0)