@igo2/geo 21.0.0-next.12 → 21.0.0-next.13
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/fesm2022/igo2-geo.mjs +67 -79
- package/fesm2022/igo2-geo.mjs.map +1 -1
- package/package.json +5 -5
- package/types/igo2-geo.d.ts +25 -26
package/fesm2022/igo2-geo.mjs
CHANGED
|
@@ -4235,10 +4235,6 @@ class GeoDB {
|
|
|
4235
4235
|
}
|
|
4236
4236
|
}));
|
|
4237
4237
|
}
|
|
4238
|
-
/** @deprecated Use delete method instead*/
|
|
4239
|
-
deleteByKey(key) {
|
|
4240
|
-
return this.delete(key);
|
|
4241
|
-
}
|
|
4242
4238
|
getRegionCountByID(id) {
|
|
4243
4239
|
return this.getRegionByID(id).pipe(switchMap((datas) => {
|
|
4244
4240
|
return of(datas.length);
|
|
@@ -4345,10 +4341,6 @@ class LayerDB {
|
|
|
4345
4341
|
}
|
|
4346
4342
|
}));
|
|
4347
4343
|
}
|
|
4348
|
-
/** @deprecated Use delete method instead*/
|
|
4349
|
-
deleteByKey(key) {
|
|
4350
|
-
return this.delete(key);
|
|
4351
|
-
}
|
|
4352
4344
|
/**
|
|
4353
4345
|
* This method retrive all idb layer definition
|
|
4354
4346
|
* @param layerId
|
|
@@ -5796,7 +5788,7 @@ class PrintService {
|
|
|
5796
5788
|
let textProjScale = '';
|
|
5797
5789
|
if (options.showProjection === true) {
|
|
5798
5790
|
const projText = translate.instant('igo.geo.printForm.projection');
|
|
5799
|
-
textProjScale += projText + ': ' + map.
|
|
5791
|
+
textProjScale += projText + ': ' + map.projectionCode;
|
|
5800
5792
|
}
|
|
5801
5793
|
if (options.showScale === true) {
|
|
5802
5794
|
if (options.showProjection === true) {
|
|
@@ -6239,7 +6231,8 @@ class PrintService {
|
|
|
6239
6231
|
let projectionScaleText = '';
|
|
6240
6232
|
if (projection !== false) {
|
|
6241
6233
|
const projText = translate.instant('igo.geo.printForm.projection');
|
|
6242
|
-
projectionScaleText =
|
|
6234
|
+
projectionScaleText =
|
|
6235
|
+
projText + ': ' + map.projectionCode + ' ';
|
|
6243
6236
|
}
|
|
6244
6237
|
if (scale !== false) {
|
|
6245
6238
|
const scaleText = translate.instant('igo.geo.printForm.scale');
|
|
@@ -6292,7 +6285,7 @@ class PrintService {
|
|
|
6292
6285
|
let fileNameWithExt = 'map.' + format;
|
|
6293
6286
|
if (format.toLowerCase() === 'tiff') {
|
|
6294
6287
|
fileNameWithExt =
|
|
6295
|
-
'map' + map.
|
|
6288
|
+
'map' + map.projectionCode.replace(':', '_') + '.' + format;
|
|
6296
6289
|
}
|
|
6297
6290
|
try {
|
|
6298
6291
|
// Save the canvas as file
|
|
@@ -7894,7 +7887,7 @@ class FeatureStore extends EntityStore {
|
|
|
7894
7887
|
setLayerFeatures(features, motion = FeatureMotion.Default, viewScale, areaRatio, getId) {
|
|
7895
7888
|
getId = getId ? getId : getEntityId;
|
|
7896
7889
|
this.checkLayer();
|
|
7897
|
-
const olFeatures = features.map((feature) => featureToOl(feature, this.map.
|
|
7890
|
+
const olFeatures = features.map((feature) => featureToOl(feature, this.map.projectionCode, getId));
|
|
7898
7891
|
this.setLayerOlFeatures(olFeatures, motion, viewScale, areaRatio);
|
|
7899
7892
|
}
|
|
7900
7893
|
/**
|
|
@@ -7905,7 +7898,7 @@ class FeatureStore extends EntityStore {
|
|
|
7905
7898
|
this.checkLayer();
|
|
7906
7899
|
const features = olFeatures.map((olFeature) => {
|
|
7907
7900
|
olFeature.set('_featureStore', this, true);
|
|
7908
|
-
return featureFromOl(olFeature, this.layer.map.
|
|
7901
|
+
return featureFromOl(olFeature, this.layer.map.projectionCode);
|
|
7909
7902
|
});
|
|
7910
7903
|
this.load(features);
|
|
7911
7904
|
}
|
|
@@ -7952,7 +7945,7 @@ class FeatureStore extends EntityStore {
|
|
|
7952
7945
|
const extent = olextent.createEmpty();
|
|
7953
7946
|
const olFeatures = [];
|
|
7954
7947
|
features.forEach((feature) => {
|
|
7955
|
-
olFeatures.push(featureToOl(feature, this.map.
|
|
7948
|
+
olFeatures.push(featureToOl(feature, this.map.projectionCode));
|
|
7956
7949
|
});
|
|
7957
7950
|
const featuresExtent = computeOlFeaturesExtent(olFeatures, this.map.viewProjection);
|
|
7958
7951
|
olextent.extend(extent, featuresExtent);
|
|
@@ -9809,7 +9802,7 @@ class DirectionsInputsComponent {
|
|
|
9809
9802
|
* @param {Stop} stop - The stop to update with the new coordinates and text.
|
|
9810
9803
|
*/
|
|
9811
9804
|
useCoordinatesAsStop(coordinates, stop) {
|
|
9812
|
-
const projectedCoordinates = olproj.transform(coordinates, this.stopsFeatureStore().layer.map?.
|
|
9805
|
+
const projectedCoordinates = olproj.transform(coordinates, this.stopsFeatureStore().layer.map?.projectionCode, this.projection());
|
|
9813
9806
|
const roundedCoordinates = roundCoordTo(projectedCoordinates, this.coordRoundedDecimals());
|
|
9814
9807
|
stop.text = roundCoordToString(projectedCoordinates, this.coordRoundedDecimals()).join(', ');
|
|
9815
9808
|
stop.coordinates = roundedCoordinates;
|
|
@@ -9941,14 +9934,14 @@ class DirectionsResultsComponent {
|
|
|
9941
9934
|
const map = stepsFeatureStore.layer.map;
|
|
9942
9935
|
const vertexId = 'vertex';
|
|
9943
9936
|
const geometry4326 = new olgeom.LineString(coordinates);
|
|
9944
|
-
const geometryMapProjection = geometry4326.transform('EPSG:4326', map?.
|
|
9937
|
+
const geometryMapProjection = geometry4326.transform('EPSG:4326', map?.projectionCode);
|
|
9945
9938
|
const routeSegmentCoordinates = geometryMapProjection.getCoordinates();
|
|
9946
9939
|
const lastPointCoordinates = routeSegmentCoordinates[0];
|
|
9947
9940
|
const lastPointGeometry = new olgeom.Point(lastPointCoordinates);
|
|
9948
9941
|
const lastPointFeature = new OlFeature({
|
|
9949
9942
|
geometry: lastPointGeometry
|
|
9950
9943
|
});
|
|
9951
|
-
const projection = map?.
|
|
9944
|
+
const projection = map?.projectionCode;
|
|
9952
9945
|
const geojsonGeom = new OlGeoJSON().writeGeometryObject(lastPointGeometry, {
|
|
9953
9946
|
featureProjection: projection,
|
|
9954
9947
|
dataProjection: projection
|
|
@@ -10555,7 +10548,7 @@ class CapabilitiesService {
|
|
|
10555
10548
|
isExtentInGeographic = false;
|
|
10556
10549
|
}
|
|
10557
10550
|
const extent = isExtentInGeographic
|
|
10558
|
-
? olproj.transformExtent(layer.EX_GeographicBoundingBox, 'EPSG:4326', this.mapService.getMap()?.
|
|
10551
|
+
? olproj.transformExtent(layer.EX_GeographicBoundingBox, 'EPSG:4326', this.mapService.getMap()?.projectionCode)
|
|
10559
10552
|
: undefined;
|
|
10560
10553
|
let queryFormat;
|
|
10561
10554
|
const queryFormatMimeTypePriority = [
|
|
@@ -14102,7 +14095,7 @@ class MapGeolocationController extends MapController {
|
|
|
14102
14095
|
const edgeRatios = position?.speed > 12.5
|
|
14103
14096
|
? [0.25, 0.25, 0.25, 0.25]
|
|
14104
14097
|
: [0.15, 0.1, 0.1, 0.1];
|
|
14105
|
-
const areOutOfView = featuresAreOutOfView(this.map.getExtent(), featuresExtent, edgeRatios);
|
|
14098
|
+
const areOutOfView = featuresAreOutOfView(this.map.viewController.getExtent(), featuresExtent, edgeRatios);
|
|
14106
14099
|
let motion = this.followPosition && areOutOfView
|
|
14107
14100
|
? FeatureMotion.Move
|
|
14108
14101
|
: FeatureMotion.None;
|
|
@@ -14495,10 +14488,6 @@ class IgoMap {
|
|
|
14495
14488
|
defaultOptions = {
|
|
14496
14489
|
controls: { attribution: false }
|
|
14497
14490
|
};
|
|
14498
|
-
/** @deprecated use projectionCode */
|
|
14499
|
-
get projection() {
|
|
14500
|
-
return this.projectionCode;
|
|
14501
|
-
}
|
|
14502
14491
|
get viewProjection() {
|
|
14503
14492
|
return this.viewController.getOlProjection();
|
|
14504
14493
|
}
|
|
@@ -14628,27 +14617,6 @@ class IgoMap {
|
|
|
14628
14617
|
this.ol.addControl(control);
|
|
14629
14618
|
});
|
|
14630
14619
|
}
|
|
14631
|
-
/**
|
|
14632
|
-
* @deprecated
|
|
14633
|
-
* TODO: Move to ViewController and update every place it's used
|
|
14634
|
-
*/
|
|
14635
|
-
getCenter(projection) {
|
|
14636
|
-
return this.viewController.getCenter(projection);
|
|
14637
|
-
}
|
|
14638
|
-
/**
|
|
14639
|
-
* @deprecated
|
|
14640
|
-
* TODO: Move to ViewController and update every place it's used
|
|
14641
|
-
*/
|
|
14642
|
-
getExtent(projection) {
|
|
14643
|
-
return this.viewController.getExtent(projection);
|
|
14644
|
-
}
|
|
14645
|
-
/**
|
|
14646
|
-
* @deprecated
|
|
14647
|
-
* TODO: Move to ViewController and update every place it's used
|
|
14648
|
-
*/
|
|
14649
|
-
getZoom() {
|
|
14650
|
-
return this.viewController.getZoom();
|
|
14651
|
-
}
|
|
14652
14620
|
/** @deprecated find a way to remove this method. For now we discourage to use it until we find the way to remove it */
|
|
14653
14621
|
getLayerByOlUId(olUId) {
|
|
14654
14622
|
return this.layerController.all.find((layer) => getUid(layer.ol) && getUid(layer.ol) === olUId);
|
|
@@ -14672,9 +14640,8 @@ class MapBase {
|
|
|
14672
14640
|
options;
|
|
14673
14641
|
// Getter
|
|
14674
14642
|
layerController;
|
|
14675
|
-
projection;
|
|
14676
|
-
viewProjection;
|
|
14677
14643
|
projectionCode;
|
|
14644
|
+
viewProjection;
|
|
14678
14645
|
}
|
|
14679
14646
|
|
|
14680
14647
|
class MapBrowserComponent {
|
|
@@ -14871,7 +14838,7 @@ class PointerPositionDirective {
|
|
|
14871
14838
|
return this.component.map();
|
|
14872
14839
|
}
|
|
14873
14840
|
get mapProjection() {
|
|
14874
|
-
return this.component.map().
|
|
14841
|
+
return this.component.map().projectionCode;
|
|
14875
14842
|
}
|
|
14876
14843
|
/**
|
|
14877
14844
|
* Start listening to pointermove
|
|
@@ -16974,7 +16941,7 @@ class SearchService {
|
|
|
16974
16941
|
return [];
|
|
16975
16942
|
}
|
|
16976
16943
|
this.searchTerm.set(term);
|
|
16977
|
-
const proj = this.mapService.getMap()?.
|
|
16944
|
+
const proj = this.mapService.getMap()?.projectionCode || 'EPSG:3857';
|
|
16978
16945
|
const response = stringToLonLat(term, proj, {
|
|
16979
16946
|
forceNA: options.forceNA
|
|
16980
16947
|
});
|
|
@@ -17212,7 +17179,7 @@ class DirectionsComponent {
|
|
|
17212
17179
|
});
|
|
17213
17180
|
this.selectedRoute.on('select', (evt) => {
|
|
17214
17181
|
if (this.focusOnStop === false) {
|
|
17215
|
-
const selectCoordinates = olproj.transform(evt.mapBrowserEvent.coordinate, this.routesFeatureStore().layer.map?.
|
|
17182
|
+
const selectCoordinates = olproj.transform(evt.mapBrowserEvent.coordinate, this.routesFeatureStore().layer.map?.projectionCode, this.projection);
|
|
17216
17183
|
const addedStop = addStopToStore(this.stopsStore());
|
|
17217
17184
|
addedStop.text = roundCoordToString(selectCoordinates, this.coordRoundedDecimals()).join(', ');
|
|
17218
17185
|
addedStop.coordinates = [selectCoordinates[0], selectCoordinates[1]];
|
|
@@ -17231,7 +17198,7 @@ class DirectionsComponent {
|
|
|
17231
17198
|
}
|
|
17232
17199
|
const firstFeature = features.getArray()[0];
|
|
17233
17200
|
const translatedStopId = firstFeature.getId();
|
|
17234
|
-
const translationCoordinates = olproj.transform(firstFeature.getGeometry().getCoordinates(), this.stopsFeatureStore().layer.map?.
|
|
17201
|
+
const translationCoordinates = olproj.transform(firstFeature.getGeometry().getCoordinates(), this.stopsFeatureStore().layer.map?.projectionCode, this.projection);
|
|
17235
17202
|
const translatedStop = this.stopsStore().get(translatedStopId);
|
|
17236
17203
|
const roundedCoord = roundCoordTo(translationCoordinates, this.coordRoundedDecimals());
|
|
17237
17204
|
translatedStop.coordinates = roundedCoord;
|
|
@@ -17931,7 +17898,7 @@ class DownloadService {
|
|
|
17931
17898
|
else {
|
|
17932
17899
|
wfsOptions = layer.dataSource.options.params;
|
|
17933
17900
|
}
|
|
17934
|
-
const currentExtent = olproj.transformExtent(layer.map.viewController.getExtent(), new olProjection({ code: layer.map.
|
|
17901
|
+
const currentExtent = olproj.transformExtent(layer.map.viewController.getExtent(), new olProjection({ code: layer.map.projectionCode }), currentProj);
|
|
17935
17902
|
const outputFormatDownload = wfsOptions.outputFormatDownload === undefined
|
|
17936
17903
|
? wfsOptions.outputFormat === undefined
|
|
17937
17904
|
? ''
|
|
@@ -19209,8 +19176,8 @@ class OgcFilterFormComponent {
|
|
|
19209
19176
|
const currentFilter = this.currentFilter();
|
|
19210
19177
|
if (this.snrc && currentFilter.igoSpatialSelector === 'snrc') {
|
|
19211
19178
|
currentFilter.wkt_geometry =
|
|
19212
|
-
this.wktService.snrcToWkt(this.snrc, this.map().
|
|
19213
|
-
'';
|
|
19179
|
+
this.wktService.snrcToWkt(this.snrc, this.map().projectionCode)
|
|
19180
|
+
?.wktPoly ?? '';
|
|
19214
19181
|
}
|
|
19215
19182
|
this.refreshFilters()?.();
|
|
19216
19183
|
}
|
|
@@ -19221,7 +19188,7 @@ class OgcFilterFormComponent {
|
|
|
19221
19188
|
}
|
|
19222
19189
|
const currentFilter = this.currentFilter();
|
|
19223
19190
|
if (currentFilter.igoSpatialSelector === 'fixedExtent') {
|
|
19224
|
-
currentFilter.wkt_geometry = this.wktService.extentToWkt(this.map().
|
|
19191
|
+
currentFilter.wkt_geometry = this.wktService.extentToWkt(this.map().projectionCode, this.map().viewController.getExtent(), this.map().projectionCode).wktPoly;
|
|
19225
19192
|
}
|
|
19226
19193
|
if (refresh) {
|
|
19227
19194
|
this.refreshFilters()?.();
|
|
@@ -20216,7 +20183,7 @@ class OgcFilterableItemComponent {
|
|
|
20216
20183
|
operator: firstOperatorName,
|
|
20217
20184
|
active: true,
|
|
20218
20185
|
igoSpatialSelector: 'fixedExtent',
|
|
20219
|
-
srsName: this.map().
|
|
20186
|
+
srsName: this.map().projectionCode
|
|
20220
20187
|
}, fieldNameGeometry, lastLevel, this.defaultLogicalParent));
|
|
20221
20188
|
this.datasource.options.ogcFilters.interfaceOgcFilters = arr;
|
|
20222
20189
|
}
|
|
@@ -24307,7 +24274,7 @@ class DrawComponent {
|
|
|
24307
24274
|
zIndex: 200,
|
|
24308
24275
|
source: new FeatureDataSource(),
|
|
24309
24276
|
style: (feature, resolution) => {
|
|
24310
|
-
return this.drawStyleService.createIndividualElementStyle(feature, resolution, this.labelsAreShown, feature.get('fontStyle'), feature.get('drawingStyle').fill, feature.get('drawingStyle').stroke, feature.get('offsetX'), feature.get('offsetY'), this.map().
|
|
24277
|
+
return this.drawStyleService.createIndividualElementStyle(feature, resolution, this.labelsAreShown, feature.get('fontStyle'), feature.get('drawingStyle').fill, feature.get('drawingStyle').stroke, feature.get('offsetX'), feature.get('offsetY'), this.map().projectionCode, this.icon);
|
|
24311
24278
|
},
|
|
24312
24279
|
showInLayerList: true,
|
|
24313
24280
|
exportable: true,
|
|
@@ -24634,7 +24601,7 @@ class DrawComponent {
|
|
|
24634
24601
|
}
|
|
24635
24602
|
const pointStyle = (feature, resolution) => {
|
|
24636
24603
|
const geom = feature.getGeometry();
|
|
24637
|
-
const coordinates = olproj.transform(geom.getCoordinates(), this.map().
|
|
24604
|
+
const coordinates = olproj.transform(geom.getCoordinates(), this.map().projectionCode, 'EPSG:4326');
|
|
24638
24605
|
const radius = radiusMeters / Math.cos((Math.PI / 180) * coordinates[1]) / resolution;
|
|
24639
24606
|
this.activeDrawControl?.predefinedRadius$.next(radiusMeters);
|
|
24640
24607
|
return new olstyle.Style({
|
|
@@ -24670,12 +24637,12 @@ class DrawComponent {
|
|
|
24670
24637
|
elementStyle(labelsAreShown, isAnIcon) {
|
|
24671
24638
|
if (isAnIcon) {
|
|
24672
24639
|
this.activeStore.layer.ol.setStyle((feature, resolution) => {
|
|
24673
|
-
return this.drawStyleService.createIndividualElementStyle(feature, resolution, labelsAreShown, feature.get('fontStyle'), feature.get('drawingStyle').fill, feature.get('drawingStyle').stroke, feature.get('offsetX'), feature.get('offsetY'), this.map().
|
|
24640
|
+
return this.drawStyleService.createIndividualElementStyle(feature, resolution, labelsAreShown, feature.get('fontStyle'), feature.get('drawingStyle').fill, feature.get('drawingStyle').stroke, feature.get('offsetX'), feature.get('offsetY'), this.map().projectionCode, this.icon);
|
|
24674
24641
|
});
|
|
24675
24642
|
}
|
|
24676
24643
|
else {
|
|
24677
24644
|
this.activeStore.layer.ol.setStyle((feature, resolution) => {
|
|
24678
|
-
return this.drawStyleService.createIndividualElementStyle(feature, resolution, labelsAreShown, feature.get('fontStyle'), feature.get('drawingStyle').fill, feature.get('drawingStyle').stroke, feature.get('offsetX'), feature.get('offsetY'), this.map().
|
|
24645
|
+
return this.drawStyleService.createIndividualElementStyle(feature, resolution, labelsAreShown, feature.get('fontStyle'), feature.get('drawingStyle').fill, feature.get('drawingStyle').stroke, feature.get('offsetX'), feature.get('offsetY'), this.map().projectionCode);
|
|
24679
24646
|
});
|
|
24680
24647
|
}
|
|
24681
24648
|
}
|
|
@@ -26928,7 +26895,7 @@ class GeometryFormFieldInputComponent {
|
|
|
26928
26895
|
olGeometry = this.circleToPoint(olGeometry);
|
|
26929
26896
|
}
|
|
26930
26897
|
const value = this.olGeoJSON.writeGeometryObject(olGeometry, {
|
|
26931
|
-
featureProjection: this.map().
|
|
26898
|
+
featureProjection: this.map().projectionCode,
|
|
26932
26899
|
dataProjection: 'EPSG:4326'
|
|
26933
26900
|
});
|
|
26934
26901
|
if (olGeometry.get('radius')) {
|
|
@@ -26940,7 +26907,7 @@ class GeometryFormFieldInputComponent {
|
|
|
26940
26907
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
26941
26908
|
circleToPoint(olGeometry) {
|
|
26942
26909
|
const center = olGeometry.getCenter();
|
|
26943
|
-
const coordinates = olproj.transform(center, this.map().
|
|
26910
|
+
const coordinates = olproj.transform(center, this.map().projectionCode, 'EPSG:4326');
|
|
26944
26911
|
const radius = Math.round(olGeometry.getRadius() * Math.cos((Math.PI / 180) * coordinates[1]));
|
|
26945
26912
|
// Convert it to a point object
|
|
26946
26913
|
olGeometry = new OlPoint(center);
|
|
@@ -26954,7 +26921,7 @@ class GeometryFormFieldInputComponent {
|
|
|
26954
26921
|
addGeoJSONToOverlay(geometry) {
|
|
26955
26922
|
const olGeometry = this.olGeoJSON.readGeometry(geometry, {
|
|
26956
26923
|
dataProjection: 'EPSG:4326',
|
|
26957
|
-
featureProjection: this.map().
|
|
26924
|
+
featureProjection: this.map().projectionCode
|
|
26958
26925
|
});
|
|
26959
26926
|
const olFeature = new OlFeature({
|
|
26960
26927
|
geometry: olGeometry
|
|
@@ -26979,7 +26946,7 @@ class GeometryFormFieldInputComponent {
|
|
|
26979
26946
|
* @param olGeometry OL Geometry
|
|
26980
26947
|
*/
|
|
26981
26948
|
updateMeasureTooltip(olGeometry) {
|
|
26982
|
-
const measure = measureOlGeometry(olGeometry, this.map().
|
|
26949
|
+
const measure = measureOlGeometry(olGeometry, this.map().projectionCode);
|
|
26983
26950
|
const lengths = measure.lengths;
|
|
26984
26951
|
const lastIndex = olGeometry.getType() === 'Polygon'
|
|
26985
26952
|
? lengths.length - 2
|
|
@@ -27116,7 +27083,7 @@ class SpatialFilterItemComponent {
|
|
|
27116
27083
|
this.radiusFormControl.setValue(this.radius);
|
|
27117
27084
|
this.PointStyle = (feature, resolution) => {
|
|
27118
27085
|
const geom = feature.getGeometry();
|
|
27119
|
-
const coordinates = olproj.transform(geom.getCoordinates(), this.map().
|
|
27086
|
+
const coordinates = olproj.transform(geom.getCoordinates(), this.map().projectionCode, 'EPSG:4326');
|
|
27120
27087
|
return new olstyle.Style({
|
|
27121
27088
|
image: new olstyle.Circle({
|
|
27122
27089
|
radius: this.radius /
|
|
@@ -29699,7 +29666,7 @@ class ImportOgreServerError extends ImportError {
|
|
|
29699
29666
|
}
|
|
29700
29667
|
|
|
29701
29668
|
function addLayerAndFeaturesToMap(features, map, contextUri, layerTitle, layerService, storeToIdb = false) {
|
|
29702
|
-
const olFeatures = features.map((feature) => featureToOl(feature, map.
|
|
29669
|
+
const olFeatures = features.map((feature) => featureToOl(feature, map.projectionCode));
|
|
29703
29670
|
const id = uuid();
|
|
29704
29671
|
const sourceOptions = {
|
|
29705
29672
|
id,
|
|
@@ -31488,7 +31455,7 @@ class QueryDirective {
|
|
|
31488
31455
|
const queryLayers = this.map.layerController.all.filter(layerIsQueryable);
|
|
31489
31456
|
queries$.push(...this.queryService.query(queryLayers, {
|
|
31490
31457
|
coordinates: event.coordinate,
|
|
31491
|
-
projection: this.map.
|
|
31458
|
+
projection: this.map.projectionCode,
|
|
31492
31459
|
resolution
|
|
31493
31460
|
}));
|
|
31494
31461
|
if (queries$.length === 0) {
|
|
@@ -31530,7 +31497,7 @@ class QueryDirective {
|
|
|
31530
31497
|
if (featureOL) {
|
|
31531
31498
|
if (featureOL.get('features')) {
|
|
31532
31499
|
for (const feature of featureOL.get('features')) {
|
|
31533
|
-
const newFeature = featureFromOl(feature, this.map.
|
|
31500
|
+
const newFeature = featureFromOl(feature, this.map.projectionCode);
|
|
31534
31501
|
newFeature.meta = {
|
|
31535
31502
|
title: feature.values_.nom,
|
|
31536
31503
|
id: layerOL.values_._layer.id + '.' + feature.id_,
|
|
@@ -31543,7 +31510,7 @@ class QueryDirective {
|
|
|
31543
31510
|
}
|
|
31544
31511
|
}
|
|
31545
31512
|
else if (featureOL instanceof RenderFeature) {
|
|
31546
|
-
const newFeature = renderFeatureFromOl(featureOL, this.map.
|
|
31513
|
+
const newFeature = renderFeatureFromOl(featureOL, this.map.projectionCode, layerOL);
|
|
31547
31514
|
newFeature.meta = {
|
|
31548
31515
|
id: layerOL.values_._layer.id + '.' + newFeature.meta.id,
|
|
31549
31516
|
sourceTitle: layerOL.values_.title,
|
|
@@ -31557,7 +31524,7 @@ class QueryDirective {
|
|
|
31557
31524
|
clickedFeatures.push(newFeature);
|
|
31558
31525
|
}
|
|
31559
31526
|
else {
|
|
31560
|
-
const newFeature = featureFromOl(featureOL, this.map.
|
|
31527
|
+
const newFeature = featureFromOl(featureOL, this.map.projectionCode, layerOL);
|
|
31561
31528
|
newFeature.meta = {
|
|
31562
31529
|
id: layerOL.values_._layer.id + '.' + newFeature.meta.id,
|
|
31563
31530
|
sourceTitle: layerOL.values_.title,
|
|
@@ -31586,7 +31553,7 @@ class QueryDirective {
|
|
|
31586
31553
|
.map((layer) => {
|
|
31587
31554
|
const featuresOL = layer.dataSource.ol;
|
|
31588
31555
|
featuresOL.forEachFeatureIntersectingExtent(dragExtent, (olFeature) => {
|
|
31589
|
-
const newFeature = featureFromOl(olFeature, this.map.
|
|
31556
|
+
const newFeature = featureFromOl(olFeature, this.map.projectionCode, layer.ol);
|
|
31590
31557
|
newFeature.meta = {
|
|
31591
31558
|
id: layer.id + '.' + olFeature.getId(),
|
|
31592
31559
|
icon: olFeature.values_._icon,
|
|
@@ -32479,7 +32446,7 @@ class SearchResultsItemComponent {
|
|
|
32479
32446
|
}
|
|
32480
32447
|
const olFeature = this.format.readFeature(this.result().data, {
|
|
32481
32448
|
dataProjection: this.result().data.projection,
|
|
32482
|
-
featureProjection: map.
|
|
32449
|
+
featureProjection: map.projectionCode
|
|
32483
32450
|
});
|
|
32484
32451
|
moveToOlFeatures(map.viewController, olFeature, FeatureMotion.Default);
|
|
32485
32452
|
}
|
|
@@ -33292,7 +33259,7 @@ class SearchPointerSummaryDirective {
|
|
|
33292
33259
|
return this.component.map();
|
|
33293
33260
|
}
|
|
33294
33261
|
get mapProjection() {
|
|
33295
|
-
return this.component.map().
|
|
33262
|
+
return this.component.map().projectionCode;
|
|
33296
33263
|
}
|
|
33297
33264
|
/**
|
|
33298
33265
|
* Start listening to pointermove and reverse search results.
|
|
@@ -33764,11 +33731,20 @@ var SearchSourceKind;
|
|
|
33764
33731
|
(function (SearchSourceKind) {
|
|
33765
33732
|
SearchSourceKind[SearchSourceKind["ICherche"] = 0] = "ICherche";
|
|
33766
33733
|
SearchSourceKind[SearchSourceKind["IChercheReverse"] = 1] = "IChercheReverse";
|
|
33734
|
+
/**
|
|
33735
|
+
* @deprecated Deprecated source kind, will be removed in a future major version, likely in 23.x+.
|
|
33736
|
+
*/
|
|
33767
33737
|
SearchSourceKind[SearchSourceKind["Cadastre"] = 2] = "Cadastre";
|
|
33768
33738
|
SearchSourceKind[SearchSourceKind["CoordinatesReverse"] = 3] = "CoordinatesReverse";
|
|
33769
33739
|
SearchSourceKind[SearchSourceKind["ILayer"] = 4] = "ILayer";
|
|
33770
33740
|
SearchSourceKind[SearchSourceKind["Nominatim"] = 5] = "Nominatim";
|
|
33741
|
+
/**
|
|
33742
|
+
* @deprecated Deprecated source kind, will be removed in a future major version, likely in 23.x+.
|
|
33743
|
+
*/
|
|
33771
33744
|
SearchSourceKind[SearchSourceKind["StoredQueries"] = 6] = "StoredQueries";
|
|
33745
|
+
/**
|
|
33746
|
+
* @deprecated Deprecated source kind, will be removed in a future major version, likely in 23.x+.
|
|
33747
|
+
*/
|
|
33772
33748
|
SearchSourceKind[SearchSourceKind["StoredQueriesReverse"] = 7] = "StoredQueriesReverse";
|
|
33773
33749
|
SearchSourceKind[SearchSourceKind["Workspace"] = 8] = "Workspace";
|
|
33774
33750
|
})(SearchSourceKind || (SearchSourceKind = {}));
|
|
@@ -34408,7 +34384,7 @@ class IChercheSearchSource extends SearchSource {
|
|
|
34408
34384
|
*/
|
|
34409
34385
|
computeOptionsParam(term, options) {
|
|
34410
34386
|
const hashtags = super.getHashtagsValid(term, 'type');
|
|
34411
|
-
if (hashtags) {
|
|
34387
|
+
if (hashtags?.length) {
|
|
34412
34388
|
options.params = Object.assign(options.params || {}, {
|
|
34413
34389
|
type: hashtags.join(',')
|
|
34414
34390
|
});
|
|
@@ -35005,7 +34981,7 @@ class ILayerSearchSource extends SearchSource {
|
|
|
35005
34981
|
*/
|
|
35006
34982
|
computeOptionsParam(term, options) {
|
|
35007
34983
|
const hashtags = super.getHashtagsValid(term, 'type');
|
|
35008
|
-
if (hashtags) {
|
|
34984
|
+
if (hashtags?.length) {
|
|
35009
34985
|
options.params = Object.assign(options.params || {}, {
|
|
35010
34986
|
type: hashtags.join(',')
|
|
35011
34987
|
});
|
|
@@ -35537,7 +35513,7 @@ class ToastComponent {
|
|
|
35537
35513
|
if (feature?.geometry && map) {
|
|
35538
35514
|
const olFeature = this.format.readFeature(this.feature, {
|
|
35539
35515
|
dataProjection: feature?.projection,
|
|
35540
|
-
featureProjection: map?.
|
|
35516
|
+
featureProjection: map?.projectionCode
|
|
35541
35517
|
});
|
|
35542
35518
|
moveToOlFeatures(map?.viewController, olFeature, FeatureMotion.Zoom);
|
|
35543
35519
|
}
|
|
@@ -40657,6 +40633,7 @@ function provideSearch(sources, options) {
|
|
|
40657
40633
|
|
|
40658
40634
|
/**
|
|
40659
40635
|
* Cadastre search source
|
|
40636
|
+
* @deprecated This is a deprecated source. This type is available in ICherche. This search source will be deleted in in few next majors versions, likely in 23x+.
|
|
40660
40637
|
*/
|
|
40661
40638
|
class CadastreSearchSource extends SearchSource {
|
|
40662
40639
|
http = inject(HttpClient);
|
|
@@ -40789,6 +40766,7 @@ function cadastreSearchSourceFactory() {
|
|
|
40789
40766
|
}
|
|
40790
40767
|
/**
|
|
40791
40768
|
* Function that returns a provider for the Cadastre search source
|
|
40769
|
+
* @deprecated This search source is deprecated and will be removed in a future major version, likely in 23.x+. As an alternative, provide iCherche. Within icherche, you could use the "cadastre type"
|
|
40792
40770
|
*/
|
|
40793
40771
|
function provideCadastreSearchSource() {
|
|
40794
40772
|
return {
|
|
@@ -40797,6 +40775,9 @@ function provideCadastreSearchSource() {
|
|
|
40797
40775
|
multi: true
|
|
40798
40776
|
};
|
|
40799
40777
|
}
|
|
40778
|
+
/**
|
|
40779
|
+
* @deprecated This search source is deprecated and will be removed in a future major version, likely in 23.x+.
|
|
40780
|
+
*/
|
|
40800
40781
|
function withCadastreSource() {
|
|
40801
40782
|
return {
|
|
40802
40783
|
kind: SearchSourceKind.Cadastre,
|
|
@@ -41008,7 +40989,7 @@ class NominatimSearchSource extends SearchSource {
|
|
|
41008
40989
|
*/
|
|
41009
40990
|
computeTermTags(term) {
|
|
41010
40991
|
const hashtags = super.getHashtagsValid(term, 'amenity');
|
|
41011
|
-
if (
|
|
40992
|
+
if (hashtags?.length) {
|
|
41012
40993
|
return this.computeTermSettings(term);
|
|
41013
40994
|
}
|
|
41014
40995
|
if (!hashtags.length) {
|
|
@@ -41081,6 +41062,7 @@ function withNominatimSource() {
|
|
|
41081
41062
|
|
|
41082
41063
|
/**
|
|
41083
41064
|
* StoredQueries search source
|
|
41065
|
+
* @deprecated This is a deprecated source. This type is available in ICherche. This search source will be deleted in in few next majors versions, likely in 23x+.
|
|
41084
41066
|
*/
|
|
41085
41067
|
class StoredQueriesSearchSource extends SearchSource {
|
|
41086
41068
|
http = inject(HttpClient);
|
|
@@ -41353,10 +41335,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImpo
|
|
|
41353
41335
|
}], ctorParameters: () => [], propDecorators: { getSearch: [] } });
|
|
41354
41336
|
/**
|
|
41355
41337
|
* StoredQueriesReverse search source
|
|
41338
|
+
* @deprecated This is a deprecated source. This type is available in ICherche. This search source will be deleted in in few next majors versions, likely in 23x+.
|
|
41356
41339
|
*/
|
|
41357
|
-
// EXAMPLE CALLS
|
|
41358
|
-
// https://ws.mapserver.transports.gouv.qc.ca/swtq?service=wfs&version=1.1.0&request=GetFeature&storedquery_id=lim_adm&srsname=epsg:4326&outputformat=text/xml;%20subtype=gml/3.1.1&long=-71.292469&lat=46.748107
|
|
41359
|
-
//
|
|
41360
41340
|
class StoredQueriesReverseSearchSource extends SearchSource {
|
|
41361
41341
|
http = inject(HttpClient);
|
|
41362
41342
|
languageService = inject(LanguageService);
|
|
@@ -41527,6 +41507,7 @@ function storedqueriesSearchSourceFactory() {
|
|
|
41527
41507
|
}
|
|
41528
41508
|
/**
|
|
41529
41509
|
* Function that returns a provider for the StoredQueries search source
|
|
41510
|
+
* @deprecated This provider is deprecated and will be removed in a future major version, likely in 23.x+.
|
|
41530
41511
|
*/
|
|
41531
41512
|
function provideStoredQueriesSearchSource() {
|
|
41532
41513
|
return {
|
|
@@ -41535,6 +41516,9 @@ function provideStoredQueriesSearchSource() {
|
|
|
41535
41516
|
multi: true
|
|
41536
41517
|
};
|
|
41537
41518
|
}
|
|
41519
|
+
/**
|
|
41520
|
+
* @deprecated This search source is deprecated and will be removed in a future major version, likely in 23.x+.
|
|
41521
|
+
*/
|
|
41538
41522
|
function withStoredQueriesSource() {
|
|
41539
41523
|
return {
|
|
41540
41524
|
kind: SearchSourceKind.StoredQueries,
|
|
@@ -41550,6 +41534,7 @@ function storedqueriesReverseSearchSourceFactory() {
|
|
|
41550
41534
|
}
|
|
41551
41535
|
/**
|
|
41552
41536
|
* Function that returns a provider for the StoredQueriesReverse search source
|
|
41537
|
+
* @deprecated This provider is deprecated and will be removed in a future major version, likely in 23.x+.
|
|
41553
41538
|
*/
|
|
41554
41539
|
function provideStoredQueriesReverseSearchSource() {
|
|
41555
41540
|
return {
|
|
@@ -41558,6 +41543,9 @@ function provideStoredQueriesReverseSearchSource() {
|
|
|
41558
41543
|
multi: true
|
|
41559
41544
|
};
|
|
41560
41545
|
}
|
|
41546
|
+
/**
|
|
41547
|
+
* @deprecated This search source is deprecated and will be removed in a future major version, likely in 23.x+.
|
|
41548
|
+
*/
|
|
41561
41549
|
function withStoredQueriesReverseSource() {
|
|
41562
41550
|
return {
|
|
41563
41551
|
kind: SearchSourceKind.StoredQueriesReverse,
|