I ran into a problem that I can not correctly connect to the Mapbox. At the front, he gives this error.image of frontend Mapbox error. in the logs on the server, I get this: image of GeoServer logs
I connect to the geoserver like this:
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Mapbox GL</title>
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.52.0/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.52.0/mapbox-gl.css' rel='stylesheet' />
<style>
html, body, #map {
height: 100%;
width: 100%;
padding: 0;
margin: 0;
}
</style>
</head>
<body>
<div id="map" class="map"></div>
</body>
<script>
mapboxgl.accessToken = '<redacted>';
var map = new mapboxgl.Map({
container: 'map',
style: 'mapbox://styles/mapbox/streets-v11',
center: [37.61, 55.7],
zoom: 2
});
map.on('load', function() {
map.addLayer({
"id": "water_name_id",
"type": "fill",
"source": {
"type": "vector",
"scheme": "tms",
"tiles": ['http://130.193.43.240:8084/geoserver/gwc/service/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&LAYER=cite:water_name&STYLE=&TILEMATRIX=EPSG:3857:{z}&TILEMATRIXSET=EPSG:3857&FORMAT=application/vnd.mapbox-vector-tile&TILECOL={x}&TILEROW={y}'],
"minzoom": 0,
"maxzoom": 14,
'tileSize': 512
},
"source-layer": "water_name",
"paint": {
"fill-opacity": 0.6,
"fill-color": "rgb(53, 175, 109)",
'fill-outline-color': 'white'
}
});
});
</script>
</html>
And this link to the source code where executed logs:
03 Dec 11:17:12 DEBUG [geoserver.ows] - Could not lookup context {0] as a workspace, trying as group
I would be glad to read any tips or answers:)