{"id":1818,"date":"2018-08-14T22:58:55","date_gmt":"2018-08-14T22:58:55","guid":{"rendered":"http:\/\/www.phpmind.com\/blog\/?p=1818"},"modified":"2018-08-15T18:19:27","modified_gmt":"2018-08-15T18:19:27","slug":"geojson-featurecollection-example-geometry-and-properties","status":"publish","type":"post","link":"https:\/\/www.phpmind.com\/blog\/2018\/08\/geojson-featurecollection-example-geometry-and-properties\/","title":{"rendered":"GeoJSON FeatureCollection example, geometry and properties."},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/www.phpmind.com\/blog\/wp-content\/uploads\/2018\/08\/0417aaae6c39bd4425a794f104f064ca.png\" \/><\/p>\n<pre lang=\"php\" class=\"\">        $str = '{\r\n            \"type\": \"FeatureCollection\",\r\n            \"features\": [\r\n            {\r\n                \"type\": \"Feature\",\r\n                \"geometry\": {\r\n                    \"type\": \"Polygon\",\r\n                    \"coordinates\": [[[-69.0062266588211,\r\n                    9.27562217679211],\r\n                    [-43.517945408821106,\r\n                    -2.811371193331128],\r\n                    [-37.014039158821106,\r\n                    -9.795677582829732],\r\n                    [-72.61157142049046,\r\n                    4.701436497353403],\r\n                    [-69.0062266588211,\r\n                    9.27562217679211]]]\r\n                },\r\n                \"properties\": {\r\n                    \"name\": \"DOUBLE OAKS CENTER\",\r\n                    \"address\": \"1326 WOODWARD AV\"\r\n                }\r\n            },\r\n            {\r\n                \"type\": \"Feature\",\r\n                \"geometry\": {\r\n                    \"type\": \"Point\",\r\n                    \"coordinates\": [\r\n                        -80.837753,\r\n                        35.249801\r\n                    ]\r\n                },\r\n                \"properties\": {\r\n                    \"name\": \"DOUBLE OAKS CENTER\",\r\n                    \"address\": \"1326 WOODWARD AV\"\r\n                }\r\n            }\r\n            ]\r\n        }';\r\n<\/pre>\n<p>http:\/\/openlayers.org\/en\/master\/examples\/geojson.html<br \/>\nhttps:\/\/google-developers.appspot.com\/maps\/documentation\/utils\/geojson\/<br \/>\nhttp:\/\/geojsonlint.com\/<\/p>\n<p>https:\/\/gist.github.com\/sgillies\/1233327\u00a0 &#8211;\u00a0 The GeoJSON Format Specification<\/p>\n<pre class=\"\">var viewer = new Cesium.Viewer('cesiumContainer', {\r\n    sceneMode : Cesium.SceneMode.SCENE2D,\r\n    timeline : false,\r\n    animation : false\r\n});\r\n\r\nvar dataSource = Cesium.GeoJsonDataSource.load('simplestyles.geojson');\r\nviewer.dataSources.add(dataSource);\r\nviewer.zoomTo(dataSource);\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>$str = &#8216;{ &#8220;type&#8221;: &#8220;FeatureCollection&#8221;, &#8220;features&#8221;: [ { &#8220;type&#8221;: &#8220;Feature&#8221;, &#8220;geometry&#8221;: { &#8220;type&#8221;: &#8220;Polygon&#8221;, &#8220;coordinates&#8221;: [[[-69.0062266588211, 9.27562217679211], [-43.517945408821106, -2.811371193331128], [-37.014039158821106, -9.795677582829732], [-72.61157142049046, 4.701436497353403], [-69.0062266588211, 9.27562217679211]]] }, &#8220;properties&#8221;: { &#8220;name&#8221;: &#8220;DOUBLE OAKS CENTER&#8221;, &#8220;address&#8221;: &#8220;1326 WOODWARD AV&#8221; } }, { &#8220;type&#8221;: &#8220;Feature&#8221;, &#8220;geometry&#8221;: { &#8220;type&#8221;: &#8220;Point&#8221;, &#8220;coordinates&#8221;: [ -80.837753, 35.249801 ] }, &#8220;properties&#8221;: { &#8220;name&#8221;: &#8220;DOUBLE [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[53],"tags":[],"class_list":["post-1818","post","type-post","status-publish","format-standard","hentry","category-cesiumjs"],"_links":{"self":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1818","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/comments?post=1818"}],"version-history":[{"count":5,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1818\/revisions"}],"predecessor-version":[{"id":1823,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/posts\/1818\/revisions\/1823"}],"wp:attachment":[{"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/media?parent=1818"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/categories?post=1818"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.phpmind.com\/blog\/wp-json\/wp\/v2\/tags?post=1818"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}