OSM OpenCPN MBTiles are not rendered in Freeboard-SK

The MBTiles listed at https://wiki.openstreetmap.org/wiki/MBTiles are showing up on OpenCPN, but not in Freeboard. Maybe due to different schema compared to signalk-world-coastline-map? signalk-world-coastline-map is showing and has the following schema:
CREATE TABLE tiles (
zoom_level integer,
tile_column integer,
tile_row integer,
tile_data blob);
CREATE TABLE metadata
(name text, value text);
CREATE TABLE grids (zoom_level integer, tile_column integer,
tile_row integer, grid blob);
CREATE TABLE grid_data (zoom_level integer, tile_column
integer, tile_row integer, key_name text, key_json text);
CREATE TABLE sqlite_stat1(tbl,idx,stat);
CREATE UNIQUE INDEX name on metadata (name);
CREATE UNIQUE INDEX tile_index on tiles
(zoom_level, tile_column, tile_row);
CREATE TABLE tiles (
zoom_level integer,
tile_column integer,
tile_row integer,
tile_data blob);
CREATE TABLE metadata
(name text, value text);
CREATE TABLE grids (zoom_level integer, tile_column integer,
tile_row integer, grid blob);
CREATE TABLE grid_data (zoom_level integer, tile_column
integer, tile_row integer, key_name text, key_json text);
CREATE TABLE sqlite_stat1(tbl,idx,stat);
CREATE UNIQUE INDEX name on metadata (name);
CREATE UNIQUE INDEX tile_index on tiles
(zoom_level, tile_column, tile_row);
https://ftp.gwdg.de/pub/misc/openstreetmap/openseamap/charts/mbtiles/OSM-OpenCPN2-Adria.mbtiles is not showing and has a different schema:
CREATE TABLE metadata (name text, value text);
CREATE TABLE tiles (zoom_level integer, tile_column integer, tile_row integer, tile_data blob);
CREATE UNIQUE INDEX tile_index on tiles (zoom_level, tile_column, tile_row);
CREATE TABLE metadata (name text, value text);
CREATE TABLE tiles (zoom_level integer, tile_column integer, tile_row integer, tile_data blob);
CREATE UNIQUE INDEX tile_index on tiles (zoom_level, tile_column, tile_row);
5 Replies
AdrianP
AdrianP3w ago
So Freeboard-SK uses the type and format attributes in the meta data at /signalk/v2/api/resources/chart/{chart-id} to determine the type of chart source. For a raster MBTiles chart source it should look something like this....
"mbtiles_01": {
"identifier": "mbtiles_01",
"name": "MBTILES_01",
"description": "my mbtiles chart",
"bounds": [-202.5, 56.1700229829, -112.5, 75.4971573189],
"minzoom": 3,
"maxzoom": 19,
"format": "png",
"type": "tilelayer",
"scale": 250000,
"url": "/signalk/chart-tiles/mbtiles_01/{z}/{x}/{y}",
"layers": []
}
"mbtiles_01": {
"identifier": "mbtiles_01",
"name": "MBTILES_01",
"description": "my mbtiles chart",
"bounds": [-202.5, 56.1700229829, -112.5, 75.4971573189],
"minzoom": 3,
"maxzoom": 19,
"format": "png",
"type": "tilelayer",
"scale": 250000,
"url": "/signalk/chart-tiles/mbtiles_01/{z}/{x}/{y}",
"layers": []
}
What does the meta data for the chart that doesn't work look like?
Tika
TikaOP3w ago
It's
"OSM-OpenCPN2-Adria": {
"identifier": "OSM-OpenCPN2-Adria",
"name": "Adria",
"bounds": [
11.25,
36.59788913307021,
22.5,
47.04018214480666
],
"minzoom": 10,
"maxzoom": 18,
"format": "png",
"type": "tilelayer",
"scale": 250000,
"url": "/signalk/chart-tiles/OSM-OpenCPN2-Adria/{z}/{x}/{y}",
"layers": []
},
"OSM-OpenCPN2-Adria": {
"identifier": "OSM-OpenCPN2-Adria",
"name": "Adria",
"bounds": [
11.25,
36.59788913307021,
22.5,
47.04018214480666
],
"minzoom": 10,
"maxzoom": 18,
"format": "png",
"type": "tilelayer",
"scale": 250000,
"url": "/signalk/chart-tiles/OSM-OpenCPN2-Adria/{z}/{x}/{y}",
"layers": []
},
AdrianP
AdrianP3w ago
OK so it appears that Openlayers has issues with the response to tile requests. Out of curiosity if you enter the path to a tile in the browser (e.g. /signalk/chart-tiles/OSM-OpenCPN2-Adria/5/2/8) is the tile image displayed?
Tika
TikaOP3w ago
/signalk/chart-tiles/OSM-OpenCPN2-Adria/11/12/40 yields "Not Found" /signalk/chart-tiles/world-coastline/7/30/30 shows an image
AdrianP
AdrianP3w ago
So the chart plugin is not returning an image for the request..... the charts-plugin uses the @mapbox/mbtiles library to process MBTiles so it looks like the difference in schema may not be supported by the library.

Did you find this page helpful?