Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
61 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "boundary", | ||
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } }, | ||
"features": [ | ||
{ "type": "Feature", "properties": { "popupContent": "This is the Auraria West Campus", "style": { "weight": 2, "color": "#999", "opacity": 1, "fillColor": "#B0DE5C", "fillOpacity": 0.800000 } }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ -105.00432014465332, 39.747321954898609 ], [ -105.007152557373047, 39.746200068351698 ], [ -105.00921249389647, 39.744682192770377 ], [ -105.010671615600586, 39.743626259601051 ], [ -105.011959075927734, 39.742900296160542 ], [ -105.009899139404311, 39.74078835902781 ], [ -105.00758171081543, 39.740590361603168 ], [ -105.003461837768555, 39.740590361603168 ], [ -105.00097274780272, 39.740590361603168 ], [ -105.000629425048814, 39.740722359949459 ], [ -105.000200271606445, 39.741910333688651 ], [ -105.000715255737305, 39.742768301986011 ], [ -105.00097274780272, 39.743692255898182 ], [ -105.00097274780272, 39.744616197421358 ], [ -105.001230239868164, 39.745342142783947 ], [ -105.001831054687514, 39.746134074456528 ], [ -105.00432014465332, 39.747321954898609 ] ], [ [ -105.003612041473374, 39.743543764140718 ], [ -105.003011226654053, 39.742784801271632 ], [ -105.002217292785645, 39.743164283751078 ], [ -105.002839565277114, 39.743906743427409 ], [ -105.003612041473374, 39.743543764140718 ] ], [ [ -105.009427070617676, 39.739897366137079 ], [ -105.009427070617676, 39.739105362785658 ], [ -105.006852149963379, 39.739237363976308 ], [ -105.003848075866713, 39.739105362785658 ], [ -105.001745223999023, 39.739039362095518 ], [ -105.000414848327637, 39.739105362785658 ], [ -105.000414848327637, 39.739798366215922 ], [ -105.005350112915039, 39.739864366179162 ], [ -105.009427070617676, 39.739897366137079 ] ] ] } } | ||
] | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* Generate tiles from GeoJSON data. | ||
* Sample data from leflet: https://leafletjs.com/examples/geojson/example.html | ||
* npm install geojson2mvt | ||
*/ | ||
|
||
var fs = require('fs'); | ||
var geojson2mvt = require('geojson2mvt'); | ||
|
||
const filePath = './boundary.geojson'; | ||
|
||
var options = { | ||
rootDir: 'boundary', | ||
bbox : [39.73,-105.02,39.75,-105.00], | ||
zoom : { | ||
min : 8, | ||
max : 14, | ||
}, | ||
layerName: 'boundary', | ||
}; | ||
|
||
var geoJson = JSON.parse(fs.readFileSync(filePath, "utf8")); | ||
|
||
// build the static tile pyramid | ||
geojson2mvt(geoJson, options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters