diff --git a/public/static/libs/mapbox/style/floodOneMap.json b/public/static/libs/mapbox/style/floodOneMap.json index e2f6002..451ffe1 100644 --- a/public/static/libs/mapbox/style/floodOneMap.json +++ b/public/static/libs/mapbox/style/floodOneMap.json @@ -256,7 +256,7 @@ "params": [ { "interval": 0.5, - "duration": 0.7, + "duration": 2, "trailLength": 0.6 } ] @@ -298,7 +298,7 @@ "params": [ { "interval": 0.3, - "duration": 1, + "duration": 2.2, "trailLength": 0.4 } ] diff --git a/public/static/libs/mapbox/style/floodOneMap.json b/public/static/libs/mapbox/style/floodOneMap.json index e2f6002..451ffe1 100644 --- a/public/static/libs/mapbox/style/floodOneMap.json +++ b/public/static/libs/mapbox/style/floodOneMap.json @@ -256,7 +256,7 @@ "params": [ { "interval": 0.5, - "duration": 0.7, + "duration": 2, "trailLength": 0.6 } ] @@ -298,7 +298,7 @@ "params": [ { "interval": 0.3, - "duration": 1, + "duration": 2.2, "trailLength": 0.4 } ] diff --git a/src/utils/GISdocument/mapboxVectorLayer.js b/src/utils/GISdocument/mapboxVectorLayer.js index 90c59f0..6aca56f 100644 --- a/src/utils/GISdocument/mapboxVectorLayer.js +++ b/src/utils/GISdocument/mapboxVectorLayer.js @@ -287,7 +287,7 @@ // https://docs.mapbox.comhttps://docs.mapbox.com/style-spec/reference/sources/ tiles: [ '/geoserver/demo/wms?bbox={bbox-epsg-3857}&format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&transparent=true&width=256&height=256&' + - `layers=${layerName}`, + `layers=${layerName}`, ], tileSize: 256, }); @@ -356,6 +356,7 @@ let counter = 0; setTimeout(() => { + // map.setBearing(90); window.routeTimer = setInterval(() => { const start = geojson.features[0].geometry.coordinates[counter >= steps ? counter - 1 : counter]; const end = geojson.features[0].geometry.coordinates[counter >= steps ? counter : counter + 1]; @@ -364,6 +365,7 @@ } symbolGeojson.features[0].geometry.coordinates = geojson.features[0].geometry.coordinates[counter]; symbolGeojson.features[0].properties.bearing = turf.bearing(turf.point(start), turf.point(end)); + newfiberMapbox.map.setBearing(symbolGeojson.features[0].properties.bearing); newfiberMapbox.map.setLayoutProperty(layerId + '_Symbol', 'icon-rotation-alignment', 'map'); newfiberMapbox.map.getSource(layerId + '_Symbol').setData(symbolGeojson); counter = counter + 1;