Geographic Information Systems Asked by mantesat on January 9, 2021
I’m using QGIS to produce a vector tile dataset for use with OpenLayers (as shown here).
However, although the dataset produced can be opened in QGIS and it renders normally, when using it in OpenLayers it does not show at all.
Other vector tile sources seem to work normally on the same Openlayers webpage (eg this ArcGIS vector tiles dataset). I used 3.14 and 3.16 QGIS versions for producing vector tiles. Can someone point to me what I’m doing wrong?
This is my sample webpage. This is the Map definition:
var map = new ol.Map({
layers: [
new ol.layer.VectorTile({
source: new ol.source.VectorTile({
format: new ol.format.MVT(),
maxZoom: 20,
url: 'http://bytemill.duckdns.org:81/VTiles_D/{z}/{x}/{y}.pbf'
//'https://basemaps.arcgis.com/v1/arcgis/rest/services/World_Basemap/VectorTileServer/tile/{z}/{y}/{x}.pbf'
})
}) ],
target: 'map',
view: new ol.View({
center: ol.proj.fromLonLat([23,39]),
maxZoom: 20,
zoom: 10,
}),
});
The commented source url is the one that works.
Tiles used are those produced by QGIS using the ‘Write Vector Tiles (XYZ)’. So, I’m asking if there is something in vector tiles production using QGIS that causes Openlayers not to show any data. Has anyone come across something similar?
(About the two GIS SE accounts issue, I’ve already followed the ‘merge accounts’ procedure, I believe I’m waiting for a review)
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP