【发布时间】: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)
有人知道如何解决这个问题吗? 谢谢
【问题讨论】: