2

I'm using android-maps-utils:0.5 to create GeoJsonPolygon in the following way

private GeoJsonFeature createPolygonFeature(List<LatLng> latLngList,String id){
    GeoJsonPolygon geoJsonPolygon=new GeoJsonPolygon(Collections.singletonList(latLngList));
    return new GeoJsonFeature(geoJsonPolygon,id,null,null);
}

But when I'm trying to fetch the coordinates from the polygon it's returning nothing. More fact is the GeoJsonPolygon excepts List<? extends List<LatLng>> coordinates as a parameter which i achieved by converting my List<LatLng> latLngList using Collections.singletonList(latLngList) but I'm quite sure I'm not doing it correctly.

Arpan
  • 596
  • 2
  • 10
  • 29

0 Answers0