2

我正在使用 android-maps-utils:0.5 通过以下方式创建 GeoJsonPolygon

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

但是当我试图从多边形中获取坐标时,它什么也没返回。更多的事实是 GeoJsonPolygon 除了List<? extends List<LatLng>> coordinates作为我通过转换我的List<LatLng> latLngList使用实现的参数,Collections.singletonList(latLngList)但我很确定我没有正确地做它。

4

0 回答 0