This example showcases how picking works.
To enable polygon picking set gatherFeatureAttributes: true in OmvWithRestClientParams or in OmvWithCustomDataProvider. To enable text element picking set gatherFeatureAttributes: true in OmvWithRestClientParams or in OmvWithCustomDataProvider.
gatherFeatureAttributes: true
Now, let's write an event that fires when the user clicks the map canvas:
All the data handling is covered by the handlePick function. Here we find the intersected objects, pick the first one in the array and display its data inside the helper box
handlePick
Generated using TypeDoc
This example showcases how picking works.
To enable polygon picking set
gatherFeatureAttributes: true
in OmvWithRestClientParams or in OmvWithCustomDataProvider. To enable text element picking setgatherFeatureAttributes: true
in OmvWithRestClientParams or in OmvWithCustomDataProvider.Now, let's write an event that fires when the user clicks the map canvas:
All the data handling is covered by the
handlePick
function. Here we find the intersected objects, pick the first one in the array and display its data inside the helper box