Questions tagged [mbtiles]

MBTiles is a file format for storing map tiles in a single file. It is, technically, a SQLite database. Latest format version as of February 2018 is 1.3.

Tile based web maps are made up of millions of tiles. Imagine loading all of those tiles; it would be inefficient and slow. That’s where MBTiles comes in. The MBTiles specification is an efficient format for storing millions of tiles in a single SQLite database.

SQLite is ideal for serving tiles on the web or displaying directly on mobile devices because it’s used on so many platforms. If you’ve worked with SQL databases before, SQLite should feel very familiar. With SQLite, each database is self-contained and represented as a single .sqlite file. There’s no external setup required. You can copy a .sqlite file from desktop to a mobile device and have all its rows, tables, and indexes ready to be used. It’s a portable, single-file solution for storing and serving web maps.

MBTiles takes advantage of utilities found in SQLite for solving problems like duplicate imagery. Maps that cover large areas of solid color like ocean or empty land can contain thousands of duplicate, redundant tiles.

For more

http://wiki.openstreetmap.org/wiki/MBTiles

https://www.mapbox.com/help/an-open-platform/#mbtiles-in-action

169 questions
0
votes
0 answers

Mbtiles vs storing vector tile data in postgress?

I have a use case of thousands of mbtils, i serve to a client. I had a thought to replace mbtiles with pg db with tables containing a simple schema of one indexed column containing z-x-y and one column containing the compressed vector tile data.…
tomer
  • 19
  • 1
  • 3
0
votes
0 answers

OSM Global Boundary/Places z0-3 US z0-14 combine

I would like to create a mbtiles service that has global boundaries and places from z0-3 combined with US only data from z0-14. wget https://download.geofabrik.de/north-america/us-latest.osm.pbf wget…
schierkolk
  • 29
  • 4
0
votes
0 answers

how to insert data in a spark foreach() function

I want to read png files and insert into a sqlite3 db in a foreach() function. But sqlite does not support multithreaded write operations, what can I do to finish this operation? I tried ReadWriteLock but it did not work.
keweizhou
  • 13
  • 3
0
votes
0 answers

Optimize planet .mbtiles files to smaller size

I have an planet.mbtiles file downloaded from openstreetmap and which is around 90GB in size, when I serve this file through tileserver-gl(consbio/mbtileserver), my average tile size is really large, for levels '0/0/0.pbf' the tile size is in MBs.…
Siddharth
  • 859
  • 8
  • 16
0
votes
1 answer

Android Google Maps Offline - my location is not shown

I am trying to use Google Maps for Android, offline (always and forever). Surprisingly, I can't find any question here that asks or solves this issue specifically. When I use a new offline phone, both my app and Google Maps show a blank map (dah, no…
guy_m
  • 3,110
  • 2
  • 19
  • 33
0
votes
2 answers

How can I merge two Mbtiles?

I have created 2 Mbtiles via QGIS: 1) one Mbtile is from zoom 0 until 10 & is a map of the whole world, 2) and another one from zoom 0 until 17 & is a detailed map of one country. I would like to merge the two Mbtiles, and have the Mbtile of the…
0
votes
1 answer

How can I generate mbtiles with a smaller extent with openmaptiles?

I'm using OpenMapTiles to download OSM data and create a mbtiles with mapbox vector tiles. This all works great, except I'm targeting an embedded platform. At zoom level 14 with the default extent of 4096, a single tile can be over 1MB and cover an…
Pepijn
  • 4,145
  • 5
  • 36
  • 64
0
votes
0 answers

generating mbtiles file in javascript

I need to generate a mbtiles file from tilemap(https://a.tile.opentopomap.org /{z}/{x}/{y}.png) using javascript for my phone app. how to do it? I want to cache this map so that I can use the map offline.
0
votes
0 answers

Offline map with capacitor, mapbox and mbtiles

i am trying to build an app working with offline map using mbtiles from openmaptiles and mapbox. i have followed this link : GitHub - oscarfonts/mapbox-gl-cordova-offline: Offline vector maps in Cordova using Mapbox GL JS and it was working fine…
0
votes
0 answers

Advanced styling of labels on Vector Tiles (OpenLayers)

I managed to use Natural Earth data to generate vector tiles, and serve it to the MapBox. I also use geoJSON data to show labels with country names. Now, as you can see on these 2 animations - when zooming in the OpenLayers, labels have the same…
Bojan Vukasovic
  • 2,054
  • 22
  • 43
0
votes
1 answer

How can I use Leaflet with an mbtiles server specifying bounding boxes instead of zoom level and x, y tile coordinates in the url

Background I am using the following client and server technologies: The map server as a container from https://github.com/consbio/mbtileserver/ The Leaflet's library for Angular 7 As documented here:…
David Sackstein
  • 500
  • 1
  • 5
  • 19
0
votes
0 answers

Display .mbtiles on google map

I have a .mbtiles and I want to display it on google map android sdk. I'm using ExpandedMBTilesTileProvider but the result is a blank page TileProvider tileProvider = new ExpandedMBTilesTileProvider(new File("/sdcard/mydatabase.mbtiles"), 256,…
0
votes
1 answer

Convert mbgl-offline db to mbtiles

I'm trying to implement mapbox offline in my flutter application... until now I'm using the repository https://github.com/mapbox/mapbox-gl-native to get the map but this map comes in format *.db which is a SQLite format. Now if I want to use that…
0
votes
0 answers

Sqlite unable to open .mbtiles file

I am using Ubuntu 18.04 and sqlite version 2.8.17 .When I run: sqlite OSM-OpenCPN2-MediEast-20200115-2320.mbtiles from terminal its give me this: Unable to open database "OSM-OpenCPN2-MediEast-20200115-2320.mbtiles": file is encrypted or is not a…
ozan
  • 3
  • 2
0
votes
0 answers

Openmaptiles cannot open /import/qeofabrik.yaml

I'm struggling with generating my on .mbtiles using openmaptiles. Running the quickstart https://openmaptiles.org/docs/generate/generate-openmaptiles/ fails with: FATAL[0054] can't write file error=open /import/geofabrik.yml: permission denied…
Ludi
  • 433
  • 2
  • 16