diff options
| author | André Dietrich <andre.dietrich@ovgu.de> | 2019-09-06 13:33:31 +0200 | 
|---|---|---|
| committer | André Dietrich <andre.dietrich@ovgu.de> | 2019-09-06 13:33:31 +0200 | 
| commit | 0a083bffd310976338fe7015c648837718260c46 (patch) | |
| tree | 1acf1539641fb4bc59e269fcf07a43b802799a92 /src | |
| parent | 8aac10c699f0c678f62bffc9bb3457618bc1c62f (diff) | |
added zoom_ and center_ attributes to mapbox Elements
Diffstat (limited to 'src')
| -rw-r--r-- | src/Mapbox/Element.elm | 18 | 
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 | 
