AnsweredAssumed Answered

MapView.Extent is wrong on spatial reference change

Question asked by maxmaxmaxmaxmax on Jun 8, 2019
Latest reply on Jun 17, 2019 by maxmaxmaxmaxmax

Code for test:

 

var sr = mapView.Map.SpatialReference;
var extent = mapView.Extent;

 

Steps to reproduce the problem:

 

1. Create new project. Variables now will have values:

 

 

2. Add layer with WGS84 spatial reference and zoom to full extent (the issue will be without zooming too). Now execute the code above:

 

 

We see that spatial reference now is WGS84, but extent coordinates doesn't correspond to WGS84. Max extent for this sr must be -180 -90 180 90 in degrees, but the values from screenshot are obviously wrong.

 

More than that I can't project extent to WGS84, because it's already in WGS84, so coordinates still the same!

Attachments

Outcomes