feat(places): import the stops of a shared Google Maps route

Pasting a /maps/dir/ link into the list-import box answered "could not
extract list ID", which is the whole of the complaint: people share a drive
far more often than they share a list, and it is the same gesture — somebody
pressed Share in Google Maps. Which screen they were on is the URL's business,
so the box takes both and the controller decides.

No API key and no call to Google for the link itself: the stops are in the URL.
Three shapes arrive — the path form with its data blob, the documented
?api=1&origin= form, and a short link that is one of those after a redirect —
and a stop the link spells out in coordinates needs no geocoder at all. One
that is only a name is geocoded, keeping the name from the link rather than
the one the geocoder answers with: somebody who typed a nickname into Google
should not find a street address on their trip.

A name nobody can place is left out and counted rather than failing the
import, because a route of six stops with five findable is five stops more
than the traveller had. Coordinates are read as 1d/2d, longitude before
latitude, which is the reverse of a place link and the one way to put Berlin
in Somalia. A blob that does not line up with the stops is ignored entirely:
half a link read confidently is worse than one read as names.
This commit is contained in:
Maurice
2026-09-05 00:39:11 +02:00
committed by Maurice
parent 761ec4e66f
commit 6fca238440
34 changed files with 675 additions and 9 deletions
+1
View File
@@ -34,6 +34,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'قائمة Google',
'places.importNaverList': 'قائمة Naver',
'places.googleListHint': 'الصق رابط قائمة Google Maps المشتركة لاستيراد جميع الأماكن.',
'places.googleDirHint': 'رابط الاتجاهات يعمل أيضاً: تتحوّل محطاته إلى أماكن، بترتيب القيادة.',
'places.googleListImported': 'تم استيراد {count} أماكن من "{list}"',
'places.googleListError': 'فشل استيراد قائمة Google Maps',
'places.naverListHint': 'الصق رابط قائمة Naver Maps مشتركة لاستيراد جميع الأماكن.',
+1
View File
@@ -34,6 +34,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Lista Google',
'places.importNaverList': 'Lista Naver',
'places.googleListHint': 'Cole um link compartilhado de uma lista do Google Maps para importar todos os lugares.',
'places.googleDirHint': 'Um link de rotas também serve: suas paradas viram locais, na ordem do percurso.',
'places.googleListImported': '{count} lugares importados de "{list}"',
'places.googleListError': 'Falha ao importar lista do Google Maps',
'places.naverListHint': 'Cole um link compartilhado de uma lista do Naver Maps para importar todos os lugares.',
+1
View File
@@ -33,6 +33,7 @@ const places: TranslationStrings = {
'places.importNaverList': 'Llista de Naver',
'places.googleListHint': "Enganxa un enllaç compartit d'una llista de Google Maps per importar tots els llocs.",
'places.googleListImported': '{count} llocs importats de "{list}"',
'places.googleDirHint': 'Un enllaç d’indicacions també serveix: les seves parades esdevenen llocs, en ordre de conducció.',
'places.googleListError': 'Error en importar la llista de Google Maps',
'places.naverListHint': "Enganxa un enllaç compartit d'una llista de Naver Maps per importar tots els llocs.",
'places.naverListImported': '{count} llocs importats de "{list}"',
+1
View File
@@ -34,6 +34,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Google Seznam',
'places.importNaverList': 'Naver Seznam',
'places.googleListHint': 'Vložte sdílený odkaz na seznam Google Maps pro import všech míst.',
'places.googleDirHint': 'Funguje i odkaz na trasu: jeho zastávky se stanou místy, v pořadí jízdy.',
'places.googleListImported': '{count} míst importováno ze seznamu "{list}"',
'places.googleListError': 'Import seznamu Google Maps se nezdařil',
'places.naverListHint': 'Vložte sdílený odkaz na seznam Naver Maps pro import všech míst.',
+1
View File
@@ -34,6 +34,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Google Liste',
'places.importNaverList': 'Naver Liste',
'places.googleListHint': 'Geteilten Google Maps Listen-Link einfügen, um alle Orte zu importieren.',
'places.googleDirHint': 'Ein Routen-Link geht auch: seine Stopps werden zu Orten, in Fahrreihenfolge.',
'places.googleListImported': '{count} Orte aus "{list}" importiert',
'places.googleListError': 'Google Maps Liste konnte nicht importiert werden',
'places.naverListHint': 'Geteilten Naver Maps Listen-Link einfügen, um alle Orte zu importieren.',
+1
View File
@@ -34,6 +34,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Google List',
'places.importNaverList': 'Naver List',
'places.googleListHint': 'Paste a shared Google Maps list link to import all places.',
'places.googleDirHint': 'A directions link works too: its stops become places, in driving order.',
'places.googleListImported': '{count} places imported from "{list}"',
'places.googleListError': 'Failed to import Google Maps list',
'places.naverListHint': 'Paste a shared Naver Maps list link to import all places.',
+1
View File
@@ -34,6 +34,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Lista Google',
'places.importNaverList': 'Lista Naver',
'places.googleListHint': 'Pega un enlace compartido de una lista de Google Maps para importar todos los lugares.',
'places.googleDirHint': 'Un enlace de indicaciones también sirve: sus paradas se convierten en lugares, en orden de conducción.',
'places.googleListImported': '{count} lugares importados de "{list}"',
'places.googleListError': 'Error al importar la lista de Google Maps',
'places.naverListHint': 'Pega un enlace compartido de una lista de Naver Maps para importar todos los lugares.',
+1
View File
@@ -34,6 +34,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Liste Google',
'places.importNaverList': 'Liste Naver',
'places.googleListHint': 'Collez un lien de liste Google Maps partagée pour importer tous les lieux.',
'places.googleDirHint': 'Un lien d’itinéraire fonctionne aussi : ses étapes deviennent des lieux, dans l’ordre du trajet.',
'places.googleListImported': '{count} lieux importés depuis "{list}"',
'places.googleListError': "Impossible d'importer la liste Google Maps",
'places.naverListHint': 'Collez un lien de liste Naver Maps partagée pour importer tous les lieux.',
+1
View File
@@ -34,6 +34,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Λίστα Google',
'places.importNaverList': 'Λίστα Naver',
'places.googleListHint': 'Επικολλήστε έναν κοινοποιημένο σύνδεσμο λίστας Google Maps για να εισάγετε όλα τα μέρη.',
'places.googleDirHint': 'Λειτουργεί και ένας σύνδεσμος διαδρομής: οι στάσεις του γίνονται τοποθεσίες, με τη σειρά οδήγησης.',
'places.googleListImported': '{count} μέρη εισήχθησαν από "{list}"',
'places.googleListError': 'Αποτυχία εισαγωγής λίστας Google Maps',
'places.naverListHint': 'Επικολλήστε έναν κοινοποιημένο σύνδεσμο λίστας Naver Maps για να εισάγετε όλα τα μέρη.',
+1
View File
@@ -34,6 +34,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Google Lista',
'places.importNaverList': 'Naver Lista',
'places.googleListHint': 'Illessz be egy megosztott Google Maps lista linket az osszes hely importalasahoz.',
'places.googleDirHint': 'Egy útvonal-hivatkozás is jó: megállói helyekké válnak, haladási sorrendben.',
'places.googleListImported': '{count} hely importalva a(z) "{list}" listabol',
'places.googleListError': 'Google Maps lista importalasa sikertelen',
'places.naverListHint': 'Illessz be egy megosztott Naver Maps lista linket az összes hely importálásához.',
+1
View File
@@ -33,6 +33,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Daftar Google',
'places.importNaverList': 'Daftar Naver',
'places.googleListHint': 'Tempel tautan daftar Google Maps yang dibagikan untuk mengimpor semua tempat.',
'places.googleDirHint': 'Tautan rute juga bisa: perhentiannya menjadi tempat, sesuai urutan berkendara.',
'places.googleListImported': '{count} tempat diimpor dari "{list}"',
'places.googleListError': 'Gagal mengimpor daftar Google Maps',
'places.naverListHint': 'Tempel tautan daftar Naver Maps yang dibagikan untuk mengimpor semua tempat.',
+1
View File
@@ -34,6 +34,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Lista Google',
'places.importNaverList': 'Lista Naver',
'places.googleListHint': 'Incolla un link condiviso di una lista Google Maps per importare tutti i luoghi.',
'places.googleDirHint': 'Funziona anche un link di indicazioni: le sue tappe diventano luoghi, nell’ordine di guida.',
'places.googleListImported': '{count} luoghi importati da "{list}"',
'places.googleListError': 'Importazione lista Google Maps non riuscita',
'places.naverListHint': 'Incolla un link condiviso di una lista Naver Maps per importare tutti i luoghi.',
+1
View File
@@ -34,6 +34,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Google リスト',
'places.importNaverList': 'Naver リスト',
'places.googleListHint': '共有されたGoogleマップのリストリンクを貼り付けてください。',
'places.googleDirHint': 'ルートのリンクでも構いません。立ち寄り地が走行順に場所として取り込まれます。',
'places.googleListImported': '「{list}」から {count} 件の場所をインポートしました',
'places.googleListError': 'Googleマップのリストをインポートできませんでした',
'places.naverListHint': '共有されたNaverマップのリストリンクを貼り付けてください。',
+1
View File
@@ -33,6 +33,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Google 목록',
'places.importNaverList': '네이버 목록',
'places.googleListHint': '공유된 Google Maps 목록 링크를 붙여넣어 모든 장소를 가져옵니다.',
'places.googleDirHint': '길찾기 링크도 됩니다. 그 정차지가 주행 순서대로 장소가 됩니다.',
'places.googleListImported': '"{list}"에서 {count}개 장소를 가져왔습니다',
'places.googleListError': 'Google Maps 목록 가져오기 실패',
'places.naverListHint': '공유된 네이버 지도 목록 링크를 붙여넣어 모든 장소를 가져옵니다.',
+1
View File
@@ -34,6 +34,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Google Lijst',
'places.importNaverList': 'Naver Lijst',
'places.googleListHint': 'Plak een gedeelde Google Maps lijstlink om alle plaatsen te importeren.',
'places.googleDirHint': 'Een routelink werkt ook: de stops worden plaatsen, in rijvolgorde.',
'places.googleListImported': '{count} plaatsen geimporteerd uit "{list}"',
'places.googleListError': 'Google Maps lijst importeren mislukt',
'places.naverListHint': 'Plak een gedeelde Naver Maps lijstlink om alle plaatsen te importeren.',
+1
View File
@@ -114,6 +114,7 @@ const places: TranslationStrings = {
'places.importNaverList': 'Lista Naver',
'places.importList': 'Import listy',
'places.googleListHint': 'Wklej link do listy Google Maps.',
'places.googleDirHint': 'Link z trasą też zadziała: jego przystanki staną się miejscami, w kolejności jazdy.',
'places.googleListImported': 'Zaimportowano {count} miejsc z „{list}”',
'places.googleListError': 'Nie udało się zaimportować listy',
'places.naverListHint': 'Wklej link do udostępnionej listy Naver Maps, aby zaimportować wszystkie miejsca.',
+1
View File
@@ -34,6 +34,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Список Google',
'places.importNaverList': 'Список Naver',
'places.googleListHint': 'Вставьте ссылку на общий список Google Maps для импорта всех мест.',
'places.googleDirHint': 'Ссылка на маршрут тоже подойдёт: его остановки станут местами, в порядке движения.',
'places.googleListImported': '{count} мест импортировано из "{list}"',
'places.googleListError': 'Не удалось импортировать список Google Maps',
'places.naverListHint': 'Вставьте ссылку на общий список Naver Maps для импорта всех мест.',
+1
View File
@@ -34,6 +34,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Google-lista',
'places.importNaverList': 'Naver-lista',
'places.googleListHint': 'Klistra in en länk till en delad lista i Google Maps för att importera alla platser.',
'places.googleDirHint': 'En vägbeskrivningslänk fungerar också: dess stopp blir platser, i körordning.',
'places.googleListImported': '{count} platser som importerats från "{list}"',
'places.googleListError': 'Det gick inte att importera listan från Google Maps',
'places.naverListHint': 'Klistra in en länk till en delad lista på Naver Maps för att importera alla platser.',
+1
View File
@@ -35,6 +35,7 @@ const places: TranslationStrings = {
'places.importNaverList': 'Naver Listesi',
'places.googleListHint':
'Tüm yerleri içe aktarmak için paylaşılan bir Google Haritalar listesi bağlantısını yapıştırın.',
'places.googleDirHint': 'Yol tarifi bağlantısı da olur: durakları, sürüş sırasına göre yerlere dönüşür.',
'places.googleListImported': '"{list}"ten {count} yer içe aktarıldı',
'places.googleListError': 'Google Haritalar listesi içe aktarılamadı',
'places.naverListHint':
+1
View File
@@ -34,6 +34,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Список Google',
'places.importNaverList': 'Список Naver',
'places.googleListHint': 'Вставте посилання на спільний список Google Maps для імпорту всіх місць.',
'places.googleDirHint': 'Посилання на маршрут теж підійде: його зупинки стануть місцями, у порядку руху.',
'places.googleListImported': '{count} місць імпортовано з "{list}"',
'places.googleListError': 'Не вдалося імпортувати список Google Maps',
'places.naverListHint': 'Вставте посилання на спільний список Naver Maps для імпорту всіх місць.',
+1
View File
@@ -34,6 +34,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Danh sách Google',
'places.importNaverList': 'Danh sách Naver',
'places.googleListHint': 'Dán liên kết danh sách Google Maps được chia sẻ để nhập tất cả các địa điểm.',
'places.googleDirHint': 'Liên kết chỉ đường cũng được: các điểm dừng của nó trở thành địa điểm, theo thứ tự lái xe.',
'places.googleListImported': '{count} địa điểm được nhập từ "{list}"',
'places.googleListError': 'Không thể nhập danh sách Google Maps',
'places.naverListHint': 'Dán liên kết danh sách Naver Maps được chia sẻ để nhập tất cả các địa điểm.',
+1
View File
@@ -33,6 +33,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Google 列表',
'places.importNaverList': 'Naver 列表',
'places.googleListHint': '貼上共享的 Google Maps 列表連結以匯入所有地點。',
'places.googleDirHint': '路線連結也可以:它的途經點會依行駛順序變成地點。',
'places.googleListImported': '已從"{list}"匯入 {count} 個地點',
'places.googleListError': 'Google Maps 列表匯入失敗',
'places.naverListHint': '貼上共享的 Naver Maps 列表連結以匯入所有地點。',
+1
View File
@@ -33,6 +33,7 @@ const places: TranslationStrings = {
'places.importGoogleList': 'Google 列表',
'places.importNaverList': 'Naver 列表',
'places.googleListHint': '粘贴共享的 Google Maps 列表链接以导入所有地点。',
'places.googleDirHint': '路线链接也可以:它的途经点会按行驶顺序变成地点。',
'places.googleListImported': '已从"{list}"导入 {count} 个地点',
'places.googleListError': 'Google Maps 列表导入失败',
'places.naverListHint': '粘贴共享的 Naver Maps 列表链接以导入所有地点。',