|
1 | 1 | import 'ol/ol.css'
|
2 | 2 | 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' |
4 | 4 | import 'ol-ext/filter/Base'
|
5 |
| -import { Geometry, Point } from 'ol/geom' |
| 5 | +import { Geometry, GeometryCollection, Point } from 'ol/geom' |
6 | 6 | import { GeoJSON, WKT } from 'ol/format'
|
7 | 7 | import { Layer, Tile, Image } from 'ol/layer'
|
8 | 8 | import VectorLayer from 'ol/layer/Vector'
|
@@ -41,6 +41,9 @@ import { FeatureLike } from 'ol/Feature'
|
41 | 41 | import TileSource from 'ol/source/Tile'
|
42 | 42 | import ImageSource from 'ol/source/Image'
|
43 | 43 | 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' |
44 | 47 |
|
45 | 48 | interface GttClientOption {
|
46 | 49 | target: HTMLDivElement | null
|
@@ -519,13 +522,14 @@ export class GttClient {
|
519 | 522 | // Control Select
|
520 | 523 | const select = new Select({
|
521 | 524 | layers: [this.vector],
|
| 525 | + style: null, |
522 | 526 | multi: false
|
523 | 527 | })
|
524 | 528 | this.map.addInteraction(select)
|
525 | 529 |
|
526 | 530 | // On selected => show/hide popup
|
527 |
| - select.getFeatures().on(['add'], evt => { |
528 |
| - const feature = evt.target |
| 531 | + select.getFeatures().on(['add'], (evt: any) => { |
| 532 | + const feature = evt.element |
529 | 533 |
|
530 | 534 | const content: Array<string> = []
|
531 | 535 | content.push(`<b>${feature.get('subject')}</b><br/>`)
|
|
0 commit comments