Skip to content

Commit af5afde

Browse files
committed
Added better sample data
1 parent cb6fa09 commit af5afde

File tree

7 files changed

+11
-426
lines changed

7 files changed

+11
-426
lines changed

data/dc-bike-routes.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

data/dc-school-zones.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

data/dc-schools.json

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

data/neighborhoods-2913.json

Lines changed: 0 additions & 135 deletions
This file was deleted.

data/rail-lines-2913.json

Lines changed: 0 additions & 101 deletions
This file was deleted.

data/rail-stops-2913.json

Lines changed: 0 additions & 184 deletions
This file was deleted.

geojsonlayer.html

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
});
4848

4949
map.on("load", function () {
50-
addGeoJsonLayer("http://opendata.dc.gov/datasets/81a9d9885947483aa2088d81b20bfe66_5.geojson");
50+
addGeoJsonLayer("./data/dc-schools.json");
5151
});
5252

5353
function selectGeoJsonData(e) {
@@ -65,7 +65,7 @@
6565
function addGeoJsonLayer(url) {
6666
// Create the layer
6767
var geoJsonLayer = new GeoJsonLayer({
68-
url: url // http://opendata.dc.gov/datasets/81a9d9885947483aa2088d81b20bfe66_5.geojson
68+
url: url // ./data/dc-schools.json
6969
});
7070
// Zoom to layer
7171
geoJsonLayer.on("update-end", function (e) {
@@ -116,16 +116,18 @@ <h3 class="panel-title">ArcGIS GeoJSON Layer</h3>
116116
<div class="form-group">
117117
<label class="control-label">Sample Data</label>
118118
<select class="form-control" id="selGeoJson">
119-
<option value="http://opendata.dc.gov/datasets/81a9d9885947483aa2088d81b20bfe66_5.geojson">ArcGIS Open Data - D.C. Schools</option>
119+
<option value="./data/dc-schools.json">GeoJSON File - D.C. Schools</option>
120+
<option value="./data/dc-bike-routes.json">GeoJSON File - D.C. Bike Routes</option>
121+
<option value="./data/dc-school-zones.json">GeoJSON File - D.C. School Zones</option>
122+
<option value="./data/canada.json">GeoJSON File - Canada</option>
123+
<option value="./data/usa.json">GeoJSON File - USA</option>
120124
<option value="http://koop.dc.esri.com/github/colemanm/hurricanes/fl_2004_hurricanes.json">Koop Server - Hurricanes</option>
121125
<option value="http://geeknixta.com/json/DEMOGRAPHICS_Blocks2010.geojson">Nixta's Server - Demographics</option>
122126
<option value="http://geonode.geeknixta.com/citybikes/rest/services/citibikenyc/FeatureServer/0/query?f=geojson">Nixta's Server - NY Bikes</option>
123-
<option value="./data/canada.json">GeoJSON File - Canada</option>
124-
<option value="./data/usa.json">GeoJSON File - USA</option>
125127
</select>
126128
</div>
127129
<div class="form-group">
128-
<label class="control-label">URL <a target="_blank" href="https://developers.arcgis.com/javascript/jshelp/inside_defaults.html">(File or CORS Server Only)</a></label>
130+
<label class="control-label">URL <a target="_blank" href="https://developers.arcgis.com/javascript/jshelp/ags_proxy.html">(File or CORS Servers Only)</a></label>
129131
<input type="text" class="form-control" id="geoJsonUrl" value="http://opendata.dc.gov/datasets/81a9d9885947483aa2088d81b20bfe66_5.geojson" placeholder="http://opendata.dc.gov/datasets/81a9d9885947483aa2088d81b20bfe66_5.geojson">
130132
</div>
131133
<div class="form-group text-center">

0 commit comments

Comments
 (0)