GeoJSON FeatureCollection example, geometry and properties.

        $str = '{
            "type": "FeatureCollection",
            "features": [
            {
                "type": "Feature",
                "geometry": {
                    "type": "Polygon",
                    "coordinates": [[[-69.0062266588211,
                    9.27562217679211],
                    [-43.517945408821106,
                    -2.811371193331128],
                    [-37.014039158821106,
                    -9.795677582829732],
                    [-72.61157142049046,
                    4.701436497353403],
                    [-69.0062266588211,
                    9.27562217679211]]]
                },
                "properties": {
                    "name": "DOUBLE OAKS CENTER",
                    "address": "1326 WOODWARD AV"
                }
            },
            {
                "type": "Feature",
                "geometry": {
                    "type": "Point",
                    "coordinates": [
                        -80.837753,
                        35.249801
                    ]
                },
                "properties": {
                    "name": "DOUBLE OAKS CENTER",
                    "address": "1326 WOODWARD AV"
                }
            }
            ]
        }';

http://openlayers.org/en/master/examples/geojson.html
https://google-developers.appspot.com/maps/documentation/utils/geojson/
http://geojsonlint.com/

https://gist.github.com/sgillies/1233327  –  The GeoJSON Format Specification

var viewer = new Cesium.Viewer('cesiumContainer', {
    sceneMode : Cesium.SceneMode.SCENE2D,
    timeline : false,
    animation : false
});

var dataSource = Cesium.GeoJsonDataSource.load('simplestyles.geojson');
viewer.dataSources.add(dataSource);
viewer.zoomTo(dataSource);

Share

Leave a Reply

Your email address will not be published. Required fields are marked *