Hi Guys,
In my addin, I subscribe to MapPropertyChangeEvent to get updated spatialreference and extent of current map view.
I correctly get updated SpatialReference in the event, but I got MapView extent boundingbox values are remained the same as old spatialreference value.
I am using this code in the MapPropertyChangeEvent to get current MapView extent.
MapView.Active.Extent
For example after I change map's spatial reference from projected coordinate system,
From
"PROJCS[\"AGD_1966_AMG_Zone_50\",GEOGCS[\"GCS_Australian_1966\",DATUM[\"D_Australian_1966\",SPHEROID[\"Australian\",6378160.0,298.25]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"False_Easting\",500000.0],PARAMETER[\"False_Northing\",10000000.0],PARAMETER[\"Central_Meridian\",117.0],PARAMETER[\"Scale_Factor\",0.9996],PARAMETER[\"Latitude_Of_Origin\",0.0],UNIT[\"Meter\",1.0]]"
to geographic
"GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137.0,298.257223563]],PRIMEM[\"Greenwich\",0.0],UNIT[\"Degree\",0.0174532925199433]]"
I am getting mapview extent boundingbox as in
XMax: -1776117.1635439098
XMin: -1900502.3492182
YMax: 12016785.670364719
YMin: 11967047.984130006
I subcribed the map property change event in constructor and using arcgis pro sdk 2.7. Is there any other way I can extract current mapview extent correctly upon spatial reference change.
Best Regards,
Than