Companion

external object Companion(source)

Types

Link copied to clipboard
external interface LoadOptions

Initialization options for the load method.

Properties

Link copied to clipboard
external var clampToGround: Boolean

Gets or sets default of whether to clamp to the ground.

Link copied to clipboard
external var crsLinkHrefs: JsAny

Gets an object that maps the href property of a crs link to a callback function which takes the crs properties object and returns a Promise that resolves to a function that takes a GeoJSON coordinate and transforms it into a WGS84 Earth-fixed Cartesian. Items in this object take precedence over those defined in crsLinkHrefs, assuming the link has a type specified.

Link copied to clipboard
external var crsLinkTypes: JsAny

Gets an object that maps the type property of a crs link to a callback function which takes the crs properties object and returns a Promise that resolves to a function that takes a GeoJSON coordinate and transforms it into a WGS84 Earth-fixed Cartesian. Items in crsLinkHrefs take precedence over this object.

Link copied to clipboard
external var crsNames: JsAny

Gets an object that maps the name of a crs to a callback function which takes a GeoJSON coordinate and transforms it into a WGS84 Earth-fixed Cartesian. Older versions of GeoJSON which supported the EPSG type can be added to this list as well, by specifying the complete EPSG name, for example 'EPSG:4326'.

Link copied to clipboard
external var fill: Color

Gets or sets default color for polygon interiors.

Link copied to clipboard
external var markerColor: Color

Gets or sets the default color of the map pin created for each point.

Link copied to clipboard
external var markerSize: Double

Gets or sets the default size of the map pin created for each point, in pixels.

Link copied to clipboard
external var markerSymbol: String

Gets or sets the default symbol of the map pin created for each point. This can be any valid Maki identifier, any single character, or blank if no symbol is to be used.

Link copied to clipboard
external var stroke: Color

Gets or sets the default color of polylines and polygon outlines.

Link copied to clipboard
external var strokeWidth: Double

Gets or sets the default width of polylines and polygon outlines.

Functions

Link copied to clipboard
suspend external fun load(data: Resource, options: GeoJsonDataSource.Companion.LoadOptions? = definedExternally): GeoJsonDataSource

Creates a Promise to a new instance loaded with the provided GeoJSON or TopoJSON data.

suspend external fun load(data: JsAny, options: GeoJsonDataSource.Companion.LoadOptions? = definedExternally): GeoJsonDataSource
suspend external fun load(data: String, options: GeoJsonDataSource.Companion.LoadOptions? = definedExternally): GeoJsonDataSource
Link copied to clipboard
external fun loadAsync(data: Resource, options: GeoJsonDataSource.Companion.LoadOptions? = definedExternally): Promise<GeoJsonDataSource>
external fun loadAsync(data: JsAny, options: GeoJsonDataSource.Companion.LoadOptions? = definedExternally): Promise<GeoJsonDataSource>
external fun loadAsync(data: String, options: GeoJsonDataSource.Companion.LoadOptions? = definedExternally): Promise<GeoJsonDataSource>