Skip to content

Commit 7a5eec9

Browse files
committed
Merge remote-tracking branch 'origin/main' into ftr/better-upload-json
2 parents ddcf4d6 + 16e7539 commit 7a5eec9

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/components/gtt-client.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import 'ol/ol.css'
22
import 'ol-ext/dist/ol-ext.min.css'
3-
import { Map, Feature, View, Geolocation } from 'ol'
3+
import { Map, Feature, View, Geolocation, Collection } from 'ol'
44
import 'ol-ext/filter/Base'
5-
import { Geometry, Point } from 'ol/geom'
5+
import { Geometry, GeometryCollection, Point } from 'ol/geom'
66
import { GeoJSON, WKT } from 'ol/format'
77
import { Layer, Tile, Image } from 'ol/layer'
88
import VectorLayer from 'ol/layer/Vector'
@@ -41,6 +41,9 @@ import { FeatureLike } from 'ol/Feature'
4141
import TileSource from 'ol/source/Tile'
4242
import ImageSource from 'ol/source/Image'
4343
import { Options as ImageWMSOptions } from 'ol/source/ImageWMS'
44+
import JSONFeature from 'ol/format/JSONFeature'
45+
import BaseEvent from 'ol/events/Event'
46+
import { CollectionEvent } from 'ol/Collection'
4447

4548
interface GttClientOption {
4649
target: HTMLDivElement | null
@@ -562,13 +565,14 @@ export class GttClient {
562565
// Control Select
563566
const select = new Select({
564567
layers: [this.vector],
568+
style: null,
565569
multi: false
566570
})
567571
this.map.addInteraction(select)
568572

569573
// On selected => show/hide popup
570-
select.getFeatures().on(['add'], evt => {
571-
const feature = evt.target
574+
select.getFeatures().on(['add'], (evt: any) => {
575+
const feature = evt.element
572576

573577
const content: Array<string> = []
574578
content.push(`<b>${feature.get('subject')}</b><br/>`)

0 commit comments

Comments
 (0)