From 157e5f058f35292659236660a65b08bdd36dd373 Mon Sep 17 00:00:00 2001 From: Mourner Date: Fri, 17 Jun 2011 19:45:04 +0300 Subject: [PATCH] initial geojson example work --- examples/geojson-example.html | 55 +++++++++++++++++++++++++++++++++++ examples/geojson-sample.js | 50 +++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 examples/geojson-example.html create mode 100644 examples/geojson-sample.js diff --git a/examples/geojson-example.html b/examples/geojson-example.html new file mode 100644 index 00000000..9b361788 --- /dev/null +++ b/examples/geojson-example.html @@ -0,0 +1,55 @@ + + + + Leaflet debug page + + + + + + + + + + +
+ + + + + + \ No newline at end of file diff --git a/examples/geojson-sample.js b/examples/geojson-sample.js new file mode 100644 index 00000000..24ecf050 --- /dev/null +++ b/examples/geojson-sample.js @@ -0,0 +1,50 @@ +var geojsonSample = { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "Point", + "coordinates": [102.0, 0.5] + }, + "properties": { + "prop0": "value0", + "color": "blue" + } + }, + + { + "type": "Feature", + "geometry": { + "type": "LineString", + "coordinates": [[102.0, 0.0], [103.0, 1.0], [104.0, 0.0], [105.0, 1.0]] + }, + "properties": { + "color": "red", + "prop1": 0.0 + } + }, + + { + "type": "Feature", + "geometry": { + "type": "Polygon", + "coordinates": [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]]] + }, + "properties": { + "color": "green", + "prop1": { + "this": "that" + } + } + }, + + { + "type": "Feature", + "geometry": { + "type": "MultiPolygon", + "coordinates": [[[[100.0, 1.5], [100.5, 1.5], [100.5, 2.0], [100.0, 2.0], [100.0, 1.5]]], [[[100.5, 2.0], [100.5, 2.5], [101.0, 2.5], [101.0, 2.0], [100.5, 2.0]]]] + } + } + ] +}; \ No newline at end of file