Listening to map extent change

1059
2
05-30-2018 02:31 PM
MaherAbdel_Karim
New Contributor II

HI,
I am working with the API to perform analytics based on map extent, I was looking around the documentation to find how we can listen to map (basemap) extent change so I can issue a callback request.
can you help please on this.


The scenario is the following:
MapView show the basemap -> user change the map extent -> listen to change -> query database based on the new extent -> display the return geometry on top of the map as a new layer

Regards
Maher

0 Kudos
2 Replies
FC_Basson
MVP Regular Contributor

You can use the watchUtils to listen for extent changes.  See this demo: Watch for changes | ArcGIS API for JavaScript 4.7 

0 Kudos
MaherAbdel_Karim
New Contributor II

Thank you for your comment.

I am using ArcGIS python API not javascript!

Regards

Maher

0 Kudos