|
47 | 47 | });
|
48 | 48 |
|
49 | 49 | map.on("load", function () {
|
50 |
| - addGeoJsonLayer("http://opendata.dc.gov/datasets/81a9d9885947483aa2088d81b20bfe66_5.geojson"); |
| 50 | + addGeoJsonLayer("./data/dc-schools.json"); |
51 | 51 | });
|
52 | 52 |
|
53 | 53 | function selectGeoJsonData(e) {
|
|
65 | 65 | function addGeoJsonLayer(url) {
|
66 | 66 | // Create the layer
|
67 | 67 | var geoJsonLayer = new GeoJsonLayer({
|
68 |
| - url: url // http://opendata.dc.gov/datasets/81a9d9885947483aa2088d81b20bfe66_5.geojson |
| 68 | + url: url // ./data/dc-schools.json |
69 | 69 | });
|
70 | 70 | // Zoom to layer
|
71 | 71 | geoJsonLayer.on("update-end", function (e) {
|
@@ -116,16 +116,18 @@ <h3 class="panel-title">ArcGIS GeoJSON Layer</h3>
|
116 | 116 | <div class="form-group">
|
117 | 117 | <label class="control-label">Sample Data</label>
|
118 | 118 | <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> |
120 | 124 | <option value="http://koop.dc.esri.com/github/colemanm/hurricanes/fl_2004_hurricanes.json">Koop Server - Hurricanes</option>
|
121 | 125 | <option value="http://geeknixta.com/json/DEMOGRAPHICS_Blocks2010.geojson">Nixta's Server - Demographics</option>
|
122 | 126 | <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> |
125 | 127 | </select>
|
126 | 128 | </div>
|
127 | 129 | <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> |
129 | 131 | <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">
|
130 | 132 | </div>
|
131 | 133 | <div class="form-group text-center">
|
|
0 commit comments