- Notifications
You must be signed in to change notification settings - Fork0
Rendering vector tiles generated from OSM data by OpenMapTiles
TomasHubelbauer/osm-vector-map
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
In this repository I prototype a vector map tile rendered. I am using an extractfrom the OSM maps provided by OpenMapTiles. I am using the freely availablesnapshot of Prague from 2017-07-03.
https://openmaptiles.com/downloads/dataset/osm/europe/czech-republic/prague
MBTILES file format is a SQLite database with a specific schema, documented here:
https://github.com/mapbox/mbtiles-spec
I am working on a JavaScript SQLite database library found here:
https://github.com/TomasHubelbauer/sqlite-javascript
Unfortunately it is not possible to use WebSQL to access the database, becauseit is barely supported (works in Chrome and Safari though) and is not able towork off a given file.
The vector tiles are stored in the ProtoBuf format in the database table calledimages
. This is true of the particular database included in this repository,but the MBTILES format also supports raster tiles. To check what sort of tilesyour MBTILES database contains, check themetadata
table, theformat
columnin particular.
The vector tile database file is loaded upon user gesture and with loadingindicator, because it is really big (70 MB).
I am toying around with an idea of using a service worker to cache the file whenthe user clicks the download button and the application determining whether itwas already downloaded or not by inspecting thecaches
object or issuing arequest with some marker (header/fragment/query) which would tell the worker toactually download if present or fail to indicate not having been cached yet ifnot present.
The worker might break the download indication (worried it will split thepipeline into two steps - worker downloads and then the page downloads from thecache) so if that's the case, we can try ranged fetch to preserve the ability todownload with indication as GitHub Pages support ranged requests.
Because the MapBox one sucks and there don't seem to be others not requiring the schema
- https://www.qwant.com/maps/tiles/ozpoi/14/8853/5549.pbf
- Consider merging this with my osm-bitmap-map and allow both bitmap and vector servers!
- https://betterweb.qwant.com/qwant-maps-a-open-and-privacy-focused-map
- https://www.qwant.com/maps
- https://mapserver.mapy.cz/bing/11-1116-708 this is alternative rasters below? This one is used by the app
About
Rendering vector tiles generated from OSM data by OpenMapTiles
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.