请教大家问题:由bundle传来的上一个activity中坐标点,想要绘制在另一个activity中的地图上,用graphic做了,结果无论坐标点怎么变换,在手机屏幕上显示的都是同一个点。求解决办法。
代码如下:
double x=bundle.getDouble("x");
double y=bundle.getDouble("y");
Point aPoint=new Point(x, y);
graphicsLayer=new GraphicsLayer();
mMapView.addLayer(graphicsLayer);
graphic=new Graphic(mMapView.toMapPoint(aPoint), new SimpleMarkerSymbol(Color.BLUE, 10, STYLE.CIRCLE));
Log.e("error", "x"+(float)bundle.getDouble("x")+","+"y"+(float) bundle.getDouble("y"));
graphicsLayer.addGraphic(graphic);
logcat显示的两次x,y值不同,但是显示在地图上的点是一样的而且位置还不对。。
graphic=new Graphic(mMapView.toMapPoint(aPoint), new SimpleMarkerSymbol(Color.BLUE, 10, STYLE.CIRCLE));
graphicsLayer.addGraphic(graphic);
mMapView.addLayer(graphicsLayer);
顺序。。