@regionerne/gis-komponent 0.0.107 → 0.0.109
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.
|
@@ -1314,14 +1314,14 @@ class KomponentSettingsHelperService {
|
|
|
1314
1314
|
image: new CircleStyle({
|
|
1315
1315
|
radius: 4,
|
|
1316
1316
|
fill: new Fill({ color: fillColor })
|
|
1317
|
-
})
|
|
1318
|
-
zIndex: 999
|
|
1317
|
+
})
|
|
1319
1318
|
}));
|
|
1320
1319
|
const source = new VectorSource({
|
|
1321
1320
|
features: [feature],
|
|
1322
1321
|
});
|
|
1323
1322
|
const layer = new VectorLayer({
|
|
1324
1323
|
source,
|
|
1324
|
+
zIndex: 999
|
|
1325
1325
|
});
|
|
1326
1326
|
// store reference for updates
|
|
1327
1327
|
layer._cursorFeature = feature;
|
|
@@ -1335,7 +1335,7 @@ class KomponentSettingsHelperService {
|
|
|
1335
1335
|
feature.getGeometry().setCoordinates(evt.coordinate);
|
|
1336
1336
|
});
|
|
1337
1337
|
}
|
|
1338
|
-
getFillColorFromStyle(style) {
|
|
1338
|
+
getFillColorFromStyle(style, geomType) {
|
|
1339
1339
|
let styles;
|
|
1340
1340
|
// resolve StyleFunction
|
|
1341
1341
|
if (typeof style === 'function') {
|
|
@@ -1350,9 +1350,11 @@ class KomponentSettingsHelperService {
|
|
|
1350
1350
|
if (!Array.isArray(styles)) {
|
|
1351
1351
|
styles = [styles];
|
|
1352
1352
|
}
|
|
1353
|
-
// find first style with fill
|
|
1353
|
+
// find first style with fill for Polygon
|
|
1354
1354
|
const fillStyle = styles.find((s) => s?.getFill?.());
|
|
1355
|
-
|
|
1355
|
+
// find first style with stroke for LineString
|
|
1356
|
+
const strokeStyle = styles.find((s) => s?.getStroke?.());
|
|
1357
|
+
return (geomType === 'Polygon' ? fillStyle?.getFill()?.getColor() : strokeStyle?.getFill()?.getColor()) || null;
|
|
1356
1358
|
}
|
|
1357
1359
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: KomponentSettingsHelperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1358
1360
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: KomponentSettingsHelperService, providedIn: 'root' });
|
|
@@ -4145,7 +4147,7 @@ class ToolboxComponent {
|
|
|
4145
4147
|
this._cursorLayerForDraw = undefined;
|
|
4146
4148
|
}
|
|
4147
4149
|
// Extract fill color from style
|
|
4148
|
-
const fillColor = this._settingsHelper.getFillColorFromStyle(style) || 'rgba(0,0,255,0.3)';
|
|
4150
|
+
const fillColor = this._settingsHelper.getFillColorFromStyle(style, geomType) || 'rgba(0,0,255,0.3)';
|
|
4149
4151
|
// Create cursor layer (circle showing the Polygon's fill color)
|
|
4150
4152
|
this._cursorLayerForDraw = this._settingsHelper.createCursorLayer(fillColor);
|
|
4151
4153
|
this.map.addLayer(this._cursorLayerForDraw);
|
|
@@ -5771,7 +5773,6 @@ const POSITION_KEY = 'docSearchInfo';
|
|
|
5771
5773
|
class DocumentSearchInfoComponent {
|
|
5772
5774
|
_showDocumentInfoService = inject(ShowDocumentInfoService);
|
|
5773
5775
|
_layoutService = inject(LayoutService);
|
|
5774
|
-
_profileService = inject(ProfileService);
|
|
5775
5776
|
profile;
|
|
5776
5777
|
showPanel = false;
|
|
5777
5778
|
collapsed = true;
|
|
@@ -6046,6 +6047,7 @@ class GisKomponentComponent {
|
|
|
6046
6047
|
}
|
|
6047
6048
|
ngOnDestroy() {
|
|
6048
6049
|
this._profileService.setProfileVersionChanged(false);
|
|
6050
|
+
this._layoutService.mapSetSubject.next(false);
|
|
6049
6051
|
}
|
|
6050
6052
|
profileSelected(profileIdentifier) {
|
|
6051
6053
|
this._profileService.getByIdentifier(profileIdentifier).subscribe({
|