Closed uladDvi closed 5 years ago
Hi @uladDvi,
I don't understand very well your question. Now the library is ready to load multiple mbtiles in the same style.json. In the code that you write us, in point 2 you are calling both sources with the same name, and maybe this is the problem.
In a correctly way you should write your style.json like this:
{
"sources": {
"openmaptiles": {
"type": "mbtiles",
"path": "assets/mapStyles/2017-07-03_iceland_reykjavik.mbtiles",
"attribution": "<a href=\"http://www.openmaptiles.org/\" target=\"_blank\">© OpenMapTiles</a> <a href=\"http://www.openstreetmap.org/about/\" target=\"_blank\">© OpenStreetMap contributors</a>"
},
"another_source_id": {
"type": "mbtiles",
"path": "Another_greate_tile.mbtiles ",
"attribution": " < a href = \"http://www.openmaptiles.org/\" target=\"_blank\">© OpenMapTiles</a> <a href=\"http://www.openstreetmap.org/about/\" target=\"_blank\">© OpenStreetMap contributors</a>"
}
}
}
Cheers!!.
Hello! First of all thanks for your great work.
Problem: As i understood, now it's possible to load only one mbtile at a time on style.json sources property :
"sources": { "openmaptiles": { "type": "mbtiles", "path": "assets/mapStyles/2017-07-03_iceland_reykjavik.mbtiles", "attribution": "<a href=\"http://www.openmaptiles.org/\" target=\"_blank\">© OpenMapTiles</a> <a href=\"http://www.openstreetmap.org/about/\" target=\"_blank\">© OpenStreetMap contributors</a>" } },
Property path takes only String value.
Expected result : 1)
"sources": { "openmaptiles": { "type": "mbtiles", "path": ["assets/mapStyles/2017-07-03_iceland_reykjavik.mbtiles", "Another_greate_tile.mbtiles"], "attribution": "<a href=\"http://www.openmaptiles.org/\" target=\"_blank\">© OpenMapTiles</a> <a href=\"http://www.openstreetmap.org/about/\" target=\"_blank\">© OpenStreetMap contributors</a>" } },
2) OR"sources": { "openmaptiles": { "type": "mbtiles", "path": "assets/mapStyles/2017-07-03_iceland_reykjavik.mbtiles", "attribution": "<a href=\"http://www.openmaptiles.org/\" target=\"_blank\">© OpenMapTiles</a> <a href=\"http://www.openstreetmap.org/about/\" target=\"_blank\">© OpenStreetMap contributors</a>" }, openmaptiles": { "type": "mbtiles", "path": "Another_greate_tile.mbtiles", "attribution": "<a href=\"http://www.openmaptiles.org/\" target=\"_blank\">© OpenMapTiles</a> <a href=\"http://www.openstreetmap.org/about/\" target=\"_blank\">© OpenStreetMap contributors</a>" } },
It would be really convenient to use this plugin , if multiple sources paths will be available. If i just did not catch how to make it , please tell me. And if there is much work to do, could you just give a brief comment Where to start looking to create such a feature in your code.