Elm Pebble

Pebble.Companion.Geolocation

Access browser geolocation through the phone companion bridge.

Pebble.Companion.Geolocation.getCurrentPosition "location-now"

Events

Commands

Union Types

Event

type Event
type Event
    = Position { latitude : Float, longitude : Float, accuracy : Float }
    | Error String
    | Unknown String

Geolocation events reported by the bridge.

Values

decode

decode : BridgeEvent -> Event

Decode a bridge geolocation event.

getCurrentPosition

getCurrentPosition : String -> CommandEnvelope

Request the current phone location once.

watch

watch : String -> CommandEnvelope

Start watching location changes.

clearWatch

clearWatch : String -> Int -> CommandEnvelope

Stop a previously started location watch.