我是第一次在我的 android 应用程序(java)中使用 ArcGis。
我通过“一张 map ”获得了某个位置的 X 和 Y 坐标http://www.onemap.sg/API/Help/RESTExamples.aspx ,
现在我想在 map 中将此点显示为红点。
X-26005.0765 Y-30007.0973
有人知道要遵循的教程吗?我看到了“Hello Map教程”。
任何人都可以指导我查看带有示例的教程或文档吗?
阿弥陀佛
最佳答案
您必须使用图形层来添加点的图形表示。 下面的代码是您在给定的坐标中打印一个点的示例。
public class Test extends Activity {
// View elements
MapView map;
GraphicsLayer measures = new GraphicsLayer();
Point point;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
// Get elements of the view
map = (MapView) findViewById(R.id.map);
map.addLayer(measures);
Point point = new Point(26005.0765, 30007.0973);
measures.addGraphic(new Graphic(point,new SimpleMarkerSymbol(Color.RED,10,STYLE.CIRCLE)));
map.zoomTo(point, 0);
}
}
关于android - 使用 ArcGis 在 OneMap 上显示位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14271411/