Comments (9)
Whatever the Apache config file is for the virtual host (site) you're deploying. For example, /etc/apache2/sites-available/my.tile.server.com.conf
.
You would typically put the directives within the <Directory>
unit of that file.
from mod_mbtiles.
Thank you for getting back to me. I am not getting any data to come through nor am I getting any errors. Would it be possible to get am example .conf to make sure I am doing this correctly?
from mod_mbtiles.
Mine looks like this (with paths/domains obfuscated):
<VirtualHost *:80>
DocumentRoot "/srv/tile.my.server"
ServerName tile.my.server
<Directory "/srv/tile.my.server">
allow from all
Options None
Require all granted
Header set Access-Control-Allow-Origin "*"
MbtilesEnabled true
MbtilesAdd dem /data/relief/dem.mbtiles
MbtilesAdd contours /data/relief/contours.mbtiles
MbtilesAdd vt /data/vector_tiles/vt.mbtiles
</Directory>
</VirtualHost>
Most of this is just standard Apache. Only the four Mbtiles
lines are new.
Don't forget you need to restart Apache once you've changed a config file.
from mod_mbtiles.
Can you provide reference how you use vt/ in your web page to display map?
from mod_mbtiles.
Using the Maplibre GL JS library.
from mod_mbtiles.
Yes, I use same - but have hard time understanding how you define layers from mod_mbtiles ? Example would be great!
from mod_mbtiles.
Not quite sure what you mean? You don't define any layers in mod_mbtiles - it simply serves out the .mbtiles file (containing vector tiles) that you point it at. Layers are defined when you create the vector tiles with other software, such as tilemaker.
from mod_mbtiles.
This is how I've defined my tileserver-gl provided mbtiles for my style.json:
"sources": {
"openmaptiles": {
"type": "vector",
"url": "http://localhost:8080/data/v3.json"
}
},
But somehow I am not able to get mod_mbtiles URL here to provide anything useful?
from mod_mbtiles.
mod_mbtiles just serves vector tiles from an mbtiles. Nothing else. It doesn't generate or serve tilejson documents or anything like that.
You either need to specify the location of your Apache virtual server (running mod_mbtiles) in the .json file you're pointing to above, or just put it in directly:
"sources":{
"openmaptiles":{
"type":"vector",
"tiles":["https://my.tile.server/directory/{z}/{x}/{y}.pbf"],
"minzoom":0,
"maxzoom":14,
"attribution":"Base map © OpenStreetMap"
}
}
from mod_mbtiles.
Related Issues (3)
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 mod_mbtiles.