remove base url, re-add encoding based background-color
This commit is contained in:
parent
56dbeb2e8e
commit
6ad99a30b6
1 changed files with 6 additions and 4 deletions
|
@ -76,8 +76,6 @@
|
||||||
{{/is_terrain}}
|
{{/is_terrain}}
|
||||||
{{#is_terrain}}
|
{{#is_terrain}}
|
||||||
|
|
||||||
let baseUrl = window.location.origin;
|
|
||||||
|
|
||||||
var style = {
|
var style = {
|
||||||
version: 8,
|
version: 8,
|
||||||
sources: {
|
sources: {
|
||||||
|
@ -93,7 +91,7 @@
|
||||||
},
|
},
|
||||||
"contour": {
|
"contour": {
|
||||||
"type": "vector",
|
"type": "vector",
|
||||||
"tiles": [ baseUrl + "/data/{{id}}/contour/{z}/{x}/{y}" ],
|
"tiles": [ "{{public_url}}/data/{{id}}/contour/{z}/{x}/{y}" ],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"glyphs": "/fonts/{fontstack}/{range}.pbf",
|
"glyphs": "/fonts/{fontstack}/{range}.pbf",
|
||||||
|
@ -104,7 +102,11 @@
|
||||||
{
|
{
|
||||||
"id": "background",
|
"id": "background",
|
||||||
"paint": {
|
"paint": {
|
||||||
|
{{#if is_terrainrgb}}
|
||||||
"background-color": "hsl(190, 99%, 63%)"
|
"background-color": "hsl(190, 99%, 63%)"
|
||||||
|
{{else}}
|
||||||
|
"background-color": "hsl(0, 100%, 25%)"
|
||||||
|
{{/if}}
|
||||||
},
|
},
|
||||||
"type": "background"
|
"type": "background"
|
||||||
},
|
},
|
||||||
|
@ -179,7 +181,7 @@
|
||||||
|
|
||||||
map.addControl(
|
map.addControl(
|
||||||
new ElevationInfoControl({
|
new ElevationInfoControl({
|
||||||
url: baseUrl + "/data/{{id}}/elevation/{z}/{x}/{y}"
|
url: "{{public_url}}data/{{id}}/elevation/{z}/{x}/{y}"
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
{{/is_terrain}}
|
{{/is_terrain}}
|
||||||
|
|
Loading…
Reference in a new issue