A simple template to render a xyz tilemap using only local html, css and javascript. An example of this running can be found at: https://fmg-view.azurewebsites.net/
Using @Azgaar's Fantasy Map Generator you can export a .osm file which can be used to render a tileset.
- Fantasy Map Generator osm branch
- Maperitive
- Downloaded copy of this template, excluding the example 'tiles' folder
- Download a .osm file from the Fantasy Map Generator
- Open Maperitive
- (Optional) Delete the current layer which shows the world
- Load your .osm file previously you downloaded
- Run the command
generate-tiles minzoom [min_value] maxzoom [max_value]
where min_value and max_value are the minumum and maximum zoom levels to render respectively. Keep in mind Performance And Storage Considerations, the example uses maxzoom 17. - copy the folder generated to the location of the index.html and rename it tiles.
- Open up tiles and it should show your map.
- If your page is completely blank when opened or there is no grid, you probibily have a script problem, open your browsers command line and see what the error is.
- If you see the interface, grid but not your map, try zooming out or looking around, your map maybe elsewhere you cant see