These are a quick & dirty pair of Leaflet-using html pages that are used in conjunction with my Let's Talk About Your Geostack workshop & deck.
You should have successfully installed the companion repo, geostack-api, and its requirements.
The workshop demonstrates how all components of a contemporary web mapping application can be run locally, on your own computer, using open source software and open data. OpenStreetMap data is used with TileMill and TileStream to generate and serve map tiles as a base layer, and with Leaflet to generate map overlays for points of interest.
dynamic.html
consumes data from the geostack-api
in order to create and display a Leaflet
GeoJSON Layer.
static.html
and dynamic.html
both rely on a running tileserver. You'd set up a
TileStream server in the workshop,
so that's the default value for tileUrl
. But you can also choose to use example tiles from MapBox, or tiles served
locally from a Python SimpleHTTPServer instance; just comment/uncomment tileUrl
accordingly in this block, which
appears in both of the included html
files.
// @todo: Pick a tileserver by uncommenting one of these values for tileUrl:
//
// To use the MapBox example tiles:
// tileUrl = 'https://{s}.tiles.mapbox.com/v3/{id}/{z}/{x}/{y}.png';
//
// To use the Python SimpleHTTPServer you've set up on port 8887:
// tileUrl = 'http://localhost:8887/tiles/{z}/{x}/{y}.png';
//
// To use the TileStream server you've set up on port 8888:
tileUrl = 'http://localhost:8888/v2/portland_from_osm/{z}/{x}/{y}.png';
//