@igo2/context 21.0.0-next.20 → 21.0.0-next.21
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.
|
@@ -25,7 +25,7 @@ import { HttpParams, HttpClient } from '@angular/common/http';
|
|
|
25
25
|
import { AuthService } from '@igo2/auth';
|
|
26
26
|
import { RouteService } from '@igo2/core/route';
|
|
27
27
|
import { StorageService } from '@igo2/core/storage';
|
|
28
|
-
import { QueryFormat, isLayerGroupOptions, ID_GROUP_PREFIX, isLayerGroup, isLayerItem, getLayerOptionIdentifier, findParentId, generateIdFromSourceOptions, ExportService, FeatureDataSource,
|
|
28
|
+
import { QueryFormat, isLayerGroupOptions, ID_GROUP_PREFIX, isLayerGroup, isLayerItem, getLayerOptionIdentifier, findParentId, generateIdFromSourceOptions, ExportService, FeatureDataSource, randomOlFlatStyle, MapBrowserComponent, LayerService, sortLayersByZindex, mergeLayersOptions, MapService, isLayerItemOptions, moveToOlFeatures, FeatureMotion, FeatureDetailsComponent } from '@igo2/geo';
|
|
29
29
|
import { ObjectUtils, uuid, downloadContent } from '@igo2/utils';
|
|
30
30
|
import GeoJSON from 'ol/format/GeoJSON';
|
|
31
31
|
import olPoint from 'ol/geom/Point';
|
|
@@ -1904,7 +1904,7 @@ function getFileExtension(file) {
|
|
|
1904
1904
|
function computeLayerTitleFromFile(file) {
|
|
1905
1905
|
return file.name.substr(0, file.name.lastIndexOf('.'));
|
|
1906
1906
|
}
|
|
1907
|
-
function addImportedFeaturesToMap(extraFeatures, map) {
|
|
1907
|
+
function addImportedFeaturesToMap(extraFeatures, map, layerService) {
|
|
1908
1908
|
const sourceOptions = {
|
|
1909
1909
|
type: 'vector',
|
|
1910
1910
|
queryable: true
|
|
@@ -1912,7 +1912,7 @@ function addImportedFeaturesToMap(extraFeatures, map) {
|
|
|
1912
1912
|
const olFeatures = collectFeaturesFromExtraFeatures(extraFeatures);
|
|
1913
1913
|
const source = new FeatureDataSource(sourceOptions);
|
|
1914
1914
|
source.ol.addFeatures(olFeatures);
|
|
1915
|
-
const layer =
|
|
1915
|
+
const layer = layerService.createLayer({
|
|
1916
1916
|
title: extraFeatures.name,
|
|
1917
1917
|
isIgoInternalLayer: true,
|
|
1918
1918
|
source,
|
|
@@ -2257,14 +2257,14 @@ class LayerContextDirective {
|
|
|
2257
2257
|
this.handleAddLayers(layers);
|
|
2258
2258
|
if (context.extraFeatures) {
|
|
2259
2259
|
context.extraFeatures.forEach((featureCollection) => {
|
|
2260
|
-
addImportedFeaturesToMap(featureCollection, this.map);
|
|
2260
|
+
addImportedFeaturesToMap(featureCollection, this.map, this.layerService);
|
|
2261
2261
|
});
|
|
2262
2262
|
}
|
|
2263
2263
|
this.contextLayersLoaded.emit(true);
|
|
2264
2264
|
});
|
|
2265
2265
|
if (this.configService.getConfig('importExport.allowToStoreLayer', false)) {
|
|
2266
2266
|
this.layerService
|
|
2267
|
-
.
|
|
2267
|
+
.createAsyncOfflineLayers(context.uri)
|
|
2268
2268
|
.pipe(debounceTime(500))
|
|
2269
2269
|
.subscribe((layers) => this.handleAddLayers(layers));
|
|
2270
2270
|
}
|