Skip to content
Draft
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion martin.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/maplibre/martin:1.8.2@sha256:7137cad2facf21ef4af6cbef051ce0553b717e8289fde57b50b50c5ac93275b7
FROM ghcr.io/maplibre/martin:1.10.1@sha256:808afb520272ebf37ea582b0191bd7a2d87c3cf89a552000883bfbdbced9688c

COPY martin /config
COPY symbols /symbols
Expand Down
3 changes: 3 additions & 0 deletions martin/configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ postgres:
# # You may set this to `false` to disable.
auto_publish: false

# Convert tiles to MapLibre Tiles (MLT) when the client requests such tiles
convert_to_mlt: auto

# No tables, see function sources below
tables: {}

Expand Down
3 changes: 2 additions & 1 deletion proxy/js/styles.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,9 @@ const sources = {
},
high: {
type: 'vector',
url: '/railway_line_high,railway_text_km',
url: '/railway_line_high',
promoteId: 'id',
encoding: 'mlt',
},
openrailwaymap_standard: {
type: 'vector',
Expand Down
10 changes: 10 additions & 0 deletions proxy/js/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -1185,6 +1185,16 @@ const map = new maplibregl.Map({
maxZoom: globalMaxZoom,
attributionControl: false,
renderWorldCopies: false,
transformRequest: function(url, resourceType) {
if (resourceType === 'Tile' && url && url.startsWith('http://localhost:8000/railway_line_high')) {
return {
url,
headers: {
'Accept': 'application/vnd.maplibre-tile'
},
}
}
},
...(configuration.view || defaultConfiguration.view),
});

Expand Down
Loading