Rerouted (cache, verified). The original is gone. This copy comes from a Lamdera package cache made before it went. The Lamdera package server serves a copy recovered from a Lamdera package cache from 2021-02-13.
What we checked: Rebuilt from the unpacked sources in a Lamdera package cache (5 copies agree), which Elm only writes after the published SHA-1 checked out; elm.json is byte-identical to package.elm-lang.org's; the exposed modules match docs.json; the zip is our own, so its SHA-1 is not the published one.
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/2.0.0/
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.