diff options
author | Jakub Hampl <kopomir@gmail.com> | 2018-06-25 13:59:42 +0100 |
---|---|---|
committer | Jakub Hampl <kopomir@gmail.com> | 2018-06-25 13:59:44 +0100 |
commit | 181401c4ffd06c127c57e27e2e88b05f7fdd1f88 (patch) | |
tree | 4c37265383c2c8eb19fad470ac71c9e04d256522 /examples/Light.elm | |
parent | 61477af04bafa8ba11a3d76ce5de3162e8d88255 (diff) |
Fix issue with passing in token
Diffstat (limited to 'examples/Light.elm')
-rw-r--r-- | examples/Light.elm | 49 |
1 files changed, 0 insertions, 49 deletions
diff --git a/examples/Light.elm b/examples/Light.elm deleted file mode 100644 index a83308a..0000000 --- a/examples/Light.elm +++ /dev/null @@ -1,49 +0,0 @@ -module Light exposing (main) - -import Html exposing (text, pre) -import Json.Encode -import Mapbox.Expression exposing (..) -import Mapbox.Layer as Layer -import Mapbox.Source as Source -import Mapbox.Style as Style - - -style = - Style.encode - { transition = Style.defaultTransition - , light = Style.defaultLight - , sources = - [ Source.vectorFromUrl "composite" "mapbox://mapbox.mapbox-terrain-v2,mapbox.mapbox-streets-v7" ] - , misc = - [ Style.name "light" - , Style.defaultCenter 20.39789404164037 43.22523201923144 - , Style.defaultZoomLevel 1.5967483759772743 - , Style.sprite "mapbox://sprites/seppotamminen/cjascxlb86kfe2rrvvtkd4ay1" - , Style.glyphs "mapbox://fonts/seppotamminen/{fontstack}/{range}.pbf" - ] - , layers = - [ Layer.background "background" - [ getProperty (str "emotion") - |> matchesStr (rgba 55 22 32 1) [ ( "funny", rgba 20 200 20 1 ), ( "angry", rgba 200 20 20 1 ) ] - |> Layer.backgroundColor - , zoom - |> interpolate Linear - [ ( 5, int 1 ) - , ( 10, int 5 ) - ] - |> Layer.circleRadius - , makeRGBColor - -- red is higher when feature.properties.temperature is higher - (getProperty (str "temperature")) - -- green is always zero - (int 0) - -- blue is higher when feature.properties.temperature is lower - (getProperty (str "temperature") |> minus (int 100)) - |> Layer.circleColor - ] - ] - } - - -main = - pre [] [ text <| Json.Encode.encode 2 style ] |