Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are mbtiles broken? #1671

Closed
TunifyBasic opened this issue Jan 28, 2025 · 2 comments
Closed

Are mbtiles broken? #1671

TunifyBasic opened this issue Jan 28, 2025 · 2 comments

Comments

@TunifyBasic
Copy link

hello, i tried to serve some mbtiles with martin (aarch64 @
0.14.2) but they don't seem to work or i misused the tool.
i tried world_cities.mbtiles and when using leaflet with it doesn't seem to show something.
also i generated another mbtile as a testing/2nd try using Planetiler and it doesn't seem to work.

./mbtiles meta-all world_cities.mbtiles
id: world_cities
tile_info:
  format: mvt
  encoding: gzip
layer_type: overlay
tilejson:
  tilejson: 3.0.0
  tiles: []

the Planetiler mbtile one always run endup running with warnings.

./mbtiles meta-all output.mbtiles
[INFO ] output has an unrecognized metadata value compression=gzip
[INFO ] output has an unrecognized metadata value planetiler:buildtime=2025-01-25T11:40:57.127Z
[INFO ] output has an unrecognized metadata value planetiler:githash=a5cc28470de1723217c5152dc66366a965e467c3
[INFO ] output has an unrecognized metadata value planetiler:osm:osmosisreplicationseq=4311
[INFO ] output has an unrecognized metadata value planetiler:osm:osmosisreplicationtime=2025-01-25T21:21:00Z
[INFO ] output has an unrecognized metadata value planetiler:osm:osmosisreplicationurl=https://download.geofabrik.de/europe/monaco-updates
[INFO ] output has an unrecognized metadata value planetiler:version=0.8.4
id: output
tile_info:
  format: mvt
  encoding: gzip
layer_type: baselayer
tilejson:
  tilejson: 3.0.0
  tiles: []

tried to curl a center position and it showed:

$ curl http://localhost:3000/points/0/0/0
Source points does not exist 
$ curl http://localhost:3000/points/7.50213/43.61837/6
can not parse "7.50213" to a u8
$ curl http://localhost:3000/points/6/7.50213/43.61837
can not parse "7.50213" to a u32

the version 0.15.0 Changelog doesn't seem to get in touch with mbtiles but i also tried it and it didn't also work

@CommanderStorm
Copy link
Collaborator

CommanderStorm commented Jan 28, 2025

using leaflet with it doesn't seem to show something

Leaflet does not allow rendering vector tiles natively.
Leaflet only allows rendering raster tiles, which we currently don't provide..
See the following issue for further context what would be needed to support this:

What you can do with leaflet is to shuehorn a plugin in there, but the results are.. imo not a great experience..
https://docs.maptiler.com/leaflet/examples/vector-tiles-in-leaflet-js/

If you want vector tiles (you want them), please consider switching to maplibre-gl-js or other alternatives ^^

the Planetiler mbtile one always run endup running with warnings.

Those info logs are expected and nothing to be worried about.

tried to curl a center position and it showed

Lets explain what you are seeing when you curl.

  • curl http://localhost:3000/points/0/0/0

    please make sure that the source points does actially exist.
    If you run martin via

    martin world_cities.mbtiles

    you can check the existing sources via curl http://localhost:3000/catalog

    Image

    => you want to request

    Image

  • curl http://localhost:3000/points/7.50213/43.61837/6

    Please see this resource what xyz refers to. It is not lat-lon as you expect.
    Please see this graphic explaining how many tiles there are on each level, x/y is then on said level the index.

Think this resolves your troubles. If it does not, feel free to reopen or just ask them ^^

@TunifyBasic
Copy link
Author

alhamdou li Allah, got it clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants