Closed mattdelsordo closed 6 years ago
This currently has demo files for both pa_gardens
and pwd_inlets
. I think it would make sense to pick one to get working and leave the other out of the repo for now. My feeling is that using pa_gardens
, since it's simpler, is preferable for the initial demo. That would also mean we could remove the inlet
filtering from node-lambnik, which I think makes sense since that's very specific to the original Lambnik demo and might not match where we ultimately want to go with filtering config.
Overview
This PR plugs mapnik into the database in order to generate map tiles, which then get served up through an API.
Demo
Example deployment (27 Jun 2018)
Notes
Current development environment setup doesn't necessarily obey the quirks of the real API Gateway, tiles are served from what is basically an express server. Also, the
pwd_inlets
data set is very large on a per-tile basis which may cause the lambdas to time out. Increase the value ofTIMEOUT
in.env
if you are consistently getting un-viewable images or 502 errors.Accept headers
API Gateway currently has issues serving images that can be simply displayed in-browser, so you have to manually add an
Accept:image/png
header to your lambda requests to receive proper images. This can be done either with curl (-H "Accept:image/png"
) or in production by setting up a proxy (e.g. with CloudFront) that adds the header to all lambda requests.Testing Instructions
./scripts/update
and./scripts/server
to run the local tileserver.src/demo/pwd_inlets_index.html
to generate and display tiles through Leaflet../scripts/publish
(optional--new
flag if you haven't deployed the project before). Assuming your credentials are set up properly it should deploy within about a minute.Resolves #10, resolves #19, resolves #31, resolves #32