Assign SpatialReference to ArcGISVIew

188
0
04-20-2023 08:21 AM
BHenke
by
New Contributor

Hi, I have been trying to use the GeographicToWorld method from the ArcGISView, but the SpatialReference is null so it only returns NaN. I've set the project up as described in the GetStarted.

The code so far looks like this: 

ArcGISMapComponent arcGISMapComponent = FindObjectOfType<ArcGISMapComponent>();
ArcGISSpatialReference spatialRef = new ArcGISSpatialReference(4326);
ArcGISPoint po = new ArcGISPoint(7.9, 53.25, 0.0, spatialRef);
var worldPos = arcGISMapComponent.View.GeographicToWorld(po);

 

0 Kudos
0 Replies