Mbtiles is a map tile storage data specification, it uses SQLite database, can greatly improve the reading speed of massive map tiles, than through the tile file way of reading much faster, suitable for Android, iphone and other smart phone offline map storage. For more information, please refer to: Mbtiles Mobile Storage Introduction.
In the Web map introduction We see that tiles refer to their z/x/y form coordinates, on disk storage, they are usually stored in a directory with Z, x as the name, so that a tile file path is 0/0/0.png.
Also with Google or Baidu map JS API is very convenient to call. But there is a drawback is that more files, take up disk space is much larger than the actual file, resulting in a lot of file fragments, moving very cumbersome, slow. Mbtiles provides such a feature: Tile table, Tiles:
sqlite> SELECT * FROM tiles;
zoom_level | tile_column | tile_row | tile_data
5 | 13 | 23 | [PNG data]
5 | 13 | 24 | [PNG data]
5 | 14 | 23 | [PNG data]
5 | 14 | 24 | [PNG data]
5 | 15 | 25 | [PNG data]
This table is easy to query for a particular tile: for example, the query level is 8, the column number is 116, the row number is 192 of the tile data:
SQLite>SELECTfromWHERE=8and=116 and=192; [PNG data]
Tile_data is a binary stream file that can be easily read from the Mbtiles database, whether it's a desktop app or Android or iOS app.
Here is a demo program I made with Delphi:
Citation connections:
I-gps
Source: Mbtiles Offline Map Demo-based on Google Maps JavaScript API v3 + SQLite
Welcome to explore the exchange of Google Maps related technologies, qq:64445322 QQ Group: 242284018
Go Mbtiles Offline Map Demo-based on Google Maps JavaScript API v3 + SQLite