Compare commits

..

4 commits

Author SHA1 Message Date
8c1a73c9d5
Fix: deduplicate .gitignore and reorder 2024-12-18 02:12:58 +01:00
c88ffdae55
Fix: remove checked-in file that is covered by .gitignore 2024-12-18 02:12:00 +01:00
375913492c
Fix: order of commands in npm run init
ELI should be downloaded before generate, because it depends on that
file. After clearing the generated assets directory, npm run init failed,
this commit fixes that.
2024-12-18 01:42:15 +01:00
Pieter Vander Vennet
6cb16877e8 Fix: imagepreview: improve typing; fix comparison tool 2024-12-17 19:03:05 +01:00
27 changed files with 68 additions and 306 deletions

View file

@ -338,7 +338,7 @@ No default value set
Used to complete the login
This documentation is defined in the source code at [ThemeViewState.ts](/src/Models/ThemeViewState.ts#L183)
This documentation is defined in the source code at [ThemeViewState.ts](/src/Models/ThemeViewState.ts#L177)
No default value set
@ -346,7 +346,7 @@ No default value set
The initial/current zoom level
This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L43)
This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L39)
The default value is _1_
@ -354,7 +354,7 @@ The default value is _1_
The initial/current latitude
This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L43)
This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L39)
The default value is _0_
@ -362,7 +362,7 @@ The default value is _0_
The initial/current longitude of the app
This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L43)
This documentation is defined in the source code at [InitialMapPositioning.ts](/src/Logic/Actors/InitialMapPositioning.ts#L39)
The default value is _0_

View file

@ -9570,4 +9570,4 @@
"render": "Turbina eòlica"
}
}
}
}

View file

@ -10715,4 +10715,4 @@
"render": "větrná turbína"
}
}
}
}

View file

@ -3060,4 +3060,4 @@
"render": "vindmølle"
}
}
}
}

View file

@ -12761,4 +12761,4 @@
"render": "Windrad"
}
}
}
}

View file

@ -4953,7 +4953,7 @@
"0": {
"options": {
"0": {
"question": "Now open"
"question": "Open now"
}
}
},
@ -13286,4 +13286,4 @@
"render": "wind turbine"
}
}
}
}

View file

@ -12664,4 +12664,4 @@
"render": "aerogenerador"
}
}
}
}

View file

@ -7541,4 +7541,4 @@
"render": "éolienne"
}
}
}
}

View file

@ -1457,4 +1457,4 @@
"render": "szélerőmű"
}
}
}
}

View file

@ -1015,4 +1015,4 @@
"render": "turbin angin"
}
}
}
}

View file

@ -3348,4 +3348,4 @@
"render": "pala eolica"
}
}
}
}

View file

@ -4065,7 +4065,7 @@
"render": "<i>Meer informatie over de locatie (in het Frans):</i><br/>{defibrillator:location:fr}"
},
"defibrillator-description": {
"question": "Is er nog iets bijzonders aan deze defibrillator dat je nog niet hebt kunnen meegeven? (laat leeg indien niet)",
"question": "Is er nog iets bijzonder aan deze defibrillator dat je nog niet hebt kunnen meegeven? (laat leeg indien niet)",
"render": "Aanvullende info: {description}"
},
"defibrillator-email": {

View file

@ -3700,4 +3700,4 @@
"render": "turbina wiatrowa"
}
}
}
}

View file

@ -1158,4 +1158,4 @@
"render": "風機"
}
}
}
}

View file

@ -24,16 +24,6 @@
"text": "匯入這座 ATM"
}
}
},
"1": {
"render": "開放街圖有記載 <a href='#{_closest_osm_poi}'>ATM距離{_closest_osm_poi_distance}公尺。</a> "
},
"2": {
"render": {
"special": {
"message": "將所有建議的標籤都加到最近的 ATM"
}
}
}
}
}
@ -42,54 +32,7 @@
"title": "自動櫃員機"
},
"bag": {
"title": "BAG 匯入助手",
"layers": {
"2": {
"tagRenderings": {
"Build year": {
"mappings": {
"0": {
"then": "這棟建築的啟用時間是 <b>{_bag_obj:start_date}</b>"
}
},
"render": "這棟建築是<b>{_bag_obj:start_date}</b>建造的"
},
"Building type": {
"mappings": {
"0": {
"then": "這棟建築類型將會是<b>{_bag_obj:construction}</b>"
}
},
"render": "這棟建築類型是<b>{_bag_obj:building}</b>"
},
"Import button": {
"mappings": {
"0": {
"then": "先不要計算正確數值,請重新整理這一頁"
}
}
},
"Reference": {
"render": "在 BAG 的參考編號是 <b>{_bag_obj:ref:bag}</b>"
}
},
"description": "BAG 當中有註冊的建築"
},
"0": {
"tagRenderings": {
"Reference": {
"mappings": {
"0": {
"then": "這棟建築在 BAG 沒有參考資訊"
}
},
"render": "在 BAG 的參考編號 <b>{ref:bag}</b>"
}
}
}
},
"description": "這個主題要感謝來自 BAG 匯入的資料",
"shortDescription": "BAG 匯入幫助工具"
"title": "BAG 匯入助手"
},
"benches": {
"description": "這份地圖顯示開放街圖上所有記錄的長椅:單獨的長椅,屬於大眾運輸站點或涼亭的長椅。",
@ -97,9 +40,7 @@
"title": "長椅"
},
"bicycle_rental": {
"title": "單車租借站",
"description": "在這份地圖,你會在開放街圖上找到很多共享單車站",
"shortDescription": "有共享單車站與單車租借服務的地圖"
"title": "單車租借站"
},
"bicyclelib": {
"description": "單車圖書館是指每年支付小額費用,然後可以租用單車的地方。最有名的單車圖書館案例是給小孩的,能夠讓長大的小孩用目前的單車換成比較大的單車",
@ -125,17 +66,6 @@
"0": {
"question": "這個地方是誰營運的?",
"render": "這個地方由 {operator} 營運的"
},
"1": {
"mappings": {
"0": {
"then": "這個地方有電源供應設施"
},
"1": {
"then": "這個地方沒有電源供應設施"
}
},
"question": "這個地方有電源供應設施嗎?"
}
}
},
@ -150,91 +80,10 @@
"climbing": {
"description": "在這份地圖上你會發現能夠攀爬機會,像是攀岩體育館、抱石大廳以及大自然當中的巨石。",
"descriptionTail": "攀爬地圖最初由 <a href='https://utopicode.de/en/?ref=kletterspots' target='_blank'>Christian Neumann</a> 製作。如果你有回饋意見或問題請到Please <a href='https://utopicode.de/en/contact/?project=kletterspots&ref=kletterspots' target='blank'>這邊反應</a>。</p><p>這專案使用來自<a href='https://www.openstreetmap.org/' target='_blank'>開放街圖</a>專案的資料。</p>",
"title": "攀岩館、俱樂部和場所",
"layers": {
"0": {
"override": {
"tagRenderings+": {
"0": {
"mappings": {
"0": {
"then": "<span class='subtle'><a href='#{_embedding_feature:id}'>強調這邊</a>包含</span> 公共可及的圖徵<br/>{_embedding_feature:access:description}"
},
"2": {
"then": "<span class='subtle'><a href='#{_embedding_feature:id}'>強調</a>包含</span>只有顧客才能進入的圖徵<br/>{_embedding_feature:access:description}"
},
"1": {
"then": "<span class='subtle'> <a href='#{_embedding_feature:id}'>強調</a>包含 </span> 需要獲得核准才能進入的圖徵<br/>{_embedding_feature:access:description}"
},
"3": {
"then": "<span class='subtle'><a href='#{_embedding_feature:id}'>強調</a>包含</span>只有會員才能進入的圖徵<br/>{_embedding_feature:access:description}"
}
}
},
"1": {
"mappings": {
"0": {
"then": "開放給所有人"
},
"1": {
"then": "你需要獲得核准才能進入這裡"
},
"2": {
"then": "只有顧客"
},
"3": {
"then": "只有會員"
}
},
"question": "誰能進入這裡?"
}
}
}
},
"1": {
"override": {
"+tagRenderings": {
"0": {
"mappings": {
"0": {
"then": "這家店能夠修理登山鞋"
},
"1": {
"then": "這家店無法修理登山鞋"
}
},
"question": "這家店能夠修理登山鞋嗎?"
}
}
}
},
"2": {
"override": {
"+tagRenderings": {
"0": {
"mappings": {
"0": {
"then": "這家店能夠修理登山鞋"
},
"1": {
"then": "這家店無法修理登山鞋"
}
},
"question": "這家店也會修理登山鞋嗎?"
}
},
"=presets": {
"0": {
"title": "修鞋店"
}
}
}
}
}
"title": "攀岩館、俱樂部和場所"
},
"cycle_highways": {
"title": "單車高速公路",
"description": "這份地圖顯示單車道"
"title": "單車高速公路"
},
"cycle_infra": {
"description": "可以檢視與編輯單車相關設施的地圖,在 #os0c21時製作。",
@ -244,63 +93,9 @@
"cyclenodes": {
"layers": {
"1": {
"name": "節點",
"tagRenderings": {
"node-expected_rcn_route_relations": {
"freeform": {
"placeholder": "例如 3"
},
"render": "這個節點連結到 {expected_rcn_route_relations} 其他單車節點。",
"question": "有多少其他單車節點連結到這一節點連結?"
},
"node-rxn_ref": {
"freeform": {
"placeholder": "例如 1"
},
"question": "這個單車節點的參考編號是什麼?",
"render": "這個單車節點有參考編號 {rcn_ref}"
},
"node-survey:date": {
"override": {
"question": "上次這個單車節點是何時探查的?",
"render": "這個單車節點上次探查時間是 {survey:date}"
}
}
},
"presets": {
"0": {
"title": "單車節點"
}
},
"title": {
"mappings": {
"0": {
"then": "單車節點 <strong>{rcn_ref}</strong>"
}
}
}
},
"0": {
"name": "節點到節點的連結",
"tagRenderings": {
"node2node-survey:date": {
"override": {
"question": "這個節點到節點連結何時最後一次探察?",
"render": "這個節點到節點連結最後是在 {survey:date} 探察"
}
}
},
"title": {
"mappings": {
"0": {
"then": "節點到節點連結 <strong>{ref}</strong>"
}
},
"render": "節點到節點連結"
}
"name": "節點"
}
},
"description": "這份地圖顯示單車節點網路與允許你輕易新增節點"
}
},
"cyclestreets": {
"description": "單車街道是<b>機動車輛受限制,只允許單車通行</b>的道路。通常會有路標顯示特別的交通指標。單車街道通常在荷蘭、比利時看到,但德國與法國也有。 ",
@ -695,28 +490,5 @@
"description": "在這份地圖當中,你可以找到你附近的垃圾筒。如果地圖有遺漏垃圾筒,你可以自己加上去",
"shortDescription": "垃圾筒的地圖",
"title": "垃圾筒"
},
"circular_economy": {
"description": "多樣物件能夠幫助人們分享、再利用與回收。",
"layers": {
"5": {
"override": {
"=name": "二手商店"
}
}
},
"title": "循環經濟"
},
"bicycle_parkings": {
"description": "顯示所有類型單車停車設施的地圖",
"title": "單車停車設施"
},
"blind_osm": {
"description": "協助視覺障礙人士所需設施的地圖",
"title": "OSM 為了視覺障礙人士"
},
"clock": {
"description": "顯示所有公共時鐘的地圖",
"title": "時鐘"
}
}
}

View file

@ -193,19 +193,18 @@
"openOsmchaLastWeek": "檢視最近 7 天的編輯",
"openPanoramax": "在這邊開啟 Panoramax",
"openThemeDocumentation": "開啟專題地圖 {name} 的文件",
"panoramaxHelp": "<b>Panoramax</b> 是收集街景照片的線上服務,並且以自由授權釋出。貢獻者能夠使用這些照片來改進開放街圖",
"panoramaxLicenseCCBYSA": "你的圖片會以 CC-BY-SA 釋出 - 每個人都能夠在提及你名字的情形下再利用你的圖片",
"seeOnMapillary": "在 Mapillary 觀看這張影像",
"themeBy": "由 {author} 維護主題",
"title": "版權與署名",
"translatedBy": "MapComplete 由 {contributors} 翻譯,而且還有 <a href=\"https://github.com/pietervdvn/MapComplete/graphs/contributors\" target=\"_blank\">{hiddenCount} 更多貢獻者</a>"
"translatedBy": "MapComplete 由 {contributors} 翻譯,而且還有 <a href=\"https://github.com/pietervdvn/MapComplete/graphs/contributors\" target=\"_blank\">{hiddenCount} 更多貢獻者</a>",
"panoramaxHelp": "<b>Panoramax</b> 是收集街景照片的線上服務,並且以自由授權釋出。貢獻者能夠使用這些照片來改進開放街圖",
"panoramaxLicenseCCBYSA": "你的圖片會以 CC-BY-SA 釋出 - 每個人都能夠在提及你名字的情形下再利用你的圖片"
},
"back": "返回",
"backToIndex": "回到所有主題地圖的總覽頁面",
"backgroundMap": "選擇背景圖層",
"backgroundSwitch": "切換背景",
"cancel": "取消",
"clearPendingChanges": "清除待處理的變動",
"confirm": "確認",
"customThemeIntro": "這些是先前使用者創造的主題。",
"customThemeTitle": "客製化主題",
@ -233,7 +232,6 @@
"downloadGeojson": "下載可視資料為 GeoJSON",
"downloadGpx": "下載為 GPX 檔案",
"downloadGpxHelper": "GPX 檔案能被大部分導航裝置或 app 使用",
"downloadImage": "下載圖片",
"exporting": "匯出中…",
"includeMetaData": "包括 metadata (上次編輯者、計算數值等)",
"licenseInfo": "<h3>著作權聲明</h3>提供的資料採用 ODbL 授權釋出。可以用任何目標再利用資料,但是需<ul><li>標明 <b>© 開放街圖貢獻者</b></li><li>任何變動必須相同方式授權</li></ul> 請閱讀完整的 <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">著作權聲明</a>。",
@ -243,7 +241,8 @@
},
"title": "下載",
"toMuch": "有很多圖徵可以下載了",
"uploadGpx": "上傳軌跡到開放街圖"
"uploadGpx": "上傳軌跡到開放街圖",
"downloadImage": "下載圖片"
},
"enableGeolocationForSafari": "你沒有看到要求地理位置權限的跳出視窗?",
"enableGeolocationForSafariLink": "學習如何在設定當中啟用地理位置權限",
@ -252,9 +251,9 @@
"example": "例子",
"examples": "例子",
"filterPanel": {
"allTypes": "所有類型",
"disableAll": "關閉所有",
"enableAll": "啟用所有"
"enableAll": "啟用所有",
"allTypes": "所有類型"
},
"geopermissionDenied": "使用地理位置要求已經被拒絕",
"histogram": {
@ -264,10 +263,10 @@
"background": "改變背景",
"filter": "篩選資料",
"jumpToLocation": "到你目前的位置",
"locationNotAvailable": "無法取得 GPS 位置,裝置有取得位置資訊還是在隧道內?",
"menu": "選單",
"zoomIn": "放大",
"zoomOut": "縮小"
"zoomOut": "縮小",
"locationNotAvailable": "無法取得 GPS 位置,裝置有取得位置資訊還是在隧道內?"
},
"layerSelection": {
"title": "選擇圖層",
@ -373,24 +372,24 @@
"save": "儲存",
"screenToSmall": "在新視窗中開啟 <i>{theme}</i>",
"search": {
"activeFilters": "啟用篩選",
"clearFilters": "清除篩選",
"deleteSearchHistory": "刪除位置歷史",
"deleteThemeHistory": "刪除先前觀看的主題",
"error": "有狀況發生了。",
"nothing": "沒有找到。",
"recents": "最近看到的地方",
"search": "搜尋地點",
"searching": "搜尋中…",
"editSearchSyncSettings": "編輯同步設定",
"editThemeSync": "編輯同步設定",
"error": "有狀況發生了。",
"instructions": "使用搜尋欄位來搜尋位置、篩選或是其他主題地圖",
"locations": "位置",
"nMoreFilters": "{n} 更多",
"nothing": "沒有找到。",
"nothingFor": "尋找 {term} 沒有結果",
"otherMaps": "其他地圖",
"pickFilter": "選擇篩選",
"recentThemes": "最近觀看的地圖",
"recents": "最近看到的地方",
"search": "搜尋地點",
"searching": "搜尋中…"
"activeFilters": "啟用篩選",
"clearFilters": "清除篩選",
"deleteSearchHistory": "刪除位置歷史",
"deleteThemeHistory": "刪除先前觀看的主題"
},
"searchAnswer": "搜尋選項",
"seeIndex": "查看所有專題地圖的概覽",
@ -520,7 +519,8 @@
"readMore": "閱讀剩下的條目內容",
"searchToShort": "你的搜尋檢索太短了,請輸入長一點的文字",
"searchWikidata": "在 Wikidata 搜尋"
}
},
"clearPendingChanges": "清除待處理的變動"
},
"hotkeyDocumentation": {
"action": "行動",
@ -761,11 +761,11 @@
},
"unknown": {
"clear": "清除答案",
"explanation": "如果答案不正確但實際數值不清楚的話,則清除這一些資訊。不會清除其他資訊。",
"keep": "保留答案",
"markUnknown": "標示為未知",
"removedKeys": "下列鍵會被移除:",
"title": "要標記為未知嗎?"
"title": "要標記為未知嗎?",
"explanation": "如果答案不正確但實際數值不清楚的話,則清除這一些資訊。不會清除其他資訊。"
},
"userinfo": {
"notLoggedIn": "你已經登出了"
@ -827,9 +827,6 @@
"description": "正數、整數",
"noZero": "並不允許零"
},
"regex": {
"description": "正規表示式"
},
"slope": {
"inputExplanation": "將你手機放在地上,並且指向上坡方向。"
},
@ -841,15 +838,18 @@
},
"tooLong": "文字太長了,最多允許 255 字元,你現在還有 {count} 字元。",
"url": {
"aggregator": "{host} 是第三方網站,如果可能請搜尋官方網站。",
"description": "連接到網站",
"feedback": "這不是有效的網址",
"aggregator": "{host} 是第三方網站,如果可能請搜尋官方網站。",
"spamSite": "{host} 被視為低品質網站,並不被允許使用。"
},
"wikidata": {
"description": "Wikidata 編號",
"empty": "請輸入一些 Wikidata 項目",
"startsWithQ": "維基數據編號以 Q 開頭後面接數字"
},
"regex": {
"description": "正規表示式"
}
}
}
}

View file

@ -341,7 +341,7 @@ class GenerateLayouts extends Script {
"https://pietervdvn.goatcounter.com",
"https://api.panoramax.xyz",
"https://panoramax.mapcomplete.org",
"https://data.velopark.be",
"https://data.velopark.be"
].concat(...(await this.eliUrls()))
SpecialVisualizations.specialVisualizations.forEach((sv) => {

View file

@ -30,7 +30,7 @@ class Compare extends Script {
Object.keys(osmParking.properties).concat(Object.keys(veloParking.properties))
)
for (const key of allKeys) {
if (["name", "numberOfLevels", "id"].indexOf(key) >= 0) {
if (["name", "numberOfLevels"].indexOf(key) >= 0) {
continue // We don't care about these tags
}
if (osmParking.properties[key] === veloParking.properties[key]) {
@ -108,19 +108,7 @@ class Compare extends Script {
distanceBins[bin] += 1
}
fs.writeFileSync(
"report_diff.json",
JSON.stringify(
{
diffs,
distanceBins,
binSize,
"#binsize": "Every bin increases with this amount in meter",
},
null,
" "
)
)
fs.writeFileSync("report_diff.json", JSON.stringify({ diffs, distanceBins }, null, " "))
console.log("Written report_diff.json")
}

View file

@ -256,7 +256,7 @@ class VeloParkToGeojson extends Script {
VeloParkToGeojson.exportExtraAmenities(allVelopark)
await VeloParkToGeojson.createDiff(allVelopark)
console.log(
"Use \nvite-node scripts/velopark/compare.ts -- velopark_all_.geojson osm_with_velopark_link_.geojson\n to compare the results and generate a diff file"
"Use vite-node scripts/velopark/compare.ts to compare the results and generate a diff file"
)
}
}

View file

@ -13,6 +13,7 @@ import StaticFeatureSource, {
} from "../FeatureSource/Sources/StaticFeatureSource"
import { MapProperties } from "../../Models/MapProperties"
import { Orientation } from "../../Sensors/Orientation"
;("use strict")
/**
* The geolocation-handler takes a map-location and a geolocation state.

View file

@ -8,6 +8,7 @@ import Constants from "../../Models/Constants"
import { Utils } from "../../Utils"
import { GeoLocationState } from "../State/GeoLocationState"
import { OsmConnection } from "../Osm/OsmConnection"
;("use strict")
/**

View file

@ -1,6 +1,7 @@
import { FeatureSource, WritableFeatureSource } from "../FeatureSource"
import { ImmutableStore, Store, UIEventSource } from "../../UIEventSource"
import { Feature } from "geojson"
;("use strict")
/**
* A simple, read only feature store.

View file

@ -15,6 +15,7 @@ import {
import { Tiles } from "../Models/TileRange"
import { Utils } from "../Utils"
import { NearestPointOnLine } from "@turf/nearest-point-on-line"
;("use strict")
export class GeoOperations {

View file

@ -37,16 +37,13 @@
if (!shown) {
previewedImage?.set(undefined)
}
})
}),
)
if (previewedImage) {
onDestroy(
previewedImage.addCallbackAndRun((previewedImage) => {
showBigPreview.set(
previewedImage !== undefined &&
(previewedImage?.id ?? previewedImage?.url) === (image.id ?? image.url)
)
})
showBigPreview.set(previewedImage !== undefined && (previewedImage?.id ?? previewedImage?.url) === (image.id ?? image.url))
}),
)
}
@ -93,6 +90,7 @@
</div>
</Popup>
{#if image.status !== undefined && image.status !== "ready" && image.status !== "hidden"}
<div class="flex h-full flex-col justify-center">
<Loading>
@ -117,7 +115,7 @@
class={imgClass ?? ""}
class:cursor-zoom-in={canZoom}
on:click={() => {
console.log("Setting", image.url)
console.log("Setting",image.url)
previewedImage?.set(image)
}}
on:error={() => {

View file

@ -15,7 +15,7 @@
import Translations from "../i18n/Translations"
import DotMenu from "../Base/DotMenu.svelte"
export let image: Partial<ProvidedImage> & { id: string; url: string }
export let image: Partial<ProvidedImage> & ({ id: string, url: string })
export let clss: string = undefined
let isLoaded = new UIEventSource(false)

View file

@ -1,7 +1,7 @@
{
"contributors": [
{
"commits": 8786,
"commits": 8779,
"contributor": "Pieter Vander Vennet"
},
{

View file

@ -49,7 +49,7 @@
"contributor": "gallegonovato"
},
{
"commits": 48,
"commits": 47,
"contributor": "Supaplex"
},
{