Files
Kenneth BrewerandClaude Opus 5 72e0fcf4dd feat(maps): map marker management
Salvages @kennethbrewer3's work from #836, which had drifted onto a stale base
(GitHub showed 231 files; the real change is the map UI plus a migration).

Marker visibility (individually and Hide All), per-marker icon and custom hex
colour with contrast-adjusted icon colour, search, sorting and a tree view over
the marker list, coordinate search and fly-to with URL parameters
(?lat=&lng=&zoom=), creating a marker from typed coordinates, and markers
rendered as SVGs anchored to true coordinates rather than approximately.

Name, notes and preset colour already existed; the new columns are
custom_color, icon, icon_color and visible.

Dropped from the original as stale-base noise rather than his work: unrelated
duplicate changes to the Ollama, Docker, download, RAG and ZIM services, the
API reference and getting-started docs, README/FAQ/CONTRIBUTING, the installer
script, and a revert of AppLayout to a version predating the compact sidebar.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F8Mgg1vd2eKSs8StZiuyMV
2026-09-29 15:54:41 -07:00

87 lines
1.5 KiB
TypeScript

export type BaseStylesFile = {
version: number
sources: {
[key: string]: MapSource
}
layers: MapLayer[]
sprite: string
glyphs: string
}
export type MapSource = {
type: 'vector' | 'raster' | 'raster-dem' | 'geojson' | 'image' | 'video'
attribution?: string
url: string
}
export type MapLayer = {
'id': string
'type': string
'source'?: string
'source-layer'?: string
[key: string]: any
}
/** ISO 3166-1 alpha-2 country code (e.g. "DE", "FR", "US"). */
export type CountryCode = string
export type Country = {
code: CountryCode
code3: string
name: string
continent: string
subregion: string
population: number
}
export type CountryGroup = {
id: string
name: string
description: string
countries: CountryCode[]
}
export type MapExtractRequest = {
countries: CountryCode[]
maxzoom?: number
}
export type MapExtractPreflight = {
tiles: number
bytes: number
source: {
url: string
date: string
key: string
}
}
export type CreateMapMarkerPayload = {
name: string
notes?: string | null
longitude: number
latitude: number
color?: string
custom_color?: string | null
icon?: string | null
icon_color?: string | null
visible?: boolean
}
export type UpdateMapMarkerPayload = Partial<CreateMapMarkerPayload>
export type MapMarkerResponse = {
id: number
name: string
longitude: number
latitude: number
color: string
custom_color?: string | null
icon?: string | null
icon_color?: string | null
visible?: boolean
notes?: string | null
created_at: string
updated_at?: string
}