aboutsummaryrefslogtreecommitdiffstats
path: root/src/Mapbox/Style.elm
diff options
context:
space:
mode:
authorJakub Hampl <kopomir@gmail.com>2018-07-13 15:20:50 +0100
committerJakub Hampl <kopomir@gmail.com>2018-07-13 15:20:50 +0100
commitcc6d143dd8124e13059c26125e70237795e9a9a4 (patch)
treee7d6a658990046b672bb59e6d97912e26b5fe057 /src/Mapbox/Style.elm
parent181401c4ffd06c127c57e27e2e88b05f7fdd1f88 (diff)
Clean up various messes
Diffstat (limited to 'src/Mapbox/Style.elm')
-rw-r--r--src/Mapbox/Style.elm7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Mapbox/Style.elm b/src/Mapbox/Style.elm
index c647814..1793067 100644
--- a/src/Mapbox/Style.elm
+++ b/src/Mapbox/Style.elm
@@ -30,6 +30,7 @@ You can also use one of these predefined styles.
import Array exposing (Array)
import Json.Encode as Encode exposing (Value)
+import LngLat exposing (LngLat)
import Mapbox.Expression exposing (Anchor(Viewport), CameraExpression, Color, Expression, float, floats, rgba)
import Mapbox.Helpers exposing (encodeAnchor)
import Mapbox.Layer exposing (Layer)
@@ -161,9 +162,9 @@ name =
{-| Default map center in longitude and latitude. The style center will be used only if the map has not been positioned by other means (e.g. map options or user interaction).
-}
-defaultCenter : Float -> Float -> MiscAttr
-defaultCenter lat lng =
- Encode.list [ Encode.float lat, Encode.float lng ] |> MiscAttr "center"
+defaultCenter : LngLat -> MiscAttr
+defaultCenter =
+ LngLat.encodeAsPair >> MiscAttr "center"
{-| Default zoom level. The style zoom will be used only if the map has not been positioned by other means (e.g. map options or user interaction).