Sorry for using another lib as example but my goal is to create something like this: https://openlayers.org/en/latest/examples/overlay.html
My goal is to place html div on the map so that it stays at the same position when map zooms/pans...
Does SDK have this functionality natively? In the same spirit like Spinner widget stays at provided point when you add it and pan map? Couldn't find that at first glance, maybe it is buried somewhere..
Not specific to it, but you could do something like that manually.
Views have a toScreen() method that converts map coordinates to screen coordinates.
https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#toScreen
And a toMap to turn screen coords to map coords.
You can then use reactiveUtils to watch some view property like interacting, maybe navigating to know when the map is being panned/zoomed and update the elements location.
https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#interacting
Thank you! It was my plan B to do that actually 🙂