diff options
Diffstat (limited to 'docs.json')
-rw-r--r-- | docs.json | 888 |
1 files changed, 681 insertions, 207 deletions
@@ -1,16 +1,436 @@ [ { + "name": "Mapbox.Cmd", + "comment": " This module has a bunch of essentially imperative commands for your map.\n\n@docs Id, Outgoing\n\nHowever, since a published library can't have ports in it, you will need to do some setup. The easiest way to do this is to copy [this file into your app](https://github.com/gampleman/elm-mapbox/blob/master/examples/MapCommands.elm).\n\n@docs Option, Supported\n\n\n### Animation options\n\nOptions common to map movement commands that involve animation, such as panBy and easeTo, controlling the duration and easing function of the animation. All properties are optional.\n\n@docs duration, easing, offset, animate\n\n\n### Moving the map around\n\n@docs panBy, panTo, zoomTo, zoomIn, zoomOut, rotateTo, jumpTo, easeTo, flyTo, curve, minZoom, speed, screenSpeed, maxDuration, stop\n\n\n### Camera Options\n\nOptions common to `jumpTo`, `easeTo`, and `flyTo`, controlling the desired location, zoom, bearing, and pitch of the camera. All properties are optional, and when a property is omitted, the current camera value for that property will remain unchanged.\n\n@docs center, zoom, bearing, pitch, around\n\n\n### Fiting bounds\n\n@docs fitBounds, padding, Padding, linear, maxZoom\n\n\n### Other\n\n@docs setRTLTextPlugin, resize\n\n\n### Querying the map\n\n@docs Response, queryResults, getBounds, queryRenderedFeatures, Query, layers, filter\n\n", + "aliases": [ + { + "name": "Id", + "comment": " Every command takes the DOM id of the map that it should operate on.\n", + "args": [], + "type": "String" + }, + { + "name": "Outgoing", + "comment": " The type of a port that you need to provide for this module to work.\n", + "args": [ + "msg" + ], + "type": "Json.Encode.Value -> Platform.Cmd.Cmd msg" + }, + { + "name": "Padding", + "comment": " ", + "args": [], + "type": "{ top : Int, right : Int, bottom : Int, left : Int }" + } + ], + "types": [ + { + "name": "Option", + "comment": " Options use phantom types to show which commands support them.\n", + "args": [ + "support" + ], + "cases": [] + }, + { + "name": "Query", + "comment": " The geometry of the query region. Either a point, a bounding box (specified in terms of southwest and northeast points), or what is currently visible in the viewport.\n", + "args": [], + "cases": [] + }, + { + "name": "Response", + "comment": " A response to the queries. See the relevant methods for more information.\n", + "args": [], + "cases": [] + }, + { + "name": "Supported", + "comment": " ", + "args": [], + "cases": [] + } + ], + "values": [ + { + "name": "animate", + "comment": " If false, no animation will occur.\n", + "type": "Bool -> Mapbox.Cmd.Option { a | animate : Mapbox.Cmd.Supported }" + }, + { + "name": "around", + "comment": " If `zoom` is specified, `around` determines the point around which the zoom is centered.\n", + "type": "Mapbox.Element.LngLat -> Mapbox.Cmd.Option { a | around : Mapbox.Cmd.Supported }" + }, + { + "name": "bearing", + "comment": " The desired bearing, in degrees. The bearing is the compass direction that is \"up\"; for example, a bearing of 90° orients the map so that east is up.\n", + "type": "Float -> Mapbox.Cmd.Option { a | bearing : Mapbox.Cmd.Supported }" + }, + { + "name": "center", + "comment": " The desired center.\n", + "type": "Mapbox.Element.LngLat -> Mapbox.Cmd.Option { a | center : Mapbox.Cmd.Supported }" + }, + { + "name": "curve", + "comment": " The zooming \"curve\" that will occur along the flight path.\nA high value maximizes zooming for an exaggerated animation, while a\nlow value minimizes zooming for an effect closer to `easeTo`.\n1.42 is the average value selected by participants in the user study discussed in [van Wijk (2003)](https://www.win.tue.nl/~vanwijk/zoompan.pdf).\nA value of `6 ^ 0.25` would be equivalent to the root mean squared average velocity. A value of 1 would produce a circular motion.\n", + "type": "Float -> Mapbox.Cmd.Option { a | curve : Mapbox.Cmd.Supported }" + }, + { + "name": "duration", + "comment": " The animation's duration, measured in milliseconds.\n", + "type": "Int -> Mapbox.Cmd.Option { a | duration : Mapbox.Cmd.Supported }" + }, + { + "name": "easeTo", + "comment": " Changes any combination of center, zoom, bearing, and pitch, with an animated transition between old and new values. The map will retain its current values for any details not specified in options.\n", + "type": "Mapbox.Cmd.Outgoing msg -> Mapbox.Cmd.Id -> List (Mapbox.Cmd.Option { center : Mapbox.Cmd.Supported , zoom : Mapbox.Cmd.Supported , bearing : Mapbox.Cmd.Supported , pitch : Mapbox.Cmd.Supported , around : Mapbox.Cmd.Supported , duration : Mapbox.Cmd.Supported , easing : Mapbox.Cmd.Supported , offset : Mapbox.Cmd.Supported , animate : Mapbox.Cmd.Supported }) -> Platform.Cmd.Cmd msg" + }, + { + "name": "easing", + "comment": " The name of an easing function. These must be passed to `elmMapbox`\nin the `easingFunctions` option.\n", + "type": "String -> Mapbox.Cmd.Option { a | easing : Mapbox.Cmd.Supported }" + }, + { + "name": "filter", + "comment": " A filter to limit query results.\n", + "type": "Mapbox.Expression.Expression Mapbox.Expression.DataExpression Bool -> Mapbox.Cmd.Option { a | filter : Mapbox.Cmd.Supported }" + }, + { + "name": "fitBounds", + "comment": " Pans and zooms the map to contain its visible area within the specified geographical bounds. This function will also reset the map's bearing to 0 if bearing is nonzero.\n", + "type": "Mapbox.Cmd.Outgoing msg -> Mapbox.Cmd.Id -> List (Mapbox.Cmd.Option { padding : Mapbox.Cmd.Supported , easing : Mapbox.Cmd.Supported , linear : Mapbox.Cmd.Supported , offset : Mapbox.Cmd.Supported , maxZoom : Mapbox.Cmd.Supported }) -> ( Mapbox.Element.LngLat, Mapbox.Element.LngLat ) -> Platform.Cmd.Cmd msg" + }, + { + "name": "flyTo", + "comment": " Changes any combination of center, zoom, bearing, and pitch, animating the transition along a curve that evokes flight. The animation seamlessly incorporates zooming and panning to help the user maintain her bearings even after traversing a great distance.\n", + "type": "Mapbox.Cmd.Outgoing msg -> Mapbox.Cmd.Id -> List (Mapbox.Cmd.Option { center : Mapbox.Cmd.Supported , zoom : Mapbox.Cmd.Supported , bearing : Mapbox.Cmd.Supported , pitch : Mapbox.Cmd.Supported , around : Mapbox.Cmd.Supported , duration : Mapbox.Cmd.Supported , easing : Mapbox.Cmd.Supported , offset : Mapbox.Cmd.Supported , animate : Mapbox.Cmd.Supported , curve : Mapbox.Cmd.Supported , minZoom : Mapbox.Cmd.Supported , speed : Mapbox.Cmd.Supported , screenSpeed : Mapbox.Cmd.Supported , maxDuration : Mapbox.Cmd.Supported }) -> Platform.Cmd.Cmd msg" + }, + { + "name": "getBounds", + "comment": " Responds with the map's geographical bounds. Takes a numerical ID that allows you to associate the question with the answer.\n", + "type": "Mapbox.Cmd.Outgoing msg -> Mapbox.Cmd.Id -> Int -> Platform.Cmd.Cmd msg" + }, + { + "name": "jumpTo", + "comment": " Changes any combination of center, zoom, bearing, and pitch, without an animated transition. The map will retain its current values for any details not specified in options.\n", + "type": "Mapbox.Cmd.Outgoing msg -> Mapbox.Cmd.Id -> List (Mapbox.Cmd.Option { center : Mapbox.Cmd.Supported , zoom : Mapbox.Cmd.Supported , bearing : Mapbox.Cmd.Supported , pitch : Mapbox.Cmd.Supported , around : Mapbox.Cmd.Supported }) -> Platform.Cmd.Cmd msg" + }, + { + "name": "layers", + "comment": " A list of style layer IDs for the query to inspect. Only features within these layers will be returned. If this parameter is not set, all layers will be checked.\n", + "type": "List String -> Mapbox.Cmd.Option { a | layers : Mapbox.Cmd.Supported }" + }, + { + "name": "linear", + "comment": " If true, the map transitions using `easeTo` . If false, the map transitions using `flyTo`.\n", + "type": "Bool -> Mapbox.Cmd.Option { a | linear : Mapbox.Cmd.Supported }" + }, + { + "name": "maxDuration", + "comment": " The animation's maximum duration, measured in milliseconds. If duration exceeds maximum duration, it resets to 0.\n", + "type": "Float -> Mapbox.Cmd.Option { a | maxDuration : Mapbox.Cmd.Supported }" + }, + { + "name": "maxZoom", + "comment": " The maximum zoom level to allow when the map view transitions to the specified bounds.\n", + "type": "Float -> Mapbox.Cmd.Option { a | maxZoom : Mapbox.Cmd.Supported }" + }, + { + "name": "minZoom", + "comment": " The zero-based zoom level at the peak of the flight path.\nIf `curve` is specified, this option is ignored.\n", + "type": "Float -> Mapbox.Cmd.Option { a | minZoom : Mapbox.Cmd.Supported }" + }, + { + "name": "offset", + "comment": " Offset of the target center relative to real map container center at the end of animation.\n", + "type": "( Int, Int ) -> Mapbox.Cmd.Option { a | offset : Mapbox.Cmd.Supported }" + }, + { + "name": "padding", + "comment": " The amount of padding in pixels to add to the given bounds.\n", + "type": "Mapbox.Cmd.Padding -> Mapbox.Cmd.Option { a | padding : Mapbox.Cmd.Supported }" + }, + { + "name": "panBy", + "comment": " Pans the map by the specified offest.\n", + "type": "Mapbox.Cmd.Outgoing msg -> Mapbox.Cmd.Id -> List (Mapbox.Cmd.Option { duration : Mapbox.Cmd.Supported , easing : Mapbox.Cmd.Supported , offset : Mapbox.Cmd.Supported , animate : Mapbox.Cmd.Supported }) -> ( Int, Int ) -> Platform.Cmd.Cmd msg" + }, + { + "name": "panTo", + "comment": " Pans the map to the specified location, with an animated transition.\n", + "type": "Mapbox.Cmd.Outgoing msg -> Mapbox.Cmd.Id -> List (Mapbox.Cmd.Option { duration : Mapbox.Cmd.Supported , easing : Mapbox.Cmd.Supported , offset : Mapbox.Cmd.Supported , animate : Mapbox.Cmd.Supported }) -> Mapbox.Element.LngLat -> Platform.Cmd.Cmd msg" + }, + { + "name": "pitch", + "comment": " The desired pitch, in degrees.\n", + "type": "Float -> Mapbox.Cmd.Option { a | pitch : Mapbox.Cmd.Supported }" + }, + { + "name": "queryRenderedFeatures", + "comment": " Returns an array of GeoJSON Feature objects representing visible features that satisfy the query parameters. Takes a numerical ID that allows you to associate the question with the answer.\n\nThe response: The properties value of each returned feature object contains the properties of its source feature. For GeoJSON sources, only string and numeric property values are supported (i.e. null, Array, and Object values are not supported).\n\nEach feature includes a top-level layer property whose value is an object representing the style layer to which the feature belongs. Layout and paint properties in this object contain values which are fully evaluated for the given zoom level and feature.\n\nFeatures from layers whose visibility property is \"none\", or from layers whose zoom range excludes the current zoom level are not included. Symbol features that have been hidden due to text or icon collision are not included. Features from all other layers are included, including features that may have no visible contribution to the rendered result; for example, because the layer's opacity or color alpha component is set to 0.\n\nThe topmost rendered feature appears first in the returned array, and subsequent features are sorted by descending z-order. Features that are rendered multiple times (due to wrapping across the antimeridian at low zoom levels) are returned only once (though subject to the following caveat).\n\nBecause features come from tiled vector data or GeoJSON data that is converted to tiles internally, feature geometries may be split or duplicated across tile boundaries and, as a result, features may appear multiple times in query results. For example, suppose there is a highway running through the bounding rectangle of a query. The results of the query will be those parts of the highway that lie within the map tiles covering the bounding rectangle, even if the highway extends into other tiles, and the portion of the highway within each map tile will be returned as a separate feature. Similarly, a point feature near a tile boundary may appear in multiple tiles due to tile buffering.\n\n", + "type": "Mapbox.Cmd.Outgoing msg -> Mapbox.Cmd.Id -> Int -> List (Mapbox.Cmd.Option { layers : Mapbox.Cmd.Supported, filter : Mapbox.Cmd.Supported }) -> Mapbox.Cmd.Query -> Platform.Cmd.Cmd msg" + }, + { + "name": "queryResults", + "comment": " Wraps an incoming port so that you can get nicer subscritions:\n\n port elmMapboxIncoming : (Value -> msg) -> Sub msg\n\n\n -- exposed\n\n queryResults : (Response -> msg) -> Sub msg\n\n queryResuls =\n Mapbox.Cmd.queryResults elmMapboxIncoming\n\n", + "type": "((Json.Encode.Value -> msg) -> Platform.Sub.Sub msg) -> (Mapbox.Cmd.Response -> msg) -> Platform.Sub.Sub msg" + }, + { + "name": "resize", + "comment": " Resizes the map according to the dimensions of its container element.\n\nThis command must be sent after the map's container is resized, or when the map is shown after being initially hidden with CSS.\n\n", + "type": "Mapbox.Cmd.Outgoing msg -> Mapbox.Cmd.Id -> Platform.Cmd.Cmd msg" + }, + { + "name": "rotateTo", + "comment": " Rotates the map to the specified bearing, with an animated transition. The bearing is the compass direction that is \"up\"; for example, a bearing of 90° orients the map so that east is up.\n", + "type": "Mapbox.Cmd.Outgoing msg -> Mapbox.Cmd.Id -> List (Mapbox.Cmd.Option { duration : Mapbox.Cmd.Supported , easing : Mapbox.Cmd.Supported , offset : Mapbox.Cmd.Supported , animate : Mapbox.Cmd.Supported }) -> Float -> Platform.Cmd.Cmd msg" + }, + { + "name": "screenSpeed", + "comment": " The average speed of the animation measured in screenfuls per second, assuming a linear timing curve. If `speed` is specified, this option is ignored.\n", + "type": "Float -> Mapbox.Cmd.Option { a | screenSpeed : Mapbox.Cmd.Supported }" + }, + { + "name": "setRTLTextPlugin", + "comment": " Sets the map's [RTL text plugin](https://www.mapbox.com/mapbox-gl-js/plugins/#mapbox-gl-rtl-text). Necessary for supporting languages like Arabic and Hebrew that are written right-to-left. Takes a URL pointing to the Mapbox RTL text plugin source.\n", + "type": "Mapbox.Cmd.Outgoing msg -> Mapbox.Cmd.Id -> String -> Platform.Cmd.Cmd msg" + }, + { + "name": "speed", + "comment": " The average speed of the animation defined in relation to `curve`. A speed of 1.2 means that the map appears to move along the flight path by 1.2 times `curve` screenfuls every second. A screenful is the map's visible span. It does not correspond to a fixed physical distance, but varies by zoom level.\n", + "type": "Float -> Mapbox.Cmd.Option { a | speed : Mapbox.Cmd.Supported }" + }, + { + "name": "stop", + "comment": " Stops any animated transition underway.\n", + "type": "Mapbox.Cmd.Outgoing msg -> Mapbox.Cmd.Id -> Platform.Cmd.Cmd msg" + }, + { + "name": "zoom", + "comment": " The desired zoom level.\n", + "type": "Float -> Mapbox.Cmd.Option { a | zoom : Mapbox.Cmd.Supported }" + }, + { + "name": "zoomIn", + "comment": " Increases the map's zoom level by 1.\n", + "type": "Mapbox.Cmd.Outgoing msg -> Mapbox.Cmd.Id -> List (Mapbox.Cmd.Option { duration : Mapbox.Cmd.Supported , easing : Mapbox.Cmd.Supported , offset : Mapbox.Cmd.Supported , animate : Mapbox.Cmd.Supported }) -> Platform.Cmd.Cmd msg" + }, + { + "name": "zoomOut", + "comment": " Decreases the map's zoom level by 1.\n", + "type": "Mapbox.Cmd.Outgoing msg -> Mapbox.Cmd.Id -> List (Mapbox.Cmd.Option { duration : Mapbox.Cmd.Supported , easing : Mapbox.Cmd.Supported , offset : Mapbox.Cmd.Supported , animate : Mapbox.Cmd.Supported }) -> Platform.Cmd.Cmd msg" + }, + { + "name": "zoomTo", + "comment": " Zooms the map to the specified zoom level, with an animated transition.\n", + "type": "Mapbox.Cmd.Outgoing msg -> Mapbox.Cmd.Id -> List (Mapbox.Cmd.Option { duration : Mapbox.Cmd.Supported , easing : Mapbox.Cmd.Supported , offset : Mapbox.Cmd.Supported , animate : Mapbox.Cmd.Supported }) -> Float -> Platform.Cmd.Cmd msg" + } + ], + "generated-with-elm-version": "0.18.0" + }, + { + "name": "Mapbox.Element", + "comment": " This library wraps a Custom Element that actually renders a map.\n\n@docs map, css, MapboxAttr\n\n\n### Attributes\n\n@docs token, id, maxZoom, minZoom, maxBounds, LngLat, renderWorldCopies, featureState\n\n\n### Events\n\n@docs EventData, TouchEvent, eventFeaturesFilter, eventFeaturesLayers\n\n@docs onMouseDown, onMouseUp, onMouseOver, onMouseMove, onClick, onDblClick, onMouseOut, onContextMenu, onZoom, onZoomStart, onZoomEnd, onRotate, onRotateStart, onRotateEnd, onTouchEnd, onTouchMove, onTouchCancel\n\n\n### Controlled mode\n\n@docs controlledMap, Viewport\n\n", + "aliases": [ + { + "name": "EventData", + "comment": " `point` is the coordinates in pixels in screen space.\n\n`lngLat` is the coordinates as a longitude, latitude in geographic space.\n\n`renderedFeatures` is a geojson that intersect the `lngLat`:\n\nThe properties value of each returned feature object contains the properties of its source feature. For GeoJSON sources, only string and numeric property values are supported (i.e. null, Array, and Object values are not supported).\n\nEach feature includes a top-level layer property whose value is an object representing the style layer to which the feature belongs. Layout and paint properties in this object contain values which are fully evaluated for the given zoom level and feature.\n\nFeatures from layers whose visibility property is \"none\", or from layers whose zoom range excludes the current zoom level are not included. Symbol features that have been hidden due to text or icon collision are not included. Features from all other layers are included, including features that may have no visible contribution to the rendered result; for example, because the layer's opacity or color alpha component is set to 0.\n\nThe topmost rendered feature appears first in the returned array, and subsequent features are sorted by descending z-order. Features that are rendered multiple times (due to wrapping across the antimeridian at low zoom levels) are returned only once (though subject to the following caveat).\n\nBecause features come from tiled vector data or GeoJSON data that is converted to tiles internally, feature geometries may be split or duplicated across tile boundaries and, as a result, features may appear multiple times in query results. For example, suppose there is a highway running through the bounding rectangle of a query. The results of the query will be those parts of the highway that lie within the map tiles covering the bounding rectangle, even if the highway extends into other tiles, and the portion of the highway within each map tile will be returned as a separate feature. Similarly, a point feature near a tile boundary may appear in multiple tiles due to tile buffering.\n\n", + "args": [], + "type": "{ point : ( Int, Int ) , lngLat : Mapbox.Element.LngLat , renderedFeatures : List Json.Decode.Value }" + }, + { + "name": "LngLat", + "comment": " A longitude latitude pair (in that order).\n", + "args": [], + "type": "( Float, Float )" + }, + { + "name": "TouchEvent", + "comment": " `touches` will list stuff for every finger involved in a gesture.\n\n`center` refers to the point in the geometric center of `touches`.\n\n", + "args": [], + "type": "{ touches : List Mapbox.Element.EventData , center : Mapbox.Element.EventData }" + }, + { + "name": "Viewport", + "comment": " ", + "args": [], + "type": "{ center : Mapbox.Element.LngLat , zoom : Float , bearing : Float , pitch : Float }" + } + ], + "types": [ + { + "name": "MapboxAttr", + "comment": " This is the type that all attributes have.\n", + "args": [ + "msg" + ], + "cases": [] + } + ], + "values": [ + { + "name": "controlledMap", + "comment": " By default the map is \"uncontrolled\". By this we mean that it has its own internal state (namely the center, zoom level, pitch and bearing). This is nice if you don't care about these, but it does break some of the niceness of TEA. It also means some advanced interaction techniques are impossible to implement. For this reason we allow controlled mode where no event handlers are attached, but you need to feed the element its state. So it's up to you to implement all the user interactions. In the future, this library may help with that, but in the present this is not available.\n", + "type": "Mapbox.Element.Viewport -> List (Mapbox.Element.MapboxAttr msg) -> Mapbox.Style.Style -> Html.Html msg" + }, + { + "name": "css", + "comment": " This is literally:\n\n <link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.45.0/mapbox-gl.css' rel='stylesheet' />\n\nYou can include the required styles yourself if it fits better with the way you deploy your assets, this is meant as a quick way to get started.\n\n", + "type": "Html.Html msg" + }, + { + "name": "eventFeaturesFilter", + "comment": " By default the `renderedFeatures` property in events will return\na lot of data. If you don't need it, you can provide a filter to filter that data. This will make things more performant.\n", + "type": "Mapbox.Expression.Expression Mapbox.Expression.DataExpression Bool -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "eventFeaturesLayers", + "comment": " By default the `renderedFeatures` property in events will return\na lot of data. Here you can specify which layers you want to search for intersections. If you don't care about intersecting data at all, you can optimize performance by passing an empty list to this attribute.\n", + "type": "List String -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "featureState", + "comment": " This is a declarative API for controlling states on the features.\n\nThe API takes a bunch of GeoJSON features (these can be returned from the event listeners for example). They should at a minimum have these properties defined:\n\n - `source`\n - `sourceLayer` (only for vector sources)\n - `id` the feature's unique id\n\nThen you can give it a `List ( String, Value )` state. You can use this state infromation through the `Mapbox.Expression.featureState` expression.\n\n", + "type": "List ( Json.Decode.Value, List ( String, Json.Decode.Value ) ) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "id", + "comment": " The element's Id. This should be unique. You will need this if you want to use the Mapbox.Cmd module.\n", + "type": "String -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "map", + "comment": " A Map html element renders a map based on a Style.\n", + "type": "List (Mapbox.Element.MapboxAttr msg) -> Mapbox.Style.Style -> Html.Html msg" + }, + { + "name": "maxBounds", + "comment": " If set, the map will be constrained to the given bounds. The bounds are the `(south-west corner, north-east corner)`.\n", + "type": "( Mapbox.Element.LngLat, Mapbox.Element.LngLat ) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "maxZoom", + "comment": " The maximum zoom level of the map (0-24). Default 22.\n", + "type": "Float -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "minZoom", + "comment": " The minimum zoom level of the map (0-24).\n", + "type": "Float -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "onClick", + "comment": " Fired when a pointing device (usually a mouse) is pressed and released at the same point on the map.\n", + "type": "(Mapbox.Element.EventData -> msg) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "onContextMenu", + "comment": " Fired when the right button of the mouse is clicked or the context menu key is pressed within the map.\n", + "type": "(Mapbox.Element.EventData -> msg) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "onDblClick", + "comment": " Fired when a pointing device (usually a mouse) is clicked twice at the same point on the map.\n", + "type": "(Mapbox.Element.EventData -> msg) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "onMouseDown", + "comment": " Fired when a pointing device (usually a mouse) is pressed within the map.\n", + "type": "(Mapbox.Element.EventData -> msg) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "onMouseMove", + "comment": " Fired when a pointing device (usually a mouse) is moved within the map.\n", + "type": "(Mapbox.Element.EventData -> msg) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "onMouseOut", + "comment": " Fired when a point device (usually a mouse) leaves the map's canvas.\n", + "type": "(Mapbox.Element.EventData -> msg) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "onMouseOver", + "comment": " Fired when a pointing device (usually a mouse) is moved within the map.\n", + "type": "(Mapbox.Element.EventData -> msg) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "onMouseUp", + "comment": " Fired when a pointing device (usually a mouse) is released within the map.\n", + "type": "(Mapbox.Element.EventData -> msg) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "onRotate", + "comment": " Fired repeatedly during a \"drag to rotate\" interaction.\n", + "type": "(Mapbox.Element.EventData -> msg) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "onRotateEnd", + "comment": " Fired when a \"drag to rotate\" interaction ends.\n", + "type": "(Mapbox.Element.EventData -> msg) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "onRotateStart", + "comment": " Fired when a \"drag to rotate\" interaction starts.\n", + "type": "(Mapbox.Element.EventData -> msg) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "onTouchCancel", + "comment": " Fired when a touchcancel event occurs within the map.\n", + "type": "(Mapbox.Element.TouchEvent -> msg) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "onTouchEnd", + "comment": " Fired when a touchend event occurs within the map.\n", + "type": "(Mapbox.Element.TouchEvent -> msg) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "onTouchMove", + "comment": " Fired when a touchmove event occurs within the map.\n", + "type": "(Mapbox.Element.TouchEvent -> msg) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "onZoom", + "comment": " Fired repeatedly during an animated transition from one zoom level to another.\n", + "type": "(Mapbox.Element.EventData -> msg) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "onZoomEnd", + "comment": " Fired just after the map completes a transition from one zoom level to another.\n", + "type": "(Mapbox.Element.EventData -> msg) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "onZoomStart", + "comment": " Fired just before the map begins a transition from one zoom level to another.\n", + "type": "(Mapbox.Element.EventData -> msg) -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "renderWorldCopies", + "comment": " If true, multiple copies of the world will be rendered, when zoomed out.\n", + "type": "Bool -> Mapbox.Element.MapboxAttr msg" + }, + { + "name": "token", + "comment": " Your [Mapbox API Token](https://www.mapbox.com/help/create-api-access-token/).\n", + "type": "String -> Mapbox.Element.MapboxAttr msg" + } + ], + "generated-with-elm-version": "0.18.0" + }, + { "name": "Mapbox.Style", - "comment": " A Mapbox style is a document that defines the visual appearance of a map: what data to draw, the order to draw it in, and how to style the data when drawing it. A style document is a JSON object with specific root level and nested properties. This specification defines and describes these properties.\n\n@docs Style, encode\n\n\n### Light\n\n@docs Light, defaultLight\n\n\n### Transition\n\n@docs Transition, defaultTransition\n\n\n### Misc Attributes\n\n@docs MiscAttr, sprite, glyphs, name, defaultCenter, defaultZoomLevel, defaultBearing, defaultPitch, metadata\n\n", + "comment": " A Mapbox style is a document that defines the visual appearance of a map: what data to draw, the order to draw it in, and how to style the data when drawing it. A style document is a JSON object with specific root level and nested properties. This specification defines and describes these properties.\n\n@docs Style, encode , StyleDef\n\n\n### Light\n\n@docs Light, defaultLight\n\n\n### Transition\n\n@docs Transition, defaultTransition\n\n\n### Misc Attributes\n\n@docs MiscAttr, sprite, glyphs, name, defaultCenter, defaultZoomLevel, defaultBearing, defaultPitch, metadata\n\n\n### Predefined styles\n\nYou can also use one of these predefined styles.\n\n@docs streets, outdoors, light, dark, satellite, satelliteStreets\n\n", "aliases": [ { "name": "Light", - "comment": " The global light source.\n\n\n#### `anchor`\n\nWhether extruded geometries are lit relative to the map or viewport.\n\n\n### `position`\n\nPosition of the light source relative to lit (extruded) geometries, in `[r radial coordinate, a azimuthal angle, p polar angle]` where `r` indicates the distance from the center of the base of an object to its light, `a` indicates the position of the light relative to 0° (0° when the `anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and `p` indicates the height of the light (from 0°, directly above, to 180°, directly below).\n\n\n### `color`\n\nColor tint for lighting extruded geometries.\n\n\n### `intensity`\n\nIntensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.\n\n", + "comment": " The global light source.\n\n\n### `anchor`\n\nWhether extruded geometries are lit relative to the map or viewport.\n\n\n### `position`\n\nPosition of the light source relative to lit (extruded) geometries, in `[r radial coordinate, a azimuthal angle, p polar angle]` where `r` indicates the distance from the center of the base of an object to its light, `a` indicates the position of the light relative to 0° (0° when the `anchor` is set to `viewport` corresponds to the top of the viewport, or 0° when `anchor` is set to `map` corresponds to due north, and degrees proceed clockwise), and `p` indicates the height of the light (from 0°, directly above, to 180°, directly below).\n\n\n### `color`\n\nColor tint for lighting extruded geometries.\n\n\n### `intensity`\n\nIntensity of lighting (on a scale from 0 to 1). Higher numbers will present as more extreme contrast.\n\n", "args": [], "type": "{ anchor : Mapbox.Expression.Anchor , position : Mapbox.Expression.Expression Mapbox.Expression.CameraExpression (Array.Array Float) , color : Mapbox.Expression.Expression Mapbox.Expression.CameraExpression Mapbox.Expression.Color , intensity : Mapbox.Expression.Expression Mapbox.Expression.CameraExpression Float }" }, { - "name": "Style", + "name": "StyleDef", "comment": " This is the core representation of a Mapbox style. It has the following keys:\n\n\n### Layers\n\nThese define what is actually rendered on screen. See the Mapbox.Layer module on how to configure these.\n\n\n### Sources\n\nThese define the data sources that feed the Layers. See the Mapbox.Source module for more.\n\n\n### Misc\n\nThese are all optional attributes.\n\nAll the other keys are values defined below.\n\n", "args": [], "type": "{ transition : Mapbox.Style.Transition , light : Mapbox.Style.Light , layers : List Mapbox.Layer.Layer , sources : List Mapbox.Source.Source , misc : List Mapbox.Style.MiscAttr }" @@ -28,10 +448,34 @@ "comment": " ", "args": [], "cases": [] + }, + { + "name": "Style", + "comment": " A mapbox style.\n\nYou can either create a style spec in Elm (for which the rest of this library is useful :) or load one from a remote URL.\n\nTo load a style from the Mapbox API, you can use a URL of the form `FromUrl \"mapbox://styles/:owner/:style\"`, where `:owner` is your Mapbox account name and `:style` is the style ID.\n\n", + "args": [], + "cases": [ + [ + "Style", + [ + "Mapbox.Style.StyleDef" + ] + ], + [ + "FromUrl", + [ + "String" + ] + ] + ] } ], "values": [ { + "name": "dark", + "comment": " ", + "type": "Mapbox.Style.Style" + }, + { "name": "defaultBearing", "comment": " Default bearing, in degrees. The bearing is the compass direction that is \"up\"; for example, a bearing of 90° orients the map so that east is up. This value will be used only if the map has not been positioned by other means (e.g. map options or user interaction).\n", "type": "Float -> Mapbox.Style.MiscAttr" @@ -72,6 +516,11 @@ "type": "String -> Mapbox.Style.MiscAttr" }, { + "name": "light", + "comment": " ", + "type": "Mapbox.Style.Style" + }, + { "name": "metadata", "comment": " Arbitrary properties useful to track with the stylesheet, but do not influence rendering. Properties should be prefixed to avoid collisions, like 'mapbox:'.\n", "type": "List ( String, Json.Encode.Value ) -> Mapbox.Style.MiscAttr" @@ -82,9 +531,29 @@ "type": "String -> Mapbox.Style.MiscAttr" }, { + "name": "outdoors", + "comment": " ", + "type": "Mapbox.Style.Style" + }, + { + "name": "satellite", + "comment": " ", + "type": "Mapbox.Style.Style" + }, + { + "name": "satelliteStreets", + "comment": " ", + "type": "Mapbox.Style.Style" + }, + { "name": "sprite", "comment": " A base URL for retrieving the sprite image and metadata. The extensions .png, .json and scale factor @2x.png will be automatically appended. This property is required if any layer uses the `backgroundPattern`, `fillPattern`, `linePattern`, `fillExtrusionPattern`, or `iconImage` properties.\n", "type": "String -> Mapbox.Style.MiscAttr" + }, + { + "name": "streets", + "comment": " ", + "type": "Mapbox.Style.Style" } ], "generated-with-elm-version": "0.18.0" @@ -810,8 +1279,209 @@ "generated-with-elm-version": "0.18.0" }, { + "name": "Mapbox.Source", + "comment": "\n\n\n# Sources\n\n@docs Source, SourceOption\n\n@docs Id, Url\n\n\n### Vector\n\n@docs vector, vectorFromUrl, VectorSource\n\n\n### Raster\n\n@docs raster, tileSize, rasterFromUrl, RasterSource, scheme, Scheme\n\n\n### Raster DEM\n\n@docs rasterDEMMapbox, rasterDEMTerrarium\n\n\n### GeoJSON\n\n@docs geoJSONFromUrl, geoJSONFromValue, GeoJSONSource, buffer, tolerance, cluster, clusterRadius, lineMetrics\n\n\n### Image, Video & Canvas\n\n@docs Coords, image, video, staticCanvas, animatedCanvas\n\n\n### Tiled sources\n\nTiled sources can also take the following attributes:\n\n@docs bounds, minzoom, maxzoom, attribution\n\n\n### Working with sources\n\n@docs encode, getId\n\n", + "aliases": [ + { + "name": "Coords", + "comment": " `(longitude, latitude)` pairs for the corners. You can use the type alias constructor in clockwise order: top left, top right, bottom right, bottom left.\n", + "args": [], + "type": "{ topLeft : ( Float, Float ) , topRight : ( Float, Float ) , bottomRight : ( Float, Float ) , bottomLeft : ( Float, Float ) }" + }, + { + "name": "Id", + "comment": " Every layer is identified by an id.\n", + "args": [], + "type": "String" + }, + { + "name": "Url", + "comment": " Represents a URL. For tiles hosted by Mapbox, the \"url\" value should be of the form mapbox://mapid.\n", + "args": [], + "type": "String" + } + ], + "types": [ + { + "name": "GeoJSONSource", + "comment": " Marks attributes that are only applicable to GeoJSON sources\n", + "args": [], + "cases": [] + }, + { + "name": "RasterSource", + "comment": " Marks attributes that are only applicable to raster sources\n", + "args": [], + "cases": [] + }, + { + "name": "Scheme", + "comment": " `XYZ`: Slippy map tilenames scheme.\n\n`TMS`: OSGeo spec scheme.\n\n", + "args": [], + "cases": [ + [ + "XYZ", + [] + ], + [ + "TMS", + [] + ] + ] + }, + { + "name": "Source", + "comment": " Sources supply data to be shown on the map. Adding a source won't immediately make data appear on the map because sources don't contain styling details like color or width. Layers refer to a source and give it a visual representation. This makes it possible to style the same source in different ways, like differentiating between types of roads in a highways layer.\n", + "args": [], + "cases": [] + }, + { + "name": "SourceOption", + "comment": " Some sources can take options.\n", + "args": [ + "sourceType" + ], + "cases": [] + }, + { + "name": "VectorSource", + "comment": " Marks attributes that are only applicable to vector sources\n", + "args": [], + "cases": [] + } + ], + "values": [ + { + "name": "animatedCanvas", + "comment": " A data source containing the contents of an HTML canvas. The second argument must be the DOM ID of the canvas element. This method is only appropriate with an animated Canvas (i.e. one that changes over time).\n", + "type": "Mapbox.Source.Id -> String -> Mapbox.Source.Coords -> Mapbox.Source.Source" + }, + { + "name": "attribution", + "comment": " Contains an attribution to be displayed when the map is shown to a user.\n", + "type": "String -> Mapbox.Source.SourceOption any" + }, + { + "name": "bounds", + "comment": " The longitude and latitude of the southwest and northeast corners of the source's bounding box in the following order: `sw.lng, sw.lat, ne.lng, ne.lat`. When this property is included in a source, no tiles outside of the given bounds are requested by Mapbox GL.\n", + "type": "Float -> Float -> Float -> Float -> Mapbox.Source.SourceOption any" + }, + { + "name": "buffer", + "comment": " Size of the tile buffer on each side. A value of 0 produces no buffer. A value of 512 produces a buffer as wide as the tile itself. Larger values produce fewer rendering artifacts near tile edges and slower performance. Defaults to 128.\n", + "type": "Int -> Mapbox.Source.SourceOption Mapbox.Source.GeoJSONSource" + }, + { + "name": "cluster", + "comment": " If the data is a collection of point features, setting this to true clusters the points by radius into groups.\n", + "type": "Bool -> Mapbox.Source.SourceOption Mapbox.Source.GeoJSONSource" + }, + { + "name": "clusterRadius", + "comment": " Radius of each cluster if clustering is enabled. A value of 512 indicates a radius equal to the width of a tile.\n", + "type": "Float -> Mapbox.Source.SourceOption Mapbox.Source.GeoJSONSource" + }, + { + "name": "encode", + "comment": " ", + "type": "Mapbox.Source.Source -> Json.Encode.Value" + }, + { + "name": "geoJSONFromUrl", + "comment": " A remote GeoJSON source.\n", + "type": "Mapbox.Source.Id -> Mapbox.Source.Url -> List (Mapbox.Source.SourceOption Mapbox.Source.GeoJSONSource) -> Mapbox.Source.Source" + }, + { + "name": "geoJSONFromValue", + "comment": " A GeoJSON source from some local data.\n", + "type": "Mapbox.Source.Id -> List (Mapbox.Source.SourceOption Mapbox.Source.GeoJSONSource) -> Json.Encode.Value -> Mapbox.Source.Source" + }, + { + "name": "getId", + "comment": " ", + "type": "Mapbox.Source.Source -> String" + }, + { + "name": "image", + "comment": " An image source\n", + "type": "Mapbox.Source.Id -> Mapbox.Source.Url -> Mapbox.Source.Coords -> Mapbox.Source.Source" + }, + { + "name": "lineMetrics", + "comment": " Whether to calculate line distance metrics. This is required for line layers that specify `lineGradient` values.\n", + "type": "Bool -> Mapbox.Source.SourceOption Mapbox.Source.GeoJSONSource" + }, + { + "name": "maxzoom", + "comment": " Maximum zoom level for which tiles are available, as in the TileJSON spec. Data from tiles at the maxzoom are used when displaying the map at higher zoom levels.\n", + "type": "Float -> Mapbox.Source.SourceOption any" + }, + { + "name": "minzoom", + "comment": " Minimum zoom level for which tiles are available, as in the TileJSON spec.\n", + "type": "Float -> Mapbox.Source.SourceOption any" + }, + { + "name": "raster", + "comment": " A raster tile source. Takes a list of one or more tile source URLs, as in the TileJSON spec.\n", + "type": "Mapbox.Source.Id -> List Mapbox.Source.Url -> List (Mapbox.Source.SourceOption Mapbox.Source.RasterSource) -> Mapbox.Source.Source" + }, + { + "name": "rasterDEMMapbox", + "comment": " The [Mapbox Terrain RGB](https://blog.mapbox.com/global-elevation-data-6689f1d0ba65) DEM source.\n", + "type": "Mapbox.Source.Id -> Mapbox.Source.Source" + }, + { + "name": "rasterDEMTerrarium", + "comment": " A raster DEM source in the Terarrium format.\n", + "type": "Mapbox.Source.Id -> Mapbox.Source.Url -> List (Mapbox.Source.SourceOption Mapbox.Source.RasterSource) -> Mapbox.Source.Source" + }, + { + "name": "rasterFromUrl", + "comment": " A |