将纬度和经度转换为 esri arcGIS MapPoint

2023-11-24

我在将纬度和经度值转换为 android esri arcGIS 地图点时遇到问题。这是我从 GPS 坐标获取纬度和经度值的代码:

LocationManager lm;
String towers;
double lat;
double longi;
TextView txt;

            lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
            Criteria crit = new Criteria();
            towers = lm.getBestProvider(crit, false);
            Location location = lm.getLastKnownLocation(towers);

            if(location != null)
            {
                lat = location.getLatitude();
                longi = location.getLongitude();
            }

现在我有了纬度和经度值。现在我需要的是将这些值转换为有效的 esri arcGIS MapPoint。谁能帮我?

提前致谢。


假设您使用的是 ESRI Android API?如果是这样,请在地图上创建一个图形图层。然后创建一个点对象

com.esri.core.geometry.Point
Point myPoint = new Point();

然后设置 x/y 值:

myPoint.setX(longi);
myPoint.setY(lat);

然后将 myPoint 添加到图形对象。

http://help.arcgis.com/en/arcgismobile/10.0/apis/android/api/index.html

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

将纬度和经度转换为 esri arcGIS MapPoint 的相关文章

随机推荐