Skip to content

Commit c4d853d

Browse files
committed
[feature] webmap3支持普通mapbox图层source是supermap-rest-data的
(reviewed by xjj)
1 parent 02a59af commit c4d853d

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/common/mapping/WebMapV3.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,12 @@ export function createWebMapV3Extending(SuperClass, { MapManager, mapRepo, crsMa
486486
});
487487
Object.assign(this._mapResourceInfo, { catalogs });
488488
const mapboxglLayers = layers.filter((layer) => !l7LayerUtil.isL7Layer(layer));
489+
for(const sourceId in sources) {
490+
const source = sources[sourceId];
491+
if(source.type === 'geojson' && source.data?.type === 'supermap-rest-data') {
492+
source.data = await l7LayerUtil.getRestDataGeojsonByWebMap(source.data, {iportalServiceProxyUrlPrefix: this.options.server, withoutFormatSuffix: true});
493+
}
494+
}
489495
mapboxglLayers.forEach((layer) => {
490496
if (layer.metadata && layer.metadata.reused) {
491497
return;

src/common/mapping/utils/L7LayerUtil.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2075,7 +2075,8 @@ export function L7LayerUtil(config) {
20752075
getL7MarkerLayers() {
20762076
return ChartController.markerLayers;
20772077
},
2078-
removeL7MarkerLayer
2078+
removeL7MarkerLayer,
2079+
getRestDataGeojsonByWebMap
20792080
}
20802081
}
20812082

0 commit comments

Comments
 (0)