From fd719d0ad613e16cb690cf45dd617eeaa6eff962 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juho=20H=C3=A4nninen?= Date: Tue, 29 Oct 2024 11:01:40 +0200 Subject: [PATCH] Fix vectortiles layers --- src/components/map/layers/NetworkLayers.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/map/layers/NetworkLayers.tsx b/src/components/map/layers/NetworkLayers.tsx index d8a191995..a2352dcc2 100644 --- a/src/components/map/layers/NetworkLayers.tsx +++ b/src/components/map/layers/NetworkLayers.tsx @@ -23,6 +23,8 @@ enum TileserverLayer { Point = 'piste_view', } +const SCHEMA = 'jore'; + interface INetworkLayersProps { map: any; mapStore?: MapStore; @@ -41,7 +43,7 @@ interface ILinkProperties { function getTileserverUrl(layerName: string) { const TILESERVER_URL = constants.TILESERVER_URL; - return `${TILESERVER_URL}/jore.${layerName}/{z}/{x}/{y}.pbf`; + return `${TILESERVER_URL}/${SCHEMA}.${layerName}/{z}/{x}/{y}.pbf`; } @inject('mapStore', 'networkStore', 'nodeStore', 'linkStore', 'popupStore') @@ -52,7 +54,7 @@ class NetworkLayers extends Component { private getLinkStyle = () => { return { // Layer name 'linkki' is directly mirrored from Jore through tileserver - linkki: (properties: ILinkProperties) => { + [`${SCHEMA}.${TileserverLayer.Link}`]: (properties: ILinkProperties) => { const { lnkalkusolmu: startNodeId, lnkloppusolmu: endNodeId, @@ -84,7 +86,7 @@ class NetworkLayers extends Component { private getLinkPointStyle = () => { return { // Layer name 'piste' is directly mirrored from Jore through tileserver - piste: (properties: ILinkProperties) => { + [`${SCHEMA}.${TileserverLayer.Point}`]: (properties: ILinkProperties) => { const { lnkalkusolmu: startNodeId, lnkloppusolmu: endNodeId,