GithubHelp home page GithubHelp logo

Comments (6)

RobertSasak avatar RobertSasak commented on September 17, 2024 1

MBtiles is a databases of tiles. In your case it stores tiles in MVT format. Those tiles are served to the browser. However Leafletjs nor browser does not know how to show MVT file.

You have two options:
You can try to add https://github.com/SpatialServer/Leaflet.MapboxVectorTile plugin into leaflet which provides support for MVT. Simply edit assets/index.html
Or you can try another MapboxGL instead of LeafletJS. https://docs.mapbox.com/mapbox-gl-js/example/third-party/

Let me know it you manage to make it work. It would be great to add it to this library.

from mbtiles-serve.

RobertSasak avatar RobertSasak commented on September 17, 2024

This library serves whatever it in the mbtiles. It does not matter whether it is raster or vector tile. Can you please provide some simple test case?

from mbtiles-serve.

anuragvohraec avatar anuragvohraec commented on September 17, 2024

I extracted mbtiles for my city, from : https://extract.bbbike.org/,
And then ran mbtiles-serve ashta.mbtiles, but the map loads as blank:
image

Adding the mbtiles file for your reference:
ashta.mbtiles.zip
I have added just *.zip to upload it here, just rename it by removing .zip from its name.

I have tried it with raster based mbtiles files (created from tilemill) and it works fine.
Do you have a link to vector based tiles, which works with this.

Thank you for your help.

from mbtiles-serve.

anuragvohraec avatar anuragvohraec commented on September 17, 2024

Let me know it you manage to make it work.

I have left for tha day, I will try your suggestions tomorrow and let you know.

from mbtiles-serve.

anuragvohraec avatar anuragvohraec commented on September 17, 2024

Hi Robert,

Your example code uses leaflet >1.0, and hence tried using other solutions, as suggested here without success.
https://leafletjs.com/plugins.html#vector-tiles

from mbtiles-serve.

RobertSasak avatar RobertSasak commented on September 17, 2024

Image tiles are easy to show on map. However Vector tiles requires styles as well which are not part of the mbtiles. This library can still serve vector tiles but you need to create your own html client.

from mbtiles-serve.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.