diff options
| author | Jakub Hampl <kopomir@gmail.com> | 2018-08-21 15:51:05 +0100 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-21 15:51:05 +0100 | 
| commit | af8b5c077da700236667ccb3cdcd736774dd9e3b (patch) | |
| tree | 5472d2c8fdf9cc81948a822e89672a0d74e5e0f3 /src/Mapbox/Source.elm | |
| parent | 11d932001ed65fed690b835e5eef504f90845533 (diff) | |
v0.19 compatibility (#1)
Diffstat (limited to 'src/Mapbox/Source.elm')
| -rw-r--r-- | src/Mapbox/Source.elm | 18 | 
1 files changed, 9 insertions, 9 deletions
| diff --git a/src/Mapbox/Source.elm b/src/Mapbox/Source.elm index 5cc571d..8cccfd8 100644 --- a/src/Mapbox/Source.elm +++ b/src/Mapbox/Source.elm @@ -120,7 +120,7 @@ getId (Source k _) =  -}  bounds : LngLat -> LngLat -> SourceOption any  bounds sw ne = -    SourceOption "bounds" (Json.Encode.list [ Json.Encode.float sw.lng, Json.Encode.float sw.lat, Json.Encode.float sw.lng, Json.Encode.float sw.lat ]) +    SourceOption "bounds" (Json.Encode.list Json.Encode.float [ sw.lng, sw.lat, sw.lng, sw.lat ])  {-| Minimum zoom level for which tiles are available, as in the TileJSON spec. @@ -222,7 +222,7 @@ This takes an array of one or more tile source URLs, as in the TileJSON spec.  -}  vector : Id -> List Url -> List (SourceOption VectorSource) -> Source  vector id urls options = -    ( "tiles", Json.Encode.list (List.map Json.Encode.string urls) ) +    ( "tiles", Json.Encode.list Json.Encode.string urls )          :: ( "type", Json.Encode.string "vector" )          :: List.map (\(SourceOption k v) -> ( k, v )) options          |> Json.Encode.object @@ -240,7 +240,7 @@ rasterFromUrl id url =  -}  raster : Id -> List Url -> List (SourceOption RasterSource) -> Source  raster id urls options = -    ( "tiles", Json.Encode.list (List.map Json.Encode.string urls) ) +    ( "tiles", Json.Encode.list Json.Encode.string urls )          :: ( "type", Json.Encode.string "raster" )          :: List.map (\(SourceOption k v) -> ( k, v )) options          |> Json.Encode.object @@ -306,11 +306,11 @@ type alias Coords =  encodeCoordinates : Coords -> Value  encodeCoordinates { topLeft, topRight, bottomRight, bottomLeft } = -    Json.Encode.list -        [ LngLat.encodeAsPair topLeft -        , LngLat.encodeAsPair topRight -        , LngLat.encodeAsPair bottomRight -        , LngLat.encodeAsPair bottomLeft +    Json.Encode.list LngLat.encodeAsPair +        [ topLeft +        , topRight +        , bottomRight +        , bottomLeft          ] @@ -331,7 +331,7 @@ image id url coordinates =  video : Id -> List Url -> Coords -> Source  video id urls coordinates =      [ ( "type", Json.Encode.string "video" ) -    , ( "urls", Json.Encode.list (List.map Json.Encode.string urls) ) +    , ( "urls", Json.Encode.list Json.Encode.string urls )      , ( "coordinates", encodeCoordinates coordinates )      ]          |> Json.Encode.object | 
