aboutsummaryrefslogtreecommitdiffstats
path: root/src/Mapbox/Helpers.elm
blob: f2072aa6886a947ea4cfa14bedf6f62e31020ef6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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"