Mapbox-ios:我有一个MultiPolygon数据,我想通过数据或Dictionary生成一个对象,并且可以查看每个Polygon数据,

时间:2019-06-03 10:25:43

标签: mapbox-ios

我检查了MGLMultiPolygon类,发现它只能使用多个Polygon方法生成,所以我有一个geojson数据,只能将其拆分为该数据吗?太麻烦了!

我尝试使用MGLShapeSource和MGLFillStyleLayer生成geojson图,但是我找不到每个对象包含的Polygon。 我需要显示多个多边形,查询其多边形并重新生成多边形。 我有一个geojson数据,但是我不知道该怎么办?

这是我的geojson数据:

{
    crs =     {
        properties =         {
            name = "urn:ogc:def:crs:EPSG::4326";
        };
        type = name;
    };
    features =     (
                {
            geometry =             {
                coordinates =                 (
                                        (
                                                (
                                                        (
                                "96.38328552",
                                "42.72695541"
                            ),
                                                        (
                                "96.35990906000001",
                                "42.70969009"
                            ),
                                                        (
                                "96.09664153999999",
                                "42.5996666"
                            ),
                                                        (
                                "96.05974578999999",
                                "42.39873505"
                            ),
                                                        (
                                "96.38304137999999",
                                "42.73304749"
                            ),
                                                        (
                                "96.38375092",
                                "42.73053741"
                            ),
                                                        (
                                "96.38328552",
                                "42.72695541"
                            )
                        )
                    )
                );
                type = MultiPolygon;
            };
            "geometry_name" = "the_geom";
            id = "china.13";
            properties =             {
                ADCODE93 = 650000;
                ADCODE99 = 650000;
                AREA = "175.591";
                "BOU2_4M_" = 4;
                "BOU2_4M_ID" = 65;
                NAME = "\U65b0\U7586\U7ef4\U543e\U5c14\U81ea\U6cbb\U533a";
                PERIMETER = "84.905";
            };
            type = Feature;
        }
    );
    numberReturned = 1;
    timeStamp = "2019-06-03T10:12:11.178Z";
    totalFeatures = unknown;
    type = FeatureCollection;
}

如果我通过MGLFillStyleLayer生成geojson,我将找不到任何多边形信息

0 个答案:

没有答案