Matteo Tosi

👋 I build stuff that doesn't stall.

Caching proxy for tile servers

Devlog: 2018-11

November: five new repos, one itch. Maps that do a bit more than show tiles.

A track on a map doesn't tell you how much it climbs. On November 2 I started leaflet-elevation, initially based on Felix Bache's Leaflet.Elevation: the track and its elevation profile, side by side. See the track demo.

An elevation profile alongside a map

An illustration of leaflet-elevation.

On the 12th, google-geolocate: a "where am I" button for Google Maps. It needs HTTPS, an API key and the user's permission. Example.

The geolocation control on a map

On the 19th, leaflet-pegman: Google Street View from a Leaflet map, based on Daniel Pegues's work. Day two was cleanup: stop panorama events bubbling up to the map, fix the control on left positions, fix a z-index. Examples: lazy loading, separate panorama container.

On the 22nd, google-transparency: an opacity slider for Google Maps overlays, based on Gavin Harriss's control. Example. The Leaflet port came the following May.

All of these pull tiles from somebody else's server. On the 25th, tile-proxy-php: a PHP caching proxy for map tiles, based on Lizard's ProxySimplePHP. Apache, mod_rewrite, php_curl. Old code: check the tile provider's policy before pointing it at anyone.

A map tile caching proxy diagram

The project's caching illustration.

Pilot ID · SWE

Software Engineer @ g3w-suite

Over a decade fighting enterprise maps. Day job: getting QGIS projects to fly on the web.

Station
g3w-suite · client, server, Docker, plugins
On board since
2012
Side missions
Leaflet plugins, brownfield code
Motto
Peace, love, and lean code.

Callsign · Raruto

This is Raruto.

Just another human in the loop. The helmet does most of the work.

Callsign
Raruto
Name
Matteo Tosi
Home base
github.com/Raruto
Flight log
Debriefs →

Stencil · 01

No step

On a real airframe it marks the panels your boot would punch through. Here it marks the parts held together with duct tape. Tread lightly.

Stencil · 02

Mach 3+ inside

SR-71 cruise speed. This site gets close by shipping almost nothing: plain HTML, one stylesheet, no framework.

Mach 3
Not included.

Stencil · 04

Open hatch

Most of my open-source mileage is Leaflet plugins. Maps that rotate, draw elevation profiles, and lately go 3D.

Hangar
42 airframes →

Stencil · 03

Rust free

No theme, no page builder. Markdown in, HTML out, one small Node script in between. Hand-rolled HTML, like it's 1999.

Source
Raruto/raruto.github.io

Stencil · 05

Best viewed @ 85,000 ft

Roughly where the SR-71 cruised. Down here, any browser from this decade will do.

Ground crew

GitHub Pages

The runway. Markdown in, HTML out, one small Node script in between, pushed to a repo and served from there. No servers to babysit.

Source
Raruto/raruto.github.io
Service
pages.github.com