blob: ed66d378781201c48857a59e070d1352a7a83d2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
module Mapbox.Helpers exposing (..)
import Json.Encode as Encode exposing (Value)
import Mapbox.Expression exposing (Anchor(..))
encodeAnchor : Anchor -> Value
encodeAnchor v =
case v of
Viewport ->
Encode.string "viewport"
Map ->
Encode.string "map"
encodePair encoder ( a, b ) =
Encode.list [ encoder a, encoder b ]
|