Skip to content

Instantly share code, notes, and snippets.

@MangelMaxime
Created July 20, 2017 12:12
Show Gist options
  • Save MangelMaxime/c14978b724ca99e6df19f5f08493f079 to your computer and use it in GitHub Desktop.
Save MangelMaxime/c14978b724ca99e6df19f5f08493f079 to your computer and use it in GitHub Desktop.
Fable MapboxGL bindings
namespace Fable.Import
open System
open System.Text.RegularExpressions
open Fable.Core
open Fable.Import.JS
open Fable.Import.Browser
module Mapboxgl =
type [<AllowNullLiteral>] [<Import("Map","mapboxgl")>] Map(?options: MapboxOptions) =
inherit Evented()
member __.showTileBoundaries with get(): bool = jsNative and set(v: bool): unit = jsNative
member __.showCollisionBoxes with get(): bool = jsNative and set(v: bool): unit = jsNative
member __.repaint with get(): bool = jsNative and set(v: bool): unit = jsNative
member __.scrollZoom with get(): ScrollZoomHandler = jsNative and set(v: ScrollZoomHandler): unit = jsNative
member __.boxZoom with get(): BoxZoomHandler = jsNative and set(v: BoxZoomHandler): unit = jsNative
member __.dragRotate with get(): DragRotateHandler = jsNative and set(v: DragRotateHandler): unit = jsNative
member __.dragPan with get(): DragPanHandler = jsNative and set(v: DragPanHandler): unit = jsNative
member __.keyboard with get(): KeyboardHandler = jsNative and set(v: KeyboardHandler): unit = jsNative
member __.doublClickZoom with get(): DoubleClickZoomHandler = jsNative and set(v: DoubleClickZoomHandler): unit = jsNative
member __.touchZoomRotate with get(): TouchZoomRotateHandler = jsNative and set(v: TouchZoomRotateHandler): unit = jsNative
member __.addControl(control: Control, ?position: (* TODO StringEnum top-right | top-left | bottom-right | bottom-left *) string): obj = jsNative
member __.removeControl(control: Control): obj = jsNative
member __.addClass(klass: string, ?options: StyleOptions): obj = jsNative
member __.removeClass(klass: string, ?options: StyleOptions): obj = jsNative
member __.setClasses(klasses: ResizeArray<string>, ?options: StyleOptions): obj = jsNative
member __.hasClass(klass: string): bool = jsNative
member __.getClasses(): ResizeArray<string> = jsNative
member __.resize(): obj = jsNative
member __.getBounds(): LngLatBounds = jsNative
member __.setMaxBounds(?lnglatbounds: U2<LngLatBounds, ResizeArray<ResizeArray<float>>>): obj = jsNative
member __.setMinZoom(?minZoom: float): obj = jsNative
member __.getMinZoom(): float = jsNative
member __.setMaxZoom(?maxZoom: float): obj = jsNative
member __.getMaxZoom(): float = jsNative
member __.project(lnglat: U2<LngLat, ResizeArray<float>>): Point = jsNative
member __.unproject(point: U2<Point, ResizeArray<float>>): LngLat = jsNative
member __.queryRenderedFeatures(?pointOrBox: U4<Point, ResizeArray<float>, ResizeArray<Point>, ResizeArray<ResizeArray<float>>>, ?parameters: obj): ResizeArray<GeoJSON.Feature<GeoJSON.GeometryObject>> = jsNative
member __.querySourceFeatures(sourceID: string, ?parameters: obj): ResizeArray<GeoJSON.Feature<GeoJSON.GeometryObject>> = jsNative
member __.setStyle(style: U2<Style, string>): obj = jsNative
member __.getStyle(): Style = jsNative
member __.addSource(id: string, source: obj): obj = jsNative
member __.isSourceLoaded(id: string): bool = jsNative
member __.removeSource(id: string): obj = jsNative
member __.getSource(id: string): obj = jsNative
member __.addImage(name: string, image: U2<HTMLImageElement, ArrayBufferView>, ?options: obj): obj = jsNative
member __.removeImage(name: string): obj = jsNative
member __.loadImage(url: string, callback: Function): obj = jsNative
member __.addLayer(layer: Layer, ?before: string): obj = jsNative
member __.moveLayer(id: string, ?beforeId: string): obj = jsNative
member __.removeLayer(id: string): obj = jsNative
member __.getLayer(id: string): Layer = jsNative
member __.setFilter(layer: string, filter: ResizeArray<obj>): obj = jsNative
member __.setLayerZoomRange(layerId: string, minzoom: float, maxzoom: float): obj = jsNative
member __.getFilter(layer: string): ResizeArray<obj> = jsNative
member __.setPaintProperty(layer: string, name: string, value: obj, ?klass: string): obj = jsNative
member __.getPaintProperty(layer: string, name: string, ?klass: string): obj = jsNative
member __.setLayoutProperty(layer: string, name: string, value: obj): obj = jsNative
member __.getLayoutProperty(layer: string, name: string, ?klass: string): obj = jsNative
member __.setLight(options: Light, lightOptions: obj): obj = jsNative
member __.getLight(): Light = jsNative
member __.getContainer(): HTMLElement = jsNative
member __.getCanvasContainer(): HTMLElement = jsNative
member __.getCanvas(): HTMLCanvasElement = jsNative
member __.loaded(): bool = jsNative
member __.remove(): unit = jsNative
member __.onError(): unit = jsNative
member __.getCenter(): LngLat = jsNative
member __.setCenter(center: U2<LngLat, ResizeArray<float>>, ?eventData: EventData): obj = jsNative
member __.panBy(offset: ResizeArray<float>, ?options: AnimationOptions, ?eventData: EventData): obj = jsNative
member __.panTo(lnglat: LngLat, ?options: AnimationOptions, ?eventdata: EventData): obj = jsNative
member __.getZoom(): float = jsNative
member __.setZoom(zoom: float, ?eventData: EventData): obj = jsNative
member __.zoomTo(zoom: float, ?options: AnimationOptions, ?eventData: EventData): obj = jsNative
member __.zoomIn(?options: AnimationOptions, ?eventData: EventData): obj = jsNative
member __.zoomOut(?options: AnimationOptions, ?eventData: EventData): obj = jsNative
member __.getBearing(): float = jsNative
member __.setBearing(bearing: float, ?eventData: EventData): obj = jsNative
member __.rotateTo(bearing: float, ?options: AnimationOptions, ?eventData: EventData): obj = jsNative
member __.resetNorth(?options: AnimationOptions, ?eventData: EventData): obj = jsNative
member __.snapToNorth(?options: AnimationOptions, ?eventData: EventData): obj = jsNative
member __.getPitch(): float = jsNative
member __.setPitch(pitch: float, ?eventData: EventData): obj = jsNative
member __.fitBounds(bounds: U2<LngLatBounds, ResizeArray<ResizeArray<float>>>, ?options: obj, ?eventData: EventData): obj = jsNative
member __.jumpTo(options: CameraOptions, ?eventData: EventData): obj = jsNative
member __.easeTo(options: U2<CameraOptions, AnimationOptions>, ?eventData: EventData): obj = jsNative
member __.flyTo(options: FlyToOptions, ?eventData: EventData): obj = jsNative
member __.isMoving(): bool = jsNative
member __.stop(): obj = jsNative
and [<AllowNullLiteral>] MapboxOptions =
abstract attributionControl: bool option with get, set
abstract bearing: float option with get, set
abstract bearingSnap: float option with get, set
abstract boxZoom: bool option with get, set
abstract center: U2<LngLat, ResizeArray<float>> option with get, set
abstract classes: ResizeArray<string> option with get, set
abstract container: U2<string, Element> option with get, set
abstract dragPan: bool option with get, set
abstract dragRotate: bool option with get, set
abstract doubleClickZoom: bool option with get, set
abstract hash: bool option with get, set
abstract failIfMayorPerformanceCaveat: bool option with get, set
abstract interactive: bool option with get, set
abstract keyboard: bool option with get, set
abstract logoPosition: bool option with get, set
abstract maxBounds: U2<LngLatBounds, ResizeArray<ResizeArray<float>>> option with get, set
abstract maxZoom: float option with get, set
abstract minZoom: float option with get, set
abstract preserveDrawingBuffer: bool option with get, set
abstract pitch: float option with get, set
abstract refreshExpiredTiles: bool option with get, set
abstract renderWorldCopies: bool option with get, set
abstract scrollZoom: bool option with get, set
abstract style: U2<Style, string> option with get, set
abstract trackResize: bool option with get, set
abstract touchZoomRotate: bool option with get, set
abstract zoom: float option with get, set
and [<AllowNullLiteral>] [<Import("PaddingOptions","mapboxgl")>] PaddingOptions() =
inherit Evented()
member __.top with get(): float = jsNative and set(v: float): unit = jsNative
member __.bottom with get(): float = jsNative and set(v: float): unit = jsNative
member __.left with get(): float = jsNative and set(v: float): unit = jsNative
member __.right with get(): float = jsNative and set(v: float): unit = jsNative
and [<AllowNullLiteral>] [<Import("BoxZoomHandler","mapboxgl")>] BoxZoomHandler(map: Map) =
member __.isEnabled(): bool = jsNative
member __.isActive(): bool = jsNative
member __.enable(): unit = jsNative
member __.disable(): unit = jsNative
and [<AllowNullLiteral>] [<Import("ScrollZoomHandler","mapboxgl")>] ScrollZoomHandler(map: Map) =
member __.isEnabled(): bool = jsNative
member __.enable(): unit = jsNative
member __.disable(): unit = jsNative
and [<AllowNullLiteral>] [<Import("DragPanHandler","mapboxgl")>] DragPanHandler(map: Map) =
member __.isEnabled(): bool = jsNative
member __.isActive(): bool = jsNative
member __.enable(): unit = jsNative
member __.disable(): unit = jsNative
and [<AllowNullLiteral>] [<Import("DragRotateHandler","mapboxgl")>] DragRotateHandler(map: Map, ?options: obj) =
member __.isEnabled(): bool = jsNative
member __.isActive(): bool = jsNative
member __.enable(): unit = jsNative
member __.disable(): unit = jsNative
and [<AllowNullLiteral>] [<Import("KeyboardHandler","mapboxgl")>] KeyboardHandler(map: Map) =
member __.isEnabled(): bool = jsNative
member __.enable(): unit = jsNative
member __.disable(): unit = jsNative
and [<AllowNullLiteral>] [<Import("DoubleClickZoomHandler","mapboxgl")>] DoubleClickZoomHandler(map: Map) =
member __.isEnabled(): bool = jsNative
member __.enable(): unit = jsNative
member __.disable(): unit = jsNative
and [<AllowNullLiteral>] [<Import("TouchZoomRotateHandler","mapboxgl")>] TouchZoomRotateHandler(map: Map) =
member __.isEnabled(): bool = jsNative
member __.enable(): unit = jsNative
member __.disable(): unit = jsNative
member __.disableRotation(): unit = jsNative
member __.enableRotation(): unit = jsNative
and [<AllowNullLiteral>] IControl =
abstract onAdd: map: Map -> HTMLElement
abstract onRemove: map: Map -> obj
abstract getDefaultPosition: unit -> string
and [<AllowNullLiteral>] [<Import("Control","mapboxgl")>] Control() =
inherit Evented()
and [<AllowNullLiteral>] [<Import("NavigationControl","mapboxgl")>] NavigationControl() =
inherit Control()
and [<AllowNullLiteral>] [<Import("PositionOptions","mapboxgl")>] PositionOptions() =
member __.enableHighAccuracy with get(): bool option = jsNative and set(v: bool option): unit = jsNative
member __.timeout with get(): float option = jsNative and set(v: float option): unit = jsNative
member __.maximumAge with get(): float option = jsNative and set(v: float option): unit = jsNative
and [<AllowNullLiteral>] [<Import("GeolocateControl","mapboxgl")>] GeolocateControl(?options: obj) =
inherit Control()
and [<AllowNullLiteral>] [<Import("AttributionControl","mapboxgl")>] AttributionControl(?options: obj) =
inherit Control()
and [<AllowNullLiteral>] [<Import("ScaleControl","mapboxgl")>] ScaleControl(?options: obj) =
inherit Control()
and [<AllowNullLiteral>] [<Import("FullscreenControl","mapboxgl")>] FullscreenControl() =
inherit Control()
and [<AllowNullLiteral>] [<Import("Popup","mapboxgl")>] Popup(?options: PopupOptions) =
inherit Evented()
member __.addTo(map: Map): obj = jsNative
member __.isOpen(): bool = jsNative
member __.remove(): obj = jsNative
member __.getLngLat(): LngLat = jsNative
member __.setLngLat(lnglat: U2<LngLat, ResizeArray<float>>): obj = jsNative
member __.setText(text: string): obj = jsNative
member __.setHTML(html: string): obj = jsNative
member __.setDOMContent(htmlNode: Node): obj = jsNative
and [<AllowNullLiteral>] PopupOptions =
abstract closeButton: bool option with get, set
abstract closeOnClick: bool option with get, set
abstract anchor: (* TODO StringEnum top | bottom | left | right | top-left | top-right | bottom-left | bottom-right *) string option with get, set
abstract offset: U4<float, Point, ResizeArray<float>, obj> option with get, set
and [<AllowNullLiteral>] Style =
abstract bearing: float option with get, set
abstract center: ResizeArray<float> option with get, set
abstract glyphs: string option with get, set
abstract layers: ResizeArray<Layer> option with get, set
abstract metadata: obj option with get, set
abstract name: string option with get, set
abstract pitch: float option with get, set
abstract light: Light option with get, set
abstract sources: obj option with get, set
abstract sprite: string option with get, set
abstract transition: Transition option with get, set
abstract version: float with get, set
abstract zoom: float option with get, set
and [<AllowNullLiteral>] Transition =
abstract delay: float option with get, set
abstract duration: float option with get, set
and [<AllowNullLiteral>] Light =
abstract anchor: (* TODO StringEnum map | viewport *) string option with get, set
abstract position: ResizeArray<float> option with get, set
abstract color: string option with get, set
abstract intensity: float option with get, set
and [<AllowNullLiteral>] Source =
abstract ``type``: (* TODO StringEnum vector | raster | geojson | image | video | canvas *) string with get, set
and [<AllowNullLiteral>] GeoJSONSourceRaw =
inherit Source
inherit GeoJSONSourceOptions
abstract ``type``: obj with get, set
and [<AllowNullLiteral>] [<Import("GeoJSONSource","mapboxgl")>] GeoJSONSource(?options: GeoJSONSourceOptions) =
// interface GeoJSONSourceRaw with
// member __.``type`` with get(): obj = jsNative and set(v: obj): unit = jsNative
member __.setData(data: U3<GeoJSON.Feature<GeoJSON.GeometryObject>, GeoJSON.FeatureCollection<GeoJSON.GeometryObject>, string>): obj = jsNative
and [<AllowNullLiteral>] GeoJSONSourceOptions =
abstract data: U3<GeoJSON.Feature<GeoJSON.GeometryObject>, GeoJSON.FeatureCollection<GeoJSON.GeometryObject>, string> option with get, set
abstract maxzoom: float option with get, set
abstract buffer: float option with get, set
abstract tolerance: float option with get, set
abstract cluster: U2<float, bool> option with get, set
abstract clusterRadius: float option with get, set
abstract clusterMaxZoom: float option with get, set
// and [<AllowNullLiteral>] VideoSource =
// inherit VideoSourceOptions
and [<AllowNullLiteral>] [<Import("VideoSource","mapboxgl")>] VideoSource(?options: VideoSourceOptions) =
interface Source with
member __.``type`` with get(): (* TODO StringEnum vector | raster | geojson | image | video | canvas *) string = jsNative and set(v: (* TODO StringEnum vector | raster | geojson | image | video | canvas *) string): unit = jsNative
member __.getVideo(): HTMLVideoElement = jsNative
member __.setCoordinates(coordinates: ResizeArray<ResizeArray<float>>): obj = jsNative
and [<AllowNullLiteral>] VideoSourceOptions =
abstract urls: ResizeArray<string> option with get, set
abstract coordinates: ResizeArray<ResizeArray<float>> option with get, set
// and [<AllowNullLiteral>] ImageSource =
// inherit ImageSourceOptions
and [<AllowNullLiteral>] [<Import("ImageSource","mapboxgl")>] ImageSource(?options: ImageSourceOptions) =
interface Source with
member __.``type`` with get(): (* TODO StringEnum vector | raster | geojson | image | video | canvas *) string = jsNative and set(v: (* TODO StringEnum vector | raster | geojson | image | video | canvas *) string): unit = jsNative
member __.setCoordinates(coordinates: ResizeArray<ResizeArray<float>>): obj = jsNative
and [<AllowNullLiteral>] ImageSourceOptions =
abstract url: string option with get, set
abstract coordinates: ResizeArray<ResizeArray<float>> option with get, set
and [<AllowNullLiteral>] [<Import("CanvasSource","mapboxgl")>] CanvasSource() =
interface Source with
member __.``type`` with get(): (* TODO StringEnum vector | raster | geojson | image | video | canvas *) string = jsNative and set(v: (* TODO StringEnum vector | raster | geojson | image | video | canvas *) string): unit = jsNative
interface CanvasSourceOptions with
member __.coordinates with get(): ResizeArray<ResizeArray<float>> = jsNative and set(v: ResizeArray<ResizeArray<float>>): unit = jsNative
member __.animate with get(): bool option = jsNative and set(v: bool option): unit = jsNative
member __.canvas with get(): string = jsNative and set(v: string): unit = jsNative
member __.getCanvas(): HTMLCanvasElement = jsNative
member __.setCoordinates(coordinates: ResizeArray<ResizeArray<float>>): obj = jsNative
and [<AllowNullLiteral>] CanvasSourceOptions =
abstract coordinates: ResizeArray<ResizeArray<float>> with get, set
abstract animate: bool option with get, set
abstract canvas: string with get, set
and [<AllowNullLiteral>] VectorSource =
inherit Source
abstract ``type``: obj with get, set
abstract url: string option with get, set
abstract tiles: ResizeArray<string> option with get, set
abstract minzoom: float option with get, set
abstract maxzoom: float option with get, set
and [<AllowNullLiteral>] RasterSource =
inherit Source
abstract ``type``: obj with get, set
abstract url: string with get, set
abstract tiles: ResizeArray<string> option with get, set
abstract minzoom: float option with get, set
abstract maxzoom: float option with get, set
abstract tileSize: float option with get, set
and [<AllowNullLiteral>] [<Import("LngLat","mapboxgl")>] LngLat(lng: float, lat: float) =
member __.lng with get(): float = jsNative and set(v: float): unit = jsNative
member __.lat with get(): float = jsNative and set(v: float): unit = jsNative
member __.wrap(): LngLat = jsNative
member __.wrapToBestWorld(center: LngLat): LngLat = jsNative
member __.toArray(): ResizeArray<float> = jsNative
member __.toString(): string = jsNative
static member convert(input: U2<ResizeArray<float>, LngLat>): LngLat = jsNative
and [<AllowNullLiteral>] [<Import("LngLatBounds","mapboxgl")>] LngLatBounds(?sw: LngLat, ?ne: LngLat) =
member __.sw with get(): U2<LngLat, ResizeArray<float>> = jsNative and set(v: U2<LngLat, ResizeArray<float>>): unit = jsNative
member __.ne with get(): U2<LngLat, ResizeArray<float>> = jsNative and set(v: U2<LngLat, ResizeArray<float>>): unit = jsNative
member __.extend(obj: U2<LngLat, LngLatBounds>): obj = jsNative
member __.getCenter(): LngLat = jsNative
member __.getSouthWest(): LngLat = jsNative
member __.getNorthEast(): LngLat = jsNative
member __.getNorthWest(): LngLat = jsNative
member __.getSouthEast(): LngLat = jsNative
member __.getWest(): float = jsNative
member __.getSouth(): float = jsNative
member __.getEast(): float = jsNative
member __.getNorth(): float = jsNative
member __.toArray(): ResizeArray<ResizeArray<float>> = jsNative
member __.toString(): string = jsNative
static member convert(input: U3<LngLatBounds, ResizeArray<float>, ResizeArray<ResizeArray<float>>>): LngLatBounds = jsNative
and [<AllowNullLiteral>] [<Import("Point","mapboxgl")>] Point(?options: obj) =
member __.clone(): Point = jsNative
member __.add(p: float): Point = jsNative
member __.sub(p: float): Point = jsNative
member __.mult(k: float): Point = jsNative
member __.div(k: float): Point = jsNative
member __.rotate(a: float): Point = jsNative
member __.matMult(m: float): Point = jsNative
member __.unit(): Point = jsNative
member __.perp(): Point = jsNative
member __.round(): Point = jsNative
member __.mag(): float = jsNative
member __.equals(p: Point): bool = jsNative
member __.dist(p: Point): float = jsNative
member __.distSqr(p: Point): float = jsNative
member __.angle(): float = jsNative
member __.angleTo(p: Point): float = jsNative
member __.angleWidth(p: Point): float = jsNative
member __.angleWithSep(x: float, y: float): float = jsNative
member __.convert(a: U2<ResizeArray<float>, Point>): Point = jsNative
and [<AllowNullLiteral>] [<Import("Marker","mapboxgl")>] Marker(?element: HTMLElement, ?options: obj) =
member __.addTo(map: Map): obj = jsNative
member __.remove(): obj = jsNative
member __.getLngLat(): LngLat = jsNative
member __.setLngLat(lngLat: U2<LngLat, ResizeArray<float>>): obj = jsNative
member __.setPopup(?popup: Popup): obj = jsNative
member __.getPopup(): Popup = jsNative
member __.togglePopup(): obj = jsNative
and [<AllowNullLiteral>] [<Import("Evented","mapboxgl")>] Evented() =
member __.on(``type``: string, listener: Function): obj = jsNative
member __.on(``type``: string, layer: string, listener: Function): obj = jsNative
member __.off(?``type``: U2<string, obj>, ?listener: Function): obj = jsNative
member __.off(?``type``: U2<string, obj>, ?layer: string, ?listener: Function): obj = jsNative
member __.once(``type``: string, listener: Function): obj = jsNative
member __.fire(``type``: string, ?data: U2<EventData, obj>): obj = jsNative
member __.listens(``type``: string): bool = jsNative
and [<AllowNullLiteral>] StyleOptions =
abstract transition: bool option with get, set
and [<AllowNullLiteral>] [<Import("EventData","mapboxgl")>] EventData() =
member __.``type`` with get(): string = jsNative and set(v: string): unit = jsNative
member __.target with get(): Map = jsNative and set(v: Map): unit = jsNative
member __.originalEvent with get(): Event = jsNative and set(v: Event): unit = jsNative
member __.point with get(): Point = jsNative and set(v: Point): unit = jsNative
member __.lngLat with get(): LngLat = jsNative and set(v: LngLat): unit = jsNative
and [<AllowNullLiteral>] [<Import("MapMouseEvent","mapboxgl")>] MapMouseEvent() =
member __.``type`` with get(): string = jsNative and set(v: string): unit = jsNative
member __.target with get(): Map = jsNative and set(v: Map): unit = jsNative
member __.originalEvent with get(): MouseEvent = jsNative and set(v: MouseEvent): unit = jsNative
member __.point with get(): Point = jsNative and set(v: Point): unit = jsNative
member __.lngLat with get(): LngLat = jsNative and set(v: LngLat): unit = jsNative
and [<AllowNullLiteral>] [<Import("MapTouchEvent","mapboxgl")>] MapTouchEvent() =
member __.``type`` with get(): string = jsNative and set(v: string): unit = jsNative
member __.target with get(): Map = jsNative and set(v: Map): unit = jsNative
member __.originalEvent with get(): TouchEvent = jsNative and set(v: TouchEvent): unit = jsNative
member __.point with get(): Point = jsNative and set(v: Point): unit = jsNative
member __.lngLat with get(): LngLat = jsNative and set(v: LngLat): unit = jsNative
member __.points with get(): ResizeArray<Point> = jsNative and set(v: ResizeArray<Point>): unit = jsNative
member __.lngLats with get(): ResizeArray<LngLat> = jsNative and set(v: ResizeArray<LngLat>): unit = jsNative
and [<AllowNullLiteral>] [<Import("MapBoxZoomEvent","mapboxgl")>] MapBoxZoomEvent() =
member __.originalEvent with get(): MouseEvent = jsNative and set(v: MouseEvent): unit = jsNative
member __.boxZoomBounds with get(): LngLatBounds = jsNative and set(v: LngLatBounds): unit = jsNative
and [<AllowNullLiteral>] [<Import("MapDataEvent","mapboxgl")>] MapDataEvent() =
member __.``type`` with get(): string = jsNative and set(v: string): unit = jsNative
member __.dataType with get(): (* TODO StringEnum source | style | tile *) string = jsNative and set(v: (* TODO StringEnum source | style | tile *) string): unit = jsNative
member __.isSourceLoaded with get(): bool option = jsNative and set(v: bool option): unit = jsNative
member __.source with get(): Source option = jsNative and set(v: Source option): unit = jsNative
member __.coord with get(): obj option = jsNative and set(v: obj option): unit = jsNative
and [<AllowNullLiteral>] AnimationOptions =
abstract duration: float option with get, set
abstract easing: Function option with get, set
abstract offset: U2<Point, ResizeArray<float>> option with get, set
abstract animate: bool option with get, set
and [<AllowNullLiteral>] CameraOptions =
abstract center: U2<LngLat, ResizeArray<float>> option with get, set
abstract zoom: float option with get, set
abstract bearing: float option with get, set
abstract pitch: float option with get, set
abstract around: U2<LngLat, ResizeArray<float>> option with get, set
and [<AllowNullLiteral>] FlyToOptions =
inherit AnimationOptions
inherit CameraOptions
abstract curve: float option with get, set
abstract minZoom: float option with get, set
abstract speed: float option with get, set
abstract screenSpeed: float option with get, set
abstract easing: Function option with get, set
and [<AllowNullLiteral>] MapEvent =
abstract resize: unit option with get, set
abstract webglcontextlost: obj option with get, set
abstract webglcontextrestored: obj option with get, set
abstract remove: unit option with get, set
abstract dataloading: obj option with get, set
abstract data: obj option with get, set
abstract render: unit option with get, set
abstract contextmenu: obj option with get, set
abstract dblclick: obj option with get, set
abstract click: obj option with get, set
abstract tiledataloading: obj option with get, set
abstract sourcedataloading: obj option with get, set
abstract styledataloading: obj option with get, set
abstract touchcancel: obj option with get, set
abstract touchmove: obj option with get, set
abstract touchend: obj option with get, set
abstract touchstart: obj option with get, set
abstract mousemove: obj option with get, set
abstract mouseup: obj option with get, set
abstract mousedown: obj option with get, set
abstract moveend: obj option with get, set
abstract move: obj option with get, set
abstract movestart: obj option with get, set
abstract mouseout: obj option with get, set
abstract load: unit option with get, set
abstract sourcedata: obj option with get, set
abstract styledata: obj option with get, set
abstract zoomend: obj option with get, set
abstract zoom: obj option with get, set
abstract zoomstart: obj option with get, set
abstract boxzoomcancel: obj option with get, set
abstract boxzoomstart: obj option with get, set
abstract boxzoomend: obj option with get, set
abstract rotate: obj option with get, set
abstract rotatestart: obj option with get, set
abstract rotateend: obj option with get, set
abstract drag: obj option with get, set
abstract dragend: obj option with get, set
abstract pitch: obj option with get, set
and [<AllowNullLiteral>] Layer =
abstract id: string with get, set
abstract ``type``: (* TODO StringEnum fill | line | symbol | circle | fill-extrusion | raster | background *) string option with get, set
abstract metadata: obj option with get, set
abstract ref: string option with get, set
abstract source: string option with get, set
abstract ``source-layer``: string option with get, set
abstract minzoom: float option with get, set
abstract maxzoom: float option with get, set
abstract interactive: bool option with get, set
abstract filter: ResizeArray<obj> option with get, set
abstract layout: obj option with get, set
abstract paint: obj option with get, set
and [<AllowNullLiteral>] StyleFunction =
abstract stops: ResizeArray<ResizeArray<obj>> with get, set
abstract property: string option with get, set
abstract ``base``: float option with get, set
abstract ``type``: (* TODO StringEnum identity | exponential | interval | categorical *) string option with get, set
abstract ``default``: obj option with get, set
abstract colorSpace: (* TODO StringEnum rgb | lab | interval *) string option with get, set
and [<AllowNullLiteral>] BackgroundLayout =
abstract visibility: (* TODO StringEnum visible | none *) string option with get, set
and [<AllowNullLiteral>] BackgroundPaint =
abstract ``background-color``: string option with get, set
abstract ``background-pattern``: string option with get, set
abstract ``background-opacity``: float option with get, set
and [<AllowNullLiteral>] FillLayout =
abstract visibility: (* TODO StringEnum visible | none *) string option with get, set
and [<AllowNullLiteral>] FillPaint =
abstract ``fill-antialias``: bool option with get, set
abstract ``fill-opacity``: U2<float, StyleFunction> option with get, set
abstract ``fill-color``: U2<string, StyleFunction> option with get, set
abstract ``fill-outline-color``: U2<string, StyleFunction> with get, set
abstract ``fill-translate``: ResizeArray<float> option with get, set
abstract ``fill-translate-anchor``: (* TODO StringEnum map | viewport *) string option with get, set
abstract ``fill-pattern``: obj option with get, set
and [<AllowNullLiteral>] FillExtrusionLayout =
abstract visibility: (* TODO StringEnum visible | none *) string option with get, set
and [<AllowNullLiteral>] FillExtrusionPaint =
abstract ``fill-extrusion-opacity``: float option with get, set
abstract ``fill-extrusion-color``: U2<string, StyleFunction> option with get, set
abstract ``fill-extrusion-translate``: ResizeArray<float> option with get, set
abstract ``fill-extrusion-translate-anchor``: (* TODO StringEnum map | viewport *) string option with get, set
abstract ``fill-extrusion-pattern``: string with get, set
abstract ``fill-extrusion-height``: U2<float, StyleFunction> option with get, set
abstract ``fill-extrusion-base``: float option with get, set
and [<AllowNullLiteral>] LineLayout =
abstract visibility: (* TODO StringEnum visible | none *) string option with get, set
abstract ``line-cap``: (* TODO StringEnum butt | round | square *) string option with get, set
abstract ``line-join``: (* TODO StringEnum bevel | round | miter *) string option with get, set
abstract ``line-miter-limit``: float option with get, set
abstract ``line-round-limit``: float option with get, set
and [<AllowNullLiteral>] LinePaint =
abstract ``line-opacity``: U2<float, StyleFunction> option with get, set
abstract ``line-color``: U2<string, StyleFunction> option with get, set
abstract ``line-translate``: ResizeArray<float> option with get, set
abstract ``line-translate-anchor``: (* TODO StringEnum map | viewport *) string option with get, set
abstract ``line-width``: float option with get, set
abstract ``line-gap-width``: U2<float, StyleFunction> option with get, set
abstract ``line-offset``: U2<float, StyleFunction> option with get, set
abstract ``line-blur``: U2<float, StyleFunction> option with get, set
abstract ``line-dasharray``: ResizeArray<float> option with get, set
abstract ``line-dasharray-transition``: Transition option with get, set
abstract ``line-pattern``: string option with get, set
and [<AllowNullLiteral>] SymbolLayout =
abstract visibility: (* TODO StringEnum visible | none *) string option with get, set
abstract ``symbol-placement``: (* TODO StringEnum point | line *) string option with get, set
abstract ``symbol-spacing``: float option with get, set
abstract ``symbol-avoid-edges``: bool option with get, set
abstract ``icon-allow-overlap``: bool option with get, set
abstract ``icon-ignore-placement``: bool option with get, set
abstract ``icon-optional``: bool option with get, set
abstract ``icon-rotation-alignment``: (* TODO StringEnum map | viewport | auto *) string option with get, set
abstract ``icon-size``: U2<float, StyleFunction> option with get, set
abstract ``icon-text-fit``: (* TODO StringEnum none | both | width | height *) string option with get, set
abstract ``icon-text-fit-padding``: ResizeArray<float> option with get, set
abstract ``icon-image``: U2<string, StyleFunction> option with get, set
abstract ``icon-rotate``: U2<float, StyleFunction> option with get, set
abstract ``icon-padding``: float option with get, set
abstract ``icon-keep-upright``: bool option with get, set
abstract ``icon-offset``: U2<ResizeArray<float>, StyleFunction> option with get, set
abstract ``text-pitch-alignment``: (* TODO StringEnum map | viewport | auto *) string option with get, set
abstract ``text-rotation-alignment``: (* TODO StringEnum map | viewport | auto *) string option with get, set
abstract ``text-field``: U2<string, StyleFunction> option with get, set
abstract ``text-font``: U2<string, ResizeArray<string>> option with get, set
abstract ``text-size``: U2<float, StyleFunction> option with get, set
abstract ``text-max-width``: float option with get, set
abstract ``text-line-height``: float option with get, set
abstract ``text-letter-spacing``: float option with get, set
abstract ``text-justify``: (* TODO StringEnum left | center | right *) string option with get, set
abstract ``text-anchor``: (* TODO StringEnum center | left | right | top | bottom | top-left | top-right | bottom-left | bottom-right *) string option with get, set
abstract ``text-max-angle``: float option with get, set
abstract ``text-rotate``: U2<float, StyleFunction> option with get, set
abstract ``text-padding``: float option with get, set
abstract ``text-keep-upright``: bool option with get, set
abstract ``text-transform``: (* TODO StringEnum none | uppercase | lowercase | *) string option with get, set
abstract ``text-offset``: ResizeArray<float> option with get, set
abstract ``text-allow-overlap``: bool option with get, set
abstract ``text-ignore-placement``: bool option with get, set
abstract ``text-optional``: bool option with get, set
and [<AllowNullLiteral>] SymbolPaint =
abstract ``icon-opacity``: U2<float, StyleFunction> option with get, set
abstract ``icon-color``: U2<string, StyleFunction> option with get, set
abstract ``icon-halo-color``: U2<string, StyleFunction> option with get, set
abstract ``icon-halo-width``: U2<float, StyleFunction> option with get, set
abstract ``icon-halo-blur``: U2<float, StyleFunction> option with get, set
abstract ``icon-translate``: ResizeArray<float> option with get, set
abstract ``icon-translate-anchor``: (* TODO StringEnum map | viewport *) string option with get, set
abstract ``text-opacity``: U2<float, StyleFunction> option with get, set
abstract ``text-color``: U2<string, StyleFunction> option with get, set
abstract ``text-halo-color``: U2<string, StyleFunction> option with get, set
abstract ``text-halo-width``: U2<float, StyleFunction> option with get, set
abstract ``text-halo-blur``: U2<float, StyleFunction> option with get, set
abstract ``text-translate``: ResizeArray<float> option with get, set
abstract ``text-translate-anchor``: (* TODO StringEnum map | viewport *) string option with get, set
and [<AllowNullLiteral>] RasterLayout =
abstract visibility: (* TODO StringEnum visible | none *) string option with get, set
and [<AllowNullLiteral>] RasterPaint =
abstract ``raster-opacity``: float option with get, set
abstract ``raster-hue-rotate``: float option with get, set
abstract ``raster-brightness-min``: float option with get, set
abstract ``raster-brightness-max``: float option with get, set
abstract ``raster-saturation``: float option with get, set
abstract ``raster-contrast``: float option with get, set
abstract ``raster-fade-duration``: float option with get, set
and [<AllowNullLiteral>] CircleLayout =
abstract visibility: (* TODO StringEnum visible | none *) string option with get, set
and [<AllowNullLiteral>] CirclePaint =
abstract ``circle-radius``: U2<float, StyleFunction> option with get, set
abstract ``circle-radius-transition``: Transition option with get, set
abstract ``circle-color``: string option with get, set
abstract ``circle-blur``: U2<float, StyleFunction> option with get, set
abstract ``circle-opacity``: U2<float, StyleFunction> option with get, set
abstract ``circle-translate``: ResizeArray<float> option with get, set
abstract ``circle-translate-anchor``: (* TODO StringEnum map | viewport *) string option with get, set
abstract ``circle-pitch-scale``: (* TODO StringEnum map | viewport *) string option with get, set
abstract ``circle-stroke-width``: U2<float, StyleFunction> option with get, set
abstract ``circle-stroke-color``: U2<string, StyleFunction> option with get, set
abstract ``circle-stroke-opacity``: U2<float, StyleFunction> option with get, set
type [<Import("*","mapboxgl")>] Globals =
//static member accessToken with get(): string = jsNative and set(v: string): unit = jsNative
[<Emit("mapboxgl.accessToken=$0")>]
static member AccessToken with set(token: string) : unit = jsNative
static member version with get(): string = jsNative and set(v: string): unit = jsNative
static member supported(?options: obj): bool = jsNative
static member setRTLTextPlugin(pluginURL: string, callback: Function): unit = jsNative
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment