aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Mapbox/Element.elm18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/Mapbox/Element.elm b/src/Mapbox/Element.elm
index 7802983..5a93501 100644
--- a/src/Mapbox/Element.elm
+++ b/src/Mapbox/Element.elm
@@ -1,6 +1,6 @@
module Mapbox.Element exposing
( map, css, MapboxAttr
- , token, id, maxZoom, minZoom, maxBounds, renderWorldCopies, featureState
+ , token, id, zoom_, center_, maxZoom, minZoom, maxBounds, renderWorldCopies, featureState
, EventData, TouchEvent, eventFeaturesFilter, eventFeaturesLayers
, onMouseDown, onMouseUp, onMouseOver, onMouseMove, onClick, onDblClick, onMouseOut, onContextMenu, onZoom, onZoomStart, onZoomEnd, onRotate, onRotateStart, onRotateEnd, onTouchEnd, onTouchMove, onTouchCancel, on
)
@@ -12,7 +12,7 @@ module Mapbox.Element exposing
### Attributes
-@docs token, id, maxZoom, minZoom, maxBounds, renderWorldCopies, featureState
+@docs token, id, zoom_, center_, maxZoom, minZoom, maxBounds, renderWorldCopies, featureState
### Events
@@ -75,6 +75,20 @@ css =
node "link" [ attribute "href" "https://api.tiles.mapbox.com/mapbox-gl-js/v0.53.0/mapbox-gl.css", attribute "rel" "stylesheet" ] []
+{-| Define the default zoom level of the map (0-24).
+-}
+zoom_ : Float -> MapboxAttr msg
+zoom_ =
+ Encode.float >> property "zoom" >> MapboxAttr
+
+
+{-| The default center pos.
+-}
+center_ : LngLat -> MapboxAttr msg
+center_ =
+ LngLat.encodeAsPair >> property "center" >> MapboxAttr
+
+
{-| The minimum zoom level of the map (0-24).
-}
minZoom : Float -> MapboxAttr msg