Reputation: 445
Included image shows a ArcGIS Online dashboard with a MapView on the right and and embedded content panel on the left. So basic question is what's the best approach to add dashboard functionality such as that shown in the left panel, i.e. interactive controls like below that action on the map?
Maybe I need to build this functionality as an application or widget before I can add it to a dashboard?
In below image example I've embedded a html document into the left panel that loads the ESRI Javascript SDK but I wondering if its possible to get it to interact with the layer data on the map.
Upvotes: 0
Views: 108
Reputation: 19
You can probably call the extent method on whatever object you saved you map to (probably view).
Here's the Documentation on View Extent
The extent of the feature in question probably needs to come from the user clicking on a feature they are interested in, you can find the geometry of the feature the user clicked on by passing "selectedFeature" to the view.popup.watch
method and look for the view.popup.selectedFeature.geometry.extent
.
view.popup.watch("selectedFeature, function(){
const featureExtent = view.popup.selectedFeature.geometry.extent
console.log(featureExtent)
})
Upvotes: 0