在 ArcGIS Runtime .NET 中设置视点不起作用 (10.2.7)

Setting the viewpoint in ArcGIS Runtime .NET not working (10.2.7)

单击鼠标时,我尝试将视点设置为给定的 google 地图坐标位置。当下面的代码运行时,它会将地图以错误的比例移动到错误的位置。知道我做错了什么吗?

var point = new MapPoint
(
    -37.808934,
    144.975170,
    SpatialReference.Create(3857)  
);

var extent = new ViewpointCenter(point, 3000);

MyMapView.SetView(extent);

在我的特殊情况下,我需要使用 ConvertCoordinate.FromDecimalDegrees(...) 将以度为单位的坐标转换为米,然后再将它们传递给 Viewpoint 构造函数。

将您的空间参考 ID 更改为正确的值并使用 long/lat 命令:

var point = new MapPoint
(
  144.975170, //Longitude first
  -37.808934, //Latitude next
  SpatialReference.Create(4326) //This is the correct code for your coordinates  
);

var extent = new ViewpointCenter(point, 3000);

MyMapView.SetView(extent);