Skip to content

Commit

Permalink
fix(geo): workspace link selection feature with it's vector layer
Browse files Browse the repository at this point in the history
(cherry picked from commit 9b477e91bcf8ac814f4b440917aa4c6a3ace7d5f)
  • Loading branch information
alecarn committed Nov 26, 2024
1 parent d0b998b commit f2df7f6
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
18 changes: 18 additions & 0 deletions packages/geo/src/lib/workspace/shared/wfs-workspace.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
import {
GeoWorkspaceOptions,
LayerService,
LinkedProperties,
VectorLayer
} from '../../layer/shared';
import { IgoMap } from '../../map/shared/map';
Expand Down Expand Up @@ -99,8 +100,25 @@ export class WfsWorkspaceService {
const confQueryOverlayStyle: OverlayStyleOptions =
this.configService.getConfig('queryOverlayStyle');

const id = layer.id + '.FeatureStore';

if (!layer.link) {
layer.options.linkedLayers.links = [
{
syncedDelete: true,
linkedIds: [id],
properties: [LinkedProperties.VISIBLE]
}
];
layer.createLink();
}

const selectionStrategy = new FeatureStoreSelectionStrategy({
layer: new VectorLayer({
id,
linkedLayers: {
linkId: id
},
zIndex: 300,
source: new FeatureDataSource(),
style: (feature) => {
Expand Down
17 changes: 17 additions & 0 deletions packages/geo/src/lib/workspace/shared/wms-workspace.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,25 @@ export class WmsWorkspaceService {
const confQueryOverlayStyle: OverlayStyleOptions =
this.configService.getConfig('queryOverlayStyle');

const id = layer.id + '.FeatureStore';

if (!layer.link) {
layer.options.linkedLayers.links = [
{
syncedDelete: true,
linkedIds: [id],
properties: [LinkedProperties.VISIBLE]
}
];
layer.createLink();
}

const selectionStrategy = new FeatureStoreSelectionStrategy({
layer: new VectorLayer({
id,
linkedLayers: {
linkId: id
},
zIndex: 300,
source: new FeatureDataSource(),
style: (feature) => {
Expand Down

0 comments on commit f2df7f6

Please sign in to comment.