如何在android的离线地图arcgis中显示经度和纬度点?

时间:2022-08-08 16:03:28

in my app I have my own offline map (.tpk) but now I want to show some points on my map and I have some longitude and latitude , I am using this code :

在我的应用程序中,我有自己的离线地图(.tpk),但现在我想在地图上显示一些点,我有一些经度和纬度,我使用的是这个代码:

            double locy = 44.008655;
            double locx = 36.1972958;
            Point wgspoint = new Point(locx, locy);
            Point mapPoint = (Point) GeometryEngine.project(wgspoint,

            SpatialReference.create(4326),

            mMapView.getSpatialReference());

            GraphicsLayer gLayer = new GraphicsLayer();
            PictureMarkerSymbol symbol = new PictureMarkerSymbol(getResources()
                    .getDrawable(R.drawable.ic_launcher));
            Graphic graphic = new Graphic(mapPoint, symbol);
            gLayer.addGraphic(graphic);
            mMapView.addLayer(gLayer);

to show locy and locx but nothing happened , this code is correct to show points ? or there is another way to do this ? thanks for any help....

为了显示locy和locx但什么都没有发生,这个代码是正确的显示点?或者还有另一种方法?感谢任何帮助....

1 个解决方案

#1


0  

I think you have to convert the points of longitudes and the latitudes to the accepted esri arcGIS MapPoint in this Link you can find your answer

我认为你必须将经度和纬度转换为接受的esri arcGIS MapPoint在这个链接中你可以找到你的答案。

#1


0  

I think you have to convert the points of longitudes and the latitudes to the accepted esri arcGIS MapPoint in this Link you can find your answer

我认为你必须将经度和纬度转换为接受的esri arcGIS MapPoint在这个链接中你可以找到你的答案。