Modul zobrazení polohy v mapě
Veškeré zdrojové soubory se nachází v ./map
- Google Maps
- Mapy.com
- Mapbox
LocationPuck
export function LocationPuck()
Atributy
| Variable | Type | Description |
|---|---|---|
| posLatitude | number | Zeměpisná šířka GPS polohy |
| posLongitude | number | Země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
| Variable | Type | Description |
|---|---|---|
| positions | Position[] | 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
| Variable | Type | Description |
|---|---|---|
| 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