aboutsummaryrefslogtreecommitdiffstats
path: root/src/Mapbox/Helpers.elm
diff options
context:
space:
mode:
authorJakub Hampl <kopomir@gmail.com>2018-06-19 09:05:14 +0100
committerJakub Hampl <kopomir@gmail.com>2018-06-19 09:05:14 +0100
commit5fdcf1fbe9a56951799d89bfc43e286742a2495f (patch)
tree189ebccd30cba8ff373ee67ff69a2552e534de8f /src/Mapbox/Helpers.elm
Initial commit
Diffstat (limited to 'src/Mapbox/Helpers.elm')
-rw-r--r--src/Mapbox/Helpers.elm14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/Mapbox/Helpers.elm b/src/Mapbox/Helpers.elm
new file mode 100644
index 0000000..f2072aa
--- /dev/null
+++ b/src/Mapbox/Helpers.elm
@@ -0,0 +1,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"