How can I retrieve the maximum and minimum latitude and longitude of the current view using the arcGIS javascript API (4.x)?
I can get the center lat and lon by using:
MapView.center.latitude
and MapView.center.longitude
.
I can also get the height and width in pixels using:
MapView.height
and MapView.width
.
However, I can't convert the pixel size to a lat/lon as the MapView.resolution property is 0. The MapView.extent is also null.
I am asking as I would like to query a database and only get the entries with a latitude and longitude within the view to save having to draw every point.