If you are talking about the 4.x API then you use the view.goTo method.
https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#goTo
Here is a sample that shows going to the extent of certain features in a layer:
https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=featurelayer-queryextent
If you are talking about having the map show specific coords based on xmin xmax ymin ymax when it first loads, you can use the `extent` property of the view:
const view = new MapView({ map, extent: { xmin, xmax, ymin, ymax, } })
The explanation for that is pretty early on in the MapView documentation .
If you're talking about getting the map to move to a certain extent some time after initialization, then the goTo method is what you need.
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.