【问题标题】:ArcGIS SDK use distanceBetween with Android.locationArcGIS SDK 使用 distanceBetween 与 Android.location
【发布时间】:2018-07-18 01:45:02
【问题描述】:

我正在使用 ArcGis Sdk 来管理我的 Android 应用程序上的地理卡片,我想知道如何计算 2 个几何图形之间的最短距离。 我尝试了两个多点,我工作得很好,但是当我使用我的位置时,通过

 LocationManager locationManager = (LocationManager) this.activity.getSystemService(Context.LOCATION_SERVICE);
Location location= locationManager.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
Point geomMyPosition = new Point(location.getLongitude(),location.getLatitude(), SpatialReferences.getWgs84());
double minDistance = GeometryEngine.distanceBetween(geomMyPosition,buildingGeom);

我明白了:

UncaughtException: com.esri.arcgisruntime.ArcGISRuntimeException: Invalid argument
                         at com.esri.arcgisruntime.internal.jni.CoreGeometryEngine.nativeDistance(Native Method)
                         at com.esri.arcgisruntime.internal.jni.CoreGeometryEngine.f(SourceFile:160)

有人知道如何解决这个问题吗? 谢谢

【问题讨论】:

    标签: android arcgis point


    【解决方案1】:

    我发现这两个几何图形没有相同的空间参考。 但将它统一起来,它就像一种魅力。

    【讨论】:

      猜你喜欢
      • 2014-06-15
      • 2016-05-12
      • 1970-01-01
      • 2016-02-29
      • 1970-01-01
      • 2017-04-24
      • 1970-01-01
      • 2018-11-24
      • 2020-04-29
      相关资源
      最近更新 更多