Has anyone been successful getting the map scale to update in console.log when an extent change is performed (through zooming with the mouse event: "zoom-end")?
I am looking for a method in the 4.x API that is similar to the following methods using the 3.x API:
will update when "zoom-end" is completed.
getScale()
getZoom()
I do have this working in the 3.x environment, but not having much luck using the 4.x API reference.
Here is a block of code I used for the 3.x API and it works well:
// Return Map Scale Results to Application - Calculation (/12) based on Feet NOT Meters
map.on("zoom-end", function() {
var returnZoomResult = document.getElementById("zoomToScaleResults");
var scale = map.getScale()/12;
var roundScale = Math.round(scale);
returnZoomResult.innerHTML = roundScale + " feet";
});