aboutsummaryrefslogtreecommitdiffstats
path: root/src/Mapbox/Cmd
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mapbox/Cmd')
-rw-r--r--src/Mapbox/Cmd/Option.elm8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Mapbox/Cmd/Option.elm b/src/Mapbox/Cmd/Option.elm
index 4c6374f..a6fc65c 100644
--- a/src/Mapbox/Cmd/Option.elm
+++ b/src/Mapbox/Cmd/Option.elm
@@ -1,4 +1,4 @@
-module Mapbox.Cmd.Option exposing (Padding, animate, around, bearing, center, curve, duration, easing, linear, maxDuration, maxZoom, minZoom, offset, padding, pitch, screenSpeed, speed, zoom)
+module Mapbox.Cmd.Option exposing (Padding, animate, around, bearing, center, curve, duration, easing, encode, linear, maxDuration, maxZoom, minZoom, offset, padding, pitch, screenSpeed, speed, zoom)
{-|
@@ -32,6 +32,12 @@ import Mapbox.Expression exposing (DataExpression, Expression)
import Mapbox.Helpers exposing (encodePair)
+encode : List (Option supported) -> Value
+encode =
+ List.map (\(Option key val) -> ( key, val ))
+ >> Encode.object
+
+
{-| The animation's duration, measured in milliseconds.
-}
duration : Int -> Option { a | duration : Supported }