0
votes

I'm using the docker image klokantech/openmaptiles-server to server map data for an application. There is a requirement to only have certain country data available. Let's say Brazil, France, China and South Africa. I downloaded the mbtiles file for each, but the server can only take one at a time.

I found this question and I tried the solution for when tiles is a view. I changed the metadata for bounds to include the entire world (-177.82410,-49.62546,183.93371,84.98811) and checked that zoomlevels matched. I then run:

ATTACH 'path/to/db2.mbtiles' AS db2;
INSERT OR REPLACE INTO map SELECT * from db2.map;
INSERT OR REPLACE INTO images SELECT * from db2.images;

When I run this new file in the server I can still only see the original region. What else can I do ?

1
If you want to use the tiles with openlayer (xyz), another solution you could use is to generate tiles with mapbox mbutils tool. With that, you could have as many mbtiles files and generate the x y z folder structure from the files and by merging folders you would have a nice mapQuentin Lerebours

1 Answers

0
votes

I had to commit the changes ¯\_(ツ)_/¯

It works now but the performance is noticeably slower than the planet file, even with a much smaller file size.