aboutsummaryrefslogtreecommitdiffstats
path: root/src/Mapbox/Layer.elm
diff options
context:
space:
mode:
authorJakub Hampl <kopomir@gmail.com>2018-10-15 16:24:16 +0100
committerJakub Hampl <kopomir@gmail.com>2018-10-15 16:24:16 +0100
commit6cd451b4fe0fd28994ad6c5a0f282dc47d2f7142 (patch)
treec6b52c6607ad2407f6b67bf3b1f03ece781c08e0 /src/Mapbox/Layer.elm
parentb6d81004b6f9fb85ecfd410c7d5b2d04e8d27c0a (diff)
Stuff for Mapbox 50
Diffstat (limited to 'src/Mapbox/Layer.elm')
-rw-r--r--src/Mapbox/Layer.elm24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/Mapbox/Layer.elm b/src/Mapbox/Layer.elm
index 79bbe1b..375a9d6 100644
--- a/src/Mapbox/Layer.elm
+++ b/src/Mapbox/Layer.elm
@@ -40,6 +40,7 @@ module Mapbox.Layer
, fillExtrusionPattern
, fillExtrusionTranslate
, fillExtrusionTranslateAnchor
+ , fillExtrusionVerticalGradient
, fillOpacity
, fillOutlineColor
, fillPattern
@@ -113,6 +114,7 @@ module Mapbox.Layer
, symbolAvoidEdges
, symbolPlacement
, symbolSpacing
+ , symbolZOrder
, textAllowOverlap
, textAnchor
, textColor
@@ -192,12 +194,12 @@ Paint properties are applied later in the rendering process. Changes to a paint
### FillExtrusion Attributes
-@docs fillExtrusionBase, fillExtrusionColor, fillExtrusionHeight, fillExtrusionOpacity, fillExtrusionPattern, fillExtrusionTranslate, fillExtrusionTranslateAnchor
+@docs fillExtrusionBase, fillExtrusionColor, fillExtrusionHeight, fillExtrusionOpacity, fillExtrusionPattern, fillExtrusionTranslate, fillExtrusionTranslateAnchor, fillExtrusionVerticalGradient
### Symbol Attributes
-@docs iconAllowOverlap, iconAnchor, iconColor, iconHaloBlur, iconHaloColor, iconHaloWidth, iconIgnorePlacement, iconImage, iconKeepUpright, iconOffset, iconOpacity, iconOptional, iconPadding, iconPitchAlignment, iconRotate, iconRotationAlignment, iconSize, iconTextFit, iconTextFitPadding, iconTranslate, iconTranslateAnchor, symbolAvoidEdges, symbolPlacement, symbolSpacing, textAllowOverlap, textAnchor, textColor, textField, textFont, textHaloBlur, textHaloColor, textHaloWidth, textIgnorePlacement, textJustify, textKeepUpright, textLetterSpacing, textLineHeight, textMaxAngle, textMaxWidth, textOffset, textOpacity, textOptional, textPadding, textPitchAlignment, textRotate, textRotationAlignment, textSize, textTransform, textTranslate, textTranslateAnchor
+@docs iconAllowOverlap, iconAnchor, iconColor, iconHaloBlur, iconHaloColor, iconHaloWidth, iconIgnorePlacement, iconImage, iconKeepUpright, iconOffset, iconOpacity, iconOptional, iconPadding, iconPitchAlignment, iconRotate, iconRotationAlignment, iconSize, iconTextFit, iconTextFitPadding, iconTranslate, iconTranslateAnchor, symbolAvoidEdges, symbolPlacement, symbolSpacing, symbolZOrder, textAllowOverlap, textAnchor, textColor, textField, textFont, textHaloBlur, textHaloColor, textHaloWidth, textIgnorePlacement, textJustify, textKeepUpright, textLetterSpacing, textLineHeight, textMaxAngle, textMaxWidth, textOffset, textOpacity, textOptional, textPadding, textPitchAlignment, textRotate, textRotationAlignment, textSize, textTransform, textTranslate, textTranslateAnchor
### Raster Attributes
@@ -218,7 +220,7 @@ Paint properties are applied later in the rendering process. Changes to a paint
import Array exposing (Array)
import Json.Encode as Encode exposing (Value)
-import Mapbox.Expression as Expression exposing (Anchor, Auto, CameraExpression, Color, DataExpression, Expression, FormattedText, LineCap, LineJoin, Position, RasterResampling, SymbolPlacement, TextFit, TextJustify, TextTransform)
+import Mapbox.Expression as Expression exposing (Anchor, Auto, CameraExpression, Color, DataExpression, Expression, FormattedText, LineCap, LineJoin, Position, RasterResampling, SymbolPlacement, SymbolZOrder, TextFit, TextJustify, TextTransform)
{-| Represents a layer.
@@ -871,6 +873,13 @@ fillExtrusionOpacity =
Expression.encode >> Paint "fill-extrusion-opacity"
+{-| Whether to apply a vertical gradient to the sides of a fill-extrusion layer. If true, sides will be shaded slightly darker farther down. Paint property. Defaults to `true`.
+-}
+fillExtrusionVerticalGradient : Expression CameraExpression Bool -> LayerAttr FillExtrusion
+fillExtrusionVerticalGradient =
+ Expression.encode >> Paint "fill-extrusion-vertical-gradient"
+
+
-- Symbol
@@ -897,6 +906,13 @@ textTranslateAnchor =
Expression.encode >> Paint "text-translate-anchor"
+{-| Controls the order in which overlapping symbols in the same layer are rendered Layout property. Defaults to `orderViewportY`.
+-}
+symbolZOrder : Expression CameraExpression SymbolZOrder -> LayerAttr Symbol
+symbolZOrder =
+ Expression.encode >> Layout "symbol-z-order"
+
+
{-| Distance between two symbol anchors. Layout property.
Should be greater than or equal to `1`.
@@ -1450,7 +1466,7 @@ hillshadeAccentColor =
{-| Name of image in sprite to use for drawing an image background. For seamless patterns, image width and height must be a factor of two (2, 4, 8, ..., 512). Note that zoom-dependent expressions will be evaluated only at integer zoom levels. Paint property.
-}
-backgroundPattern : Expression any String -> LayerAttr Background
+backgroundPattern : Expression CameraExpression String -> LayerAttr Background
backgroundPattern =
Expression.encode >> Paint "background-pattern"