在Android中json数据十分普遍,也很实用,在Arcgis中也同样支持Json数据,Json与Geometry可以相互转换,达到我们想要的数据. 一.Geometry转换成Json数据 这个实现十分简单,比如我们将一个点转换为Json,这时也同样用到GeometryEngine这个强大的类. Point point = new Point(113, 23); String json = GeometryEngine.geometryToJson(SpatialReference.creat
GraphicsLayer是图形图层,可以自定义图形添加到地图上.调用GraphicsLayer的addGraphic方法就能添加图形,此方法要一个Graphic对象,此对象的构造方法是Graphic(Geometry geometry, Symbol symbol),前面第一个是要素,而Geometry的子类有Envelope, MultiPath, MultiPoint, Point, Segment,Line, Polygon, Polyline.我们所常用的有点Point,线Polyli
我们知道某个Geometry的坐标,但不知道具体的位置,该如何使地图快速定位呢?这时需要用到MapView.setExtent方法,来看下这个方法的介绍:Zooms the map to the given geometry so that geometry fits within the bounds of the map.大体的意思即缩小地图定位到Geometry.上代码: public class MainActivity extends Activity { private MapVie