在我的应用中,我有自己的离线地图(.tpk),但现在我想在地图上显示一些点,我有一些longitude
和latitude
,我正在使用此代码:< / p>
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);
显示locy和locx但没有发生任何事情,这段代码显示点是否正确? 还是有另一种方法可以做到这一点?谢谢你的帮助......