Barebones application needed for building a Leaflet webmap with GeoJSON data. This specific example uses Mapbox's tilesets which can be obtained by creating an account at mapbox.com.
##What you'll need
- Mapbox tileset ID ex:
examples.map-h67hf2ic - Data. For testing and playing around, I recommend starting with point data from Natural Earth Data's Populated Places dataset.
##Setup
- Get your data into a GeoJSON format, via GDAL cli or QGIS (read more about geojson here).
- Take the raw text of that GeoJSON data and add it to a javascript variable in a separate
.jsfile - this is done for you here in thedata.jsfile, which is linked to yourindex.htmlfile. - Instantiate the leaflet API via your
site.jsfile, this is where you'll include your mapbox tileset ID and your geojson data/variable. Thesite.jsis prepared for you already to set up your map in the#mapelement of yourindex.htmlfile.
##Woop~!