【问题标题】:Using ArcGis for displaying location on OneMap使用 ArcGis 在 OneMap 上显示位置
【发布时间】:2012-12-25 15:16:44
【问题描述】:

我第一次在我的 android 应用程序 (java) 中使用 ArcGis。

我通过“一张地图”http://www.onemap.sg/API/Help/RESTExamples.aspx 得到了一个位置的 X 和 Y 坐标,

现在我想在地图中将此点显示为红点。

X-26005.0765 Y-30007.0973

有谁知道要遵循的教程。我看到了《你好地图教程》。

任何人都可以通过示例将我引导到教程或文档。

阿斯米塔

【问题讨论】:

    标签: android maps arcgis


    【解决方案1】:

    您必须使用图形图层来添加您的点的图形表示。 下面的代码是一个示例,您在给定的坐标中打印一个点。

    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);
    }
    

    }

    【讨论】:

      猜你喜欢
      • 2014-01-07
      • 2016-05-11
      • 2023-04-08
      • 2013-12-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多