SDK: arcgis sdk for android 100.12.0
I used sketcheditor to create a polygon, and get the polygon points, then send the points to server.
There are tow problems I got:
1.In APP, I set the layer display label, but the created polygon doesn't display the label. The polygon create from js client dispaly well.
2.In PC, I use the coordinate which get from App but it doesn't display as a polygon, it only rendered the outline.
the polygon display in PC:
the polygon display in Android:
My android code to get the polygon points:
Polygon polygon = (Polygon) GeometryEngine.project(sketchEditor.getGeometry(), SpatialReferences.getWgs84());
PointCollection points = new PointCollection(polygon.getParts().getPartsAsPoints());
I'm so confused, anyone can help me?
I solved the problem, the geometry get from sketcheditor is not topologically consistent. so I guess in PC it can't render as a polygon and in Android, it can't find the center point to show label. I use GeometryEngine.simplify to make it topologically consistent and now it render well in PC and Android.
Hope to be useful to you. ^_^