Pebble.Companion.Geolocation

Companion-side geolocation helpers.

init _ =
    ( model, Geolocation.currentPosition GotLocation )

Types

Location

type alias Location =
    { latitude : Float
    , longitude : Float
    , accuracy : Float
    }

A latitude, longitude, and accuracy reading.

Commands

currentPosition

currentPosition : (Result String Location -> msg) -> Cmd msg

Request the current device position and deliver it to toMsg.

Subscriptions

onCurrentPosition

onCurrentPosition : (Result String Location -> msg) -> Sub msg

Receive pushed geolocation updates from the companion bridge.