Skip to main content

Modul zobrazení polohy v mapě

Veškeré zdrojové soubory se nachází v ./map

GoogleMapsView

export function GoogleMapsView( {latitude, longitude, url}

LocationPuck

export function LocationPuck()

Atributy

VariableTypeDescription
posLatitudenumberZeměpisná šířka GPS polohy
posLongitudenumberZeměpisná délka GPS polohy

Funkce

const getCurrentPosition = ()

Získá současnou GPS polohu

Position

interface Position {
name: string,
latitude: number,
longitude: number
}

PositionsLayer

export function PositionsLayer(props : {url})

Atributy

VariableTypeDescription
positionsPosition[]Seznam pozic závodníků

Funkce

const fetchPositions = async ()

Stáhne pozice závodníků do proměnné positions

Settings

export const Settings = (props: {url})

Atributy

VariableTypeDescription
options[{title: String, value: number}]Možnosti volby sdílení polohy
selectedItem{title: String, value: number}Vybraná možnost sdílení polohy

Funkce

const fetchSharing = async ()

Uloží současnou volbu sdílení polohy do proměnné selectedItem