Dear Gurus!
I'm trying to add wmts layer from geoserver 2.18. My code in javascript:
window.mymap.addSource(
"mvt-test-source", {
"type": "vector",
"tiles": [
"http://localhost:8080/geoserver/gwc/service/wmts?SERVICE=WMTS&&VERSION=1.0.0&REQUEST=GetTile&layer=mapbox:roads4326&TILEMATRIX=EPSG:4326:{z}&TILEMATRIXSET=EPSG:4326&FORMAT=application/vnd.mapbox-vector-tile&TILECOL={x}&TILEROW={y}"
],
"minZoom": 0,
"maxZoom": 14
});
window.mymap.addLayer(
{
'id': 'my_mvt_layer',
'type': 'line',
'source': 'mvt-test-source',
'source-layer': 'mapbox:roads4326',
"visibility": "visible",
'paint': {
'line-color': 'Red',
'line-width': 7
}
}
);
There are no errors in browser, but layer don't appear on the map. What
could be the reason? When I try to use wms service - all work fine. Next
code with wms format:
window.mymap.addSource("wms-test-source", {
"type": 'raster',
"tiles": [
"http://localhost:8080/geoserver/wms?bbox={bbox-epsg-3857}&format=image/png&service=WMS&&version=1.1.1&request=GetMap&srs=EPSG:900913&transparent=true&width=256&height=256&layers=mapbox:roads4326"
],
'tileSize': 256
});
window.mymap.addLayer(
{
"id": 'wms-test-layer',
"type": 'raster',
"source": 'wms-test-source',
"paint": {
}
}
);
--
Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users