Skip to content

Commit

Permalink
implement geometry re-search
Browse files Browse the repository at this point in the history
  • Loading branch information
warm-coolguy committed Mar 4, 2024
1 parent a01edfb commit e74f3c8
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { searchGeometry } from '../../../utils/coastalGazetteer/searchGeometry'
import { getEmptyFeatureCollection } from '../../../utils/coastalGazetteer/responseInterpreter'
import { makeTreeView } from '../utils/makeTreeView'
import { updateVectorLayer, vectorLayer } from '../utils/vectorDisplay'
import { geoJson } from '../../../utils/coastalGazetteer/common'
import { setupTooltip } from './actions/setupTooltip'
import { setupDrawReaction } from './actions/setupDrawReaction'
import { setupWatchers } from './actions/setupWatchers'
Expand Down Expand Up @@ -73,8 +74,16 @@ export const makeStoreModule = () => {
) {
updateVectorLayer(map, featureCollection.features, item)
},
fullSearchOnToponym({}, item: TreeViewItem) {
console.warn('NOT IMPLEMENTED', item)
fullSearchOnToponym(
{ dispatch, getters: { featureCollection } },
item: TreeViewItem
) {
const feature = featureCollection.features.find(
// TODO change after id handling has been modified
// @ts-expect-error | added locally
(feature) => feature.title === item.id
)
dispatch('searchGeometry', geoJson.readFeature(feature))
},
},
mutations: {
Expand Down

0 comments on commit e74f3c8

Please sign in to comment.