Mapzen maps. In a browser. Full-screen. With the ability to screenshot themselves.
This doesn't do a bunch of things that any normal map does, yet.
Put it on a web server. Or: Use the handy
slippy target in the included Makefile.
This will start a small local web server that you can visit in your web browser by going to
If you don't know what a "Makefile" is or don't make the
make program installed on your computer you can start
mapzen-slippy-map by hand, from the command-line, like this:
./utils/PLATFORM/www-server -path ./www
PLATFORM should be one of the following:
- darwin (as in Mac OS X)
Proxying (and caching tiles)
It is also possible to proxy (and cache) tiles from Mapzen, assuming you are using the local web server. Like this:
slippy Makefile target this is just a convenience for a bunch of typing you can and may want to do by hand.
There's actually a bunch of things going on so it's worth describing them. The first thing the
proxy target does is invoke the
slippy target passing along a
PROXY argument the Make program continues along ensuring that there are both a folder to cache proxied tiles in and a config file for how to manage tile proxying:
if test ! -d tiles/cache; then mkdir -p tiles/cache; fi if test ! -e tiles/config.json; then cp tiles/config.json.example tiles/config.json; fi
As of this writing the functionality and documentation around the tile proxying is still a work in progress so the easiest thing is to not try changing any of the details in the config file.
Finally we start the web server with flags to enable tile proxing that you can visit in your web browser by going to
if test -z "$$TLS"; then utils/$(UNAME)/www-server -path www -proxy -proxy-config tiles/config.json; else utils/$(UNAME)/www-server -path www -tls -proxy -proxy-config tiles/config.json; fi start and listen for requests at http://localhost:8080
As of this writing there are no controls for refreshing tile or invoking any kind of cache invalidation outside of deleting the local
By default the local web server listens for requests on port
80 which is unencrypted. If you want to use an encrypted connection you can pass a
TLS=1 to any of the relevant Makefile targets. This will prompt the server to pre-generate a self-signed TLS key and certificate pair, like this:
make proxy TLS=1 start and listen for requests at https://localhost:8080
If you are starting the server manually simply include a
-tls argument, like this:
utils/darwin/www-server -path www -tls -proxy -proxy-config tiles/config.json
Please remember that these are self-signed credentials which means your web browser won't know who signed them and complain accordingly. This is the correct behaviour so remember to approach things with patience and diligence.
slippy-map supports the WASD key configuration for panning the map.
W will move the map upwards,
A will move the map to the left and
D to the right.
The standard keyboard arrow keys are also supported and pan the map in a direction corresponding the key being pressed.
Toggles between labeled and unlabeled versions of the current style. This is still a bit clunky and does not apply to the
bubble-wrap or the
outdoor style which is now called
walkabout. This keyboard control is preserved for backwards compatibility.
This will create a screenshot of the current map view and open it up in another browser tab.
This will create a screenshot of the current map view and try to save it to the place your browser saves downloads. Filenames are generated as follows:
MAP STYLE + "-" +
YEARMONTHDAY + "-"
GEOHASH(SW lat,lon) + "-" +
GEOHASH(NE lat,lon) + ".png"
Updating the map styles
Run the handy
make mapzen target in the included Makefile to update all map styles (and their assets) from source.
mapzen-slippy-map still needs to learn how to do
- Maybe GetLatLon style coordinate display?
- Screenshot controls for touch devices