mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-01 08:53:13 +00:00
feat(maps): MapLibre draws the user's map template on trek:template
A MapLibre user could only draw OpenFreeMap styles; a raster template was Leaflet's alone. With maplibre_style set to trek:template, MapLibre now draws the template the trip map already resolves for Leaflet (CARTO key, keyless fallback and dark default included), so both renderers show the same map. No stored row holds the keyword, so every existing user sees exactly the map they saw before, and Mapbox is untouched. - glBasemap turns the basemap spec into a raster style document (256px tiles as Leaflet requests them, the provider's deepest zoom, the credit, OpenFreeMap glyphs for the map's own labels) and resolves trek:ofm-auto to Liberty or OpenFreeMap Dark with the colour scheme. - glCanFetch decides whether a GL map may fetch a basemap here: https on a host the CSP names, the shipped ones or MAP_EXTRA_CONNECT_HOSTS from the app config. GCJ-02 tiles (Amap) and other hosts are drawn by Leaflet for that render, the setting untouched. - rasterHealth watches the first tiles of a template map: a CSP refusal or twelve failures without a success move every map drawing that template to Leaflet for the session, with a pill that says so. - useEffectiveMapEngine decides this on the engine that actually draws and runs the offline checks after it; a stored raster template keeps drawing offline where Leaflet would keep the same tiles. - The journey map uses the same hook: the same template, the same fallback and now the offline basemap with its pill as the trip map has it. - A MapLibre raster style stops at zoom 19 like Leaflet; the Mapbox options stay as they were. The offline pill moves to BasemapPill for both maps. Dropping the unused imports there lowers the eslint baseline.
This commit is contained in:
@@ -58,5 +58,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': 'يحتاج العرض ثلاثي الأبعاد إلى WebGL2، وهذا المتصفح لا يوفّره. تبقى الخريطة ثنائية الأبعاد.',
|
||||
'map.offlineBasemap': 'خريطة دون اتصال',
|
||||
'map.offlineShowStored': 'عرض الخريطة دون اتصال',
|
||||
'map.templateClassic': 'قالب الخريطة بعرض ثنائي الأبعاد كلاسيكي',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -56,6 +56,7 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': '3D üçün WebGL2 lazımdır, bu brauzer isə onu təqdim etmir. Xəritə 2D olaraq qalır.',
|
||||
'map.offlineBasemap': 'Oflayn xəritə',
|
||||
'map.offlineShowStored': 'Oflayn xəritəni göstər',
|
||||
'map.templateClassic': 'Xəritə şablonu klassik 2D-də',
|
||||
};
|
||||
|
||||
export default map;
|
||||
|
||||
@@ -53,5 +53,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': 'O 3D precisa de WebGL2, que este navegador não oferece. O mapa continua em 2D.',
|
||||
'map.offlineBasemap': 'Mapa offline',
|
||||
'map.offlineShowStored': 'Mostrar mapa offline',
|
||||
'map.templateClassic': 'Modelo de mapa no 2D clássico',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -51,5 +51,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': 'El 3D necessita WebGL2, que aquest navegador no ofereix. El mapa es queda en 2D.',
|
||||
'map.offlineBasemap': 'Mapa fora de línia',
|
||||
'map.offlineShowStored': 'Mostra el mapa fora de línia',
|
||||
'map.templateClassic': 'Plantilla del mapa en 2D clàssic',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -52,5 +52,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': '3D potřebuje WebGL2, které tento prohlížeč nenabízí. Mapa zůstává ve 2D.',
|
||||
'map.offlineBasemap': 'Offline mapa',
|
||||
'map.offlineShowStored': 'Zobrazit offline mapu',
|
||||
'map.templateClassic': 'Šablona mapy v klasickém 2D',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -53,5 +53,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': '3D braucht WebGL2, das dieser Browser nicht bietet. Die Karte bleibt in 2D.',
|
||||
'map.offlineBasemap': 'Offline-Karte',
|
||||
'map.offlineShowStored': 'Offline-Karte zeigen',
|
||||
'map.templateClassic': 'Karten-Vorlage in klassischem 2D',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -51,5 +51,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': '3D needs WebGL2, which this browser does not offer. The map stays in 2D.',
|
||||
'map.offlineBasemap': 'Offline map',
|
||||
'map.offlineShowStored': 'Show offline map',
|
||||
'map.templateClassic': 'Map template in classic 2D',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -50,5 +50,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': 'El 3D necesita WebGL2, que este navegador no ofrece. El mapa se queda en 2D.',
|
||||
'map.offlineBasemap': 'Mapa sin conexión',
|
||||
'map.offlineShowStored': 'Mostrar mapa sin conexión',
|
||||
'map.templateClassic': 'Plantilla del mapa en 2D clásico',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -49,5 +49,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': '3D vajab WebGL2-te, mida see brauser ei paku. Kaart jääb 2D-vaatesse.',
|
||||
'map.offlineBasemap': 'Võrguühenduseta kaart',
|
||||
'map.offlineShowStored': 'Näita võrguühenduseta kaarti',
|
||||
'map.templateClassic': 'Kaardimall klassikalises 2D-s',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -52,5 +52,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': 'La 3D nécessite WebGL2, que ce navigateur ne propose pas. La carte reste en 2D.',
|
||||
'map.offlineBasemap': 'Carte hors ligne',
|
||||
'map.offlineShowStored': 'Afficher la carte hors ligne',
|
||||
'map.templateClassic': 'Modèle de carte en 2D classique',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -52,5 +52,6 @@ const map: TranslationStrings = {
|
||||
'Το 3D χρειάζεται WebGL2, που αυτό το πρόγραμμα περιήγησης δεν προσφέρει. Ο χάρτης μένει σε 2D.',
|
||||
'map.offlineBasemap': 'Χάρτης εκτός σύνδεσης',
|
||||
'map.offlineShowStored': 'Εμφάνιση χάρτη εκτός σύνδεσης',
|
||||
'map.templateClassic': 'Πρότυπο χάρτη σε κλασικό 2D',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -51,6 +51,7 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': 'תלת-ממד דורש WebGL2, והדפדפן הזה לא תומך בו. המפה נשארת בדו-ממד.',
|
||||
'map.offlineBasemap': 'מפה לא מקוונת',
|
||||
'map.offlineShowStored': 'הצגת מפה לא מקוונת',
|
||||
'map.templateClassic': 'תבנית המפה בתצוגת 2D קלאסית',
|
||||
};
|
||||
|
||||
export default map;
|
||||
|
||||
@@ -50,5 +50,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': 'A 3D-hez WebGL2 kell, amelyet ez a böngésző nem kínál. A térkép 2D-ben marad.',
|
||||
'map.offlineBasemap': 'Offline térkép',
|
||||
'map.offlineShowStored': 'Offline térkép megjelenítése',
|
||||
'map.templateClassic': 'Térkép sablon klasszikus 2D-ben',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -49,5 +49,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': '3D membutuhkan WebGL2, yang tidak disediakan browser ini. Peta tetap dalam 2D.',
|
||||
'map.offlineBasemap': 'Peta offline',
|
||||
'map.offlineShowStored': 'Tampilkan peta offline',
|
||||
'map.templateClassic': 'Template peta dalam 2D klasik',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -53,5 +53,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': 'Il 3D richiede WebGL2, che questo browser non offre. La mappa resta in 2D.',
|
||||
'map.offlineBasemap': 'Mappa offline',
|
||||
'map.offlineShowStored': 'Mostra mappa offline',
|
||||
'map.templateClassic': 'Modello mappa in 2D classico',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -49,5 +49,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': '3D には WebGL2 が必要ですが、このブラウザーは対応していません。地図は 2D のままです。',
|
||||
'map.offlineBasemap': 'オフライン地図',
|
||||
'map.offlineShowStored': 'オフライン地図を表示',
|
||||
'map.templateClassic': '地図テンプレートをクラシック 2D で表示',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -48,5 +48,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': '3D에는 WebGL2가 필요하지만 이 브라우저는 지원하지 않습니다. 지도는 2D로 유지됩니다.',
|
||||
'map.offlineBasemap': '오프라인 지도',
|
||||
'map.offlineShowStored': '오프라인 지도 보기',
|
||||
'map.templateClassic': '지도 템플릿을 클래식 2D로 표시',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -52,5 +52,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': '3D heeft WebGL2 nodig, dat deze browser niet biedt. De kaart blijft in 2D.',
|
||||
'map.offlineBasemap': 'Offline kaart',
|
||||
'map.offlineShowStored': 'Offline kaart tonen',
|
||||
'map.templateClassic': 'Kaartsjabloon in klassiek 2D',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -55,5 +55,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': 'Tryb 3D wymaga WebGL2, którego ta przeglądarka nie obsługuje. Mapa pozostaje w 2D.',
|
||||
'map.offlineBasemap': 'Mapa offline',
|
||||
'map.offlineShowStored': 'Pokaż mapę offline',
|
||||
'map.templateClassic': 'Szablon mapy w klasycznym 2D',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -56,5 +56,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': 'Для 3D нужен WebGL2, а этот браузер его не поддерживает. Карта остаётся в 2D.',
|
||||
'map.offlineBasemap': 'Офлайн-карта',
|
||||
'map.offlineShowStored': 'Показать офлайн-карту',
|
||||
'map.templateClassic': 'Шаблон карты в классическом 2D',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -52,5 +52,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': '3D potrebuje WebGL2, ktoré tento prehliadač neponúka. Mapa zostáva v 2D.',
|
||||
'map.offlineBasemap': 'Offline mapa',
|
||||
'map.offlineShowStored': 'Zobraziť offline mapu',
|
||||
'map.templateClassic': 'Šablóna mapy v klasickom 2D',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -50,5 +50,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': '3D kräver WebGL2, som den här webbläsaren inte erbjuder. Kartan stannar i 2D.',
|
||||
'map.offlineBasemap': 'Offlinekarta',
|
||||
'map.offlineShowStored': 'Visa offlinekarta',
|
||||
'map.templateClassic': 'Kartmall i klassisk 2D',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -47,5 +47,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': 'โหมด 3D ต้องใช้ WebGL2 ซึ่งเบราว์เซอร์นี้ไม่รองรับ แผนที่จึงยังคงเป็น 2D',
|
||||
'map.offlineBasemap': 'แผนที่ออฟไลน์',
|
||||
'map.offlineShowStored': 'แสดงแผนที่ออฟไลน์',
|
||||
'map.templateClassic': 'แม่แบบแผนที่แบบ 2D คลาสสิก',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -50,5 +50,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': '3D için WebGL2 gerekir, bu tarayıcı ise onu sunmuyor. Harita 2D olarak kalır.',
|
||||
'map.offlineBasemap': 'Çevrimdışı harita',
|
||||
'map.offlineShowStored': 'Çevrimdışı haritayı göster',
|
||||
'map.templateClassic': 'Klasik 2D harita şablonu',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -54,5 +54,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': 'Для 3D потрібен WebGL2, а цей браузер його не підтримує. Карта залишається у 2D.',
|
||||
'map.offlineBasemap': 'Офлайн-карта',
|
||||
'map.offlineShowStored': 'Показати офлайн-карту',
|
||||
'map.templateClassic': 'Шаблон карти в класичному 2D',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -50,5 +50,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': 'Chế độ 3D cần WebGL2, nhưng trình duyệt này không hỗ trợ. Bản đồ vẫn ở dạng 2D.',
|
||||
'map.offlineBasemap': 'Bản đồ ngoại tuyến',
|
||||
'map.offlineShowStored': 'Hiện bản đồ ngoại tuyến',
|
||||
'map.templateClassic': 'Mẫu bản đồ ở chế độ 2D cổ điển',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -46,5 +46,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': '3D 需要 WebGL2,而此瀏覽器不支援。地圖維持 2D。',
|
||||
'map.offlineBasemap': '離線地圖',
|
||||
'map.offlineShowStored': '顯示離線地圖',
|
||||
'map.templateClassic': '地圖模板以經典 2D 顯示',
|
||||
};
|
||||
export default map;
|
||||
|
||||
@@ -46,5 +46,6 @@ const map: TranslationStrings = {
|
||||
'map.webgl2.terrain': '3D 需要 WebGL2,而此浏览器不支持。地图保持 2D。',
|
||||
'map.offlineBasemap': '离线地图',
|
||||
'map.offlineShowStored': '显示离线地图',
|
||||
'map.templateClassic': '地图模板以经典 2D 显示',
|
||||
};
|
||||
export default map;
|
||||
|
||||
Reference in New Issue
Block a user