Rerouted (fork, verified). The original repository is gone. This copy comes from a fork that still has the tag. The Lamdera package server serves a copy recovered from https://github.com/elm-review-bot/elm-mapbox (a fork).
What we checked: Rebuilt with git archive from commit be2348dcc8be of https://github.com/elm-review-bot/elm-mapbox (a fork) (zip prefix jackhp95-elm-mapbox-be2348d/, America/Los_Angeles times): the zip is byte-identical to the one package.elm-lang.org recorded, SHA-1 3c49f17d1449731e8179a584fcc95b89360b658c.
The Lamdera compiler uses this copy and prints a one-line notice saying so. elm itself fails to download this version.
Details · package.elm-lang.org's zip: https://github.com/jackhp95/elm-mapbox/zipball/1.0.1/
Functions for manipulating the Map.
The setters can be used to modify a map
For example, MapBox tiles on a large map:
map
|> setTileServer ("https://api.mapbox.com/v4/mapbox.streets/{z}/{x}/{y}.png?access_token=" ++ accessToken)
|> setWidth 1200
|> setHeight 800Set the tile server.
The format is a URL with {x} {y} {z} placeholders for the x, y and zoom coordinates.
Set the width, as displayed on the screen, of a given Map.
Set the height, as displayed on the screen, of a given Map.
Set the width/height in px of a tile. Note, this is dependent on the tile server, and the default of 256px is almost always correct.
Move the map a given number of pixels in the x and y dimensions.
For example, up 10px and right 10px:
map
|> move { x = 10, y = -10 }Move the center of the map to a specific location.
For example, move the map to Shanghai:
map
|> moveTo (Maps.Geo.LatLng 31.267401 121.522179)Sets the zoom to a specific level
For example, zoom all the way out
map
|> zoom 0Or all the way in:
map
|> zoom 19Zoom into the center of the map.
For example zoom out two levels:
map
|> zoom -2Zoom into an x,y co-ordinate on the map.
For example, zoom into the top left corner of the map:
map
|> zoom 1 { x = 0, y = 0}Move and zoom the map to cover given the bounds.
For example, view the bounds of Madagascar:
let
madagascar =
Maps.Geo.bounds
{ northEast = Maps.Geo.latLng -11.9519639 50.48377989999999
, southWest = Maps.Geo.latLng -25.6065157 43.1851395
}
in
map
|> viewBounds madagascar
The map type contains all the information necessary to display a map on the screen. The map type is opaque, so use the functions in this module to maniuplate the map.