Does esri 4.x versions has an event equivalent to onExtentChange for Map?
map.on("extent-change", function(){//do things});
Solved! Go to Solution.
Read the section "Watching properties" here: Working with properties | ArcGIS API for JavaScript 4.4
view.watch("extent", (newValue, oldValue, property, object)=>{
console.info("Extent has changed: ", newValue);
});
Read the section "Watching properties" here: Working with properties | ArcGIS API for JavaScript 4.4
view.watch("extent", (newValue, oldValue, property, object)=>{
console.info("Extent has changed: ", newValue);
});
Does this work in 4.3 or is this new feature in 4.4?
Since 4.0; watching properties is the 4.x way of handling this use case.
This is only for setting new values to the existing values. What I need to is load some markers to exact points on extent change so the markers will be loaded only in the visible area.
Please read the section "Watching properties".