Skip to content

Commit

Permalink
Merge pull request #2009 from HSLdevcom/develop
Browse files Browse the repository at this point in the history
Fix vectortiles layers
  • Loading branch information
jhanninen authored Oct 29, 2024
2 parents 279f890 + fd719d0 commit 0efb467
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/components/map/layers/NetworkLayers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ enum TileserverLayer {
Point = 'piste_view',
}

const SCHEMA = 'jore';

interface INetworkLayersProps {
map: any;
mapStore?: MapStore;
Expand All @@ -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')
Expand All @@ -52,7 +54,7 @@ class NetworkLayers extends Component<INetworkLayersProps> {
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,
Expand Down Expand Up @@ -84,7 +86,7 @@ class NetworkLayers extends Component<INetworkLayersProps> {
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,
Expand Down

0 comments on commit 0efb467

Please sign in to comment.