Add .mbtiles support (#549)
Adds a new [.mbtiles](https://github.com/mapbox/mbtiles-spec/blob/master/1.3/spec.md)
backend, without the grid support. Uses extensive tile content
detection, i.e. if the content is gzipped, png, jpeg, gif, webp.
From CLI, can be as easy as adding a path to a directory that contains a
.mbtiles file (works just like pmtiles support)
```bash
# All *.mbtiles files in this dir will be published.
# The filename will be used as the source ID
martin ./tests/fixtures
```
From configuration file, the path can be specified in a number of ways
(same as pmtiles)
```yaml
mbtiles:
paths:
# scan this whole dir, matching all *.mbtiles files
- /dir-path
# specific mbtiles file will be published as mbtiles2 source
- /path/to/mbtiles2.mbtiles
sources:
# named source matching source name to a single file
pm-src1: /tmp/mbtiles.mbtiles
# named source, where the filename is explicitly set. This way we will be able to add more options later
pm-src2:
path: /tmp/mbtiles.mbtiles
```
Fixes #494
2023-01-09 08:10:23 +03:00
{
2023-02-22 19:25:48 +03:00
"tilejson" : "3.0.0" ,
"tiles" : [
"http://localhost:3111/geography-class-jpg/{z}/{x}/{y}"
] ,
Add .mbtiles support (#549)
Adds a new [.mbtiles](https://github.com/mapbox/mbtiles-spec/blob/master/1.3/spec.md)
backend, without the grid support. Uses extensive tile content
detection, i.e. if the content is gzipped, png, jpeg, gif, webp.
From CLI, can be as easy as adding a path to a directory that contains a
.mbtiles file (works just like pmtiles support)
```bash
# All *.mbtiles files in this dir will be published.
# The filename will be used as the source ID
martin ./tests/fixtures
```
From configuration file, the path can be specified in a number of ways
(same as pmtiles)
```yaml
mbtiles:
paths:
# scan this whole dir, matching all *.mbtiles files
- /dir-path
# specific mbtiles file will be published as mbtiles2 source
- /path/to/mbtiles2.mbtiles
sources:
# named source matching source name to a single file
pm-src1: /tmp/mbtiles.mbtiles
# named source, where the filename is explicitly set. This way we will be able to add more options later
pm-src2:
path: /tmp/mbtiles.mbtiles
```
Fixes #494
2023-01-09 08:10:23 +03:00
"bounds" : [
-180 ,
-85.0511 ,
180 ,
85.0511
] ,
"description" : "One of the example maps that comes with TileMill - a bright & colorful world map that blends retro and high-tech with its folded paper texture and interactive flag tooltips. " ,
"legend" : "<div style=\"text-align:center;\">\n\n<div style=\"font:12pt/16pt Georgia,serif;\">Geography Class</div>\n<div style=\"font:italic 10pt/16pt Georgia,serif;\">by MapBox</div>\n\n<img src=\" d a t a : i m a g e / p n g ; b a s e 64 , i V B O R w 0 K G g o A A A A N S U h E U g A A A J Y A A A C W C A Y A A A A 8 A X H i A A A A B H N C S V Q I C A g I f A h k i A A A A A l w S F l z A A A E U w A A B F M B A q / u p Q A A A B l 0 R V h 0 U 29 m d H d h c m U A d 3 d 3 L m l u a 3 N j Y X B l L m 9 y Z 5 v u P B o A A C I s S U R B V H j a 7 Z 0 J v I 1 V 98 d l S l H S I C W S B p k v S m m S E E o y h 9 J A M k e 9 i k b 0 N s 80 D x r 16 m 2 e V D I k l S h R q S g J l f I m U W m S 7 P / 6 P p 19 / v v u u 5 / n P G f A d e 9 e n 8 / 6 u P c 49 w x 7 / 5611 / q t 4 S m h l C r h 1 W u u 1 S + C V w 8 s r x 5 Y X j 2 w / C L k W 5 A S J S q I 9 h V d 2 D g v T 7 V t 3 Z o H h 1 j P 2 U P 0 f N F 19 e r U 4 Y F P R X v 69 f P A i g O w A 8 q X L 79 g 1 t S p a t j g w Z v k 926 O 55 w o u k q 0 p F 8 z D 6 x 0 w H V C l c q V n 144 b 566 d N S o j f L 7 c d b / l x S 9 x 6 + V B 1 a 6 w G o r W r b m f v v N W r 54 s R r c v //v8nsjG3x+rTyw0gaW9rsa1K+/cNXy5aprp05r5fea9nO8emClDSztsB91xBErVn/9tTq+VauV8ntlDywPrKyBlfi9Rvt27X4AXEc2a7ZIft/JA8sDK2tgJR6r37tXr1+/W7ZM1ahefZb8fpJfKw+sdEC1o2jvkP87aviQIRsenTCBX4b79fLASgdYbUTvj/j/Dj27d//bA8sDKy6g9hG9WHT17rvtxgN3iXZ2kaAifUSH+XXzwNocQNzBr4MHllcPLK8eWMXjyCMvWM6vhQdWroHVUHSiXwsPrFwDq6PoR34tPLByDazLRL/3a+GBlWtgPe6B5YG1OYD1juh3onv69fDAyiWwFor+LHq4Xw8PrFwC60tRfjjdr4cHVq5AVVH0mwSwbvJr4oEVV3cRPUqUTpyholeJThCdLDp/3rx5q3fffXdApdq0afOXPLZYdKboJNFbREeKniF6vOhBfj2LN7AOFh2RAAhgCZVnn31W7bzzzgGwDj30UBVDloneJtpGdHsPrKKtZURbJizMEpWGXHHFFapGjRoBsOrUqaPSlPWiz4meLbqXB1bR0WNFnxT9KR00/PXXX2rFihVq4cKF6tRTT1UNGzYMgMWRuGrVquRz0pRNovNELxQt74G1bWoT0Slxd/zqq69WrVu3Vo8++mjw+5NPPqnKlCmjmjVrpk466SSVl5cXAKts2bJq6tSpwXOGDRumdthhBzV06NDg9x9//FHdcsstasmSWAZxVcKfK+uBtW1oLdEnEtbBKRs3blS33XYbjrj64osvgsdefPFF9eCDD6pFixYln7Np0z8v0a1btySwdtppJzV79uzg8d9++y0A0dKlS4PfP//8c9W2bVu15557Jq2ZOP6pLBv+GBRGSQ+swqnVRKlR3+javTlz5qhrr702+TvH26233qp++OGHlKbl9NNPTwILBYCpjlHkjz/+UNWqVVMVK1ZUn376aaq3+Vi0owdW4dHdRW9mH8N2DEuCb3TWWWcFm52OrFu3LjjqTGANHz48vlMlVu/9999Pgq1Lly4BoP/888+wP5kj2sIDa+tq64SvUkCwEOeee25wpGnrkUq+/vpr9cYbb6j//ve/aty4cWrUqFGqQ4cO6oILLsgHrL322it4bfwyrNcrr7yiPvjgg1jO/KuvvqoOOeQQ9e6776Z66p2i5TywtqyWFr0mzI/ieOP4wblev3595JEFkC688EJVt25dVaVKFXXUUUep7t27B1bp+uuvD16DI9QE1gEHHKBuv/12dckllwRWEL+qXr16atdddw38sYceekj973//i2XNeK+nn3467CkfJvg2D6wtoNVFZxcIsVatCiwLDjXy009udmH16tXqkUceUaecckoABAjPsWPHBseVS8aMGaMmTJiQD1hhXBaA5rUBS6VKlVTTpk0DDozX1oGAKX///be6//77A44sIpJc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gzZo1+cL2zSFwWCSUXcBCyfPlWuzvQpQLmWqmeXAPXOQqDIloJQ+s/9cDlNEpQ2qD+ildJqyF0hQc2Y8//rhAWP7666/nOy5zwWHtvffe6uWXXw4FVi64LFNIVtvWmWP/5JNPVv/617+cOUabdklUfXhgJfQxc2UoDzarPXVVAhbk+eefD03h3HzzzWnn8KI4LIhJSovDgIUlyYVggSZNmhSaQ/z555+DY5nKCVM++uijgDC20lVwFVU8sJSqr1M2UQvfvHlzddVVV0Vu0OLFi4O8oOMqLgBS6qxISocJNVKlSpVKJrddwIriskhcE1yEVTSYn+W6665LmSIik4AFtQsEe/bs6brYbvPAUup526ewjzq4qq5du8a6+jm6OKK4usPKf3v06BFEVUScNv9FKQ1W6pxzzgnA8/vvv4cCCwuKZcPfAfymUADI3w4aNCi08oK/pciQmi39PlHy2muvBZxdRFlzkhITrVGcgXW4uRrz588P8oGw0Gb+D1Y97hGHTwIPBLiwcOZraeEKv+uuu4LkMgDib9hkrAycEQKQ+SxaXMCCy9LdPPh/AIz3A6wc5fhpUAN2iom/wSLyGfGd0jm++Vx0GNlHpcMyPlScgTXDXAmy/I899lj+fIUcbS7HNUoADJaPjePvXREUNVo8Pnjw4CBIsKMxOCysQxSw4Jk0EM3Ag4oF/B+OW7syFOrgpptuCj4bqqs14gr+J0eiWXJNswgZCeu9CCNrF0dgtUq1iGwSBXqZ1FJRagJ49AbiHJvHFVRG+/btgw3CatlC+fHhhx8eCSy4LNvhprHivvvuC/KX5513Xr7/4z1p0NCfyY5640qfPn0K+JtcQC+9
"maxzoom" : 1 ,
"minzoom" : 0 ,
"name" : "Geography Class" ,
"template" : "{{#__location__}}{{/__location__}}{{#__teaser__}}<div style=\"text-align:center;\">\n\n<img src=\"data:image/png;base64,{{flag_png}}\" style=\"-moz-box-shadow:0px 1px 3px #222;-webkit-box-shadow:0px 1px 5px #222;box-shadow:0px 1px 3px #222;\"><br>\n<strong>{{admin}}</strong>\n\n</div>{{/__teaser__}}{{#__full__}}{{/__full__}}" ,
"version" : "1.0.0"
}