File tree Expand file tree Collapse file tree
arcgis_map_android/android/src/main/kotlin/esri/arcgis/flutter_plugin/util Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ class GraphicsParser {
2222 " point" -> parsePoint(map)
2323 " polygon" -> parsePolygon(map)
2424 " polyline" -> parsePolyline(map)
25- else -> throw Exception (" No type for $type " )
25+ else -> throw Exception (" No type for $type " )
2626 }
2727
2828 val attributes = map[" attributes" ] as ? Map <String , String >
@@ -62,11 +62,12 @@ class GraphicsParser {
6262 }
6363
6464 private fun parsePolygon (map : Map <String , Any >): List <Graphic > {
65- val rings = parseToClass<List <List <LatLng >>>(map[" rings" ]!! )
65+ val rings = parseToClass<List <List <List < Double > >>>(map[" rings" ]!! )
6666
67- return rings.map { points ->
67+ return rings.map { ring ->
6868 Graphic ().apply {
69- geometry = Polygon (PointCollection (points.map { it.toAGSPoint() }))
69+ geometry =
70+ Polygon (PointCollection (ring.map { LatLng (it[0 ], it[1 ]).toAGSPoint() }))
7071 symbol = parseSymbol(map)
7172 }
7273 }
You can’t perform that action at this time.
0 commit comments