Hello, I am updating one of my legacy applications and I used to do this to set the extent for the search widget: Search widget | Guide | ArcGIS API for JavaScript 3.43 | ArcGIS Developer but I do not see a link to how to do it using the new Version of the API for 4.26. Is it just as simple as this?
As shown in the 3.x documentation you linked to, setting the extent for a source looked like this:
search.sources[0].searchExtent = extent;
In 4.x, it would look like this:
search.sources.getItemAt(0).filter = {geometry:extent};
See also Search.sources and LayerSearchSource.filter.
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.