Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix vectortiles layers #2009

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading