Comments (6)
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.
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.
I extracted mbtiles for my city, from : https://extract.bbbike.org/,
And then ran mbtiles-serve ashta.mbtiles
, but the map loads as blank:
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.
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.
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.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mbtiles-serve.