Skip to content

Commit

Permalink
Merge branch 'main' into feature/add-lasso-logic-to-draw
Browse files Browse the repository at this point in the history
  • Loading branch information
warm-coolguy authored Feb 18, 2025
2 parents 06bd465 + de516a1 commit 69fa0a4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions packages/plugins/Gfi/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# CHANGELOG

## unpublished

- Fix: Allow layers that have `singleTile` set to `true` and thus being an `ImageLayer` instead a `TileLayer` to be used for GFI-requests as well.

## 3.0.1

- Fix: Clean-up internal flag used for `multiSelect` if a drawing is aborted. This is always the case if a user simply clicks into the map holding CTRL / Command.
Expand Down
5 changes: 3 additions & 2 deletions packages/plugins/Gfi/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Map, Feature } from 'ol'
import BaseLayer from 'ol/layer/Base'
import ImageLayer from 'ol/layer/Image'
import TileLayer from 'ol/layer/Tile'
import { TileWMS } from 'ol/source'
import { ImageWMS, TileWMS } from 'ol/source'
import VectorSource from 'ol/source/Vector'
import { Feature as GeoJsonFeature, GeoJsonProperties } from 'geojson'
import {
Expand Down Expand Up @@ -31,7 +32,7 @@ export interface RequestGfiWmsParameters {
coordinate: [number, number]
layerConfiguration: RequestGfiParameters['layerConfiguration']
layerSpecification: RequestGfiParameters['layerSpecification']
layer: TileLayer<TileWMS>
layer: TileLayer<TileWMS> | ImageLayer<ImageWMS>
}

export type FeaturesByLayerId = Record<string, GeoJsonFeature[] | symbol>
Expand Down
7 changes: 4 additions & 3 deletions packages/plugins/Gfi/src/utils/requestGfi.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { Feature as GeoJsonFeature } from 'geojson'
import { Tile as TileLayer, Vector as VectorLayer } from 'ol/layer'
import ImageLayer from 'ol/layer/Image'
import TileLayer from 'ol/layer/Tile'
import VectorLayer from 'ol/layer/Vector'
import { rawLayerList } from '@masterportal/masterportalapi'

import { RequestGfiParameters } from '../types'

import requestGfiWms from './requestGfiWms'
Expand Down Expand Up @@ -32,7 +33,7 @@ export function requestGfi({
layerConfiguration,
layerSpecification,
}
if (layer instanceof TileLayer) {
if (layer instanceof TileLayer || layer instanceof ImageLayer) {
return coordinateOrExtent.length === 2
? requestGfiWms({
...params,
Expand Down

0 comments on commit 69fa0a4

Please sign in to comment.