Snippets of code that don't quite fit anywhere else.
I recently deployed GNR Comparo. I initially built it with Laravel on Google App Engine because that’s works well for prototypes when you’re unsure if you need a frontend, backend, API or fullstack app. Here’s some notes about my experience deploying this stack.
(Eventually GNRComparo ended up using Lumen instead, but even that proved to be overkill. The app ended up entirely client-side so shoudl be redeployed as a static app without any server frameworks).
This post demonstrates hovering over features on a map and setting their borders to blue. Basically this repurposes the OL3 Box Selection Demo to use an ol3.interaction.Select
interaction instead of click/drag box interactions. There’s some notes at the bottom about using map.on('pointermove')
for an alternative way of doing it.
This post demonstrates adding an icon image to an OL3 map.
This post demonstrates integrating the ECMWF public CAMS WMS products with Open Layers 3.
I’ve just been doing some customisation on the Confluence wiki, and ran into a bug while using the old Documentation theme. I hacked this JavaScript to create a fix that works for me. It needs to go in the Custom HTML, in the ‘end of Body’ section.
Google App Engine can serve static content as well as apps, which makes it a handy place to run sites like this one powered by Jekyll (more info here). But familiar features from other webservers are missing and need reinventing, such as default directory indexes and HTTP Basic Auth. Here’s some info about how to add Basic Auth.