Skip to content

armgit / TREK

Public Imported from GitHub
0

The most complete open-source travel planner: real-time collaboration, bookings, budgets, packing lists, journals, offline PWA, SSO and an AI-ready MCP server, with planet-wide place search and routing built in.

feat(export): places as KML for Google My Maps (#1866)

Maurice3e98938c957e
diff --git a/client/src/api/collections.test.ts b/client/src/api/collections.test.ts
index 65ca3e974..c0796d3e0 100644
--- a/client/src/api/collections.test.ts
+++ b/client/src/api/collections.test.ts
@@ -1,4 +1,4 @@
-// FE-API-COLLECTIONS-001 to FE-API-COLLECTIONS-034
+// FE-API-COLLECTIONS-001 to FE-API-COLLECTIONS-035
//
// The Collections addon wrapper is thin, but every method encodes a URL, a verb and a
// request-body shape that the server contract depends on. These tests drive each method
@@ -352,6 +352,15 @@ describe('collectionsApi', () => {
expect(res).toEqual({ name: 'Tokyo', gpx: '<gpx/>', waypoints: 0, omitted: 2 })
})
+ it('FE-API-COLLECTIONS-035: exportKml() reads the KML of a list by id (#1866)', async () => {
+ server.use(http.get(`${BASE}/:id/export/kml`, record({ name: 'Tokyo', kml: '<kml/>', pins: 1, omitted: 0 })))
+
+ const res = await collectionsApi.exportKml(1)
+
+ expect(requestUrl).toContain(`${BASE}/1/export/kml`)
+ expect(res).toEqual({ name: 'Tokyo', kml: '<kml/>', pins: 1, omitted: 0 })
+ })
+
it('FE-API-COLLECTIONS-034: readGpx() posts the document and its file name', async () => {
const file = { format: 'trek.collection', version: 1, name: 'Tokyo', places: [] }
server.use(http.post(`${BASE}/gpx/read`, record({ file, skipped: 0, track_points: 12 })))
diff --git a/client/src/api/collections.ts b/client/src/api/collections.ts
index 71f1ed8dd..bce9d0a5e 100644
--- a/client/src/api/collections.ts
+++ b/client/src/api/collections.ts
@@ -17,6 +17,7 @@ import type {
CollectionGpxExport,
CollectionGpxReadRequest,
CollectionGpxReadResult,
+ CollectionKmlExport,
CollectionPlaceUpdateRequest,
CollectionCopyToTripRequest,
CollectionInviteRequest,
@@ -75,6 +76,9 @@ export const collectionsApi = {
ax.get(`${base}/${id}/export/gpx`).then((r: AxiosResponse) => r.data),
readGpx: (body: CollectionGpxReadRequest): Promise<CollectionGpxReadResult> =>
ax.post(`${base}/gpx/read`, body satisfies CollectionGpxReadRequest).then((r: AxiosResponse) => r.data),
+ /** The same list as pins for Google My Maps (#1866). */
+ exportKml: (id: number): Promise<CollectionKmlExport> =>
+ ax.get(`${base}/${id}/export/kml`).then((r: AxiosResponse) => r.data),
// Both answer with the bare collection, not a { collection } envelope — the
// controller returns the service's `Collection` straight through, and the e2e
// suite pins that shape. Declaring the envelope made createCollection() resolve
diff --git a/client/src/components/Collections/CollectionExportMenu.test.tsx b/client/src/components/Collections/CollectionExportMenu.test.tsx
index d3d8f621b..697526d55 100644
--- a/client/src/components/Collections/CollectionExportMenu.test.tsx
+++ b/client/src/components/Collections/CollectionExportMenu.test.tsx
@@ -1,4 +1,4 @@
-// FE-COMP-COLEXPORT-001 to FE-COMP-COLEXPORT-008
+// FE-COMP-COLEXPORT-001 to FE-COMP-COLEXPORT-009
import React from 'react';
import { render, screen, waitFor } from '../../../tests/helpers/render';
import userEvent from '@testing-library/user-event';
@@ -34,7 +34,7 @@ describe('CollectionExportMenu (#2301)', () => {
expect(screen.queryByRole('menu')).toBeNull();
});
- it('FE-COMP-COLEXPORT-002: offers both formats, each with its extension and what it is for', async () => {
+ it('FE-COMP-COLEXPORT-002: offers every format, each with its extension and what it is for', async () => {
renderMenu();
await userEvent.click(trigger());
@@ -44,9 +44,19 @@ describe('CollectionExportMenu (#2301)', () => {
expect(items().map(item => item.textContent)).toEqual([
'TREK list.trekcollection.jsonFor another TREK, with labels and status',
'GPX.gpxWaypoints for OsmAnd, Organic Maps, Garmin and other map apps',
+ 'KML.kmlPins for Google My Maps, to see the places in Google Maps',
]);
});
+ it('FE-COMP-COLEXPORT-009: exports the places as KML for Google My Maps (#1866)', async () => {
+ const props = renderMenu();
+ await userEvent.click(trigger());
+
+ await userEvent.click(screen.getByRole('menuitem', { name: /KML/ }));
+
+ expect(props.onExport).toHaveBeenCalledWith('kml');
+ });
+
it('FE-COMP-COLEXPORT-003: exports the picked format, closes and gives focus back', async () => {
const props = renderMenu();
await userEvent.click(trigger());
@@ -65,15 +75,17 @@ describe('CollectionExportMenu (#2301)', () => {
await userEvent.keyboard('{ArrowDown}');
expect(items()[1]).toHaveFocus();
+ await userEvent.keyboard('{ArrowDown}');
+ expect(items()[2]).toHaveFocus();
// Past the end wraps round, as it does in every menu.
await userEvent.keyboard('{ArrowDown}');
expect(items()[0]).toHaveFocus();
await userEvent.keyboard('{ArrowUp}');
- expect(items()[1]).toHaveFocus();
+ expect(items()[2]).toHaveFocus();
await userEvent.keyboard('{Home}');
expect(items()[0]).toHaveFocus();
await userEvent.keyboard('{End}');
- expect(items()[1]).toHaveFocus();
+ expect(items()[2]).toHaveFocus();
});
it('FE-COMP-COLEXPORT-005: opens from the keyboard and picks with Enter', async () => {
diff --git a/client/src/components/Collections/CollectionExportMenu.tsx b/client/src/components/Collections/CollectionExportMenu.tsx
index 826ad1c09..9f10730a4 100644
--- a/client/src/components/Collections/CollectionExportMenu.tsx
+++ b/client/src/components/Collections/CollectionExportMenu.tsx
@@ -1,9 +1,11 @@
import React, { useCallback, useEffect, useId, useRef, useState } from 'react'
import { createPortal } from 'react-dom'
-import { Download, FileJson, Loader2, Route, type LucideIcon } from 'lucide-react'
+import { Download, FileJson, Loader2, MapPinned, Route, type LucideIcon } from 'lucide-react'
import type { TranslationFn } from '../../types'
import { useAnchoredPosition } from '../../hooks/useAnchoredPosition'
-import { COLLECTION_FILE_EXTENSION, COLLECTION_GPX_EXTENSION, type CollectionExportFormat } from './collectionFile'
+import {
+ COLLECTION_FILE_EXTENSION, COLLECTION_GPX_EXTENSION, COLLECTION_KML_EXTENSION, type CollectionExportFormat,
+} from './collectionFile'
interface CollectionExportMenuProps {
onExport: (format: CollectionExportFormat) => void
@@ -23,11 +25,12 @@ interface FormatOption {
const MENU_WIDTH = 300
/**
- * Export in the list hero: a menu of the two formats a list can leave in (#2301).
+ * Export in the list hero: a menu of the formats a list can leave in (#2301).
*
* The TREK file carries everything and is for another TREK; GPX carries the
- * places as waypoints and is for every other map app. Choosing is the whole
- * interaction, so it is a menu rather than a dialog.
+ * places as waypoints and is for every other map app; KML carries them as pins
+ * for Google My Maps (#1866). Choosing is the whole interaction, so it is a
+ * menu rather than a dialog.
*
* Portalled, because the hero clips its overflow, and placed against the
* trigger's right edge, where the button sits. A menu in the WAI-ARIA sense:
@@ -39,7 +42,7 @@ export default function CollectionExportMenu({ onExport, exporting, t }: Collect
const triggerRef = useRef<HTMLButtonElement>(null)
const menuRef = useRef<HTMLDivElement>(null)
const menuId = useId()
- const anchored = useAnchoredPosition(triggerRef, open, { estimatedHeight: 150, offset: 6 })
+ const anchored = useAnchoredPosition(triggerRef, open, { estimatedHeight: 220, offset: 6 })
// Focusable only once positioned: until then the menu is hidden, and a hidden
// element refuses focus.
const placed = open && anchored !== null
@@ -53,6 +56,10 @@ export default function CollectionExportMenu({ onExport, exporting, t }: Collect
format: 'gpx', icon: Route, label: 'GPX',
extension: COLLECTION_GPX_EXTENSION, hint: t('collections.file.formatGpxHint'),
},
+ {
+ format: 'kml', icon: MapPinned, label: 'KML',
+ extension: COLLECTION_KML_EXTENSION, hint: t('collections.file.formatKmlHint'),
+ },
]
const items = () => Array.from(menuRef.current?.querySelectorAll<HTMLElement>('[role="menuitem"]') ?? [])
diff --git a/client/src/components/Collections/collectionFile.test.ts b/client/src/components/Collections/collectionFile.test.ts
index 657f7232b..f5094ec0b 100644
--- a/client/src/components/Collections/collectionFile.test.ts
+++ b/client/src/components/Collections/collectionFile.test.ts
@@ -1,9 +1,10 @@
-// FE-COLL-FILE-001 to FE-COLL-FILE-020
+// FE-COLL-FILE-001 to FE-COLL-FILE-021
import { describe, it, expect, vi, afterEach } from 'vitest'
import {
collectionFileName,
downloadCollectionFile,
downloadCollectionGpx,
+ downloadCollectionKml,
readCollectionFile,
COLLECTION_FILE_EXTENSION,
COLLECTION_GPX_EXTENSION,
@@ -90,6 +91,16 @@ describe('downloads', () => {
expect(created[0].type).toBe('application/gpx+xml')
expect(await created[0].text()).toBe('<gpx/>')
})
+
+ it('FE-COLL-FILE-021: hands the browser a KML for Google My Maps under the list name (#1866)', async () => {
+ const { created, names } = captureDownload()
+
+ downloadCollectionKml('Lisbon', '<kml/>')
+
+ expect(names).toEqual(['lisbon.kml'])
+ expect(created[0].type).toBe('application/vnd.google-earth.kml+xml')
+ expect(await created[0].text()).toBe('<kml/>')
+ })
})
describe('readCollectionFile', () => {
diff --git a/client/src/components/Collections/collectionFile.ts b/client/src/components/Collections/collectionFile.ts
index b0b6487c9..a7a45b12d 100644
--- a/client/src/components/Collections/collectionFile.ts
+++ b/client/src/components/Collections/collectionFile.ts
@@ -27,9 +27,13 @@ import { downloadBlob } from '../../utils/fileDownload'
export const COLLECTION_FILE_EXTENSION = '.trekcollection.json'
export const COLLECTION_GPX_EXTENSION = '.gpx'
+export const COLLECTION_KML_EXTENSION = '.kml'
-/** The two ways a list can leave: whole, for another TREK, or as waypoints for everything else. */
-export type CollectionExportFormat = 'trek' | 'gpx'
+/**
+ * The ways a list can leave: whole, for another TREK, as waypoints for every
+ * other map app, or as pins for Google My Maps (#1866).
+ */
+export type CollectionExportFormat = 'trek' | 'gpx' | 'kml'
/** A file name from a list name: lowercase, ascii-ish, short. */
export function collectionFileName(name: string, extension = COLLECTION_FILE_EXTENSION): string {
@@ -51,6 +55,11 @@ export function downloadCollectionGpx(listName: string, gpx: string): void {
download(gpx, 'application/gpx+xml', collectionFileName(listName, COLLECTION_GPX_EXTENSION))
}
+/** Hand a list's KML to the browser as a download, named the same way. */
+export function downloadCollectionKml(listName: string, kml: string): void {
+ download(kml, 'application/vnd.google-earth.kml+xml', collectionFileName(listName, COLLECTION_KML_EXTENSION))
+}
+
export type CollectionFileError = 'not-a-collection' | CollectionGpxProblem
/** What a GPX held that did not become a place. */
diff --git a/client/src/components/Planner/TripExportModal.test.tsx b/client/src/components/Planner/TripExportModal.test.tsx
index d03186c3b..986a29876 100644
--- a/client/src/components/Planner/TripExportModal.test.tsx
+++ b/client/src/components/Planner/TripExportModal.test.tsx
@@ -1,4 +1,4 @@
-// FE-PLANNER-EXPORTMODAL-001 to FE-PLANNER-EXPORTMODAL-020
+// FE-PLANNER-EXPORTMODAL-001 to FE-PLANNER-EXPORTMODAL-021
import { act, render, screen, waitFor } from '../../../tests/helpers/render'
import userEvent from '@testing-library/user-event'
import { downloadTripPDF } from '../PDF/TripPDF'
@@ -246,6 +246,22 @@ describe('TripExportModal', () => {
}
})
+ // ── KML for Google My Maps (#1866) ───────────────────────────────────────
+ it('FE-PLANNER-EXPORTMODAL-021: the places go out as KML in a section of their own, named after the trip', async () => {
+ const user = userEvent.setup()
+ const fetchMock = vi.fn(async () => okResponse('<kml/>'))
+ vi.stubGlobal('fetch', fetchMock)
+ const onClose = vi.fn()
+ render(<TripExportModal {...makeProps({ onClose })} />)
+ expect(screen.getByText('dayplan.exportGoogleMaps')).toBeInTheDocument()
+ expect(screen.getByText('KML')).toBeInTheDocument()
+ expect(screen.getByText('dayplan.kmlHint')).toBeInTheDocument()
+
+ await user.click(screen.getByText('dayplan.kmlPlaces'))
+ await waitFor(() => expect(fetchMock).toHaveBeenCalledWith('/api/trips/1/places/export.kml', { credentials: 'include' }))
+ await waitFor(() => expect(onClose).toHaveBeenCalled())
+ })
+
it('FE-PLANNER-EXPORTMODAL-012: a download names the file after the trip', async () => {
const user = userEvent.setup()
vi.stubGlobal('fetch', vi.fn(async () => okResponse()))
diff --git a/client/src/components/Planner/TripExportModal.tsx b/client/src/components/Planner/TripExportModal.tsx
index 15c5d3bb2..10862a06a 100644
--- a/client/src/components/Planner/TripExportModal.tsx
+++ b/client/src/components/Planner/TripExportModal.tsx
@@ -1,5 +1,5 @@
import { useId, useState } from 'react'
-import { CalendarDays, CalendarPlus, ChevronRight, Download, FileText, Loader2, MapPin, Route as RouteIcon, UserRound } from 'lucide-react'
+import { CalendarDays, CalendarPlus, ChevronRight, Download, FileText, Loader2, MapPin, MapPinned, Route as RouteIcon, UserRound } from 'lucide-react'
import type { LucideIcon } from 'lucide-react'
import { DialogHeader, DialogSection, DialogShell, DialogTile, NEUTRAL_TINT, fs } from '../shared/DialogShell'
import { IcsSubscribeModal } from './IcsSubscribeModal'
@@ -49,8 +49,9 @@ interface TripExportModalProps {
/**
* Every way a trip leaves TREK, in one dialog: the day plan as a PDF, the
- * bookings as a calendar (a one-off .ics or a live subscription) and the map
- * data as GPX in the three scopes a device actually wants.
+ * bookings as a calendar (a one-off .ics or a live subscription), the map
+ * data as GPX in the three scopes a device actually wants, and the places as
+ * KML for Google My Maps.
*
* It replaces three separate toolbar buttons, two of which opened hover menus of
* their own. On a narrow sidebar that row simply ran out of width and the
@@ -64,6 +65,7 @@ export function TripExportModal({
const titleId = useId()
const {
fileBase, offerMine, isRunning, anyRunning, exportPdf, pdfRouting, pdfRoutingLabel, skipPdfRouting, downloadIcs, downloadGpx,
+ downloadKml,
} = useTripExport({
tripId,
open: isOpen,
@@ -167,6 +169,19 @@ export function TripExportModal({
))}
</div>
</DialogSection>
+
+ {/* Google Maps keeps no list from outside, but My Maps takes the places
+ as a KML layer (#1866); the format pill as for GPX above. */}
+ <DialogSection label={<span className="inline-flex items-center gap-1.5">{t('dayplan.exportGoogleMaps')}<SoftPill caps>KML</SoftPill></span>}>
+ <ExportRow
+ icon={MapPinned}
+ title={t('dayplan.kmlPlaces')}
+ sub={t('dayplan.kmlHint')}
+ busy={isRunning('kml')}
+ disabled={anyRunning}
+ onClick={() => void downloadKml()}
+ />
+ </DialogSection>
</DialogShell>
{/* Mounted after the export dialog, so its backdrop stacks above it. */}
diff --git a/client/src/components/Planner/useTripExport.test.ts b/client/src/components/Planner/useTripExport.test.ts
index 38bcac9b2..0bce77df7 100644
--- a/client/src/components/Planner/useTripExport.test.ts
+++ b/client/src/components/Planner/useTripExport.test.ts
@@ -1,4 +1,4 @@
-// FE-PLANNER-TRIPEXPORT-001 to -013: the trip exports behind the desktop export
+// FE-PLANNER-TRIPEXPORT-001 to -014: the trip exports behind the desktop export
// dialog and the phone's export sheet.
import { act, renderHook } from '@testing-library/react';
import { afterEach, beforeEach, describe, expect, it, vi, type MockInstance } from 'vitest';
@@ -240,6 +240,24 @@ describe('useTripExport', () => {
expect(result.current.anyRunning).toBe(false);
});
+ it('FE-PLANNER-TRIPEXPORT-014: the places go out as KML for Google My Maps, an empty trip and a broken download said apart (#1866)', async () => {
+ const opts = options();
+ const { result } = renderHook(() => useTripExport(opts));
+ await act(() => result.current.downloadKml());
+ expect(fetchSpy).toHaveBeenCalledWith('/api/trips/3/places/export.kml', { credentials: 'include' });
+ expect((clickSpy.mock.contexts[0] as HTMLAnchorElement).download).toBe('Alps.kml');
+ expect(opts.onExported).toHaveBeenCalledTimes(1);
+
+ fetchSpy.mockResolvedValue(response(404));
+ await act(() => result.current.downloadKml());
+ expect(opts.toast.info).toHaveBeenCalledWith('dayplan.gpxEmpty');
+
+ fetchSpy.mockResolvedValue(response(500));
+ await act(() => result.current.downloadKml());
+ expect(opts.toast.error).toHaveBeenCalledWith('dayplan.kmlFailed');
+ expect(result.current.isRunning('kml')).toBe(false);
+ });
+
it('FE-PLANNER-TRIPEXPORT-011: the PDF routes what the planner draws, counts its legs and can print without the rest', async () => {
const pdf = deferred();
vi.mocked(downloadTripPDF).mockReturnValue(pdf.promise);
diff --git a/client/src/components/Planner/useTripExport.ts b/client/src/components/Planner/useTripExport.ts
index caa587296..4de48d9b3 100644
--- a/client/src/components/Planner/useTripExport.ts
+++ b/client/src/components/Planner/useTripExport.ts
@@ -12,8 +12,8 @@ import { hasPersonalPlan } from '../PDF/pdfScope';
type Translate = (key: string, params?: Record<string, string | number>) => string;
-/** A running export: a PDF of the plan or of my plan, the calendar file, or a GPX scope. */
-export type ExportJob = 'pdf' | 'pdf:mine' | 'ics' | `gpx:${string}`;
+/** A running export: a PDF of the plan or of my plan, the calendar file, a GPX scope, or the places as KML. */
+export type ExportJob = 'pdf' | 'pdf:mine' | 'ics' | 'kml' | `gpx:${string}`;
/** What a trip export prints, as both shells hold it. */
export interface TripExportData {
@@ -117,8 +117,8 @@ function usePdfRouting(open: boolean) {
/**
* Every way a trip leaves TREK, behind the desktop export dialog and the phone's
* export sheet: the day plan as a PDF (the whole plan, or my plan once somebody
- * has been given a part of the trip, #2168), the bookings as an .ics file and the
- * map data as GPX.
+ * has been given a part of the trip, #2168), the bookings as an .ics file, the
+ * map data as GPX and the places as KML for Google My Maps.
*/
export function useTripExport({
tripId,
@@ -215,13 +215,12 @@ export function useTripExport({
}
};
- /** One GPX scope; `query` narrows what the file carries, empty for everything. */
- const downloadGpx = async (key: string, query: string) => {
- const job: ExportJob = `gpx:${key}`;
+ /** One map file the server writes, saved as `<trip>.<extension>`; `failed` is what a broken download says. */
+ const downloadMapFile = async (job: ExportJob, path: string, extension: string, failed: string) => {
if (running[laneOf(job)]) return;
begin(job);
try {
- const res = await fetch(`/api/trips/${tripId}/places/export.gpx${query}`, { credentials: 'include' });
+ const res = await fetch(`/api/trips/${tripId}/places/${path}`, { credentials: 'include' });
// 404 here means the selection is empty, which is worth its own message:
// "nothing happened" and "the download broke" look identical otherwise.
if (res.status === 404) {
@@ -229,15 +228,22 @@ export function useTripExport({
return;
}
if (!res.ok) throw new Error();
- saveBlob(await res.blob(), `${fileBase}.gpx`);
+ saveBlob(await res.blob(), `${fileBase}.${extension}`);
onExported();
} catch {
- toast.error(t('dayplan.gpxFailed'));
+ toast.error(failed);
} finally {
end(job);
}
};
+ /** One GPX scope; `query` narrows what the file carries, empty for everything. */
+ const downloadGpx = (key: string, query: string) =>
+ downloadMapFile(`gpx:${key}`, `export.gpx${query}`, 'gpx', t('dayplan.gpxFailed'));
+
+ /** The places as pins for Google My Maps (#1866), which takes a KML file as a layer. */
+ const downloadKml = () => downloadMapFile('kml', 'export.kml', 'kml', t('dayplan.kmlFailed'));
+
return {
fileBase,
offerMine,
@@ -249,5 +255,6 @@ export function useTripExport({
skipPdfRouting: pdfRouting.skip,
downloadIcs,
downloadGpx,
+ downloadKml,
};
}
diff --git a/client/src/mobile/screens/trip/sheets/MExportSheet.tsx b/client/src/mobile/screens/trip/sheets/MExportSheet.tsx
index 986a288b3..44e51b20f 100644
--- a/client/src/mobile/screens/trip/sheets/MExportSheet.tsx
+++ b/client/src/mobile/screens/trip/sheets/MExportSheet.tsx
@@ -1,5 +1,5 @@
import { useState, type ReactNode } from 'react'
-import { CalendarPlus, ChevronRight, FileDown, Share2, UserRound } from 'lucide-react'
+import { CalendarPlus, ChevronRight, FileDown, MapPinned, Share2, UserRound } from 'lucide-react'
import MSheet from '../../../components/MSheet'
import { IcsSubscribeModal } from '../../../../components/Planner/IcsSubscribeModal'
import { useTripStore } from '../../../../store/tripStore'
@@ -12,8 +12,8 @@ import type { LucideIcon } from 'lucide-react'
/**
* Export sheet ('export', opened from the Mehr sheet): the desktop day-plan
- * toolbar's PDF export, GPX download, ICS download and calendar subscription in
- * one place. The subscription dialog is the shared IcsSubscribeModal — it owns the
+ * toolbar's PDF export, GPX download, KML for Google My Maps, ICS download and
+ * calendar subscription in one place. The subscription dialog is the shared IcsSubscribeModal — it owns the
* enable/rotate/disable token flow.
*/
export default function MExportSheet({ planner, shell }: MTripSheetsProps) {
@@ -26,7 +26,7 @@ export default function MExportSheet({ planner, shell }: MTripSheetsProps) {
// Fed the way the desktop dialog feeds it: the store's assignments, and the export
// applies the day plan's filter itself, so both shells print the same. The PDF stays
// open here; a calendar or GPX file closes the sheet.
- const { offerMine, isRunning, exportPdf, pdfRouting, pdfRoutingLabel, skipPdfRouting, downloadIcs, downloadGpx } = useTripExport({
+ const { offerMine, isRunning, exportPdf, pdfRouting, pdfRoutingLabel, skipPdfRouting, downloadIcs, downloadGpx, downloadKml } = useTripExport({
tripId: planner.tripId,
open,
data: {
@@ -105,6 +105,12 @@ export default function MExportSheet({ planner, shell }: MTripSheetsProps) {
sub={t('dayplan.gpxTooltip')}
onClick={() => void downloadGpx('all', '')}
/>
+ <ExportRow
+ icon={MapPinned}
+ title={isRunning('kml') ? t('common.loading') : t('dayplan.kmlPlaces')}
+ sub={t('dayplan.kmlHint')}
+ onClick={() => void downloadKml()}
+ />
{canManageShare && (
<ExportRow
icon={CalendarPlus}
diff --git a/client/src/pages/collections/useCollections.test.tsx b/client/src/pages/collections/useCollections.test.tsx
index 2b9d65701..3961b6b2c 100644
--- a/client/src/pages/collections/useCollections.test.tsx
+++ b/client/src/pages/collections/useCollections.test.tsx
@@ -1,4 +1,4 @@
-// FE-PAGE-COLL-001 to FE-PAGE-COLL-095
+// FE-PAGE-COLL-001 to FE-PAGE-COLL-098
// The Collections page hook. The collection store is replaced by a fixture so
// every handler/branch can be driven directly; the categories request goes
// through MSW, and the websocket module is already mocked in tests/setup.ts.
@@ -35,8 +35,9 @@ vi.mock('../../store/collectionStore', () => ({
vi.mock('../../components/Collections/collectionFile', () => ({
downloadCollectionFile: vi.fn(),
downloadCollectionGpx: vi.fn(),
+ downloadCollectionKml: vi.fn(),
}))
-import { downloadCollectionFile, downloadCollectionGpx } from '../../components/Collections/collectionFile'
+import { downloadCollectionFile, downloadCollectionGpx, downloadCollectionKml } from '../../components/Collections/collectionFile'
/** How long useCollections lets a run of collections:* events settle before it reloads. */
const WS_SETTLE_MS = 400
@@ -163,6 +164,7 @@ beforeEach(() => {
addToast.mockClear()
vi.mocked(downloadCollectionFile).mockClear()
vi.mocked(downloadCollectionGpx).mockClear()
+ vi.mocked(downloadCollectionKml).mockClear()
vi.mocked(addListener).mockClear()
vi.mocked(removeListener).mockClear()
installMatchMedia()
@@ -1200,6 +1202,52 @@ describe('useCollections — export and import as a file', () => {
})
})
+// ── The same list as KML for Google My Maps (#1866) ──────────────────────────
+
+describe('useCollections: KML (#1866)', () => {
+ const exportKml = (body: Record<string, unknown>) =>
+ server.use(http.get('/api/addons/collections/:id/export/kml', () => HttpResponse.json(body)))
+
+ it('FE-PAGE-COLL-096: downloads the KML under the list name, neither the list file nor a GPX', async () => {
+ exportKml({ name: 'Lisbon', kml: '<kml/>', pins: 2, omitted: 0 })
+ store.activeId = 11
+ const { result } = await setup()
+
+ await act(async () => { await result.current.handleExportList('kml') })
+
+ expect(downloadCollectionKml).toHaveBeenCalledWith('Lisbon', '<kml/>')
+ expect(downloadCollectionFile).not.toHaveBeenCalled()
+ expect(downloadCollectionGpx).not.toHaveBeenCalled()
+ expect(addToast).not.toHaveBeenCalled()
+ expect(result.current.exporting).toBe(false)
+ })
+
+ it('FE-PAGE-COLL-097: says how many places had no coordinates and stayed out', async () => {
+ exportKml({ name: 'Lisbon', kml: '<kml/>', pins: 2, omitted: 3 })
+ store.activeId = 11
+ const { result } = await setup()
+
+ await act(async () => { await result.current.handleExportList('kml') })
+
+ expect(downloadCollectionKml).toHaveBeenCalled()
+ expect(addToast).toHaveBeenCalledWith('3 places have no coordinates and were left out of the KML file', 'info', undefined)
+ })
+
+ it('FE-PAGE-COLL-098: hands over no empty KML when no place has coordinates', async () => {
+ exportKml({ name: 'Lisbon', kml: '<kml/>', pins: 0, omitted: 4 })
+ store.activeId = 11
+ const { result } = await setup()
+
+ await act(async () => { await result.current.handleExportList('kml') })
+
+ expect(downloadCollectionKml).not.toHaveBeenCalled()
+ expect(addToast).toHaveBeenCalledWith(
+ 'None of these places has coordinates, so there is nothing to put in a KML file.', 'warning', undefined,
+ )
+ expect(result.current.exporting).toBe(false)
+ })
+})
+
// ── The same list as GPX (#2301) ─────────────────────────────────────────────
describe('useCollections: GPX (#2301)', () => {
diff --git a/client/src/pages/collections/useCollections.ts b/client/src/pages/collections/useCollections.ts
index a7e3457d2..137f4413b 100644
--- a/client/src/pages/collections/useCollections.ts
+++ b/client/src/pages/collections/useCollections.ts
@@ -7,7 +7,7 @@ import { useSettingsStore } from '../../store/settingsStore'
import { useAuthStore } from '../../store/authStore'
import { useToast } from '../../components/shared/Toast'
import { collectionsApi } from '../../api/collections'
-import { downloadCollectionFile, downloadCollectionGpx, type CollectionExportFormat } from '../../components/Collections/collectionFile'
+import { downloadCollectionFile, downloadCollectionGpx, downloadCollectionKml, type CollectionExportFormat } from '../../components/Collections/collectionFile'
import { getApiErrorMessage } from '../../types'
import { canAddToCollection, canRemoveFromCollection, collectionRoleOf } from '../../utils/collectionAccess'
import { addListener, removeListener } from '../../api/websocket'
@@ -282,8 +282,8 @@ export function useCollections() {
*
* The file is fetched rather than built from what this page holds: the page
* has the places for display, the server decides what may leave the instance.
- * A GPX holds only places with coordinates, so the rest are counted and the
- * count is said; a list with none at all gets no empty file (#2301).
+ * A GPX or KML holds only places with coordinates, so the rest are counted and
+ * the count is said; a list with none at all gets no empty file (#2301, #1866).
*/
const handleExportList = useCallback(async (format: CollectionExportFormat = 'trek') => {
if (typeof activeId !== 'number') return
@@ -293,6 +293,16 @@ export function useCollections() {
downloadCollectionFile(await collectionsApi.exportFile(activeId))
return
}
+ if (format === 'kml') {
+ const kml = await collectionsApi.exportKml(activeId)
+ if (kml.pins === 0) {
+ toast.warning(t('collections.file.kmlNothing'))
+ return
+ }
+ downloadCollectionKml(kml.name, kml.kml)
+ if (kml.omitted > 0) toast.info(t('collections.file.kmlOmitted', { count: kml.omitted }))
+ return
+ }
const result = await collectionsApi.exportGpx(activeId)
if (result.waypoints === 0) {
toast.warning(t('collections.file.gpxNothing'))
diff --git a/client/tests/unit/mobile/trip/MExportSheet.test.tsx b/client/tests/unit/mobile/trip/MExportSheet.test.tsx
index 0871e364f..51cf83165 100644
--- a/client/tests/unit/mobile/trip/MExportSheet.test.tsx
+++ b/client/tests/unit/mobile/trip/MExportSheet.test.tsx
@@ -9,7 +9,7 @@ import { server } from '../../../helpers/msw/server'
import { resetAllStores, seedStore } from '../../../helpers/store'
import { act, fireEvent, render, screen, waitFor } from '../../../helpers/render'
-// FE-MOB-EXPSH-001 to FE-MOB-EXPSH-016
+// FE-MOB-EXPSH-001 to FE-MOB-EXPSH-017
// This sheet reads its copy from useTranslation(), so the assertions are English.
vi.mock('../../../../src/components/PDF/TripPDF', () => ({ downloadTripPDF: vi.fn() }))
@@ -161,6 +161,17 @@ describe('MExportSheet', () => {
await waitFor(() => expect(shell.closeSheet).toHaveBeenCalledTimes(1))
})
+ it('FE-MOB-EXPSH-017: the places go out as KML for Google My Maps, named after the trip (#1866)', async () => {
+ server.use(http.get('/api/trips/1/places/export.kml', () => HttpResponse.text('<kml/>')))
+ const { shell } = renderSheet()
+ expect(screen.getByText('A KML file to import as a layer in My Maps')).toBeInTheDocument()
+ fireEvent.click(screen.getByText('Places for Google My Maps'))
+
+ await waitFor(() => expect(clickSpy).toHaveBeenCalledTimes(1))
+ expect(clickedAnchor().download).toBe('Japan 2026.kml')
+ await waitFor(() => expect(shell.closeSheet).toHaveBeenCalledTimes(1))
+ })
+
it('FE-MOB-EXPSH-008b: a second tap while the ics request runs is ignored', async () => {
let release: () => void = () => {}
server.use(http.get('/api/trips/1/export.ics', async () => {
diff --git a/server/scripts/size-baseline.json b/server/scripts/size-baseline.json
index bc019645b..45ac169ec 100644
--- a/server/scripts/size-baseline.json
+++ b/server/scripts/size-baseline.json
@@ -8,7 +8,7 @@
"src/nest/atlas/atlas.service.ts": 1177,
"src/nest/auth/auth.service.ts": 1143,
"src/nest/budget/budget.service.ts": 1607,
- "src/nest/collections/collections.service.ts": 1426,
+ "src/nest/collections/collections.service.ts": 1414,
"src/nest/doc-sync/doc-sync.service.ts": 1060,
"src/nest/doc-sync/providers/synology-drive.client.ts": 1160,
"src/nest/journey/journey-domain.service.ts": 1659,
diff --git a/server/src/nest/collections/collections.controller.ts b/server/src/nest/collections/collections.controller.ts
index f6e8eda6a..ebe93db44 100644
--- a/server/src/nest/collections/collections.controller.ts
+++ b/server/src/nest/collections/collections.controller.ts
@@ -7,6 +7,7 @@ import { CurrentUser } from '../auth-core/current-user.decorator';
import { JwtAuthGuard } from '../auth-core/jwt-auth.guard';
import { isDemoWriteBlocked, DEMO_WRITE_ERROR } from '../common/demo-write';
import { PLACE_IMAGE_FILE_FILTER } from '../common/place-image-upload';
+import { ResponseContract } from '../common/response-contract';
import { CollectionGpxError } from '../place-import/place-import.types';
import { placeImageUrl } from '../places/place-image';
import { PlaceRatingDto } from '../places/places.dto';
@@ -55,6 +56,7 @@ import {
UseInterceptors,
} from '@nestjs/common';
import { FileInterceptor } from '@nestjs/platform-express';
+import { collectionKmlExportSchema } from '@trek/shared';
import type { Options } from 'multer';
import path from 'path';
@@ -499,6 +501,13 @@ export class CollectionsController {
return this.collections.exportCollectionGpx(user.id, Number(id));
}
+ /** The list as KML for Google My Maps (#1866), wrapped in JSON like the GPX above, for the same reasons. */
+ @Get(':id/export/kml')
+ @ResponseContract(collectionKmlExportSchema)
+ exportCollectionKml(@CurrentUser() user: User, @Param('id') id: string) {
+ return this.collections.exportCollectionKml(user.id, Number(id));
+ }
+
/**
* The same file read into a list that already exists (#2301 follow-up).
*
diff --git a/server/src/nest/collections/collections.helpers.ts b/server/src/nest/collections/collections.helpers.ts
index 021df149c..3aa4f8754 100644
--- a/server/src/nest/collections/collections.helpers.ts
+++ b/server/src/nest/collections/collections.helpers.ts
@@ -1,5 +1,5 @@
-import type { CollectionPlacePosition } from '../../db/repositories/Collections.repository';
-import type { CollectionLink, CollectionPlaceUpdateRequest } from '@trek/shared';
+import type { CollectionPlacePosition, CollectionPlaceRow } from '../../db/repositories/Collections.repository';
+import type { CollectionFilePlace, CollectionLink, CollectionPlaceUpdateRequest, CollectionStatus } from '@trek/shared';
import { z } from 'zod';
@@ -24,6 +24,36 @@ export function serializeLinks(links: CollectionLink[] | undefined): string | nu
return links && links.length ? JSON.stringify(links) : null;
}
+/**
+ * A saved place as the list file carries it (#2198), and with it every export
+ * written from that file (GPX, KML): no ids, the category by name, the labels
+ * by the names given.
+ */
+export function filePlaceOf(row: CollectionPlaceRow, labels: string[]): CollectionFilePlace {
+ return {
+ name: row.name,
+ description: row.description ?? null,
+ lat: row.lat ?? null,
+ lng: row.lng ?? null,
+ address: row.address ?? null,
+ notes: row.notes ?? null,
+ price: row.price ?? null,
+ currency: row.currency ?? null,
+ website: row.website ?? null,
+ phone: row.phone ?? null,
+ // Only an absolute https URL survives: a /uploads path resolves on this
+ // server, not the reader's. See the note in the file contract.
+ image_url: typeof row.image_url === 'string' && /^https:\/\//i.test(row.image_url) ? row.image_url : null,
+ google_place_id: row.google_place_id ?? null,
+ google_ftid: row.google_ftid ?? null,
+ osm_id: row.osm_id ?? null,
+ status: row.status as CollectionStatus,
+ links: parseLinks((row as { links?: unknown }).links),
+ category: row.category_name ?? null,
+ labels,
+ };
+}
+
/** The provider ids, contact and price columns of a saved place, as an update writes them. */
type ListingWrite = Partial<{
google_place_id: string | null;
diff --git a/server/src/nest/collections/collections.service.ts b/server/src/nest/collections/collections.service.ts
index c2ccb5108..27911e796 100644
--- a/server/src/nest/collections/collections.service.ts
+++ b/server/src/nest/collections/collections.service.ts
@@ -52,6 +52,7 @@ import {
type CollectionImportIntoRequest,
type CollectionImportResult,
type CollectionGpxExport,
+ type CollectionKmlExport,
type CollectionGpxReadRequest,
type CollectionGpxReadResult,
} from '@trek/shared';
@@ -75,7 +76,7 @@ import type {
import { NotificationsService } from '../notifications/notifications.service';
import { PlaceImportService, type ExportedCollectionFile } from '../place-import/place-import.service';
import { UnitOfWork } from '../database/unit-of-work';
-import { listingWriteOf, parseLinks, serializeLinks } from './collections.helpers';
+import { filePlaceOf, listingWriteOf, parseLinks, serializeLinks } from './collections.helpers';
// Errors: a DomainError carrying a status; TrekExceptionFilter maps it to that code with an `{ error }` body.
@@ -331,28 +332,9 @@ export class CollectionsService {
const rows = await this.collectionsRepo.listPlaceRows(id);
const labelIdsByPlace = await this.loadLabelIdsByPlaceIds(rows.map(r => r.id));
- const places: CollectionFilePlace[] = rows.map(row => ({
- name: row.name,
- description: row.description ?? null,
- lat: row.lat ?? null,
- lng: row.lng ?? null,
- address: row.address ?? null,
- notes: row.notes ?? null,
- price: row.price ?? null,
- currency: row.currency ?? null,
- website: row.website ?? null,
- phone: row.phone ?? null,
- // Only an absolute https URL survives: a /uploads path resolves on this
- // server, not the reader's. See the note in the file contract.
- image_url: typeof row.image_url === 'string' && /^https:\/\//i.test(row.image_url) ? row.image_url : null,
- google_place_id: row.google_place_id ?? null,
- google_ftid: row.google_ftid ?? null,
- osm_id: row.osm_id ?? null,
- status: row.status as CollectionStatus,
- links: parseLinks((row as { links?: unknown }).links),
- category: row.category_name ?? null,
- labels: (labelIdsByPlace[row.id] || []).map(lid => labelNameById.get(lid)).filter((n): n is string => !!n),
- }));
+ const places: CollectionFilePlace[] = rows.map(row =>
+ filePlaceOf(row, (labelIdsByPlace[row.id] || []).map(lid => labelNameById.get(lid)).filter((n): n is string => !!n)),
+ );
return {
format: COLLECTION_FILE_FORMAT,
@@ -376,6 +358,11 @@ export class CollectionsService {
return this.placeImport.writeCollectionGpx(await this.exportCollection(userId, id));
}
+ /** The list as KML for Google My Maps (#1866), written from that same file for the same reasons. */
+ async exportCollectionKml(userId: number, id: number): Promise<CollectionKmlExport> {
+ return this.placeImport.writeCollectionKml(await this.exportCollection(userId, id));
+ }
+
/**
* A GPX document read (by place-import) into the list file it amounts to. Touches no table: the file
* goes back to the browser to be shown, and comes back through importCollection like any other, so
diff --git a/server/src/nest/place-import/kml.codec.ts b/server/src/nest/place-import/kml.codec.ts
index 12ecda349..3b61b30e9 100644
--- a/server/src/nest/place-import/kml.codec.ts
+++ b/server/src/nest/place-import/kml.codec.ts
@@ -1,5 +1,5 @@
/**
- * KML and KMZ in: the one place the XML library is configured for KML.
+ * KML and KMZ in, KML out: the one place the XML library is configured for KML.
*
* A KMZ is unpacked to its KML (doc.kml preferred, the decompressed size
* capped), the bytes are decoded as UTF-8 (loosely, with a warning, when they
@@ -12,8 +12,13 @@
* The Tours import reads the same document for its lines instead (IO-02):
* every LineString and gx:Track, also inside a MultiGeometry or gx:MultiTrack,
* as a line of its own, and a count of what it leaves out.
+ *
+ * Writing (#1866) is the other way round and only pins: places for Google My
+ * Maps, which takes a KML file as a layer, the one way to get a list of places
+ * into Google Maps without an API that writes its lists.
*/
import { stripHtmlTags } from '../common/stripHtmlTags';
+import { coord } from './gpx.codec';
import {
KmlReadError,
type KmlDocumentRead,
@@ -24,7 +29,7 @@ import {
type ParsedKmlPlacemark,
} from './place-import.types';
-import { XMLParser, XMLValidator } from 'fast-xml-parser';
+import { XMLBuilder, XMLParser, XMLValidator } from 'fast-xml-parser';
import unzipper, { type File as ZipEntry } from 'unzipper';
import { TextDecoder } from 'util';
@@ -425,3 +430,56 @@ export async function unpackKmzToKml(
throw new KmlReadError('archive_invalid', 'Invalid KMZ archive.');
}
}
+
+// ---------------------------------------------------------------------------
+// Writing (#1866)
+// ---------------------------------------------------------------------------
+
+const KML_NAMESPACE = 'http://www.opengis.net/kml/2.2';
+
+const kmlBuilder = new XMLBuilder({
+ ignoreAttributes: false,
+ attributeNamePrefix: '@_',
+ format: true,
+ indentBy: ' ',
+ suppressEmptyNode: true,
+});
+
+/** One pin as the export writes it. Text goes in as given: the caller has made it XML text (xml-text.ts). */
+export interface KmlPinOut {
+ name: string;
+ lat: number;
+ lng: number;
+ address?: string;
+ phone?: string;
+ description?: string;
+ /** Named values, which Google My Maps shows as the columns of the layer's table. */
+ data?: Array<{ name: string; value: string }>;
+}
+
+/**
+ * A KML 2.2 document of pins, each Placemark's elements in the order the
+ * schema gives them (name, address, phoneNumber, description, ExtendedData,
+ * then the Point), its coordinates longitude first as KML has them.
+ */
+export function writeKmlPins(documentName: string, pins: KmlPinOut[]): string {
+ return kmlBuilder.build({
+ '?xml': { '@_version': '1.0', '@_encoding': 'UTF-8' },
+ kml: {
+ '@_xmlns': KML_NAMESPACE,
+ Document: {
+ name: documentName,
+ Placemark: pins.map((pin) => ({
+ name: pin.name,
+ address: pin.address,
+ phoneNumber: pin.phone,
+ description: pin.description,
+ ExtendedData: pin.data?.length
+ ? { Data: pin.data.map((entry) => ({ '@_name': entry.name, value: entry.value })) }
+ : undefined,
+ Point: { coordinates: `${coord(pin.lng)},${coord(pin.lat)}` },
+ })),
+ },
+ },
+ });
+}
diff --git a/server/src/nest/place-import/place-import.module.ts b/server/src/nest/place-import/place-import.module.ts
index 56d80f67e..a8407d278 100644
--- a/server/src/nest/place-import/place-import.module.ts
+++ b/server/src/nest/place-import/place-import.module.ts
@@ -10,7 +10,7 @@ import { Module } from '@nestjs/common';
/**
* Place import (leaf module): reads places out of GPX, KML/KMZ, Google lists,
- * Google directions links and Naver lists, and writes GPX. No controller, no
+ * Google directions links and Naver lists, and writes GPX and KML. No controller, no
* table of its own: PlacesModule, CollectionsModule and ToursModule import it
* and persist what it reads. It imports no other
* domain: the stops of a directions link that carry only a name are geocoded
diff --git a/server/src/nest/place-import/place-import.service.ts b/server/src/nest/place-import/place-import.service.ts
index 525928a2f..05e099461 100644
--- a/server/src/nest/place-import/place-import.service.ts
+++ b/server/src/nest/place-import/place-import.service.ts
@@ -15,11 +15,17 @@ import { CollectionGpxProvider, type ExportedCollectionFile } from './providers/
import { GoogleDirectionsProvider } from './providers/google-directions.provider';
import { GoogleListProvider } from './providers/google-list.provider';
import { GoogleMapsShortLinkProvider } from './providers/google-maps-short-link.provider';
-import { GpxProvider, type GpxExportInput, type GpxExportOptions, type GpxTourExport } from './providers/gpx.provider';
+import {
+ GpxProvider,
+ type GpxExportInput,
+ type GpxExportOptions,
+ type GpxExportPlace,
+ type GpxTourExport,
+} from './providers/gpx.provider';
import { KmlProvider } from './providers/kml.provider';
import { NaverListProvider } from './providers/naver-list.provider';
import { Injectable } from '@nestjs/common';
-import type { CollectionGpxExport, CollectionGpxReadResult } from '@trek/shared';
+import type { CollectionGpxExport, CollectionGpxReadResult, CollectionKmlExport } from '@trek/shared';
// The directions-link reading is also what the road trip planner reads a
// shared route with, what the import routes dispatch on, and what the city
@@ -41,7 +47,7 @@ export type Geocoder = (query: string) => Promise<{ lat: number; lng: number } |
/**
* Places out of files and shared lists: the one layer that reads GPX, KML/KMZ,
- * Google lists, Google directions links and Naver lists, and writes GPX.
+ * Google lists, Google directions links and Naver lists, and writes GPX and KML.
*
* One provider per source behind it, over one GPX codec and one KML codec.
* Nothing here persists: a trip import (PlacesService), the Tours import
@@ -116,6 +122,20 @@ export class PlaceImportService {
return this.kml.readTracks(fileBuffer, filename);
}
+ /** A trip's places as KML pins for Google My Maps (#1866), or null when none has coordinates. */
+ writeTripKml(tripTitle: string, places: GpxExportPlace[]): string | null {
+ return this.kml.writeTrip(tripTitle, places);
+ }
+
+ tripKmlFilename(tripTitle: string): string {
+ return this.kml.tripFilename(tripTitle);
+ }
+
+ /** A list file as KML pins for Google My Maps (#1866). */
+ writeCollectionKml(file: ExportedCollectionFile): CollectionKmlExport {
+ return this.kml.writeCollection(file);
+ }
+
// ── Shared lists ───────────────────────────────────────────────────────────
/** A Google Maps list, or the directions link a short link turned out to be. */
diff --git a/server/src/nest/place-import/providers/collection-gpx.provider.ts b/server/src/nest/place-import/providers/collection-gpx.provider.ts
index db4375bf4..b80c0d75a 100644
--- a/server/src/nest/place-import/providers/collection-gpx.provider.ts
+++ b/server/src/nest/place-import/providers/collection-gpx.provider.ts
@@ -1,5 +1,6 @@
import { coord, gpxTextParser, writeGpx } from '../gpx.codec';
import { CollectionGpxError } from '../place-import.types';
+import { textOf, xmlText } from '../xml-text';
import { Injectable } from '@nestjs/common';
import {
COLLECTION_FILE_FORMAT,
@@ -59,21 +60,6 @@ const SCALAR_EXTENSIONS = (Object.keys(COLLECTION_GPX_PLACE_FIELDS) as (keyof Co
// Writing
// ---------------------------------------------------------------------------
-/**
- * Text XML 1.0 can hold. The builder escapes markup but passes through the
- * control characters the spec forbids outright, and one of those in a place
- * name is enough for a strict reader to refuse the whole file.
- */
-function xmlText(value: string): string {
- return value.replace(/[\p{Cc}\p{Cs}\uFFFE\uFFFF]/gu, (ch) => (ch === '\t' || ch === '\n' || ch === '\r' ? ch : ''));
-}
-
-/** A value as element text, or nothing, since an empty element is noise to every reader. */
-function textOf(value: string | number | null | undefined): string | undefined {
- if (value === null || value === undefined) return undefined;
- return xmlText(String(value)).trim() || undefined;
-}
-
/**
* `<desc>` is what other apps show under the name, so it gets the place's
* description and, on a line of its own after it, the address: GPX has no
diff --git a/server/src/nest/place-import/providers/gpx.provider.ts b/server/src/nest/place-import/providers/gpx.provider.ts
index 07840d455..a7fa22150 100644
--- a/server/src/nest/place-import/providers/gpx.provider.ts
+++ b/server/src/nest/place-import/providers/gpx.provider.ts
@@ -196,9 +196,10 @@ export function buildTourGpx(tour: GpxTourExport): string | null {
* folded away rather than escaped. Header safety is contentDisposition()'s
* job since #2165, which is why the title's own script survives here —
* 沖縄 stays 沖縄 instead of being mangled into underscores. `fallback`
- * names a file whose title folds away to nothing. */
-export function gpxFilename(tripTitle: string, fallback = 'trip'): string {
- const base = tripTitle
+ * names a file whose title folds away to nothing, `extension` the format
+ * the file is in (the KML export names its files the same way, #1866). */
+export function exportFilename(title: string, extension: string, fallback = 'trip'): string {
+ const base = title
// eslint-disable-next-line no-control-regex
.replace(/[\x00-\x1f\x7f"\\/:*?<>|]+/g, ' ')
.replace(/\s+/g, ' ')
@@ -206,7 +207,11 @@ export function gpxFilename(tripTitle: string, fallback = 'trip'): string {
.replaceAll(' ', '-');
// Codepoints, not UTF-16 units: slice() would cut an emoji in half and the
// lone surrogate is exactly what URI-encoding chokes on.
- return `${[...base].slice(0, 60).join('') || fallback}.gpx`;
+ return `${[...base].slice(0, 60).join('') || fallback}.${extension}`;
+}
+
+export function gpxFilename(tripTitle: string, fallback = 'trip'): string {
+ return exportFilename(tripTitle, 'gpx', fallback);
}
/** A time written with its zone (`Z` or an offset); one without is local to an unknown clock and reads as none. */
diff --git a/server/src/nest/place-import/providers/kml.provider.ts b/server/src/nest/place-import/providers/kml.provider.ts
index 81dc7b989..cc323c188 100644
--- a/server/src/nest/place-import/providers/kml.provider.ts
+++ b/server/src/nest/place-import/providers/kml.provider.ts
@@ -6,14 +6,75 @@
* The Tours import reads the same file for its lines (IO-02): each one a row
* the GPX import's persistence takes as it takes a track, named the way a GPX
* track without a name is.
+ *
+ * Out, a trip's places or a list's become pins for Google My Maps (#1866). A
+ * list of places is what Google Maps keeps, so every place with coordinates is
+ * one pin, a place with a line included at its start; the lines themselves
+ * leave as GPX.
*/
import { createGeometryNamer } from '../geometry-names';
-import { readKmlDocument, readKmlLines, unpackKmzToKml } from '../kml.codec';
+import { readKmlDocument, readKmlLines, unpackKmzToKml, writeKmlPins, type KmlPinOut } from '../kml.codec';
import type { KmlDocumentRead, KmlTracksRead, PreparedGpxPlace } from '../place-import.types';
+import { textOf, xmlText } from '../xml-text';
+import type { ExportedCollectionFile } from './collection-gpx.provider';
+import { exportFilename, type GpxExportPlace } from './gpx.provider';
import { Injectable } from '@nestjs/common';
+import type { CollectionKmlExport } from '@trek/shared';
const extensionOf = (filename: string) => filename.toLowerCase().split('.').pop();
+/** The text under a pin's name: what the place says about itself, then the notes, each on lines of their own. */
+function pinDescription(...parts: Array<string | null | undefined>): string | undefined {
+ return textOf(
+ parts
+ .map((part) => part?.trim())
+ .filter(Boolean)
+ .join('\n\n'),
+ );
+}
+
+/** Named values as Google My Maps shows them in its table; an empty one is left out. */
+function pinData(entries: Array<[string, string | null | undefined]>): KmlPinOut['data'] {
+ return entries.flatMap(([name, value]) => {
+ const text = textOf(value);
+ return text ? [{ name, value: text }] : [];
+ });
+}
+
+/** A trip's place as a pin, or nothing for one without coordinates. */
+function tripPin(place: GpxExportPlace): KmlPinOut | null {
+ if (place.lat == null || place.lng == null) return null;
+ return {
+ name: xmlText(place.name),
+ lat: place.lat,
+ lng: place.lng,
+ address: textOf(place.address),
+ description: pinDescription(place.description),
+ data: pinData([['category', place.category]]),
+ };
+}
+
+/** A list's place as a pin, or nothing for one without coordinates. */
+function listPin(place: ExportedCollectionFile['places'][number]): KmlPinOut | null {
+ if (place.lat == null || place.lng == null) return null;
+ return {
+ name: xmlText(place.name),
+ lat: place.lat,
+ lng: place.lng,
+ address: textOf(place.address),
+ phone: textOf(place.phone),
+ description: pinDescription(place.description, place.notes),
+ data: pinData([
+ ['category', place.category],
+ ['status', place.status],
+ ['labels', place.labels?.join(', ')],
+ ['website', place.website],
+ ]),
+ };
+}
+
+const isPin = (pin: KmlPinOut | null): pin is KmlPinOut => pin !== null;
+
@Injectable()
export class KmlProvider {
async readMapFile(fileBuffer: Buffer, filename: string): Promise<KmlDocumentRead> {
@@ -49,4 +110,25 @@ export class KmlProvider {
});
return { tracks, leftOut };
}
+
+ /** A trip's places as pins; null when none has coordinates, so the caller refuses instead of handing over nothing. */
+ writeTrip(tripTitle: string, places: GpxExportPlace[]): string | null {
+ const pins = places.map(tripPin).filter(isPin);
+ return pins.length ? writeKmlPins(xmlText(tripTitle), pins) : null;
+ }
+
+ tripFilename(tripTitle: string): string {
+ return exportFilename(tripTitle, 'kml');
+ }
+
+ /** A list as pins, written from the list file the JSON export returns, so it carries no more than that file. */
+ writeCollection(file: ExportedCollectionFile): CollectionKmlExport {
+ const pins = file.places.map(listPin).filter(isPin);
+ return {
+ name: file.name,
+ kml: writeKmlPins(xmlText(file.name), pins),
+ pins: pins.length,
+ omitted: file.places.length - pins.length,
+ };
+ }
}
diff --git a/server/src/nest/place-import/xml-text.ts b/server/src/nest/place-import/xml-text.ts
new file mode 100644
index 000000000..1111a35e3
--- /dev/null
+++ b/server/src/nest/place-import/xml-text.ts
@@ -0,0 +1,19 @@
+/**
+ * Text for the documents the exports write (the list as GPX, a trip or a list
+ * as KML): the builder escapes markup, these keep out what it lets through.
+ */
+
+/**
+ * Text XML 1.0 can hold. The builder escapes markup but passes through the
+ * control characters the spec forbids outright, and one of those in a place
+ * name is enough for a strict reader to refuse the whole file.
+ */
+export function xmlText(value: string): string {
+ return value.replace(/[\p{Cc}\p{Cs}￾￿]/gu, (ch) => (ch === '\t' || ch === '\n' || ch === '\r' ? ch : ''));
+}
+
+/** A value as element text, or nothing, since an empty element is noise to every reader. */
+export function textOf(value: string | number | null | undefined): string | undefined {
+ if (value === null || value === undefined) return undefined;
+ return xmlText(String(value)).trim() || undefined;
+}
diff --git a/server/src/nest/places/places-kml.service.ts b/server/src/nest/places/places-kml.service.ts
new file mode 100644
index 000000000..8028cd4dc
--- /dev/null
+++ b/server/src/nest/places/places-kml.service.ts
@@ -0,0 +1,34 @@
+import { Places } from '../../db/entities/Places.entity';
+import { Trips } from '../../db/entities/Trips.entity';
+import type { PlacesRepository } from '../../db/repositories/Places.repository';
+import type { TripsRepository } from '../../db/repositories/Trips.repository';
+import { PlaceImportService } from '../place-import/place-import.service';
+import { InjectRepository } from '@mikro-orm/nestjs';
+import { Injectable } from '@nestjs/common';
+
+/**
+ * A trip's places as KML for Google My Maps (#1866). Google Maps has no API
+ * that writes to a saved list, but My Maps takes a KML file as a layer, which
+ * is the closest a trip gets to a list of its places in Google Maps.
+ *
+ * Its own provider rather than a method beside PlacesService.exportGpx: the
+ * GPX export also folds the day plan into routes, while a list of places is
+ * just the places, and PlacesService has no room left to grow. The places are
+ * the ones the GPX export reads, in the same order.
+ */
+@Injectable()
+export class PlacesKmlService {
+ constructor(
+ @InjectRepository(Trips) private readonly tripsRepo: TripsRepository,
+ @InjectRepository(Places) private readonly placesRepo: PlacesRepository,
+ private readonly placeImport: PlaceImportService,
+ ) {}
+
+ /** The document and its file name; null for a trip that is gone or has no place with coordinates. */
+ async exportKml(tripId: string): Promise<{ kml: string; filename: string } | null> {
+ const title = await this.tripsRepo.getTitle(tripId);
+ if (title === null) return null;
+ const kml = this.placeImport.writeTripKml(title, await this.placesRepo.listForGpx(tripId));
+ return kml ? { kml, filename: this.placeImport.tripKmlFilename(title) } : null;
+ }
+}
diff --git a/server/src/nest/places/places.controller.ts b/server/src/nest/places/places.controller.ts
index 0c0f44426..ca1307ecc 100644
--- a/server/src/nest/places/places.controller.ts
+++ b/server/src/nest/places/places.controller.ts
@@ -11,6 +11,7 @@ import { isDirectionsUrl, isGoogleListDataUrl } from '../place-import/place-impo
import { StorageService } from '../storage/storage.service';
import { placeImageUrl } from './place-image';
import { TrackPlaceOrigins } from './place-origins.interceptor';
+import { PlacesKmlService } from './places-kml.service';
import {
PlaceBulkDeleteDto,
PlaceBulkUpdateDto,
@@ -126,6 +127,7 @@ export class PlacesController {
private readonly places: PlacesService,
private readonly env: RuntimeEnvService,
private readonly storage: StorageService,
+ private readonly kml: PlacesKmlService,
) {}
private async requireTrip(tripId: string, user: User) {
@@ -241,6 +243,24 @@ export class PlacesController {
res.send(result.gpx);
}
+ /**
+ * The trip's places as KML, for Google My Maps (#1866): every place with
+ * coordinates as a pin. A read like the GPX export above, so viewing the
+ * trip is enough. Declared before the `:id` routes so the literal path wins.
+ */
+ // response-contract-exempt: sends the KML document through @Res() as a download, there is no JSON body to check.
+ @Get('export.kml')
+ async exportKml(@CurrentUser() user: User, @Param('tripId') tripId: string, @Res() res: Response) {
+ await this.requireTrip(tripId, user);
+ const result = await this.kml.exportKml(tripId);
+ if (!result) {
+ throw new HttpException({ error: 'Nothing to export' }, 404);
+ }
+ res.setHeader('Content-Type', 'application/vnd.google-earth.kml+xml; charset=utf-8');
+ res.setHeader('Content-Disposition', contentDisposition(result.filename, 'attachment'));
+ res.send(result.kml);
+ }
+
@Post('import/map')
@UseInterceptors(FileInterceptor('file', UPLOAD))
@TrackPlaceOrigins('import')
diff --git a/server/src/nest/places/places.mcp.ts b/server/src/nest/places/places.mcp.ts
index b668e375f..543d7e214 100644
--- a/server/src/nest/places/places.mcp.ts
+++ b/server/src/nest/places/places.mcp.ts
@@ -25,6 +25,7 @@ import { JourneyDomainService } from '../journey/journey-domain.service';
import { noAccess, permissionDenied } from '../../mcp/tools/_shared';
import { UnitOfWork } from '../database/unit-of-work';
import { MapsService } from '../maps/maps.service';
+import { PlacesKmlService } from './places-kml.service';
import { PlacesService } from './places.service';
import { PlaceOriginsService } from './place-origins.service';
import type { OriginWriter } from './place-origins.helpers';
@@ -72,6 +73,7 @@ export class PlacesMcp {
private readonly guards: McpToolGuardsService,
private readonly uow: UnitOfWork,
private readonly origins: PlaceOriginsService,
+ private readonly kml: PlacesKmlService,
) {}
@Tool({
@@ -466,6 +468,21 @@ export class PlacesMcp {
return ok({ gpx: result.gpx, filename: result.filename });
}
+ @Tool({
+ name: 'export_trip_kml',
+ description: 'Export the places of a trip as KML text for Google My Maps: every place with coordinates as a pin with its name, address, description and category. Google Maps cannot take a list of places from outside, but a My Maps map imports this file as a layer. Places without coordinates are left out. Prefer export_trip_gpx for GPS devices and offline map apps.',
+ inputSchema: { tripId: idSchema },
+ annotations: TOOL_ANNOTATIONS_READONLY,
+ access: { group: 'places', mode: 'read' },
+ })
+ async exportTripKml({ tripId }: { tripId: number }, ctx: McpContext) {
+ // A read, like the REST route and export_trip_gpx: seeing the trip is enough.
+ if (!(await this.tripsRepo.findAccessible(tripId, ctx.userId))) return noAccess();
+ const result = await this.kml.exportKml(String(tripId));
+ if (!result) return errorResult('Nothing to export.');
+ return ok({ kml: result.kml, filename: result.filename });
+ }
+
@Tool({
name: 'bulk_delete_places',
description: 'Permanently delete multiple places from a trip at once. Removes all day assignments for each place as well, plus each place\'s linked expenses and any nights booked at it, with their reservations and expenses. Any Tours in the selection also lose their routes and editable waypoints. A city walk in the selection takes all its stations with it, protected ones included: name those to the traveller and ask first. Warn the user before calling: this cannot be undone.',
diff --git a/server/src/nest/places/places.module.ts b/server/src/nest/places/places.module.ts
index 6ecc18660..473f35e50 100644
--- a/server/src/nest/places/places.module.ts
+++ b/server/src/nest/places/places.module.ts
@@ -28,6 +28,7 @@ import { StorageService } from '../storage/storage.service';
import { TripMembershipModule } from '../trip-membership/trip-membership.module';
import { UnsplashModule } from '../unsplash/unsplash.module';
import { PlaceOriginsService } from './place-origins.service';
+import { PlacesKmlService } from './places-kml.service';
import { PlacesStorageRefsService } from './places-storage-refs.service';
import { PlacesController } from './places.controller';
import { PlacesMcp } from './places.mcp';
@@ -106,7 +107,7 @@ import { MulterModule } from '@nestjs/platform-express';
]),
],
controllers: [PlacesController],
- providers: [PlacesService, PlacesMcp, PlacesRpc, PlaceOriginsService, PlacesStorageRefsService],
+ providers: [PlacesService, PlacesKmlService, PlacesMcp, PlacesRpc, PlaceOriginsService, PlacesStorageRefsService],
// The origin bookkeeping too: the booking import writes places as well.
exports: [PlacesService, PlaceOriginsService],
})
diff --git a/server/tests/e2e/collections.e2e.test.ts b/server/tests/e2e/collections.e2e.test.ts
index 10a19fd75..690c3e2a9 100644
--- a/server/tests/e2e/collections.e2e.test.ts
+++ b/server/tests/e2e/collections.e2e.test.ts
@@ -708,6 +708,37 @@ describe('Collections e2e (real auth guard + real service + temp SQLite)', () =>
expect((await request(server).post('/api/addons/collections/gpx/read').send({ gpx: '<gpx/>' })).status).toBe(401);
});
+ // ── KML for Google My Maps (#1866) ───────────────────────────────────────
+ it('COLLECTIONS-E2E-092: a list goes out as KML pins, the places without coordinates counted', async () => {
+ const as = (userId: number) => ({ Cookie: sessionCookie(userId) });
+ const col = (await request(server).post('/api/addons/collections').set(as(ownerId)).send({ name: 'Rome' })).body;
+ await request(server).post('/api/addons/collections/places').set(as(ownerId)).send({
+ collection_id: col.id,
+ name: 'Pinned',
+ lat: 41.9,
+ lng: 12.48,
+ address: 'Via Nuova 1',
+ status: 'revisit',
+ });
+ await request(server)
+ .post('/api/addons/collections/places')
+ .set(as(ownerId))
+ .send({ collection_id: col.id, name: 'Vague' });
+
+ const exported = await request(server).get(`/api/addons/collections/${col.id}/export/kml`).set(as(ownerId));
+ expect(exported.status).toBe(200);
+ expect(exported.body).toMatchObject({ name: 'Rome', pins: 1, omitted: 1 });
+ expect(exported.body.kml).toContain('<name>Pinned</name>');
+ expect(exported.body.kml).toContain('<address>Via Nuova 1</address>');
+ expect(exported.body.kml).toContain('<coordinates>12.48,41.9</coordinates>');
+ expect(exported.body.kml).not.toContain('Vague');
+
+ // The same read as the list file: a list the caller cannot see has none.
+ expect((await request(server).get(`/api/addons/collections/${col.id}/export/kml`).set(as(otherId))).status).toBe(
+ 404,
+ );
+ });
+
it('COLLECTIONS-E2E-082: a list the caller cannot see has no GPX either', async () => {
const col = (
await request(server).post('/api/addons/collections').set('Cookie', sessionCookie(ownerId)).send({ name: 'Mine' })
diff --git a/server/tests/e2e/places.e2e.test.ts b/server/tests/e2e/places.e2e.test.ts
index 27db07a00..292576e68 100644
--- a/server/tests/e2e/places.e2e.test.ts
+++ b/server/tests/e2e/places.e2e.test.ts
@@ -555,6 +555,45 @@ describe('Places e2e (real auth guard + temp SQLite)', () => {
});
});
+ // ── KML export (#1866): the places as pins for Google My Maps ─────────────
+ describe('GET export.kml (#1866)', () => {
+ it('serves every place with coordinates as a pin, named after the trip', async () => {
+ await upsertRow(orm, Trips, { id: 5, title: 'Alpine week', user: 1 });
+ await insertRow(orm, Places, { id: 1, trip: 5, name: 'Trailhead', lat: 47.1, lng: 11.2, address: 'Hut road 1' });
+ await insertRow(orm, Places, { id: 2, trip: 5, name: 'Somewhere', lat: null, lng: null });
+
+ const res = await request(server).get('/api/trips/5/places/export.kml').set('Cookie', sessionCookie(1));
+ expect(res.status).toBe(200);
+ expect(res.headers['content-type']).toContain('application/vnd.google-earth.kml+xml');
+ expect(res.headers['content-disposition']).toBe('attachment; filename="Alpine-week.kml"');
+ expect(res.text).toContain('<name>Trailhead</name>');
+ expect(res.text).toContain('<address>Hut road 1</address>');
+ expect(res.text).toContain('<coordinates>11.2,47.1</coordinates>');
+ expect(res.text).not.toContain('Somewhere');
+ });
+
+ it('404s a trip without a place to pin, and one the caller cannot reach', async () => {
+ await upsertRow(orm, Trips, { id: 5, title: 'Nothing here', user: 1 });
+ const empty = await request(server).get('/api/trips/5/places/export.kml').set('Cookie', sessionCookie(1));
+ expect(empty.status).toBe(404);
+ expect(empty.body).toEqual({ error: 'Nothing to export' });
+
+ await deleteRows(orm, Trips, { id: 5 });
+ const gone = await request(server).get('/api/trips/5/places/export.kml').set('Cookie', sessionCookie(1));
+ expect(gone.status).toBe(404);
+ expect(gone.body).toEqual({ error: 'Trip not found' });
+ expect((await request(server).get('/api/trips/5/places/export.kml')).status).toBe(401);
+ });
+
+ it('is a read: no place_edit permission required', async () => {
+ await upsertRow(orm, Trips, { id: 5, title: 'Alpine week', user: 1 });
+ await insertRow(orm, Places, { id: 1, trip: 5, name: 'Trailhead', lat: 47.1, lng: 11.2 });
+ checkPermission.mockReturnValue(false);
+ const res = await request(server).get('/api/trips/5/places/export.kml').set('Cookie', sessionCookie(1));
+ expect(res.status).toBe(200);
+ });
+ });
+
// The reason places keeps its inline checks on the write routes: a guard runs
// before the pipe, so guarding create would answer 404 where the suite above
// pins a 400. This is the non-regression pin for that decision.
diff --git a/server/tests/unit/mcp/tools-places.test.ts b/server/tests/unit/mcp/tools-places.test.ts
index adefd161e..f0ab0c1c9 100644
--- a/server/tests/unit/mcp/tools-places.test.ts
+++ b/server/tests/unit/mcp/tools-places.test.ts
@@ -1352,6 +1352,42 @@ describe('Tool: export_trip_gpx', () => {
});
});
+// ---------------------------------------------------------------------------
+// export_trip_kml (#1866): the places as pins for Google My Maps
+// ---------------------------------------------------------------------------
+
+describe('Tool: export_trip_kml', () => {
+ it('writes the places as pins and names the file after the trip', async () => {
+ const { user } = createUser(testDb);
+ const trip = createTrip(testDb, user.id, { title: 'Paris Weekend' });
+ createPlace(testDb, trip.id, { name: 'Eiffel Tower', lat: 48.8584, lng: 2.2945 });
+
+ await withHarness(user.id, async (h) => {
+ const result = await h.client.callTool({ name: 'export_trip_kml', arguments: { tripId: trip.id } });
+ const data = parseToolResult(result) as { kml: string; filename: string };
+ expect(data.filename).toBe('Paris-Weekend.kml');
+ expect(data.kml).toContain('<name>Eiffel Tower</name>');
+ expect(data.kml).toContain('<coordinates>2.2945,48.8584</coordinates>');
+ });
+ });
+
+ it('errors when no place has coordinates, and for a non-member', async () => {
+ const { user } = createUser(testDb);
+ const { user: other } = createUser(testDb);
+ const empty = createTrip(testDb, user.id, { title: 'Empty' });
+ const theirs = createTrip(testDb, other.id);
+ createPlace(testDb, theirs.id, { name: 'Theirs', lat: 1, lng: 1 });
+
+ await withHarness(user.id, async (h) => {
+ const nothing = await h.client.callTool({ name: 'export_trip_kml', arguments: { tripId: empty.id } });
+ expect(nothing.isError).toBe(true);
+ expect((nothing.content as { text: string }[])[0].text).toBe('Nothing to export.');
+ const denied = await h.client.callTool({ name: 'export_trip_kml', arguments: { tripId: theirs.id } });
+ expect(denied.isError).toBe(true);
+ });
+ });
+});
+
// ---------------------------------------------------------------------------
// create_and_assign_place failure path
// ---------------------------------------------------------------------------
diff --git a/server/tests/unit/nest/collections.controller.test.ts b/server/tests/unit/nest/collections.controller.test.ts
index a5eaccdb7..c67856241 100644
--- a/server/tests/unit/nest/collections.controller.test.ts
+++ b/server/tests/unit/nest/collections.controller.test.ts
@@ -407,6 +407,15 @@ describe('CollectionsController', () => {
expect(svc.exportCollectionGpx).toHaveBeenCalledWith(1, 3);
});
+ it('exports the list as KML for Google My Maps the same way (#1866)', async () => {
+ const exported = { name: 'Lisbon', kml: '<kml/>', pins: 0, omitted: 0 };
+ const svc = makeService({ exportCollectionKml: vi.fn().mockResolvedValue(exported) });
+ const c = new CollectionsController(svc, new RuntimeEnvService(), storageStub);
+
+ expect(await c.exportCollectionKml(user, '3')).toBe(exported);
+ expect(svc.exportCollectionKml).toHaveBeenCalledWith(1, 3);
+ });
+
it('hands back the file a GPX was read into', () => {
const read = { file: { name: 'Lisbon' }, skipped: 1, track_points: 4 };
const svc = makeService({ readCollectionGpx: vi.fn().mockReturnValue(read) });
diff --git a/server/tests/unit/nest/collections.helpers.test.ts b/server/tests/unit/nest/collections.helpers.test.ts
index d8f0b9305..f235a1fc1 100644
--- a/server/tests/unit/nest/collections.helpers.test.ts
+++ b/server/tests/unit/nest/collections.helpers.test.ts
@@ -1,12 +1,14 @@
/**
* The pure helpers of the collections domain: the link helpers, which read and
* write the JSON TEXT column a list or a saved place keeps its links in, the
- * listing fields an update writes, and the cursor of a page of places.
- * COLLECTIONS-HELPERS-001 to 007.
+ * listing fields an update writes, the cursor of a page of places, and a saved
+ * place as the list file carries it. COLLECTIONS-HELPERS-001 to 009.
*/
+import type { CollectionPlaceRow } from '../../../src/db/repositories/Collections.repository';
import {
decodePlacesCursor,
encodePlacesCursor,
+ filePlaceOf,
listingWriteOf,
parseLinks,
serializeLinks,
@@ -89,3 +91,68 @@ describe('encodePlacesCursor / decodePlacesCursor', () => {
expect(decodePlacesCursor(encode([0, '2026-05-01 10:00:00', 0]))).toBeNull();
});
});
+
+describe('filePlaceOf', () => {
+ const row: CollectionPlaceRow = {
+ id: 9,
+ collection_id: 4,
+ owner_id: 1,
+ saved_by: 1,
+ name: 'Septime',
+ description: 'Natural wine',
+ lat: 48.853,
+ lng: 2.381,
+ address: '80 Rue de Charonne',
+ category_id: 3,
+ price: 45,
+ currency: 'EUR',
+ notes: 'Book ahead',
+ image_url: 'https://images.example/septime.jpg',
+ google_place_id: 'ChIJseptime',
+ google_ftid: null,
+ osm_id: 'node/42',
+ website: 'https://septime-charonne.fr',
+ phone: '+33 1 43 67 38 29',
+ status: 'revisit',
+ source_trip_id: 7,
+ source_place_id: 70,
+ links: JSON.stringify(links),
+ sort_order: 0,
+ created_at: '2026-05-01 10:00:00',
+ updated_at: null,
+ category_name: 'Restaurant',
+ category_color: '#ff0000',
+ category_icon: 'utensils',
+ };
+
+ it('COLLECTIONS-HELPERS-008: a saved place as the list file carries it: no ids, the category by name, the labels given', () => {
+ expect(filePlaceOf(row, ['Dinner'])).toEqual({
+ name: 'Septime',
+ description: 'Natural wine',
+ lat: 48.853,
+ lng: 2.381,
+ address: '80 Rue de Charonne',
+ notes: 'Book ahead',
+ price: 45,
+ currency: 'EUR',
+ website: 'https://septime-charonne.fr',
+ phone: '+33 1 43 67 38 29',
+ image_url: 'https://images.example/septime.jpg',
+ google_place_id: 'ChIJseptime',
+ google_ftid: null,
+ osm_id: 'node/42',
+ status: 'revisit',
+ links,
+ category: 'Restaurant',
+ labels: ['Dinner'],
+ });
+ });
+
+ it('COLLECTIONS-HELPERS-009: an upload of this server stays behind, it resolves nowhere else', () => {
+ expect(filePlaceOf({ ...row, image_url: '/uploads/places/septime.jpg' }, []).image_url).toBeNull();
+ expect(filePlaceOf({ ...row, image_url: null, links: null }, [])).toMatchObject({
+ image_url: null,
+ links: undefined,
+ });
+ });
+});
diff --git a/server/tests/unit/nest/place-import/kml-export.test.ts b/server/tests/unit/nest/place-import/kml-export.test.ts
new file mode 100644
index 000000000..784014972
--- /dev/null
+++ b/server/tests/unit/nest/place-import/kml-export.test.ts
@@ -0,0 +1,137 @@
+/**
+ * KML out (#1866): a trip's places or a list's as pins for Google My Maps.
+ * The document is read back through TREK's own KML reader, so what is written
+ * is what an importer finds. KML-EXPORT-001 to KML-EXPORT-007.
+ */
+import { readKmlDocument, writeKmlPins } from '../../../../src/nest/place-import/kml.codec';
+import type { ExportedCollectionFile } from '../../../../src/nest/place-import/providers/collection-gpx.provider';
+import { exportFilename, type GpxExportPlace } from '../../../../src/nest/place-import/providers/gpx.provider';
+import { KmlProvider } from '../../../../src/nest/place-import/providers/kml.provider';
+
+import { describe, expect, it } from 'vitest';
+
+const provider = new KmlProvider();
+
+const tripPlace = (over: Partial<GpxExportPlace>): GpxExportPlace => ({
+ name: 'Septime',
+ description: null,
+ address: null,
+ lat: 48.853,
+ lng: 2.381,
+ route_geometry: null,
+ category: null,
+ ...over,
+});
+
+const listFile = (places: Array<Partial<ExportedCollectionFile['places'][number]>>): ExportedCollectionFile => ({
+ format: 'trek.collection',
+ version: 1,
+ name: 'Paris & more',
+ description: null,
+ color: null,
+ icon: null,
+ exported_at: '2026-11-13T10:00:00.000Z',
+ labels: [],
+ places: places.map((place) => ({ name: 'Spot', lat: null, lng: null, ...place })),
+});
+
+describe('writeKmlPins', () => {
+ it('KML-EXPORT-001: writes a KML 2.2 document of pins, longitude first, in the schema order', () => {
+ const kml = writeKmlPins('Paris', [
+ {
+ name: 'Septime',
+ lat: 48.8530001234,
+ lng: 2.381,
+ address: '80 Rue de Charonne',
+ phone: '+33 1 43 67 38 29',
+ description: 'Natural wine',
+ data: [{ name: 'category', value: 'Restaurant' }],
+ },
+ ]);
+ expect(kml).toContain('<kml xmlns="http://www.opengis.net/kml/2.2">');
+ expect(kml).toContain('<name>Paris</name>');
+ expect(kml).toContain('<coordinates>2.381,48.8530001</coordinates>');
+ expect(kml).toContain('<Data name="category">');
+ const order = ['<name>Septime', '<address>', '<phoneNumber>', '<description>', '<ExtendedData>', '<Point>'];
+ const at = order.map((tag) => kml.indexOf(tag));
+ expect(at.every((index) => index >= 0)).toBe(true);
+ expect([...at].sort((a, b) => a - b)).toEqual(at);
+ });
+
+ it('KML-EXPORT-002: leaves out what a pin lacks and escapes markup', () => {
+ const kml = writeKmlPins('A <b>trip</b>', [{ name: 'Fish & Chips', lat: 51.5, lng: -0.12 }]);
+ expect(kml).toContain('Fish &amp; Chips');
+ expect(kml).toContain('A &lt;b&gt;trip&lt;/b&gt;');
+ for (const tag of ['<address>', '<phoneNumber>', '<description>', '<ExtendedData>']) {
+ expect(kml).not.toContain(tag);
+ }
+ });
+});
+
+describe('KmlProvider: a trip as pins', () => {
+ it('KML-EXPORT-003: every place with coordinates is a pin an importer reads back, a place with a line at its start', () => {
+ const kml = provider.writeTrip('Paris', [
+ tripPlace({ name: 'Septime', description: 'Book ahead', address: '80 Rue de Charonne', category: 'Restaurant' }),
+ tripPlace({ name: 'Canal walk', lat: 48.87, lng: 2.36, route_geometry: '[[48.87,2.36],[48.88,2.37]]' }),
+ tripPlace({ name: 'Somewhere', lat: null, lng: null }),
+ ]);
+ expect(kml).not.toBeNull();
+ const { placemarks } = readKmlDocument(Buffer.from(kml ?? '', 'utf8'));
+ expect(placemarks.map((p) => [p.name, p.lat, p.lng])).toEqual([
+ ['Septime', 48.853, 2.381],
+ ['Canal walk', 48.87, 2.36],
+ ]);
+ expect(placemarks[0]?.description).toBe('Book ahead');
+ expect(kml).toContain('<address>80 Rue de Charonne</address>');
+ expect(kml).toContain('<value>Restaurant</value>');
+ });
+
+ it('KML-EXPORT-004: a trip without any place with coordinates has nothing to write', () => {
+ expect(provider.writeTrip('Paris', [tripPlace({ lat: null, lng: null })])).toBeNull();
+ expect(provider.writeTrip('Paris', [])).toBeNull();
+ });
+
+ it('KML-EXPORT-005: the file is named like the GPX export, as .kml', () => {
+ expect(provider.tripFilename('Trip: "Rome"/2026')).toBe('Trip-Rome-2026.kml');
+ expect(provider.tripFilename('///')).toBe('trip.kml');
+ expect(exportFilename('Ridge', 'gpx', 'tour')).toBe('Ridge.gpx');
+ });
+});
+
+describe('KmlProvider: a list as pins', () => {
+ it('KML-EXPORT-006: pins carry the address, phone, notes and the list fields, the rest is counted', () => {
+ const result = provider.writeCollection(
+ listFile([
+ {
+ name: 'Septime',
+ lat: 48.853,
+ lng: 2.381,
+ address: '80 Rue de Charonne',
+ phone: '+33 1 43 67 38 29',
+ description: 'Natural wine',
+ notes: 'Ask for the counter',
+ category: 'Restaurant',
+ status: 'revisit',
+ labels: ['Dinner', 'Late'],
+ website: 'https://septime-charonne.fr',
+ },
+ { name: 'No pin' },
+ ]),
+ );
+ expect(result).toMatchObject({ name: 'Paris & more', pins: 1, omitted: 1 });
+ const { placemarks } = readKmlDocument(Buffer.from(result.kml, 'utf8'));
+ expect(placemarks).toHaveLength(1);
+ expect(placemarks[0]?.description).toBe('Natural wine\n\nAsk for the counter');
+ expect(result.kml).toContain('<name>Paris &amp; more</name>');
+ expect(result.kml).toContain('<phoneNumber>+33 1 43 67 38 29</phoneNumber>');
+ for (const value of ['Restaurant', 'revisit', 'Dinner, Late', 'https://septime-charonne.fr']) {
+ expect(result.kml).toContain(`<value>${value}</value>`);
+ }
+ });
+
+ it('KML-EXPORT-007: a list without coordinates still answers, with nothing in it and every place counted', () => {
+ const result = provider.writeCollection(listFile([{ name: 'A' }, { name: 'B' }]));
+ expect(result).toMatchObject({ pins: 0, omitted: 2 });
+ expect(readKmlDocument(Buffer.from(result.kml, 'utf8')).placemarks).toEqual([]);
+ });
+});
diff --git a/shared/src/collection/collection-file.schema.ts b/shared/src/collection/collection-file.schema.ts
index 3f7e4251e..6dc13b509 100644
--- a/shared/src/collection/collection-file.schema.ts
+++ b/shared/src/collection/collection-file.schema.ts
@@ -294,3 +294,19 @@ export interface CollectionGpxExport {
/** Places left out because they have no coordinates. */
omitted: number;
}
+
+/**
+ * The list as KML for Google My Maps (#1866), as GET /:id/export/kml answers
+ * it: JSON around the document, like the GPX export, so the browser names the
+ * download and can say how many places had no coordinates.
+ */
+export const collectionKmlExportSchema = z.object({
+ /** The list's name, for the file name. */
+ name: z.string(),
+ kml: z.string(),
+ /** Places written as pins. */
+ pins: z.number().int().min(0),
+ /** Places left out because they have no coordinates. */
+ omitted: z.number().int().min(0),
+});
+export type CollectionKmlExport = z.infer<typeof collectionKmlExportSchema>;
diff --git a/shared/src/i18n/ar/collection.ts b/shared/src/i18n/ar/collection.ts
index 6bd776604..2d987f264 100644
--- a/shared/src/i18n/ar/collection.ts
+++ b/shared/src/i18n/ar/collection.ts
@@ -289,6 +289,7 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'قائمة TREK',
'collections.file.formatTrekHint': 'لنسخة TREK أخرى، مع التسميات والحالة',
'collections.file.formatGpxHint': 'نقاط طريق لتطبيقات OsmAnd وOrganic Maps وGarmin وغيرها من تطبيقات الخرائط',
+ 'collections.file.formatKmlHint': 'دبابيس لـ Google My Maps لرؤية الأماكن في Google Maps',
'collections.file.gpxOmitted': 'لم يُضمَّن {count} مكان في ملف GPX لأنها بلا إحداثيات',
'collections.file.gpxOmitted.zero': 'لم يُستبعد أي مكان من ملف GPX',
'collections.file.gpxOmitted.one': 'لم يُضمَّن مكان واحد في ملف GPX لأنه بلا إحداثيات',
@@ -296,6 +297,13 @@ const collection: TranslationStrings = {
'collections.file.gpxOmitted.few': 'لم يُضمَّن {count} أماكن في ملف GPX لأنها بلا إحداثيات',
'collections.file.gpxOmitted.many': 'لم يُضمَّن {count} مكانًا في ملف GPX لأنها بلا إحداثيات',
'collections.file.gpxNothing': 'لا يملك أي من هذه الأماكن إحداثيات، فلا يوجد ما يُوضع في ملف GPX.',
+ 'collections.file.kmlOmitted': 'لم يُضمَّن {count} مكان في ملف KML لأنها بلا إحداثيات',
+ 'collections.file.kmlOmitted.zero': 'لم يُستبعد أي مكان من ملف KML',
+ 'collections.file.kmlOmitted.one': 'لم يُضمَّن مكان واحد في ملف KML لأنه بلا إحداثيات',
+ 'collections.file.kmlOmitted.two': 'لم يُضمَّن مكانان في ملف KML لأنهما بلا إحداثيات',
+ 'collections.file.kmlOmitted.few': 'لم يُضمَّن {count} أماكن في ملف KML لأنها بلا إحداثيات',
+ 'collections.file.kmlOmitted.many': 'لم يُضمَّن {count} مكانًا في ملف KML لأنها بلا إحداثيات',
+ 'collections.file.kmlNothing': 'لا يملك أي من هذه الأماكن إحداثيات، فلا يوجد ما يُوضع في ملف KML.',
'collections.file.reading': 'جارٍ قراءة الملف…',
'collections.file.gpxSkipped': 'ستُستبعد {count} نقطة طريق لعدم وجود إحداثيات صالحة لها.',
'collections.file.gpxSkipped.zero': 'لن تُستبعد أي نقطة طريق.',
diff --git a/shared/src/i18n/ar/dayplan.ts b/shared/src/i18n/ar/dayplan.ts
index a1e400611..5d360b8bd 100644
--- a/shared/src/i18n/ar/dayplan.ts
+++ b/shared/src/i18n/ar/dayplan.ts
@@ -69,6 +69,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'الأيام كمسارات',
'dayplan.gpxEmpty': 'لا يوجد شيء للتصدير بعد',
'dayplan.gpxFailed': 'فشل تصدير GPX',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'أماكن لـ Google My Maps',
+ 'dayplan.kmlHint': 'ملف KML لاستيراده كطبقة في My Maps',
+ 'dayplan.kmlFailed': 'فشل تصدير KML',
'dayplan.pdfError': 'فشل تصدير PDF',
'dayplan.expandAll': 'توسيع كل الأيام',
'dayplan.collapseAll': 'طي كل الأيام',
diff --git a/shared/src/i18n/az/collection.ts b/shared/src/i18n/az/collection.ts
index a0495c72b..29c1eae93 100644
--- a/shared/src/i18n/az/collection.ts
+++ b/shared/src/i18n/az/collection.ts
@@ -200,10 +200,15 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'TREK siyahısı',
'collections.file.formatTrekHint': 'Etiketlər və statuslarla başqa TREK üçün',
'collections.file.formatGpxHint': 'OsmAnd, Organic Maps, Garmin və digər xəritə tətbiqləri üçün yol nöqtələri',
+ 'collections.file.formatKmlHint': 'Məkanları Google Maps-də görmək üçün Google My Maps nişanları',
'collections.file.gpxOmitted': '{count} məkanın koordinatları olmadığı üçün GPX faylına daxil edilmədi',
'collections.file.gpxOmitted.one': '{count} məkanın koordinatları olmadığı üçün GPX faylına daxil edilmədi',
'collections.file.gpxNothing':
'Bu məkanların heç birinin koordinatları yoxdur, buna görə GPX faylına əlavə ediləcək heç nə yoxdur.',
+ 'collections.file.kmlOmitted': '{count} məkanın koordinatları olmadığı üçün KML faylına daxil edilmədi',
+ 'collections.file.kmlOmitted.one': '{count} məkanın koordinatları olmadığı üçün KML faylına daxil edilmədi',
+ 'collections.file.kmlNothing':
+ 'Bu məkanların heç birinin koordinatları yoxdur, buna görə KML faylına əlavə ediləcək heç nə yoxdur.',
'collections.file.reading': 'Fayl oxunur…',
'collections.file.gpxSkipped': 'İstifadəyə yararlı koordinatları olmayan {count} yol nöqtəsi daxil edilmir.',
'collections.file.gpxSkipped.one': 'İstifadəyə yararlı koordinatları olmayan {count} yol nöqtəsi daxil edilmir.',
diff --git a/shared/src/i18n/az/dayplan.ts b/shared/src/i18n/az/dayplan.ts
index df90deec6..e7da8b25a 100644
--- a/shared/src/i18n/az/dayplan.ts
+++ b/shared/src/i18n/az/dayplan.ts
@@ -91,6 +91,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Günlər marşrut kimi',
'dayplan.gpxEmpty': 'Hələ ixrac ediləcək heç nə yoxdur',
'dayplan.gpxFailed': 'GPX ixracı uğursuz oldu',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Google My Maps üçün məkanlar',
+ 'dayplan.kmlHint': 'My Maps-ə qat kimi idxal etmək üçün KML faylı',
+ 'dayplan.kmlFailed': 'KML ixracı alınmadı',
'dayplan.pdfError': 'PDF-i ixrac etmək mümkün olmadı',
'dayplan.mobile.addPlace': 'Məkan əlavə et',
diff --git a/shared/src/i18n/br/collection.ts b/shared/src/i18n/br/collection.ts
index 9eb072558..1e9edb262 100644
--- a/shared/src/i18n/br/collection.ts
+++ b/shared/src/i18n/br/collection.ts
@@ -198,10 +198,15 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'Lista do TREK',
'collections.file.formatTrekHint': 'Para outro TREK, com etiquetas e status',
'collections.file.formatGpxHint': 'Pontos de referência para OsmAnd, Organic Maps, Garmin e outros apps de mapa',
+ 'collections.file.formatKmlHint': 'Marcadores para o Google My Maps, para ver os lugares no Google Maps',
'collections.file.gpxOmitted': '{count} lugares não têm coordenadas e ficaram fora do arquivo GPX',
'collections.file.gpxOmitted.one': '{count} lugar não tem coordenadas e ficou fora do arquivo GPX',
'collections.file.gpxNothing':
'Nenhum desses lugares tem coordenadas, então não há nada para colocar em um arquivo GPX.',
+ 'collections.file.kmlOmitted': '{count} lugares não têm coordenadas e ficaram fora do arquivo KML',
+ 'collections.file.kmlOmitted.one': '{count} lugar não tem coordenadas e ficou fora do arquivo KML',
+ 'collections.file.kmlNothing':
+ 'Nenhum desses lugares tem coordenadas, então não há nada para colocar em um arquivo KML.',
'collections.file.reading': 'Lendo o arquivo…',
'collections.file.gpxSkipped': '{count} pontos de referência sem coordenadas utilizáveis ficam de fora.',
'collections.file.gpxSkipped.one': '{count} ponto de referência sem coordenadas utilizáveis fica de fora.',
diff --git a/shared/src/i18n/br/dayplan.ts b/shared/src/i18n/br/dayplan.ts
index fa538bcf1..13f663d04 100644
--- a/shared/src/i18n/br/dayplan.ts
+++ b/shared/src/i18n/br/dayplan.ts
@@ -67,6 +67,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Dias como rotas',
'dayplan.gpxEmpty': 'Ainda não há nada para exportar',
'dayplan.gpxFailed': 'Falha ao exportar o GPX',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Lugares para o Google My Maps',
+ 'dayplan.kmlHint': 'Um arquivo KML para importar como camada no My Maps',
+ 'dayplan.kmlFailed': 'Falha ao exportar KML',
'dayplan.pdfError': 'Falha ao exportar PDF',
'dayplan.cannotReorderTransport': 'Reservas com horário fixo não podem ser reordenadas',
'dayplan.confirmRemoveTimeTitle': 'Remover horário?',
diff --git a/shared/src/i18n/ca/collection.ts b/shared/src/i18n/ca/collection.ts
index d2fd47d09..61a36a88d 100644
--- a/shared/src/i18n/ca/collection.ts
+++ b/shared/src/i18n/ca/collection.ts
@@ -189,10 +189,15 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'Llista del TREK',
'collections.file.formatTrekHint': 'Per a un altre TREK, amb etiquetes i estat',
'collections.file.formatGpxHint': 'Punts de pas per a OsmAnd, Organic Maps, Garmin i altres aplicacions de mapes',
+ 'collections.file.formatKmlHint': 'Marcadors per a Google My Maps, per veure els llocs a Google Maps',
'collections.file.gpxOmitted': '{count} llocs no tenen coordenades i han quedat fora del fitxer GPX',
'collections.file.gpxOmitted.one': '{count} lloc no té coordenades i ha quedat fora del fitxer GPX',
'collections.file.gpxNothing':
'Cap d’aquests llocs té coordenades, així que no hi ha res per posar en un fitxer GPX.',
+ 'collections.file.kmlOmitted': '{count} llocs no tenen coordenades i han quedat fora del fitxer KML',
+ 'collections.file.kmlOmitted.one': '{count} lloc no té coordenades i ha quedat fora del fitxer KML',
+ 'collections.file.kmlNothing':
+ 'Cap d’aquests llocs té coordenades, així que no hi ha res per posar en un fitxer KML.',
'collections.file.reading': 'S’està llegint el fitxer…',
'collections.file.gpxSkipped': 'Es deixen fora {count} punts de pas sense coordenades vàlides.',
'collections.file.gpxSkipped.one': 'Es deixa fora {count} punt de pas sense coordenades vàlides.',
diff --git a/shared/src/i18n/ca/dayplan.ts b/shared/src/i18n/ca/dayplan.ts
index 063d2966b..178965ca2 100644
--- a/shared/src/i18n/ca/dayplan.ts
+++ b/shared/src/i18n/ca/dayplan.ts
@@ -67,6 +67,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Dies com a rutes',
'dayplan.gpxEmpty': 'Encara no hi ha res per exportar',
'dayplan.gpxFailed': "L'exportació GPX ha fallat",
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Llocs per a Google My Maps',
+ 'dayplan.kmlHint': 'Un fitxer KML per importar com a capa a My Maps',
+ 'dayplan.kmlFailed': 'Error en exportar el KML',
'dayplan.pdfError': "No s'ha pogut exportar el PDF",
'dayplan.cannotReorderTransport': 'Les reserves amb hora fixa no es poden reordenar',
'dayplan.confirmRemoveTimeTitle': "Vols eliminar l'hora?",
diff --git a/shared/src/i18n/cs/collection.ts b/shared/src/i18n/cs/collection.ts
index 363bc9aeb..4bab0f6c6 100644
--- a/shared/src/i18n/cs/collection.ts
+++ b/shared/src/i18n/cs/collection.ts
@@ -220,10 +220,15 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'Seznam TREK',
'collections.file.formatTrekHint': 'Pro jiný TREK, se štítky a stavem',
'collections.file.formatGpxHint': 'Trasové body pro OsmAnd, Organic Maps, Garmin a další mapové aplikace',
+ 'collections.file.formatKmlHint': 'Špendlíky pro Google My Maps, abyste místa viděli v Google Maps',
'collections.file.gpxOmitted': '{count} míst nemá souřadnice a bylo vynecháno ze souboru GPX',
'collections.file.gpxOmitted.one': '{count} místo nemá souřadnice a bylo vynecháno ze souboru GPX',
'collections.file.gpxOmitted.few': '{count} místa nemají souřadnice a byla vynechána ze souboru GPX',
'collections.file.gpxNothing': 'Žádné z těchto míst nemá souřadnice, takže do souboru GPX není co uložit.',
+ 'collections.file.kmlOmitted': '{count} míst nemá souřadnice a bylo vynecháno ze souboru KML',
+ 'collections.file.kmlOmitted.one': '{count} místo nemá souřadnice a bylo vynecháno ze souboru KML',
+ 'collections.file.kmlOmitted.few': '{count} místa nemají souřadnice a byla vynechána ze souboru KML',
+ 'collections.file.kmlNothing': 'Žádné z těchto míst nemá souřadnice, takže do souboru KML není co uložit.',
'collections.file.reading': 'Načítání souboru…',
'collections.file.gpxSkipped': '{count} trasových bodů bez použitelných souřadnic bude vynecháno.',
'collections.file.gpxSkipped.one': '{count} trasový bod bez použitelných souřadnic bude vynechán.',
diff --git a/shared/src/i18n/cs/dayplan.ts b/shared/src/i18n/cs/dayplan.ts
index c0f6d6d8e..194367878 100644
--- a/shared/src/i18n/cs/dayplan.ts
+++ b/shared/src/i18n/cs/dayplan.ts
@@ -67,6 +67,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Dny jako trasy',
'dayplan.gpxEmpty': 'Zatím není co exportovat',
'dayplan.gpxFailed': 'Export GPX selhal',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Místa pro Google My Maps',
+ 'dayplan.kmlHint': 'Soubor KML k importu jako vrstva do My Maps',
+ 'dayplan.kmlFailed': 'Export KML se nezdařil',
'dayplan.pdfError': 'Export do PDF se nezdařil',
'dayplan.cannotReorderTransport': 'Rezervace s pevným časem nelze přeuspořádat',
'dayplan.confirmRemoveTimeTitle': 'Odebrat čas?',
diff --git a/shared/src/i18n/de/collection.ts b/shared/src/i18n/de/collection.ts
index ed24a43f4..b46d9015a 100644
--- a/shared/src/i18n/de/collection.ts
+++ b/shared/src/i18n/de/collection.ts
@@ -199,9 +199,13 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'TREK-Liste',
'collections.file.formatTrekHint': 'Für ein anderes TREK, mit Labels und Status',
'collections.file.formatGpxHint': 'Wegpunkte für OsmAnd, Organic Maps, Garmin und andere Karten-Apps',
+ 'collections.file.formatKmlHint': 'Pins für Google My Maps, um die Orte in Google Maps zu sehen',
'collections.file.gpxOmitted': '{count} Orte ohne Koordinaten fehlen in der GPX-Datei',
'collections.file.gpxOmitted.one': '{count} Ort ohne Koordinaten fehlt in der GPX-Datei',
'collections.file.gpxNothing': 'Keiner dieser Orte hat Koordinaten, für eine GPX-Datei gibt es also nichts.',
+ 'collections.file.kmlOmitted': '{count} Orte ohne Koordinaten fehlen in der KML-Datei',
+ 'collections.file.kmlOmitted.one': '{count} Ort ohne Koordinaten fehlt in der KML-Datei',
+ 'collections.file.kmlNothing': 'Keiner dieser Orte hat Koordinaten, für eine KML-Datei gibt es also nichts.',
'collections.file.reading': 'Datei wird gelesen…',
'collections.file.gpxSkipped': '{count} Wegpunkte ohne brauchbare Koordinaten bleiben weg.',
'collections.file.gpxSkipped.one': '{count} Wegpunkt ohne brauchbare Koordinaten bleibt weg.',
diff --git a/shared/src/i18n/de/dayplan.ts b/shared/src/i18n/de/dayplan.ts
index a1df23d72..6b2eb7ca4 100644
--- a/shared/src/i18n/de/dayplan.ts
+++ b/shared/src/i18n/de/dayplan.ts
@@ -78,6 +78,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Tage als Routen',
'dayplan.gpxEmpty': 'Es gibt noch nichts zu exportieren',
'dayplan.gpxFailed': 'GPX-Export fehlgeschlagen',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Orte für Google My Maps',
+ 'dayplan.kmlHint': 'KML-Datei zum Import als Ebene in My Maps',
+ 'dayplan.kmlFailed': 'KML-Export fehlgeschlagen',
'dayplan.pdfError': 'Fehler beim PDF-Export',
'dayplan.mobile.addPlace': 'Ort hinzufügen',
'dayplan.mobile.searchPlaces': 'Orte suchen...',
diff --git a/shared/src/i18n/en/collection.ts b/shared/src/i18n/en/collection.ts
index ec3f16955..c04af48f1 100644
--- a/shared/src/i18n/en/collection.ts
+++ b/shared/src/i18n/en/collection.ts
@@ -198,9 +198,13 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'TREK list',
'collections.file.formatTrekHint': 'For another TREK, with labels and status',
'collections.file.formatGpxHint': 'Waypoints for OsmAnd, Organic Maps, Garmin and other map apps',
+ 'collections.file.formatKmlHint': 'Pins for Google My Maps, to see the places in Google Maps',
'collections.file.gpxOmitted': '{count} places have no coordinates and were left out of the GPX file',
'collections.file.gpxOmitted.one': '{count} place has no coordinates and was left out of the GPX file',
'collections.file.gpxNothing': 'None of these places has coordinates, so there is nothing to put in a GPX file.',
+ 'collections.file.kmlOmitted': '{count} places have no coordinates and were left out of the KML file',
+ 'collections.file.kmlOmitted.one': '{count} place has no coordinates and was left out of the KML file',
+ 'collections.file.kmlNothing': 'None of these places has coordinates, so there is nothing to put in a KML file.',
'collections.file.reading': 'Reading the file…',
'collections.file.gpxSkipped': '{count} waypoints without usable coordinates are left out.',
'collections.file.gpxSkipped.one': '{count} waypoint without usable coordinates is left out.',
diff --git a/shared/src/i18n/en/dayplan.ts b/shared/src/i18n/en/dayplan.ts
index ef9c53ac8..7264e7bbe 100644
--- a/shared/src/i18n/en/dayplan.ts
+++ b/shared/src/i18n/en/dayplan.ts
@@ -78,6 +78,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Days as routes',
'dayplan.gpxEmpty': 'There is nothing to export yet',
'dayplan.gpxFailed': 'GPX export failed',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Places for Google My Maps',
+ 'dayplan.kmlHint': 'A KML file to import as a layer in My Maps',
+ 'dayplan.kmlFailed': 'KML export failed',
'dayplan.pdfError': 'Failed to export PDF',
'dayplan.mobile.addPlace': 'Add Place',
'dayplan.mobile.searchPlaces': 'Search places...',
diff --git a/shared/src/i18n/es/collection.ts b/shared/src/i18n/es/collection.ts
index 4befddbc9..4c3090a93 100644
--- a/shared/src/i18n/es/collection.ts
+++ b/shared/src/i18n/es/collection.ts
@@ -198,10 +198,15 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'Lista de TREK',
'collections.file.formatTrekHint': 'Para otro TREK, con etiquetas y estado',
'collections.file.formatGpxHint': 'Puntos de ruta para OsmAnd, Organic Maps, Garmin y otras apps de mapas',
+ 'collections.file.formatKmlHint': 'Marcadores para Google My Maps, para ver los lugares en Google Maps',
'collections.file.gpxOmitted': '{count} lugares no tienen coordenadas y se han quedado fuera del archivo GPX',
'collections.file.gpxOmitted.one': '{count} lugar no tiene coordenadas y se ha quedado fuera del archivo GPX',
'collections.file.gpxNothing':
'Ninguno de estos lugares tiene coordenadas, así que no hay nada que poner en un archivo GPX.',
+ 'collections.file.kmlOmitted': '{count} lugares no tienen coordenadas y se han quedado fuera del archivo KML',
+ 'collections.file.kmlOmitted.one': '{count} lugar no tiene coordenadas y se ha quedado fuera del archivo KML',
+ 'collections.file.kmlNothing':
+ 'Ninguno de estos lugares tiene coordenadas, así que no hay nada que poner en un archivo KML.',
'collections.file.reading': 'Leyendo el archivo…',
'collections.file.gpxSkipped': 'Se dejan fuera {count} puntos de ruta sin coordenadas válidas.',
'collections.file.gpxSkipped.one': 'Se deja fuera {count} punto de ruta sin coordenadas válidas.',
diff --git a/shared/src/i18n/es/dayplan.ts b/shared/src/i18n/es/dayplan.ts
index cc4b6995b..56ebbe74e 100644
--- a/shared/src/i18n/es/dayplan.ts
+++ b/shared/src/i18n/es/dayplan.ts
@@ -67,6 +67,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Días como rutas',
'dayplan.gpxEmpty': 'Aún no hay nada que exportar',
'dayplan.gpxFailed': 'Error al exportar el GPX',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Lugares para Google My Maps',
+ 'dayplan.kmlHint': 'Un archivo KML para importar como capa en My Maps',
+ 'dayplan.kmlFailed': 'Error al exportar KML',
'dayplan.pdfError': 'No se pudo exportar el PDF',
'dayplan.cannotReorderTransport': 'Las reservas con hora fija no se pueden reordenar',
'dayplan.confirmRemoveTimeTitle': '¿Eliminar hora?',
diff --git a/shared/src/i18n/et/collection.ts b/shared/src/i18n/et/collection.ts
index 99d920583..4836c0496 100644
--- a/shared/src/i18n/et/collection.ts
+++ b/shared/src/i18n/et/collection.ts
@@ -198,9 +198,13 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'TREKi nimekiri',
'collections.file.formatTrekHint': 'Teise TREKi jaoks, koos siltide ja olekutega',
'collections.file.formatGpxHint': 'Teekonnapunktid OsmAndi, Organic Mapsi, Garmini ja muude kaardirakenduste jaoks',
+ 'collections.file.formatKmlHint': 'Nööpnõelad Google My Mapsi jaoks, et näha kohti Google Mapsis',
'collections.file.gpxOmitted': '{count} kohal puuduvad koordinaadid ja need jäeti GPX-failist välja',
'collections.file.gpxOmitted.one': '{count} kohal puuduvad koordinaadid ja see jäeti GPX-failist välja',
'collections.file.gpxNothing': 'Ühelgi neist kohtadest pole koordinaate, seega pole midagi GPX-faili panna.',
+ 'collections.file.kmlOmitted': '{count} kohal puuduvad koordinaadid ja need jäeti KML-failist välja',
+ 'collections.file.kmlOmitted.one': '{count} kohal puuduvad koordinaadid ja see jäeti KML-failist välja',
+ 'collections.file.kmlNothing': 'Ühelgi neist kohtadest pole koordinaate, seega pole midagi KML-faili panna.',
'collections.file.reading': 'Faili lugemine…',
'collections.file.gpxSkipped': '{count} kasutatavate koordinaatideta teekonnapunkti jäetakse välja.',
'collections.file.gpxSkipped.one': '{count} kasutatavate koordinaatideta teekonnapunkt jäetakse välja.',
diff --git a/shared/src/i18n/et/dayplan.ts b/shared/src/i18n/et/dayplan.ts
index beff7344f..af0ace774 100644
--- a/shared/src/i18n/et/dayplan.ts
+++ b/shared/src/i18n/et/dayplan.ts
@@ -78,6 +78,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Päevad marsruutidena',
'dayplan.gpxEmpty': 'Veel pole midagi eksportida',
'dayplan.gpxFailed': 'GPX-i eksport ebaõnnestus',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Kohad Google My Mapsi jaoks',
+ 'dayplan.kmlHint': 'KML-fail, mida My Mapsi kihina importida',
+ 'dayplan.kmlFailed': 'KML-i eksport ebaõnnestus',
'dayplan.pdfError': 'PDF-i eksport ebaõnnestus',
'dayplan.mobile.addPlace': 'Lisa koht',
'dayplan.mobile.searchPlaces': 'Otsi kohti...',
diff --git a/shared/src/i18n/fr/collection.ts b/shared/src/i18n/fr/collection.ts
index 86ad05882..8b33811a3 100644
--- a/shared/src/i18n/fr/collection.ts
+++ b/shared/src/i18n/fr/collection.ts
@@ -199,10 +199,15 @@ const collection: TranslationStrings = {
'collections.file.formatTrekHint': 'Pour un autre TREK, avec étiquettes et statut',
'collections.file.formatGpxHint':
'Points de passage pour OsmAnd, Organic Maps, Garmin et d’autres applications cartographiques',
+ 'collections.file.formatKmlHint': 'Des repères pour Google My Maps, pour voir les lieux dans Google Maps',
'collections.file.gpxOmitted': '{count} lieux sans coordonnées ont été laissés hors du fichier GPX',
'collections.file.gpxOmitted.one': '{count} lieu sans coordonnées a été laissé hors du fichier GPX',
'collections.file.gpxNothing':
'Aucun de ces lieux n’a de coordonnées, il n’y a donc rien à mettre dans un fichier GPX.',
+ 'collections.file.kmlOmitted': '{count} lieux sans coordonnées ont été laissés hors du fichier KML',
+ 'collections.file.kmlOmitted.one': '{count} lieu sans coordonnées a été laissé hors du fichier KML',
+ 'collections.file.kmlNothing':
+ 'Aucun de ces lieux n’a de coordonnées, il n’y a donc rien à mettre dans un fichier KML.',
'collections.file.reading': 'Lecture du fichier…',
'collections.file.gpxSkipped': '{count} points de passage sans coordonnées utilisables sont écartés.',
'collections.file.gpxSkipped.one': '{count} point de passage sans coordonnées utilisables est écarté.',
diff --git a/shared/src/i18n/fr/dayplan.ts b/shared/src/i18n/fr/dayplan.ts
index 3922dd50e..f3b4eef61 100644
--- a/shared/src/i18n/fr/dayplan.ts
+++ b/shared/src/i18n/fr/dayplan.ts
@@ -67,6 +67,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Journées en itinéraires',
'dayplan.gpxEmpty': "Il n'y a encore rien à exporter",
'dayplan.gpxFailed': "Échec de l'export GPX",
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Lieux pour Google My Maps',
+ 'dayplan.kmlHint': 'Un fichier KML à importer comme calque dans My Maps',
+ 'dayplan.kmlFailed': 'Échec de l’export KML',
'dayplan.pdfError': "Échec de l'export PDF",
'dayplan.cannotReorderTransport': 'Les réservations avec une heure fixe ne peuvent pas être réorganisées',
'dayplan.confirmRemoveTimeTitle': "Supprimer l'heure ?",
diff --git a/shared/src/i18n/gr/collection.ts b/shared/src/i18n/gr/collection.ts
index 1939c9b88..529823a11 100644
--- a/shared/src/i18n/gr/collection.ts
+++ b/shared/src/i18n/gr/collection.ts
@@ -198,10 +198,15 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'Λίστα TREK',
'collections.file.formatTrekHint': 'Για άλλο TREK, με ετικέτες και κατάσταση',
'collections.file.formatGpxHint': 'Σημεία διαδρομής για OsmAnd, Organic Maps, Garmin και άλλες εφαρμογές χαρτών',
+ 'collections.file.formatKmlHint': 'Πινέζες για το Google My Maps, για να βλέπετε τα μέρη στο Google Maps',
'collections.file.gpxOmitted': '{count} μέρη χωρίς συντεταγμένες έμειναν εκτός του αρχείου GPX',
'collections.file.gpxOmitted.one': '{count} μέρος χωρίς συντεταγμένες έμεινε εκτός του αρχείου GPX',
'collections.file.gpxNothing':
'Κανένα από αυτά τα μέρη δεν έχει συντεταγμένες, οπότε δεν υπάρχει τίποτα για αρχείο GPX.',
+ 'collections.file.kmlOmitted': '{count} μέρη χωρίς συντεταγμένες έμειναν εκτός του αρχείου KML',
+ 'collections.file.kmlOmitted.one': '{count} μέρος χωρίς συντεταγμένες έμεινε εκτός του αρχείου KML',
+ 'collections.file.kmlNothing':
+ 'Κανένα από αυτά τα μέρη δεν έχει συντεταγμένες, οπότε δεν υπάρχει τίποτα για αρχείο KML.',
'collections.file.reading': 'Ανάγνωση αρχείου…',
'collections.file.gpxSkipped': '{count} σημεία διαδρομής χωρίς αξιοποιήσιμες συντεταγμένες μένουν εκτός.',
'collections.file.gpxSkipped.one': '{count} σημείο διαδρομής χωρίς αξιοποιήσιμες συντεταγμένες μένει εκτός.',
diff --git a/shared/src/i18n/gr/dayplan.ts b/shared/src/i18n/gr/dayplan.ts
index b2d1fef6d..ed056ce46 100644
--- a/shared/src/i18n/gr/dayplan.ts
+++ b/shared/src/i18n/gr/dayplan.ts
@@ -78,6 +78,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Ημέρες ως διαδρομές',
'dayplan.gpxEmpty': 'Δεν υπάρχει ακόμη κάτι για εξαγωγή',
'dayplan.gpxFailed': 'Η εξαγωγή GPX απέτυχε',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Μέρη για το Google My Maps',
+ 'dayplan.kmlHint': 'Αρχείο KML για εισαγωγή ως επίπεδο στο My Maps',
+ 'dayplan.kmlFailed': 'Η εξαγωγή KML απέτυχε',
'dayplan.pdfError': 'Αποτυχία εξαγωγής PDF',
'dayplan.mobile.addPlace': 'Προσθήκη Τοποθεσίας',
'dayplan.mobile.searchPlaces': 'Αναζήτηση τοποθεσιών...',
diff --git a/shared/src/i18n/he/collection.ts b/shared/src/i18n/he/collection.ts
index 13e7cbe20..524065cec 100644
--- a/shared/src/i18n/he/collection.ts
+++ b/shared/src/i18n/he/collection.ts
@@ -207,10 +207,15 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'רשימת TREK',
'collections.file.formatTrekHint': 'ל-TREK אחר, עם תוויות וסטטוס',
'collections.file.formatGpxHint': 'נקודות ציון ל-OsmAnd, ‏Organic Maps, ‏Garmin ואפליקציות מפה אחרות',
+ 'collections.file.formatKmlHint': 'נעצים ל-Google My Maps, כדי לראות את המקומות ב-Google Maps',
'collections.file.gpxOmitted': 'ל-{count} מקומות אין קואורדינטות והם לא נכללו בקובץ ה-GPX',
'collections.file.gpxOmitted.one': 'למקום אחד אין קואורדינטות והוא הושמט מקובץ ה-GPX',
'collections.file.gpxOmitted.two': 'לשני מקומות אין קואורדינטות והם הושמטו מקובץ ה-GPX',
'collections.file.gpxNothing': 'לאף אחד מהמקומות האלה אין קואורדינטות, אז אין מה להכניס לקובץ GPX.',
+ 'collections.file.kmlOmitted': 'ל-{count} מקומות אין קואורדינטות והם לא נכללו בקובץ ה-KML',
+ 'collections.file.kmlOmitted.one': 'למקום אחד אין קואורדינטות והוא הושמט מקובץ ה-KML',
+ 'collections.file.kmlOmitted.two': 'לשני מקומות אין קואורדינטות והם הושמטו מקובץ ה-KML',
+ 'collections.file.kmlNothing': 'לאף אחד מהמקומות האלה אין קואורדינטות, אז אין מה להכניס לקובץ KML.',
'collections.file.reading': 'קורא את הקובץ…',
'collections.file.gpxSkipped': '{count} נקודות ציון ללא קואורדינטות שמישות לא נכללו.',
'collections.file.gpxSkipped.one': 'נקודת ציון אחת בלי קואורדינטות שמישות מושמטת.',
diff --git a/shared/src/i18n/he/dayplan.ts b/shared/src/i18n/he/dayplan.ts
index 88f459a71..af24ca614 100644
--- a/shared/src/i18n/he/dayplan.ts
+++ b/shared/src/i18n/he/dayplan.ts
@@ -77,6 +77,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'ימים כמסלולים',
'dayplan.gpxEmpty': 'עדיין אין מה לייצא',
'dayplan.gpxFailed': 'ייצוא GPX נכשל',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'מקומות ל-Google My Maps',
+ 'dayplan.kmlHint': 'קובץ KML לייבוא כשכבה ב-My Maps',
+ 'dayplan.kmlFailed': 'ייצוא KML נכשל',
'dayplan.pdfError': 'ייצוא PDF נכשל',
'dayplan.mobile.addPlace': 'הוספת מקום',
'dayplan.mobile.searchPlaces': 'חיפוש מקומות...',
diff --git a/shared/src/i18n/hu/collection.ts b/shared/src/i18n/hu/collection.ts
index 5d48bbc88..2bb7dd2cd 100644
--- a/shared/src/i18n/hu/collection.ts
+++ b/shared/src/i18n/hu/collection.ts
@@ -199,9 +199,13 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'TREK-lista',
'collections.file.formatTrekHint': 'Másik TREK-hez, címkékkel és állapottal',
'collections.file.formatGpxHint': 'Útpontok OsmAndhez, Organic Mapshez, Garminhoz és más térképes alkalmazásokhoz',
+ 'collections.file.formatKmlHint': 'Gombostűk a Google My Maps számára, hogy a helyeket a Google Mapsben lásd',
'collections.file.gpxOmitted': '{count} helynek nincs koordinátája, ezért kimaradt a GPX-fájlból',
'collections.file.gpxOmitted.one': '{count} helynek nincs koordinátája, ezért kimaradt a GPX-fájlból',
'collections.file.gpxNothing': 'Egyik helynek sincs koordinátája, így nincs mit GPX-fájlba tenni.',
+ 'collections.file.kmlOmitted': '{count} helynek nincs koordinátája, ezért kimaradt a KML-fájlból',
+ 'collections.file.kmlOmitted.one': '{count} helynek nincs koordinátája, ezért kimaradt a KML-fájlból',
+ 'collections.file.kmlNothing': 'Egyik helynek sincs koordinátája, így nincs mit KML-fájlba tenni.',
'collections.file.reading': 'Fájl beolvasása…',
'collections.file.gpxSkipped': '{count} útpontnak nincs használható koordinátája, ezért kimarad.',
'collections.file.gpxSkipped.one': '{count} útpontnak nincs használható koordinátája, ezért kimarad.',
diff --git a/shared/src/i18n/hu/dayplan.ts b/shared/src/i18n/hu/dayplan.ts
index d6bc6ca3b..f0f0322b7 100644
--- a/shared/src/i18n/hu/dayplan.ts
+++ b/shared/src/i18n/hu/dayplan.ts
@@ -67,6 +67,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Napok útvonalként',
'dayplan.gpxEmpty': 'Még nincs mit exportálni',
'dayplan.gpxFailed': 'A GPX-exportálás nem sikerült',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Helyek a Google My Maps számára',
+ 'dayplan.kmlHint': 'KML-fájl a My Mapsbe rétegként importáláshoz',
+ 'dayplan.kmlFailed': 'A KML-exportálás nem sikerült',
'dayplan.pdfError': 'Nem sikerült a PDF exportálás',
'dayplan.cannotReorderTransport': 'A rögzített időpontú foglalások nem rendezhetők át',
'dayplan.confirmRemoveTimeTitle': 'Időpont eltávolítása?',
diff --git a/shared/src/i18n/id/collection.ts b/shared/src/i18n/id/collection.ts
index 0f454dece..8a112901b 100644
--- a/shared/src/i18n/id/collection.ts
+++ b/shared/src/i18n/id/collection.ts
@@ -175,9 +175,13 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'Daftar TREK',
'collections.file.formatTrekHint': 'Untuk TREK lain, lengkap dengan label dan status',
'collections.file.formatGpxHint': 'Titik lokasi untuk OsmAnd, Organic Maps, Garmin, dan aplikasi peta lain',
+ 'collections.file.formatKmlHint': 'Penanda untuk Google My Maps, agar tempat terlihat di Google Maps',
'collections.file.gpxOmitted': '{count} tempat tanpa koordinat tidak dimasukkan ke berkas GPX',
'collections.file.gpxNothing':
'Tidak ada tempat yang punya koordinat, jadi tidak ada yang bisa dimasukkan ke berkas GPX.',
+ 'collections.file.kmlOmitted': '{count} tempat tanpa koordinat tidak dimasukkan ke berkas KML',
+ 'collections.file.kmlNothing':
+ 'Tidak ada tempat yang punya koordinat, jadi tidak ada yang bisa dimasukkan ke berkas KML.',
'collections.file.reading': 'Membaca berkas…',
'collections.file.gpxSkipped': '{count} titik lokasi tanpa koordinat yang bisa dipakai tidak disertakan.',
'collections.file.gpxTrack': 'Berkas ini juga berisi {count} titik jejak. Jejak tidak diimpor, hanya titik lokasi.',
diff --git a/shared/src/i18n/id/dayplan.ts b/shared/src/i18n/id/dayplan.ts
index aa4ec0e4a..3b769b73f 100644
--- a/shared/src/i18n/id/dayplan.ts
+++ b/shared/src/i18n/id/dayplan.ts
@@ -76,6 +76,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Hari sebagai rute',
'dayplan.gpxEmpty': 'Belum ada yang bisa diekspor',
'dayplan.gpxFailed': 'Ekspor GPX gagal',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Tempat untuk Google My Maps',
+ 'dayplan.kmlHint': 'Berkas KML untuk diimpor sebagai lapisan di My Maps',
+ 'dayplan.kmlFailed': 'Ekspor KML gagal',
'dayplan.pdfError': 'Gagal mengekspor PDF',
'dayplan.mobile.addPlace': 'Tambah Tempat',
'dayplan.mobile.searchPlaces': 'Cari tempat...',
diff --git a/shared/src/i18n/it/collection.ts b/shared/src/i18n/it/collection.ts
index 21d925f56..996869fcd 100644
--- a/shared/src/i18n/it/collection.ts
+++ b/shared/src/i18n/it/collection.ts
@@ -198,10 +198,15 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'Elenco TREK',
'collections.file.formatTrekHint': 'Per un altro TREK, con etichette e stato',
'collections.file.formatGpxHint': 'Punti di passaggio per OsmAnd, Organic Maps, Garmin e altre app di mappe',
+ 'collections.file.formatKmlHint': 'Segnaposto per Google My Maps, per vedere i luoghi in Google Maps',
'collections.file.gpxOmitted': '{count} luoghi senza coordinate sono rimasti fuori dal file GPX',
'collections.file.gpxOmitted.one': '{count} luogo senza coordinate è rimasto fuori dal file GPX',
'collections.file.gpxNothing':
'Nessuno di questi luoghi ha coordinate, quindi non c’è niente da mettere in un file GPX.',
+ 'collections.file.kmlOmitted': '{count} luoghi senza coordinate sono rimasti fuori dal file KML',
+ 'collections.file.kmlOmitted.one': '{count} luogo senza coordinate è rimasto fuori dal file KML',
+ 'collections.file.kmlNothing':
+ 'Nessuno di questi luoghi ha coordinate, quindi non c’è niente da mettere in un file KML.',
'collections.file.reading': 'Lettura del file…',
'collections.file.gpxSkipped': '{count} punti di passaggio senza coordinate utilizzabili restano fuori.',
'collections.file.gpxSkipped.one': '{count} punto di passaggio senza coordinate utilizzabili resta fuori.',
diff --git a/shared/src/i18n/it/dayplan.ts b/shared/src/i18n/it/dayplan.ts
index ec2b8bcd6..2b49ada6a 100644
--- a/shared/src/i18n/it/dayplan.ts
+++ b/shared/src/i18n/it/dayplan.ts
@@ -67,6 +67,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Giorni come itinerari',
'dayplan.gpxEmpty': "Non c'è ancora nulla da esportare",
'dayplan.gpxFailed': 'Esportazione GPX non riuscita',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Luoghi per Google My Maps',
+ 'dayplan.kmlHint': 'Un file KML da importare come livello in My Maps',
+ 'dayplan.kmlFailed': 'Esportazione KML non riuscita',
'dayplan.pdfError': 'Impossibile esportare il PDF',
'dayplan.cannotReorderTransport': 'Le prenotazioni con un orario fisso non possono essere riordinate',
'dayplan.confirmRemoveTimeTitle': "Rimuovere l'orario?",
diff --git a/shared/src/i18n/ja/collection.ts b/shared/src/i18n/ja/collection.ts
index 8f2b1b344..cbcd79568 100644
--- a/shared/src/i18n/ja/collection.ts
+++ b/shared/src/i18n/ja/collection.ts
@@ -174,8 +174,11 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'TREK リスト',
'collections.file.formatTrekHint': '別の TREK 向け。ラベルとステータスも含みます',
'collections.file.formatGpxHint': 'OsmAnd、Organic Maps、Garmin などの地図アプリ向けのウェイポイント',
+ 'collections.file.formatKmlHint': 'Google My Maps 用のピン。Google Maps で場所を見られます',
'collections.file.gpxOmitted': '座標のない {count} 件の場所は GPX ファイルに含まれていません',
'collections.file.gpxNothing': 'どの場所にも座標がないため、GPX ファイルに入れるものがありません。',
+ 'collections.file.kmlOmitted': '座標のない {count} 件の場所は KML ファイルに含まれていません',
+ 'collections.file.kmlNothing': 'どの場所にも座標がないため、KML ファイルに入れるものがありません。',
'collections.file.reading': 'ファイルを読み込んでいます…',
'collections.file.gpxSkipped': '使える座標のないウェイポイント {count} 件は除外されます。',
'collections.file.gpxTrack':
diff --git a/shared/src/i18n/ja/dayplan.ts b/shared/src/i18n/ja/dayplan.ts
index 10e0ed2f2..cce4fb3b3 100644
--- a/shared/src/i18n/ja/dayplan.ts
+++ b/shared/src/i18n/ja/dayplan.ts
@@ -78,6 +78,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': '日程をルートとして',
'dayplan.gpxEmpty': 'まだ書き出せるものがありません',
'dayplan.gpxFailed': 'GPXの書き出しに失敗しました',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Google My Maps 用の場所',
+ 'dayplan.kmlHint': 'My Maps にレイヤーとして読み込む KML ファイル',
+ 'dayplan.kmlFailed': 'KML のエクスポートに失敗しました',
'dayplan.pdfError': 'PDFの書き出しに失敗しました',
'dayplan.mobile.addPlace': '場所を追加',
'dayplan.mobile.searchPlaces': '場所を検索…',
diff --git a/shared/src/i18n/ko/collection.ts b/shared/src/i18n/ko/collection.ts
index 81db23e68..13345501c 100644
--- a/shared/src/i18n/ko/collection.ts
+++ b/shared/src/i18n/ko/collection.ts
@@ -173,8 +173,11 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'TREK 목록',
'collections.file.formatTrekHint': '다른 TREK용, 라벨과 상태 포함',
'collections.file.formatGpxHint': 'OsmAnd, Organic Maps, Garmin 등 지도 앱용 웨이포인트',
+ 'collections.file.formatKmlHint': 'Google Maps에서 장소를 보기 위한 Google My Maps용 핀',
'collections.file.gpxOmitted': '좌표가 없는 장소 {count}개는 GPX 파일에서 빠졌습니다',
'collections.file.gpxNothing': '좌표가 있는 장소가 없어 GPX 파일에 넣을 것이 없습니다.',
+ 'collections.file.kmlOmitted': '좌표가 없는 장소 {count}개는 KML 파일에서 빠졌습니다',
+ 'collections.file.kmlNothing': '좌표가 있는 장소가 없어 KML 파일에 넣을 것이 없습니다.',
'collections.file.reading': '파일을 읽는 중…',
'collections.file.gpxSkipped': '쓸 수 있는 좌표가 없는 웨이포인트 {count}개는 제외됩니다.',
'collections.file.gpxTrack':
diff --git a/shared/src/i18n/ko/dayplan.ts b/shared/src/i18n/ko/dayplan.ts
index 81e1e7a4f..f34bae2a6 100644
--- a/shared/src/i18n/ko/dayplan.ts
+++ b/shared/src/i18n/ko/dayplan.ts
@@ -78,6 +78,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': '날짜를 경로로',
'dayplan.gpxEmpty': '아직 내보낼 것이 없습니다',
'dayplan.gpxFailed': 'GPX 내보내기에 실패했습니다',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Google My Maps용 장소',
+ 'dayplan.kmlHint': 'My Maps에 레이어로 가져올 KML 파일',
+ 'dayplan.kmlFailed': 'KML 내보내기에 실패했습니다',
'dayplan.pdfError': 'PDF 내보내기 실패',
'dayplan.mobile.addPlace': '장소 추가',
'dayplan.mobile.searchPlaces': '장소 검색...',
diff --git a/shared/src/i18n/nl/collection.ts b/shared/src/i18n/nl/collection.ts
index d04eb7c40..c40a65763 100644
--- a/shared/src/i18n/nl/collection.ts
+++ b/shared/src/i18n/nl/collection.ts
@@ -198,10 +198,15 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'TREK-lijst',
'collections.file.formatTrekHint': 'Voor een andere TREK, met labels en status',
'collections.file.formatGpxHint': 'Waypoints voor OsmAnd, Organic Maps, Garmin en andere kaart-apps',
+ 'collections.file.formatKmlHint': 'Spelden voor Google My Maps, om de plekken in Google Maps te zien',
'collections.file.gpxOmitted': '{count} plekken zonder coördinaten zijn niet in het GPX-bestand opgenomen',
'collections.file.gpxOmitted.one': '{count} plek zonder coördinaten is niet in het GPX-bestand opgenomen',
'collections.file.gpxNothing':
'Geen van deze plekken heeft coördinaten, dus er is niets om in een GPX-bestand te zetten.',
+ 'collections.file.kmlOmitted': '{count} plekken zonder coördinaten zijn niet in het KML-bestand opgenomen',
+ 'collections.file.kmlOmitted.one': '{count} plek zonder coördinaten is niet in het KML-bestand opgenomen',
+ 'collections.file.kmlNothing':
+ 'Geen van deze plekken heeft coördinaten, dus er is niets om in een KML-bestand te zetten.',
'collections.file.reading': 'Bestand wordt gelezen…',
'collections.file.gpxSkipped': '{count} waypoints zonder bruikbare coördinaten worden overgeslagen.',
'collections.file.gpxSkipped.one': '{count} waypoint zonder bruikbare coördinaten wordt overgeslagen.',
diff --git a/shared/src/i18n/nl/dayplan.ts b/shared/src/i18n/nl/dayplan.ts
index 73d109d1f..60755f1d9 100644
--- a/shared/src/i18n/nl/dayplan.ts
+++ b/shared/src/i18n/nl/dayplan.ts
@@ -67,6 +67,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Dagen als routes',
'dayplan.gpxEmpty': 'Er valt nog niets te exporteren',
'dayplan.gpxFailed': 'GPX-export mislukt',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Plekken voor Google My Maps',
+ 'dayplan.kmlHint': 'Een KML-bestand om als laag in My Maps te importeren',
+ 'dayplan.kmlFailed': 'KML-export mislukt',
'dayplan.pdfError': 'PDF-export mislukt',
'dayplan.cannotReorderTransport': 'Boekingen met een vast tijdstip kunnen niet worden verplaatst',
'dayplan.confirmRemoveTimeTitle': 'Tijd verwijderen?',
diff --git a/shared/src/i18n/pl/collection.ts b/shared/src/i18n/pl/collection.ts
index e4cb2f693..fb821f9aa 100644
--- a/shared/src/i18n/pl/collection.ts
+++ b/shared/src/i18n/pl/collection.ts
@@ -244,11 +244,17 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'Lista TREK',
'collections.file.formatTrekHint': 'Dla innego TREK, z etykietami i statusem',
'collections.file.formatGpxHint': 'Punkty trasy dla OsmAnd, Organic Maps, Garmina i innych aplikacji z mapami',
+ 'collections.file.formatKmlHint': 'Pinezki dla Google My Maps, aby zobaczyć miejsca w Google Maps',
'collections.file.gpxOmitted': '{count} miejsca nie ma współrzędnych i nie trafiło do pliku GPX',
'collections.file.gpxOmitted.one': '{count} miejsce nie ma współrzędnych i nie trafiło do pliku GPX',
'collections.file.gpxOmitted.few': '{count} miejsca nie mają współrzędnych i nie trafiły do pliku GPX',
'collections.file.gpxOmitted.many': '{count} miejsc nie ma współrzędnych i nie trafiło do pliku GPX',
'collections.file.gpxNothing': 'Żadne z tych miejsc nie ma współrzędnych, więc nie ma czego zapisać w pliku GPX.',
+ 'collections.file.kmlOmitted': '{count} miejsca nie ma współrzędnych i nie trafiło do pliku KML',
+ 'collections.file.kmlOmitted.one': '{count} miejsce nie ma współrzędnych i nie trafiło do pliku KML',
+ 'collections.file.kmlOmitted.few': '{count} miejsca nie mają współrzędnych i nie trafiły do pliku KML',
+ 'collections.file.kmlOmitted.many': '{count} miejsc nie ma współrzędnych i nie trafiło do pliku KML',
+ 'collections.file.kmlNothing': 'Żadne z tych miejsc nie ma współrzędnych, więc nie ma czego zapisać w pliku KML.',
'collections.file.reading': 'Wczytywanie pliku…',
'collections.file.gpxSkipped': 'Punkty trasy bez użytecznych współrzędnych zostaną pominięte: {count}.',
'collections.file.gpxSkipped.one': '{count} punkt trasy bez użytecznych współrzędnych zostanie pominięty.',
diff --git a/shared/src/i18n/pl/dayplan.ts b/shared/src/i18n/pl/dayplan.ts
index 9f9b7047a..d80955503 100644
--- a/shared/src/i18n/pl/dayplan.ts
+++ b/shared/src/i18n/pl/dayplan.ts
@@ -77,6 +77,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Dni jako trasy',
'dayplan.gpxEmpty': 'Nie ma jeszcze czego eksportować',
'dayplan.gpxFailed': 'Eksport GPX nie powiódł się',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Miejsca dla Google My Maps',
+ 'dayplan.kmlHint': 'Plik KML do zaimportowania jako warstwa w My Maps',
+ 'dayplan.kmlFailed': 'Eksport KML nie powiódł się',
'dayplan.pdfError': 'Nie udało się wyeksportować pliku PDF',
'dayplan.mobile.addPlace': 'Dodaj miejsce',
'dayplan.mobile.searchPlaces': 'Szukaj miejsc...',
diff --git a/shared/src/i18n/ru/collection.ts b/shared/src/i18n/ru/collection.ts
index 38f6b0e42..6cedceb4a 100644
--- a/shared/src/i18n/ru/collection.ts
+++ b/shared/src/i18n/ru/collection.ts
@@ -244,11 +244,17 @@ const collection: TranslationStrings = {
'collections.file.formatTrekHint': 'Для другого TREK, с метками и статусом',
'collections.file.formatGpxHint':
'Путевые точки для OsmAnd, Organic Maps, Garmin и других картографических приложений',
+ 'collections.file.formatKmlHint': 'Точки для Google My Maps, чтобы видеть места в Google Maps',
'collections.file.gpxOmitted': '{count} места без координат не попало в файл GPX',
'collections.file.gpxOmitted.one': '{count} место без координат не попало в файл GPX',
'collections.file.gpxOmitted.few': '{count} места без координат не попали в файл GPX',
'collections.file.gpxOmitted.many': '{count} мест без координат не попало в файл GPX',
'collections.file.gpxNothing': 'Ни у одного из этих мест нет координат, поэтому в файл GPX нечего записать.',
+ 'collections.file.kmlOmitted': '{count} места без координат не попало в файл KML',
+ 'collections.file.kmlOmitted.one': '{count} место без координат не попало в файл KML',
+ 'collections.file.kmlOmitted.few': '{count} места без координат не попали в файл KML',
+ 'collections.file.kmlOmitted.many': '{count} мест без координат не попало в файл KML',
+ 'collections.file.kmlNothing': 'Ни у одного из этих мест нет координат, поэтому в файл KML нечего записать.',
'collections.file.reading': 'Чтение файла…',
'collections.file.gpxSkipped': '{count} путевой точки без пригодных координат будет пропущено.',
'collections.file.gpxSkipped.one': '{count} путевая точка без пригодных координат будет пропущена.',
diff --git a/shared/src/i18n/ru/dayplan.ts b/shared/src/i18n/ru/dayplan.ts
index 16e0f503d..ef50f0161 100644
--- a/shared/src/i18n/ru/dayplan.ts
+++ b/shared/src/i18n/ru/dayplan.ts
@@ -67,6 +67,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Дни как маршруты',
'dayplan.gpxEmpty': 'Пока нечего экспортировать',
'dayplan.gpxFailed': 'Не удалось экспортировать GPX',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Места для Google My Maps',
+ 'dayplan.kmlHint': 'Файл KML для импорта слоем в My Maps',
+ 'dayplan.kmlFailed': 'Не удалось экспортировать KML',
'dayplan.pdfError': 'Ошибка экспорта PDF',
'dayplan.cannotReorderTransport': 'Бронирования с фиксированным временем нельзя перемещать',
'dayplan.confirmRemoveTimeTitle': 'Удалить время?',
diff --git a/shared/src/i18n/sk/collection.ts b/shared/src/i18n/sk/collection.ts
index 342ff6326..05d6d0cda 100644
--- a/shared/src/i18n/sk/collection.ts
+++ b/shared/src/i18n/sk/collection.ts
@@ -221,10 +221,15 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'Zoznam TREK',
'collections.file.formatTrekHint': 'Pre iný TREK, so štítkami a stavom',
'collections.file.formatGpxHint': 'Trasové body pre OsmAnd, Organic Maps, Garmin a ďalšie mapové aplikácie',
+ 'collections.file.formatKmlHint': 'Špendlíky pre Google My Maps, aby ste miesta videli v Google Maps',
'collections.file.gpxOmitted': '{count} miest nemá súradnice a bolo vynechaných zo súboru GPX',
'collections.file.gpxOmitted.one': '{count} miesto nemá súradnice a bolo vynechané zo súboru GPX',
'collections.file.gpxOmitted.few': '{count} miesta nemajú súradnice a boli vynechané zo súboru GPX',
'collections.file.gpxNothing': 'Žiadne z týchto miest nemá súradnice, takže do súboru GPX nie je čo uložiť.',
+ 'collections.file.kmlOmitted': '{count} miest nemá súradnice a bolo vynechaných zo súboru KML',
+ 'collections.file.kmlOmitted.one': '{count} miesto nemá súradnice a bolo vynechané zo súboru KML',
+ 'collections.file.kmlOmitted.few': '{count} miesta nemajú súradnice a boli vynechané zo súboru KML',
+ 'collections.file.kmlNothing': 'Žiadne z týchto miest nemá súradnice, takže do súboru KML nie je čo uložiť.',
'collections.file.reading': 'Načítava sa súbor…',
'collections.file.gpxSkipped': '{count} trasových bodov bez použiteľných súradníc sa vynechá.',
'collections.file.gpxSkipped.one': '{count} trasový bod bez použiteľných súradníc sa vynechá.',
diff --git a/shared/src/i18n/sk/dayplan.ts b/shared/src/i18n/sk/dayplan.ts
index 2f48f172f..56c6122a9 100644
--- a/shared/src/i18n/sk/dayplan.ts
+++ b/shared/src/i18n/sk/dayplan.ts
@@ -78,6 +78,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Dni ako trasy',
'dayplan.gpxEmpty': 'Zatiaľ nie je čo exportovať',
'dayplan.gpxFailed': 'Export GPX zlyhal',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Miesta pre Google My Maps',
+ 'dayplan.kmlHint': 'Súbor KML na import ako vrstva do My Maps',
+ 'dayplan.kmlFailed': 'Export KML zlyhal',
'dayplan.pdfError': 'Export do PDF sa nepodaril',
'dayplan.mobile.addPlace': 'Pridať miesto',
'dayplan.mobile.searchPlaces': 'Hľadať miesta...',
diff --git a/shared/src/i18n/sv/collection.ts b/shared/src/i18n/sv/collection.ts
index a75eec44e..e9acdabbb 100644
--- a/shared/src/i18n/sv/collection.ts
+++ b/shared/src/i18n/sv/collection.ts
@@ -197,10 +197,15 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'TREK-lista',
'collections.file.formatTrekHint': 'För en annan TREK, med etiketter och status',
'collections.file.formatGpxHint': 'Vägpunkter för OsmAnd, Organic Maps, Garmin och andra kartappar',
+ 'collections.file.formatKmlHint': 'Nålar för Google My Maps, för att se platserna i Google Maps',
'collections.file.gpxOmitted': '{count} platser utan koordinater kom inte med i GPX-filen',
'collections.file.gpxOmitted.one': '{count} plats utan koordinater kom inte med i GPX-filen',
'collections.file.gpxNothing':
'Ingen av de här platserna har koordinater, så det finns inget att lägga i en GPX-fil.',
+ 'collections.file.kmlOmitted': '{count} platser utan koordinater kom inte med i KML-filen',
+ 'collections.file.kmlOmitted.one': '{count} plats utan koordinater kom inte med i KML-filen',
+ 'collections.file.kmlNothing':
+ 'Ingen av de här platserna har koordinater, så det finns inget att lägga i en KML-fil.',
'collections.file.reading': 'Läser filen…',
'collections.file.gpxSkipped': '{count} vägpunkter utan användbara koordinater lämnas utanför.',
'collections.file.gpxSkipped.one': '{count} vägpunkt utan användbara koordinater lämnas utanför.',
diff --git a/shared/src/i18n/sv/dayplan.ts b/shared/src/i18n/sv/dayplan.ts
index 45d6c4e53..d74e5a9a1 100644
--- a/shared/src/i18n/sv/dayplan.ts
+++ b/shared/src/i18n/sv/dayplan.ts
@@ -79,6 +79,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Dagar som rutter',
'dayplan.gpxEmpty': 'Det finns inget att exportera än',
'dayplan.gpxFailed': 'GPX-exporten misslyckades',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Platser för Google My Maps',
+ 'dayplan.kmlHint': 'En KML-fil att importera som lager i My Maps',
+ 'dayplan.kmlFailed': 'KML-exporten misslyckades',
'dayplan.pdfError': 'Kunde inte exportera PDF',
'dayplan.mobile.addPlace': 'Lägg itll plats',
'dayplan.mobile.searchPlaces': 'Sök platser...',
diff --git a/shared/src/i18n/th/collection.ts b/shared/src/i18n/th/collection.ts
index 23a69f00d..d1d154b0b 100644
--- a/shared/src/i18n/th/collection.ts
+++ b/shared/src/i18n/th/collection.ts
@@ -217,8 +217,11 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'รายการ TREK',
'collections.file.formatTrekHint': 'สำหรับ TREK อื่น พร้อมป้ายกำกับและสถานะ',
'collections.file.formatGpxHint': 'จุดอ้างอิงสำหรับ OsmAnd, Organic Maps, Garmin และแอปแผนที่อื่นๆ',
+ 'collections.file.formatKmlHint': 'หมุดสำหรับ Google My Maps เพื่อดูสถานที่ใน Google Maps',
'collections.file.gpxOmitted': 'สถานที่ {count} แห่งไม่มีพิกัด จึงไม่ได้รวมไว้ในไฟล์ GPX',
'collections.file.gpxNothing': 'ไม่มีสถานที่ใดในนี้ที่มีพิกัด จึงไม่มีอะไรจะใส่ในไฟล์ GPX',
+ 'collections.file.kmlOmitted': 'สถานที่ {count} แห่งไม่มีพิกัด จึงไม่ได้รวมไว้ในไฟล์ KML',
+ 'collections.file.kmlNothing': 'ไม่มีสถานที่ใดในนี้ที่มีพิกัด จึงไม่มีอะไรจะใส่ในไฟล์ KML',
'collections.file.reading': 'กำลังอ่านไฟล์…',
'collections.file.gpxSkipped': 'จุดอ้างอิง {count} จุดที่ไม่มีพิกัดที่ใช้ได้จะถูกข้ามไป',
'collections.file.gpxTrack': 'ไฟล์นี้ยังมีจุดแทร็ก {count} จุด ระบบจะนำเข้าเฉพาะจุดอ้างอิง ไม่นำเข้าแทร็ก',
diff --git a/shared/src/i18n/th/dayplan.ts b/shared/src/i18n/th/dayplan.ts
index 2c6f891fc..df2248ff5 100644
--- a/shared/src/i18n/th/dayplan.ts
+++ b/shared/src/i18n/th/dayplan.ts
@@ -77,6 +77,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'วันเป็นเส้นทาง',
'dayplan.gpxEmpty': 'ยังไม่มีสิ่งใดที่จะส่งออก',
'dayplan.gpxFailed': 'การส่งออก GPX ล้มเหลว',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'สถานที่สำหรับ Google My Maps',
+ 'dayplan.kmlHint': 'ไฟล์ KML สำหรับนำเข้าเป็นเลเยอร์ใน My Maps',
+ 'dayplan.kmlFailed': 'ส่งออก KML ไม่สำเร็จ',
'dayplan.pdfError': 'ส่งออก PDF ไม่สำเร็จ',
'dayplan.mobile.addPlace': 'เพิ่มสถานที่',
'dayplan.mobile.searchPlaces': 'ค้นหาสถานที่...',
diff --git a/shared/src/i18n/tr/collection.ts b/shared/src/i18n/tr/collection.ts
index 24b705545..cefbe7952 100644
--- a/shared/src/i18n/tr/collection.ts
+++ b/shared/src/i18n/tr/collection.ts
@@ -198,9 +198,13 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'TREK listesi',
'collections.file.formatTrekHint': 'Başka bir TREK için, etiketler ve durumla birlikte',
'collections.file.formatGpxHint': 'OsmAnd, Organic Maps, Garmin ve diğer harita uygulamaları için yol noktaları',
+ 'collections.file.formatKmlHint': 'Yerleri Google Maps’te görmek için Google My Maps işaretleri',
'collections.file.gpxOmitted': 'Koordinatı olmayan {count} yer GPX dosyasına eklenmedi',
'collections.file.gpxOmitted.one': 'Koordinatı olmayan {count} yer GPX dosyasına eklenmedi',
'collections.file.gpxNothing': 'Bu yerlerin hiçbirinin koordinatı yok, bu yüzden GPX dosyasına konacak bir şey yok.',
+ 'collections.file.kmlOmitted': 'Koordinatı olmayan {count} yer KML dosyasına eklenmedi',
+ 'collections.file.kmlOmitted.one': 'Koordinatı olmayan {count} yer KML dosyasına eklenmedi',
+ 'collections.file.kmlNothing': 'Bu yerlerin hiçbirinin koordinatı yok, bu yüzden KML dosyasına konacak bir şey yok.',
'collections.file.reading': 'Dosya okunuyor…',
'collections.file.gpxSkipped': 'Kullanılabilir koordinatı olmayan {count} yol noktası dışarıda bırakılıyor.',
'collections.file.gpxSkipped.one': 'Kullanılabilir koordinatı olmayan {count} yol noktası dışarıda bırakılıyor.',
diff --git a/shared/src/i18n/tr/dayplan.ts b/shared/src/i18n/tr/dayplan.ts
index 53382a753..7a779f1bf 100644
--- a/shared/src/i18n/tr/dayplan.ts
+++ b/shared/src/i18n/tr/dayplan.ts
@@ -78,6 +78,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Günler rota olarak',
'dayplan.gpxEmpty': 'Henüz dışa aktarılacak bir şey yok',
'dayplan.gpxFailed': 'GPX dışa aktarma başarısız oldu',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Google My Maps için yerler',
+ 'dayplan.kmlHint': 'My Maps’e katman olarak aktarılacak bir KML dosyası',
+ 'dayplan.kmlFailed': 'KML dışa aktarımı başarısız oldu',
'dayplan.pdfError': 'PDF dışa aktarılamadı',
'dayplan.mobile.addPlace': 'Yer Ekle',
'dayplan.mobile.searchPlaces': 'Yer ara...',
diff --git a/shared/src/i18n/uk/collection.ts b/shared/src/i18n/uk/collection.ts
index d66fe18c6..febbdfb97 100644
--- a/shared/src/i18n/uk/collection.ts
+++ b/shared/src/i18n/uk/collection.ts
@@ -244,11 +244,17 @@ const collection: TranslationStrings = {
'collections.file.formatTrekHint': 'Для іншого TREK, з мітками й статусом',
'collections.file.formatGpxHint':
'Маршрутні точки для OsmAnd, Organic Maps, Garmin та інших картографічних застосунків',
+ 'collections.file.formatKmlHint': 'Точки для Google My Maps, щоб бачити місця в Google Maps',
'collections.file.gpxOmitted': '{count} місця не має координат і не потрапило до файлу GPX',
'collections.file.gpxOmitted.one': '{count} місце не має координат і не потрапило до файлу GPX',
'collections.file.gpxOmitted.few': '{count} місця не мають координат і не потрапили до файлу GPX',
'collections.file.gpxOmitted.many': '{count} місць не має координат і не потрапило до файлу GPX',
'collections.file.gpxNothing': 'Жодне з цих місць не має координат, тож у файл GPX нічого записати.',
+ 'collections.file.kmlOmitted': '{count} місця не має координат і не потрапило до файлу KML',
+ 'collections.file.kmlOmitted.one': '{count} місце не має координат і не потрапило до файлу KML',
+ 'collections.file.kmlOmitted.few': '{count} місця не мають координат і не потрапили до файлу KML',
+ 'collections.file.kmlOmitted.many': '{count} місць не має координат і не потрапило до файлу KML',
+ 'collections.file.kmlNothing': 'Жодне з цих місць не має координат, тож у файл KML нічого записати.',
'collections.file.reading': 'Читання файлу…',
'collections.file.gpxSkipped': 'Буде пропущено {count} маршрутної точки без придатних координат.',
'collections.file.gpxSkipped.one': 'Буде пропущено {count} маршрутну точку без придатних координат.',
diff --git a/shared/src/i18n/uk/dayplan.ts b/shared/src/i18n/uk/dayplan.ts
index a8c4b8095..c8c04a37b 100644
--- a/shared/src/i18n/uk/dayplan.ts
+++ b/shared/src/i18n/uk/dayplan.ts
@@ -69,6 +69,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Дні як маршрути',
'dayplan.gpxEmpty': 'Поки немає чого експортувати',
'dayplan.gpxFailed': 'Не вдалося експортувати GPX',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Місця для Google My Maps',
+ 'dayplan.kmlHint': 'Файл KML для імпорту шаром у My Maps',
+ 'dayplan.kmlFailed': 'Не вдалося експортувати KML',
'dayplan.pdfError': 'Помилка експорту PDF',
'dayplan.cannotReorderTransport': 'Бронювання з фіксованим часом не можна переміщувати',
'dayplan.confirmRemoveTimeTitle': 'Видалити час?',
diff --git a/shared/src/i18n/vi/collection.ts b/shared/src/i18n/vi/collection.ts
index 53814c615..ad003c92f 100644
--- a/shared/src/i18n/vi/collection.ts
+++ b/shared/src/i18n/vi/collection.ts
@@ -175,8 +175,11 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'Danh sách TREK',
'collections.file.formatTrekHint': 'Cho một TREK khác, kèm nhãn và trạng thái',
'collections.file.formatGpxHint': 'Điểm tham chiếu cho OsmAnd, Organic Maps, Garmin và các ứng dụng bản đồ khác',
+ 'collections.file.formatKmlHint': 'Ghim cho Google My Maps để xem các địa điểm trong Google Maps',
'collections.file.gpxOmitted': '{count} địa điểm không có tọa độ nên không được đưa vào tệp GPX',
'collections.file.gpxNothing': 'Không địa điểm nào có tọa độ, nên không có gì để đưa vào tệp GPX.',
+ 'collections.file.kmlOmitted': '{count} địa điểm không có tọa độ nên không được đưa vào tệp KML',
+ 'collections.file.kmlNothing': 'Không địa điểm nào có tọa độ, nên không có gì để đưa vào tệp KML.',
'collections.file.reading': 'Đang đọc tệp…',
'collections.file.gpxSkipped': '{count} điểm tham chiếu không có tọa độ dùng được sẽ bị bỏ qua.',
'collections.file.gpxTrack':
diff --git a/shared/src/i18n/vi/dayplan.ts b/shared/src/i18n/vi/dayplan.ts
index a903c0483..13276e0a1 100644
--- a/shared/src/i18n/vi/dayplan.ts
+++ b/shared/src/i18n/vi/dayplan.ts
@@ -78,6 +78,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': 'Các ngày dưới dạng lộ trình',
'dayplan.gpxEmpty': 'Chưa có gì để xuất',
'dayplan.gpxFailed': 'Xuất GPX thất bại',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': 'Địa điểm cho Google My Maps',
+ 'dayplan.kmlHint': 'Tệp KML để nhập làm lớp trong My Maps',
+ 'dayplan.kmlFailed': 'Xuất KML thất bại',
'dayplan.pdfError': 'Không xuất được PDF',
'dayplan.mobile.addPlace': 'Thêm địa điểm',
'dayplan.mobile.searchPlaces': 'Tìm kiếm địa điểm...',
diff --git a/shared/src/i18n/zh-TW/collection.ts b/shared/src/i18n/zh-TW/collection.ts
index 0b154409c..cf01ac093 100644
--- a/shared/src/i18n/zh-TW/collection.ts
+++ b/shared/src/i18n/zh-TW/collection.ts
@@ -172,8 +172,11 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'TREK 清單',
'collections.file.formatTrekHint': '給其他 TREK 使用,包含標籤與狀態',
'collections.file.formatGpxHint': '供 OsmAnd、Organic Maps、Garmin 等地圖 App 使用的航點',
+ 'collections.file.formatKmlHint': '用於 Google My Maps 的圖釘,可在 Google Maps 中查看這些地點',
'collections.file.gpxOmitted': '{count} 個沒有座標的地點未寫入 GPX 檔案',
'collections.file.gpxNothing': '這些地點都沒有座標,沒有可寫入 GPX 檔案的內容。',
+ 'collections.file.kmlOmitted': '{count} 個沒有座標的地點未寫入 KML 檔案',
+ 'collections.file.kmlNothing': '這些地點都沒有座標,沒有可寫入 KML 檔案的內容。',
'collections.file.reading': '正在讀取檔案…',
'collections.file.gpxSkipped': '{count} 個沒有可用座標的航點將被略過。',
'collections.file.gpxTrack': '這個檔案還包含 {count} 個軌跡點。軌跡不會匯入,只匯入航點。',
diff --git a/shared/src/i18n/zh-TW/dayplan.ts b/shared/src/i18n/zh-TW/dayplan.ts
index e8cb41628..717281aef 100644
--- a/shared/src/i18n/zh-TW/dayplan.ts
+++ b/shared/src/i18n/zh-TW/dayplan.ts
@@ -67,6 +67,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': '按天產生路線',
'dayplan.gpxEmpty': '暫時沒有可匯出的內容',
'dayplan.gpxFailed': 'GPX 匯出失敗',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': '用於 Google My Maps 的地點',
+ 'dayplan.kmlHint': '可作為圖層匯入 My Maps 的 KML 檔案',
+ 'dayplan.kmlFailed': 'KML 匯出失敗',
'dayplan.pdfError': 'PDF 匯出失敗',
'dayplan.cannotReorderTransport': '有固定時間的預訂無法重新排序',
'dayplan.confirmRemoveTimeTitle': '移除時間?',
diff --git a/shared/src/i18n/zh/collection.ts b/shared/src/i18n/zh/collection.ts
index 6f5e1c815..1c513ddf9 100644
--- a/shared/src/i18n/zh/collection.ts
+++ b/shared/src/i18n/zh/collection.ts
@@ -172,8 +172,11 @@ const collection: TranslationStrings = {
'collections.file.formatTrek': 'TREK 列表',
'collections.file.formatTrekHint': '用于其他 TREK,包含标签和状态',
'collections.file.formatGpxHint': '供 OsmAnd、Organic Maps、Garmin 等地图应用使用的航点',
+ 'collections.file.formatKmlHint': '用于 Google My Maps 的图钉,可在 Google Maps 中查看这些地点',
'collections.file.gpxOmitted': '{count} 个没有坐标的地点未写入 GPX 文件',
'collections.file.gpxNothing': '这些地点都没有坐标,没有可写入 GPX 文件的内容。',
+ 'collections.file.kmlOmitted': '{count} 个没有坐标的地点未写入 KML 文件',
+ 'collections.file.kmlNothing': '这些地点都没有坐标,没有可写入 KML 文件的内容。',
'collections.file.reading': '正在读取文件…',
'collections.file.gpxSkipped': '{count} 个没有可用坐标的航点将被略过。',
'collections.file.gpxTrack': '该文件还包含 {count} 个轨迹点。轨迹不会导入,只导入航点。',
diff --git a/shared/src/i18n/zh/dayplan.ts b/shared/src/i18n/zh/dayplan.ts
index 3f9622ba5..170c36658 100644
--- a/shared/src/i18n/zh/dayplan.ts
+++ b/shared/src/i18n/zh/dayplan.ts
@@ -67,6 +67,10 @@ const dayplan: TranslationStrings = {
'dayplan.gpxDays': '按天生成路线',
'dayplan.gpxEmpty': '暂时没有可导出的内容',
'dayplan.gpxFailed': 'GPX 导出失败',
+ 'dayplan.exportGoogleMaps': 'Google Maps',
+ 'dayplan.kmlPlaces': '用于 Google My Maps 的地点',
+ 'dayplan.kmlHint': '可作为图层导入 My Maps 的 KML 文件',
+ 'dayplan.kmlFailed': 'KML 导出失败',
'dayplan.pdfError': 'PDF 导出失败',
'dayplan.cannotReorderTransport': '有固定时间的预订无法重新排序',
'dayplan.confirmRemoveTimeTitle': '移除时间?',
diff --git a/wiki/Collections.md b/wiki/Collections.md
index 77cabe0f4..3d108078b 100644
--- a/wiki/Collections.md
+++ b/wiki/Collections.md
@@ -109,6 +109,7 @@ Sharing works between people on the same TREK. To give a list to somebody who ru
- **TREK list** downloads the open list as a `.trekcollection.json` file: the list's name, description and colour, its labels, and every place with its address, coordinates, notes, status, website, phone, category name and labels. This is the one to give to another TREK.
- **GPX** downloads the places as waypoints in a `.gpx` file, for OsmAnd, Organic Maps, a Garmin, gpx.studio or any other app that reads GPX. Each waypoint carries the place's name, description and address, notes, website and category, which every such app shows. Labels, status, phone and the rest travel alongside in a TREK extension that other apps ignore, so a GPX made by TREK comes back into TREK complete. A place without coordinates cannot be a waypoint: it is left out, and TREK tells you how many were.
+- **KML** downloads the places as pins in a `.kml` file for Google My Maps, the way to see a list in Google Maps (see [Taking the places to Google Maps](Map-Features#taking-the-places-to-google-maps)). Each pin carries the place's name, address, phone, description and notes, and its category, status, labels and website as the columns of the layer's table. Places without coordinates are left out and counted, as for GPX.
**Import** sits next to **New list** in the lists rail, as the button with the upload arrow. Pick a TREK list file or a GPX file and TREK shows what is in it before anything happens: the name, how many places, how many labels. Then choose where the places go, and you land on that list when it is done.
diff --git a/wiki/Day-Plans-and-Notes.md b/wiki/Day-Plans-and-Notes.md
index fb7bf60d3..0bf19d329 100644
--- a/wiki/Day-Plans-and-Notes.md
+++ b/wiki/Day-Plans-and-Notes.md
@@ -153,7 +153,7 @@ Click a day's head band to open its details. The panel floats over the map, betw
The head band of the days column holds, from left to right:
-- **Export**: one dialog with every way a trip leaves TREK, in three groups. **Document** is the **PDF** of the whole plan and, once some stop has participants or some booking has travelers, **My plan as PDF**: the plan you go on, without the stops and bookings that name only other people (see [PDF-Export](PDF-Export)). **Calendar** offers **Download .ics** and, for members who can manage share links, **Subscribe to calendar** (see [Calendar Feeds](Calendar-Feeds)). **Maps & GPS** offers GPX files: **Whole trip**, **Places only** and **Days as routes** (see [Exporting a trip as GPX](Map-Features#exporting-a-trip-as-gpx)).
+- **Export**: one dialog with every way a trip leaves TREK, in four groups. **Document** is the **PDF** of the whole plan and, once some stop has participants or some booking has travelers, **My plan as PDF**: the plan you go on, without the stops and bookings that name only other people (see [PDF-Export](PDF-Export)). **Calendar** offers **Download .ics** and, for members who can manage share links, **Subscribe to calendar** (see [Calendar Feeds](Calendar-Feeds)). **Maps & GPS** offers GPX files: **Whole trip**, **Places only** and **Days as routes** (see [Exporting a trip as GPX](Map-Features#exporting-a-trip-as-gpx)). **Google Maps** offers the places as a KML file for Google My Maps (see [Taking the places to Google Maps](Map-Features#taking-the-places-to-google-maps)).
- **Undo**: reverses the last action. See [Undo](Trip-Planner-Overview#undo).
- **Expand all days** / **Collapse all days**.
- **Reorder days**: move, add and delete days. Shown to members who can edit days. See [Adding a day](#adding-a-day) and [Deleting a day](#deleting-a-day).
diff --git a/wiki/MCP-Tools-and-Resources.md b/wiki/MCP-Tools-and-Resources.md
index b3783d7bb..db98b465f 100644
--- a/wiki/MCP-Tools-and-Resources.md
+++ b/wiki/MCP-Tools-and-Resources.md
@@ -64,6 +64,7 @@ Requires `places:read` or `places:write` scope.
| `delete_place` | Remove a place from a trip. Also removes all day assignments, the expenses linked to the place and any night booked at it, together with that night's reservation and the reservation's expense. Cannot be undone, so an assistant should warn before deleting a hotel that holds a booking. |
| `bulk_delete_places` | Delete multiple places by ID. Removes all day assignments, linked expenses and any nights booked at each place, with their reservations and expenses. Cannot be undone. |
| `import_places_from_url` | Import all places from a publicly shared Google Maps or Naver Maps list URL. |
+| `export_trip_kml` | Export the trip's places as KML text for Google My Maps: every place with coordinates as a pin with its name, address, description and category. Google Maps takes no list of places from outside, but a My Maps map imports the file as a layer. Requires `places:read`. |
| `list_categories` | List all available place categories with id, name, icon, and color. |
| `create_category` | Add a category to the instance-wide palette, with name, hex colour and emoji icon. Every trip on the instance sees it, so prefer an existing one from `list_categories`. Admin only; a non-admin gets `Admin access required`. Requires `places:write`. |
| `update_category` | Rename a category or change its colour or icon. Every place already carrying it follows the change. Admin only. Requires `places:write`. |
diff --git a/wiki/Map-Features.md b/wiki/Map-Features.md
index fb347fd5d..21745f26e 100644
--- a/wiki/Map-Features.md
+++ b/wiki/Map-Features.md
@@ -99,6 +99,10 @@ Three scopes:
Places carry their description and address, and their category travels along as the GPX symbol, so devices that support it can show a different icon per kind of stop. Elevation is written back for tracks that were imported with it. Exporting is a read, so every trip member can do it, not only those who may edit.
+### Taking the places to Google Maps
+
+Google Maps cannot take a list of places from another app, but a Google My Maps map can. Under **Google Maps**, the same dialog offers **Places for Google My Maps**: a `.kml` file with every place that has coordinates as a pin, with its name, address, description and category. In [Google My Maps](https://www.google.com/maps/d/), create a map, choose **Import** on a layer and pick the file. A place that is a track appears as a pin at its start; the line itself goes out as GPX. Places without coordinates are left out. On a phone the same download sits in the trip's **Export** sheet.
+
## Travel times between stops
Travel times are not drawn on the map; they sit in the day plan. Switch a day's **Route** on and a slim connector row appears between each pair of consecutive stops with that leg's travel time and distance, and an icon for the mode it was routed in: a car for driving, a foot for walking, a bicycle for cycling, a bolt for a plugin route profile. On a phone the same rows sit in the day's plan timeline, where they are always shown and need no toggle. If the day has an accommodation and **Optimize route from accommodation** is on, two extra connectors frame the day, naming the hotel with the drive out in the morning and back in the evening.
diff --git a/wiki/Mobile-App.md b/wiki/Mobile-App.md
index 83b901c61..ea3921cf8 100644
--- a/wiki/Mobile-App.md
+++ b/wiki/Mobile-App.md
@@ -41,7 +41,7 @@ Swipe sideways to go from day to day, or tap a day chip. A button switches betwe
**The More sheet** of a trip starts with **Ask TREK** when the assistant is available, showing how many things in your plan are worth a check. Below come tiles for the sections that did not get a dock seat (such as Files, Collab and plugin tabs), then **Trip settings** ([Trip-Settings](Trip-Settings)), **Export** and, if you may edit the trip, **Edit Trip**.
-**Export** on a phone offers the trip as a **PDF**, **My plan as PDF**, the GPX tracks of the **Whole trip**, **Download .ics**, and **Subscribe to calendar**, which keeps your calendar app up to date. See [PDF-Export](PDF-Export) and [Calendar-Feeds](Calendar-Feeds).
+**Export** on a phone offers the trip as a **PDF**, **My plan as PDF**, the GPX tracks of the **Whole trip**, the **Places for Google My Maps** as KML, **Download .ics**, and **Subscribe to calendar**, which keeps your calendar app up to date. See [PDF-Export](PDF-Export) and [Calendar-Feeds](Calendar-Feeds).
## The other screens
diff --git a/wiki/PDF-Export.md b/wiki/PDF-Export.md
index 8ec0b5baf..aae53ad8c 100644
--- a/wiki/PDF-Export.md
+++ b/wiki/PDF-Export.md
@@ -8,7 +8,7 @@ TREK turns a trip into a printable **Trip Plan PDF**: a cover, a map of the whol
### How to generate
-1. In the trip planner, click **Export** at the top of the days column. The Export dialog opens with three groups: **Document**, **Calendar** and **Maps & GPS**.
+1. In the trip planner, click **Export** at the top of the days column. The Export dialog opens with four groups: **Document**, **Calendar**, **Maps & GPS** and **Google Maps**.
2. Under **Document**, click **PDF** (*Export day plan as PDF*). The row shows a spinner while the document is put together, then the dialog closes and a preview opens.
3. In the preview, click **Save as PDF**. Your browser's print dialog opens; pick *Save as PDF* as the destination, or send it to a printer.
@@ -20,7 +20,7 @@ TREK turns a trip into a printable **Trip Plan PDF**: a cover, a map of the whol
When some activities or bookings of the trip name who takes part (participants on a day plan entry, travelers on a booking), the **Document** group also offers **My plan as PDF** (*Only the activities and bookings you take part in*). It builds the same document with only your part of the plan: an entry or booking that names its people stays only when it names you, and one that names nobody belongs to everyone and stays. The row is offered on the phone's export sheet as well.
-The other groups of the same dialog are covered elsewhere: **Calendar** in [Calendar-Feeds](Calendar-Feeds), and the GPX downloads under **Maps & GPS** (*Whole trip*, *Places only*, *Days as routes*) in [Map-Features](Map-Features#exporting-a-trip-as-gpx).
+The other groups of the same dialog are covered elsewhere: **Calendar** in [Calendar-Feeds](Calendar-Feeds), the GPX downloads under **Maps & GPS** (*Whole trip*, *Places only*, *Days as routes*) in [Map-Features](Map-Features#exporting-a-trip-as-gpx), and the KML for Google My Maps under **Google Maps** in [Map-Features](Map-Features#taking-the-places-to-google-maps).
### Cover page