Simple way to have an offline web based map?

I would recommend looking into TileMill which is made by the same people that were workign on Maps On A Stick. TileMill was either part of Maps On A Stick, or is what Maps On A Stick became - something like that. I forget the connection. Anyway...

TileMill will let you load geographic data, style it how you like and then create a set of PNG map tiles for a variety for zoom levels.

The output of TileMill is a .mbtiles file. This is just a sqlite database which holds the PNGs. If you're working offline it's probably easier to extract the pngs to a folder (using mbutil)rather than using sqlite to access them.

If your map is fairly simple (i.e. minimal interaction), I'd recommend using Leaflet for your mapping library.

In leaflet you then need to add a tile layer (hint: use tms rather than xyz).

Hope that helps.

Edit: Couple of things to note.

1) You should be aware of the licensing restrictions with any map data you use (see my comment on the question above).

2) If you get close in enough to see roads etc then expect to have several GBs of tiles.


Another option would be something like mapwingis. No need for tiles, it'll read shapefiles.


I've found a new project called OpenMapTiles, which makes it a lot easier to have offline maps.

Setting up a tile server on your machine is very easy. Install Node.js (with npm) and follow the two steps in their docs: https://openmaptiles.org/docs/

You can download the maps from their website (including a map of the entire planet, which is now ~44 GB): https://openmaptiles.org/downloads/