Add Tracestrack Topo as featured layer
This commit is contained in:
parent
cfcb89a9c9
commit
00d085ed5d
6 changed files with 34 additions and 1 deletions
|
@ -51,6 +51,13 @@ L.OSM.Map = L.Map.extend({
|
||||||
}).prop("outerHTML");
|
}).prop("outerHTML");
|
||||||
var thunderforest = I18n.t("javascripts.map.thunderforest_credit", { thunderforest_link: thunderforest_link });
|
var thunderforest = I18n.t("javascripts.map.thunderforest_credit", { thunderforest_link: thunderforest_link });
|
||||||
|
|
||||||
|
var tracestrack_link = $("<a>", {
|
||||||
|
href: "https://www.tracestrack.com/",
|
||||||
|
target: "_blank",
|
||||||
|
text: I18n.t("javascripts.map.tracestrack")
|
||||||
|
}).prop("outerHTML");
|
||||||
|
var tracestrack = I18n.t("javascripts.map.tracestrack_credit", { tracestrack_link: tracestrack_link });
|
||||||
|
|
||||||
var memomaps_link = $("<a>", {
|
var memomaps_link = $("<a>", {
|
||||||
href: "https://memomaps.de/",
|
href: "https://memomaps.de/",
|
||||||
target: "_blank",
|
target: "_blank",
|
||||||
|
@ -99,6 +106,15 @@ L.OSM.Map = L.Map.extend({
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (OSM.TRACESTRACK_KEY) {
|
||||||
|
this.baseLayers.push(new L.OSM.TracestrackTopo({
|
||||||
|
attribution: copyright + ". " + tracestrack + ". " + terms,
|
||||||
|
apikey: OSM.TRACESTRACK_KEY,
|
||||||
|
code: "P",
|
||||||
|
keyid: "tracestracktopo",
|
||||||
|
name: I18n.t("javascripts.map.base.tracestracktop_topo")
|
||||||
|
}));
|
||||||
|
}
|
||||||
this.baseLayers.push(new L.OSM.OPNVKarte({
|
this.baseLayers.push(new L.OSM.OPNVKarte({
|
||||||
attribution: copyright + ". " + memomaps + ". " + terms,
|
attribution: copyright + ". " + memomaps + ". " + terms,
|
||||||
code: "O",
|
code: "O",
|
||||||
|
|
|
@ -25,6 +25,10 @@ OSM = {
|
||||||
THUNDERFOREST_KEY: <%= Settings.thunderforest_key.to_json %>,
|
THUNDERFOREST_KEY: <%= Settings.thunderforest_key.to_json %>,
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
|
<% if Settings.key?(:tracestrack_key) %>
|
||||||
|
TRACESTRACK_KEY: <%= Settings.tracestrack_key.to_json %>,
|
||||||
|
<% end %>
|
||||||
|
|
||||||
MARKER_GREEN: <%= image_path("marker-green.png").to_json %>,
|
MARKER_GREEN: <%= image_path("marker-green.png").to_json %>,
|
||||||
MARKER_RED: <%= image_path("marker-red.png").to_json %>,
|
MARKER_RED: <%= image_path("marker-red.png").to_json %>,
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ csp_policy = {
|
||||||
:form_action => %w['self'],
|
:form_action => %w['self'],
|
||||||
:frame_ancestors => %w['self'],
|
:frame_ancestors => %w['self'],
|
||||||
:frame_src => %w['self'],
|
:frame_src => %w['self'],
|
||||||
:img_src => %w['self' data: www.gravatar.com *.wp.com tile.openstreetmap.org *.tile.openstreetmap.org *.tile.thunderforest.com tileserver.memomaps.de *.openstreetmap.fr],
|
:img_src => %w['self' data: www.gravatar.com *.wp.com tile.openstreetmap.org *.tile.openstreetmap.org *.tile.thunderforest.com tileserver.memomaps.de tile.tracestrack.com *.openstreetmap.fr],
|
||||||
:manifest_src => %w['self'],
|
:manifest_src => %w['self'],
|
||||||
:media_src => %w['none'],
|
:media_src => %w['none'],
|
||||||
:object_src => %w['self'],
|
:object_src => %w['self'],
|
||||||
|
|
|
@ -2966,6 +2966,7 @@ en:
|
||||||
cyclosm: CyclOSM
|
cyclosm: CyclOSM
|
||||||
cycle_map: Cycle Map
|
cycle_map: Cycle Map
|
||||||
transport_map: Transport Map
|
transport_map: Transport Map
|
||||||
|
tracestracktop_topo: Tracestrack Topo
|
||||||
hot: Humanitarian
|
hot: Humanitarian
|
||||||
opnvkarte: ÖPNVKarte
|
opnvkarte: ÖPNVKarte
|
||||||
layers:
|
layers:
|
||||||
|
@ -2986,6 +2987,8 @@ en:
|
||||||
andy_allan: Andy Allan
|
andy_allan: Andy Allan
|
||||||
opnvkarte_credit: "Tiles courtesy of %{memomaps_link}"
|
opnvkarte_credit: "Tiles courtesy of %{memomaps_link}"
|
||||||
memomaps: MeMoMaps
|
memomaps: MeMoMaps
|
||||||
|
tracestrack_credit: "Tiles courtesy of %{tracestrack_link}"
|
||||||
|
tracestrack: Tracestrack
|
||||||
hotosm_credit: "Tiles style by %{hotosm_link} hosted by %{osm_france_link}"
|
hotosm_credit: "Tiles style by %{hotosm_link} hosted by %{osm_france_link}"
|
||||||
hotosm_name: Humanitarian OpenStreetMap Team
|
hotosm_name: Humanitarian OpenStreetMap Team
|
||||||
site:
|
site:
|
||||||
|
|
|
@ -117,6 +117,8 @@ fossgis_valhalla_url: "https://valhalla1.openstreetmap.de/route"
|
||||||
#wikipedia_auth_secret: ""
|
#wikipedia_auth_secret: ""
|
||||||
# Thunderforest authentication details
|
# Thunderforest authentication details
|
||||||
#thunderforest_key: ""
|
#thunderforest_key: ""
|
||||||
|
# Tracestrack authentication details
|
||||||
|
#tracestrack_key: ""
|
||||||
# Key for generating TOTP tokens
|
# Key for generating TOTP tokens
|
||||||
#totp_key: ""
|
#totp_key: ""
|
||||||
# Enforce Content-Security-Policy
|
# Enforce Content-Security-Policy
|
||||||
|
|
8
vendor/assets/leaflet/leaflet.osm.js
vendored
8
vendor/assets/leaflet/leaflet.osm.js
vendored
|
@ -61,6 +61,14 @@ L.OSM.HOT = L.OSM.TileLayer.extend({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
L.OSM.TracestrackTopo = L.OSM.TileLayer.extend({
|
||||||
|
options: {
|
||||||
|
url: 'https://tile.tracestrack.com/topo__/{z}/{x}/{y}.png?key={apikey}',
|
||||||
|
maxZoom: 19,
|
||||||
|
attribution: '© <a href="https://www.openstreetmap.org/copyright" target="_blank">OpenStreetMap</a> contributors. Tiles courtesy of <a href="https://www.tracestrack.com/" target="_blank">Tracestrack Maps</a>'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
L.OSM.GPS = L.OSM.TileLayer.extend({
|
L.OSM.GPS = L.OSM.TileLayer.extend({
|
||||||
options: {
|
options: {
|
||||||
url: 'https://gps.tile.openstreetmap.org/lines/{z}/{x}/{y}.png',
|
url: 'https://gps.tile.openstreetmap.org/lines/{z}/{x}/{y}.png',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue