gampleman/elm-mapbox/3.1.0

NOTE: the latest version is 4.1.0

LngLat

Encodes geographic position.

type alias LngLat =
{ lng : Float
, lat : Float
}

A LngLat represents a geographic position.

encodeAsPair : LngLat -> Value

Most implementations seem to encode these as a 2 member array.

encodeAsObject : LngLat -> Value

We can also encode as an {lng: 32, lat: 435} object.

decodeFromPair : Decoder LngLat

Most implementations seem to encode these as a 2 member array.

decodeFromObject : Decoder LngLat

We can also encode from an {lng: 32, lat: 435} object.

map : (Float -> Float) -> LngLat -> LngLat
toString : LngLat -> String

Returns a text representation suitable for humans.