OpenLayers深入浅出(6)—-GeoJSON格式定制

   var featurecollection = {
              “type”: “FeatureCollection”,
              “features”: [
                {“geometry”: {
                    “type”: “GeometryCollection”,
                    “geometries”: [
                        {
                            “type”: “LineString”,
                            “coordinates”:
                                [[11.0878902207, 45.1602390564],
                                [15.01953125, 48.1298828125]]
                        },
                        {
                            “type”: “Polygon”,
                            “coordinates”:
                                [[[11.0878902207, 45.1602390564],
                                  [14.931640625, 40.9228515625],
                                  [0.8251953125, 41.0986328125],
                                  [7.63671875, 48.96484375],
                                  [11.0878902207, 45.1602390564]]]
                        },
                        {
                            “type”:”Point”,
                            “coordinates”:[15.87646484375, 44.1748046875]
                        }
                    ]
                },
                “type”: “Feature”,
                “properties”: {}}
              ]
           };

转载自:https://blog.csdn.net/wozaifeiyang0/article/details/6894506

You may also like...