Class: MapSystemBuilder<Modules, Layers, Controllers, Context>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:192
Builds maps. Each builder is configured with a series of build steps which collectively define how the builder compiles finished maps. In addition to defining basic map properties such as size and range, build steps can also customize map behavior and appearance through adding map model modules, layers, and controllers.
Each map compiled by the builder is associated with a MapSystemContext, which holds references to the map projection, map model, all layers and controllers, and other data associated with the map. Layers and controllers have access to the context when they are created during compilation, and a reference to the context is stored with the compiled map.
A single builder can compile multiple maps. Each compiled map is a separate entity, with its own model, layers, controllers, and context.
Type Parameters
Type Parameter | Default type |
---|---|
Modules extends ModuleRecord | any |
Layers extends LayerRecord | any |
Controllers extends ControllerRecord | any |
Context extends ContextRecord | any |
Constructors
Constructor
protected
new MapSystemBuilder<Modules
,Layers
,Controllers
,Context
>(bus
):MapSystemBuilder
<Modules
,Layers
,Controllers
,Context
>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:246
Creates an instance of a map system builder.
Parameters
Parameter | Type | Description |
---|---|---|
bus | EventBus | This builder's event bus. |
Returns
MapSystemBuilder
<Modules
, Layers
, Controllers
, Context
>
Properties
bus
readonly
bus:EventBus
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:246
This builder's event bus.
contextFactories
protected
readonly
contextFactories:Map
<string
,ContextFactory
>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:214
controllerFactories
protected
readonly
controllerFactories:Map
<string
,ControllerFactory
>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:213
deadZone?
protected
optional
deadZone:Subscribable
<Readonly
<Omit
<Float64Array
,"set"
|"sort"
|"copyWithin"
>>>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:219
destroyCallbacks
protected
readonly
destroyCallbacks:Map
<string
, (context
) =>void
>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:216
initCallbacks
protected
readonly
initCallbacks:Map
<string
, (context
) =>void
>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:215
layerFactories
protected
readonly
layerFactories:Map
<string
,LayerFactory
>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:212
moduleFactories
protected
readonly
moduleFactories:Map
<string
,ModuleFactory
>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:211
nominalRangeEndpoints?
protected
optional
nominalRangeEndpoints:Readonly
<Omit
<Float64Array
,"set"
|"sort"
|"copyWithin"
>>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:221
projectedSize
protected
projectedSize:Subscribable
<Readonly
<Omit
<Float64Array
,"set"
|"sort"
|"copyWithin"
>>>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:218
range?
protected
optional
range:number
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:222
targetOffset?
protected
optional
targetOffset:Readonly
<Omit
<Float64Array
,"set"
|"sort"
|"copyWithin"
>>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:220
RESTRICTED_CONTEXT_KEYS
protected
readonly
static
RESTRICTED_CONTEXT_KEYS:Set
<string
>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:199
Accessors
controllerCount
Get Signature
get controllerCount():
number
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:238
The number of map controllers added to this builder.
Returns
number
layerCount
Get Signature
get layerCount():
number
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:232
The number of map layers added to this builder.
Returns
number
moduleCount
Get Signature
get moduleCount():
number
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:226
The number of map model modules added to this builder.
Returns
number
Methods
build()
build<
UseModules
,UseLayers
,UseControllers
,UseContext
>(cssClass?
):CompiledMapSystem
<DefaultIfAny
<UseModules
,Modules
>,DefaultIfAny
<UseLayers
,Layers
>,DefaultIfAny
<UseControllers
,Controllers
>,DefaultIfAny
<UseContext
,Context
>>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:1265
Compiles a map. The compiled map consists of a map context, a rendered map (as a VNode), and a node reference to the rendered map component.
The compiled map will be bound to a model (accessible through the map context) which contains all the modules added to this builder.
The map will also contain all layers added to this builder, with layers assigned lower order values appearing below layers assigned greater order values. The layers can be retrieved by their keys from the map context.
All controllers added to this builder will be created with the map and hooked up to the map's lifecycle callbacks. The controllers can be retrieved by their keys from the map context.
Type Parameters
Type Parameter | Default type |
---|---|
UseModules extends ModuleRecord | any |
UseLayers extends LayerRecord | any |
UseControllers extends ControllerRecord | any |
UseContext extends ContextRecord | any |
Parameters
Parameter | Type | Description |
---|---|---|
cssClass? | string | SubscribableSet <string > | The CSS class(es) to apply to the root of the rendered map component. |
Returns
CompiledMapSystem
<DefaultIfAny
<UseModules
, Modules
>, DefaultIfAny
<UseLayers
, Layers
>, DefaultIfAny
<UseControllers
, Controllers
>, DefaultIfAny
<UseContext
, Context
>>
A compiled map.
buildContext()
protected
buildContext():object
&Readonly
<any
> &object
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:1494
Builds a new map context. The map context will be initialized with all context properties and modules added to this builder.
Returns
The new map context.
with()
with<
Builder
,UseModules
,UseLayers
,UseContext
>(builder
, ...args
):ConditionalReturn
<DefaultIfAny
<UseModules
,Modules
>,RequiredCustomBuilderModules
<Builder
>,DefaultIfAny
<UseLayers
,Layers
>,RequiredCustomBuilderLayers
<Builder
>,DefaultIfAny
<UseContext
,Context
>,RequiredCustomBuilderContext
<Builder
>,MapSystemBuilder
<Modules
,Layers
,Controllers
,Context
>>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:1230
Configures this builder using a custom build step.
Type Parameters
Type Parameter | Default type |
---|---|
Builder extends MapSystemCustomBuilder <any [], any , any , any > | - |
UseModules | any |
UseLayers extends LayerRecord | any |
UseContext | any |
Parameters
Parameter | Type | Description |
---|---|---|
builder | Builder | A function which defines a custom build step. |
...args | CustomBuilderArgs <Builder > | Arguments to pass to the custom build function. |
Returns
ConditionalReturn
<DefaultIfAny
<UseModules
, Modules
>, RequiredCustomBuilderModules
<Builder
>, DefaultIfAny
<UseLayers
, Layers
>, RequiredCustomBuilderLayers
<Builder
>, DefaultIfAny
<UseContext
, Context
>, RequiredCustomBuilderContext
<Builder
>, MapSystemBuilder
<Modules
, Layers
, Controllers
, Context
>>
This builder, after it has been configured.
withAirspaces()
withAirspaces(
cache
,showTypes
,selectRenderer
,renderOrder
,options?
,order?
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:1120
Configures this builder to generate a map which displays airspaces.
Adds the following...
Context properties:
[MapSystemKeys.AirspaceManager]: GenericAirspaceRenderManager
Modules:
[MapSystemKeys.Airspace]: MapAirspaceModule
Layers:
[MapSystemKeys.Airspace]: MapAirspaceLayer
Parameters
Parameter | Type | Description |
---|---|---|
cache | LodBoundaryCache | The airspace cache to use to store airspaces retrieved for rendering. |
showTypes | MapAirspaceShowTypes | The airspace show types to define in the airspace module. Each show type will be assigned a Subject in the show property of the module. The Subject controls the visibility of airspace types included in its show type. Airspace types that are not included in any defined show type will never be displayed. |
selectRenderer | (airspace ) => MapAirspaceRenderer | A function which selects a MapAirspaceRenderer |
renderOrder | (a , b ) => number | A function which determines the rendering order of airspaces. The function should return a negative number when airspace a should be rendered before (below) airspace b , a positive number when airspace a should be rendered after (above) airspace b , and 0 when the relative render order of the two airspaces does not matter. If not defined, there will be no guarantee on the order in which airspaces are rendered. |
options? | Partial <Pick <MapAirspaceLayerProps , "maxSearchRadius" | "maxSearchItemCount" | "searchDebounceDelay" | "renderTimeBudget" >> | Options for the airspace layer. Option defaults are as follows: * maxSearchRadius : 10 nautical miles * maxSearchItemCount : 100 * searchDebounceDelay : 500 (milliseconds) * renderTimeBudget : 0.2 (milliseconds) |
order? | number | The order to assign to the airspace layer. Layers with lower assigned order will be attached to the map before and appear below layers with greater assigned order values. Defaults to the number of layers already added to this builder. |
Returns
this
This builder, after it has been configured.
withAutopilotProps()
withAutopilotProps(
propertiesToBind?
,updateFreq?
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:736
Configures this builder to add a module describing the player airplane's autopilot properties, and optionally binds the module's properties to data received over the event bus.
Adds the following...
Modules:
[MapSystemKeys.AutopilotProps]: MapAutopilotPropsModule
Controllers:
[MapSystemKeys.AutopilotProps]: MapAutopilotPropsController
(optional)
Parameters
Parameter | Type | Description |
---|---|---|
propertiesToBind? | Iterable <MapAutopilotPropsKey > | Properties on the autopilot module to bind to data received over the event bus. |
updateFreq? | number | Subscribable <number > | The update frequency, in hertz, of the data bindings, or a subscribable which provides it. If not defined, the data bindings will update every frame. Ignored if propertiesToBind is undefined. |
Returns
this
This builder, after it has been configured.
withBindings()
withBindings<
UseModules
,UseLayers
,UseContext
>(key
,bindings
,onDestroy?
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:492
Configures this builder to add a controller which maintains a list of bindings from source to target subscribables.
Type Parameters
Type Parameter | Default type |
---|---|
UseModules extends ModuleRecord | any |
UseLayers extends LayerRecord | any |
UseContext extends ContextRecord | any |
Parameters
Parameter | Type | Description |
---|---|---|
key | string | The key of the controller. |
bindings | (context ) => Iterable <MapBinding > | The bindings to maintain. |
onDestroy? | () => void | A function to execute when the controller is destroyed. |
Returns
this
This builder, after it has been configured.
withBing()
withBing(
bingId
,delay
,mode?
,order?
,cssClass?
,opacity?
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:813
Configures this builder to generate a map which displays Bing Map terrain and weather.
Adds the following...
Modules:
[MapSystemKeys.TerrainColors]: MapTerrainColorsModule
[MapSystemKeys.Weather]: MapWxrModule
Layers:
[MapSystemKeys.Bing]: MapBingLayer
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
bingId | string | undefined | The ID to assign to the Bing Map instance bound to the layer. |
delay | number | 0 | The delay, in milliseconds, to wait after the Bing layer has been rendered before attempting to bind a Bing Map instance. |
mode? | EBingMode | undefined | The mode of the map, optional. If omitted, will be EBingMode.PLANE. |
order? | number | undefined | The order value to assign to the Bing layer. Layers with lower assigned order will be attached to the map before and appear below layers with greater assigned order values. Defaults to the number of layers already added to the map builder. |
cssClass? | string | SubscribableSet <string > | undefined | The CSS class(es) to apply to the root of the map bing layer. |
opacity? | Subscribable <number > | undefined | The opacity to apply to the layer. If not defined, control of opacity will be left to CSS. |
Returns
this
This builder, after it has been configured.
withClockUpdate()
withClockUpdate(
updateFreq
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:522
Configures this builder to generate a map which is updated at a regular frequency based on event bus clock events.
Adds the following...
Context properties:
'updateFreq': Subscribable<number>
Controllers:
[MapSystemKeys.ClockUpdate]: MapClockUpdateController
.
Parameters
Parameter | Type | Description |
---|---|---|
updateFreq | number | Subscribable <number > | The map's update frequency, in hertz, or a subscribable which provides it. |
Returns
this
This builder, after it has been configured.
withContext()
withContext<
UseContext
>(key
,factory
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:399
Adds a context property to this builder. When the builder compiles its map, all added properties will be available on the context. Properties are created on the context in the order they were added to the builder, and property factories have access to previously created properties on the context. If an existing property has been added to this builder with the same key, it will be replaced.
Type Parameters
Type Parameter | Default type |
---|---|
UseContext extends ContextRecord | any |
Parameters
Parameter | Type | Description |
---|---|---|
key | string | The key of the property to add. |
factory | (context ) => any | A function which creates the value of the property. |
Returns
this
This builder, after the context property has been added.
withController()
withController<
Controller
,UseModules
,UseLayers
,UseControllers
,UseContext
>(key
,factory
):ConditionalReturn
<DefaultIfAny
<UseModules
,Modules
>,RequiredControllerModules
<Controller
>,DefaultIfAny
<UseLayers
,Layers
>,RequiredControllerLayers
<Controller
>,DefaultIfAny
<UseContext
,Context
>,RequiredControllerContext
<Controller
>,MapSystemBuilder
<Modules
,Layers
,Controllers
,Context
>>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:361
Adds a controller to this builder. When this builder compiles its map, all added controllers will be created and hooked up to the map's lifecycle callbacks. If an existing controller has been added to this builder with the same key, it will be replaced.
Type Parameters
Type Parameter | Default type |
---|---|
Controller extends MapSystemController <any , any , any , any > | - |
UseModules extends ModuleRecord | any |
UseLayers extends LayerRecord | any |
UseControllers extends ControllerRecord | any |
UseContext extends ContextRecord | any |
Parameters
Parameter | Type | Description |
---|---|---|
key | string | The key of the controller. |
factory | (context ) => Controller | A function which creates the controller. |
Returns
ConditionalReturn
<DefaultIfAny
<UseModules
, Modules
>, RequiredControllerModules
<Controller
>, DefaultIfAny
<UseLayers
, Layers
>, RequiredControllerLayers
<Controller
>, DefaultIfAny
<UseContext
, Context
>, RequiredControllerContext
<Controller
>, MapSystemBuilder
<Modules
, Layers
, Controllers
, Context
>>
This builder, after the map layer has been added, or never
if this builder does not have all the
modules required by the controller.
withDeadZone()
withDeadZone(
deadZone
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:273
Configures this builder to generate a map with a given dead zone.
Parameters
Parameter | Type | Description |
---|---|---|
deadZone | Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >> | Subscribable <Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >>> | The dead zone, as [left, top, right, bottom] in pixels, or a subscribable which provides it. |
Returns
this
This builder, after it has been configured.
withDestroy()
withDestroy<
UseModules
,UseLayers
,UseControllers
,UseContext
>(key
,callback
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:446
Configures this builder to execute a callback function after a built map is destroyed. If an existing callback has been added to this builder with the same key, it will be replaced.
Type Parameters
Type Parameter | Default type |
---|---|
UseModules extends ModuleRecord | any |
UseLayers extends LayerRecord | any |
UseControllers extends ControllerRecord | any |
UseContext extends ContextRecord | any |
Parameters
Parameter | Type | Description |
---|---|---|
key | string | The key of the callback. |
callback | (context ) => void | The callback function to add. |
Returns
this
This builder, after the callback has been added.
withFlightPlan()
withFlightPlan(
configure
,flightPlanner
,planIndex
,enableTextCulling
,order?
,cssClass?
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:1005
Configures this builder to generate a map which displays a flight plan. Waypoints displayed as part of the flight plan are rendered by a MapSystemWaypointsRenderer.
If a text layer has already been added to the builder, its order will be changed so that it is rendered above the waypoint layer. Otherwise, a text layer will be added to the builder after the waypoint layer.
Adds the following...
Context properties:
[MapSystemKeys.FlightPlanner]: FlightPlanner
[MapSystemKeys.TextManager]: MapCullableTextLabelManager
[MapSystemKeys.IconFactory]: MapSystemIconFactory
[MapSystemKeys.LabelFactory]: MapSystemLabelFactory
[MapSystemKeys.FlightPathRenderer]: MapSystemPlanRenderer
Modules:
[MapSystemKeys.FlightPlan]: MapFlightPlanModule
Layers:
`${[MapSystemKeys.FlightPlan]}${planIndex}`: MapSystemFlightPlanLayer
[MapSystemKeys.TextLayer]: MapCullableTextLayer
Controllers:
[MapSystemKeys.FlightPlan]: MapFlightPlanController
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
configure | (builder , context ) => void | undefined | A function to configure the waypoint display. |
flightPlanner | FlightPlanner | undefined | The flight planner. |
planIndex | number | undefined | The index of the flight plan to display. |
enableTextCulling | boolean | false | Whether to enable text culling on the text manager. |
order? | number | undefined | The order to assign to the plan layer. Layers with lower assigned order will be attached to the map before and appear below layers with greater assigned order values. Defaults to the number of layers already added to this builder. |
cssClass? | string | SubscribableSet <string > | undefined | The CSS class(es) to apply to the flight plan canvas elements. |
Returns
this
This builder, after it has been configured.
withFollowAirplane()
withFollowAirplane():
this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:578
Configures this builder to generate a map whose projection target follows the player airplane. The follow airplane
behavior will be active if and only if the controller owns the projection target control resource. The
controller's priority for the resource is 0
.
Adds the following...
Context properties:
[MapSystemKeys.TargetControl]: ResourceModerator<void>
Modules:
[MapSystemKeys.OwnAirplaneProps]: MapOwnAirplanePropsModule
[MapSystemKeys.FollowAirplane]: MapFollowAirplaneModule
Controllers:
[MapSystemKeys.FollowAirplane]: MapFollowAirplaneController
Returns
this
This builder, after it has been configured.
withInit()
withInit<
UseModules
,UseLayers
,UseControllers
,UseContext
>(key
,callback
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:419
Configures this builder to execute a callback function immediately after it is finished compiling a map. If an existing callback has been added to this builder with the same key, it will be replaced.
Type Parameters
Type Parameter | Default type |
---|---|
UseModules extends ModuleRecord | any |
UseLayers extends LayerRecord | any |
UseControllers extends ControllerRecord | any |
UseContext extends ContextRecord | any |
Parameters
Parameter | Type | Description |
---|---|---|
key | string | The key of the callback. |
callback | (context ) => void | The callback function to add. |
Returns
this
This builder, after the callback has been added.
withLayer()
withLayer<
L
,UseModules
,UseContext
>(key
,factory
,order?
):ConditionalReturn
<DefaultIfAny
<UseModules
,Modules
>,RequiredLayerModules
<L
>,any
,any
,any
,any
,MapSystemBuilder
<Modules
,Layers
,Controllers
,Context
>>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:334
Adds a map layer to this builder. When this builder compiles its map, all added layers will be created and attached to the map. Layers with a lower assigned order will be attached before and appear below layers with greater assigned order values. If an existing layer has been added to this builder with the same key, it will be replaced.
Type Parameters
Type Parameter | Default type |
---|---|
L extends MapLayer <MapLayerProps <any >> | any |
UseModules extends ModuleRecord | any |
UseContext extends ContextRecord | any |
Parameters
Parameter | Type | Description |
---|---|---|
key | string | The key of the layer. |
factory | (context ) => VNode | A function which renders the layer as a VNode. |
order? | number | The order assigned to the layer. Layers with lower assigned order will be attached to the map before and appear below layers with greater assigned order values. Defaults to the number of layers already added to this builder. |
Returns
ConditionalReturn
<DefaultIfAny
<UseModules
, Modules
>, RequiredLayerModules
<L
>, any
, any
, any
, any
, MapSystemBuilder
<Modules
, Layers
, Controllers
, Context
>>
This builder, after the map layer has been added, or never
if this builder does not have all the
modules required by the layer.
withLayerOrder()
withLayerOrder(
key
,order
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:473
Assigns an order value to a layer. Layers with a lower assigned order will be attached before and appear below layers with greater assigned order values.
Parameters
Parameter | Type | Description |
---|---|---|
key | keyof Layers & string | The key of the layer to which to assign the order value. |
order | number | The order value to assign. |
Returns
this
This builder, after the order value has been assigned.
withModule()
withModule(
key
,factory
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:316
Adds a map module to this builder. When this builder compiles its map, all added modules will be created and added to the map's model. If an existing module has been added to this builder with the same key, it will be replaced.
Parameters
Parameter | Type | Description |
---|---|---|
key | string | The key (name) of the module. |
factory | () => any | A function which creates the module. |
Returns
this
This builder, after the map module has been added.
withNearestWaypoints()
withNearestWaypoints(
configure
,enableTextCulling
,order?
,cssClass?
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:911
Configures this builder to generate a map which displays waypoints near the map center or target. Waypoints displayed in this manner are rendered by a MapSystemWaypointsRenderer.
If a text layer has already been added to the builder, its order will be changed so that it is rendered above the waypoint layer. Otherwise, a text layer will be added to the builder after the waypoint layer.
Adds the following...
Context properties:
[MapSystemKeys.TextManager]: MapCullableTextLabelManager
[MapSystemKeys.IconFactory]: MapSystemIconFactory
[MapSystemKeys.LabelFactory]: MapSystemLabelFactory
Modules:
[MapSystemKeys.NearestWaypoints]: MapWaypointDisplayModule
Layers:
[MapSystemKeys.NearestWaypoints]: MapSystemWaypointsLayer
[MapSystemKeys.TextLayer]: MapCullableTextLayer
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
configure | (builder ) => void | undefined | A function to configure the waypoint display. |
enableTextCulling | boolean | false | Whether to enable text culling on the text manager. |
order? | number | undefined | The order to assign to the waypoint layer. Layers with lower assigned order will be attached to the map before and appear below layers with greater assigned order values. Defaults to the number of layers already added to this builder. |
cssClass? | string | SubscribableSet <string > | undefined | The CSS class(es) to apply to the root of the nearest waypoints layer. |
Returns
this
This builder, after it has been configured.
withOwnAirplaneIcon()
withOwnAirplaneIcon(
iconSize
,iconFilePath
,iconAnchor
,cssClass?
,order?
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:641
Configures this builder to generate a map which displays an icon depicting the position of the player airplane.
Adds the following...
Modules:
[MapSystemKeys.OwnAirplaneProps]: MapOwnAirplanePropsModule
[MapSystemKeys.OwnAirplaneIcon]: MapOwnAirplaneIconModule
Layers:
[MapSystemKeys.OwnAirplaneIcon]: MapOwnAirplaneLayer
Parameters
Parameter | Type | Description |
---|---|---|
iconSize | number | Subscribable <number > | The size of the icon, in pixels. |
iconFilePath | string | Subscribable <string > | The path to the icon's image asset, or a subscribable which provides it. |
iconAnchor | Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >> | Subscribable <Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >>> | The point on the icon that is anchored to the airplane's position, or a subscribable which provides it. The point is expressed as a 2-tuple relative to the icon's width and height, with [0, 0] at the top left and [1, 1] at the bottom right. |
cssClass? | string | SubscribableSet <string > | The CSS class(es) to apply to the root of the airplane icon layer. |
order? | number | The order assigned to the icon layer. Layers with lower assigned order will be attached to the map before and appear below layers with greater assigned order values. Defaults to the number of layers already added to this builder. |
Returns
this
This builder, after it has been configured.
withOwnAirplaneIconOrientation()
withOwnAirplaneIconOrientation<
UseModules
>(desiredOrientation
):ConditionalReturn
<DefaultIfAny
<UseModules
,Modules
>,MapOwnAirplaneIconOrientationControllerModules
,any
,any
,any
,any
,MapSystemBuilder
<Modules
,Layers
,Controllers
,Context
>>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:678
Configures this builder to add a controller which controls and optimizes the orientation of the own airplane icon in response to a desired orientation and the map rotation type. If the desired orientation matches the map rotation (e.g. both Heading Up), the icon orientation is set to Map Up; otherwise the orientation is set to the desired orientation.
Requires the modules [MapSystemKeys.OwnAirplaneIcon]: MapOwnAirplaneIconModule
and
[MapSystemKeys.Rotation]: MapRotationModule
.
Adds the controller [MapSystemKeys.OwnAirplaneIconOrientation]: MapOwnAirplaneIconOrientationController
.
Type Parameters
Type Parameter | Default type |
---|---|
UseModules | any |
Parameters
Parameter | Type | Description |
---|---|---|
desiredOrientation | MapOwnAirplaneIconOrientation | Subscribable <MapOwnAirplaneIconOrientation > | The desired orientation of the own airplane icon. |
Returns
ConditionalReturn
<DefaultIfAny
<UseModules
, Modules
>, MapOwnAirplaneIconOrientationControllerModules
, any
, any
, any
, any
, MapSystemBuilder
<Modules
, Layers
, Controllers
, Context
>>
This builder, after it has been configured.
withOwnAirplanePropBindings()
withOwnAirplanePropBindings<
UseModules
>(properties
,updateFreq
):ConditionalReturn
<DefaultIfAny
<UseModules
,Modules
>,MapOwnAirplanePropsControllerModules
,any
,any
,any
,any
,MapSystemBuilder
<Modules
,Layers
,Controllers
,Context
>>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:704
Configures this builder to bind properties in an added MapOwnAirplanePropsModule to data derived from event bus events.
Requires the module [MapSystemKeys.OwnAirplaneProps]: MapOwnAirplanePropsModule
.
Adds the controller [MapSystemKeys.OwnAirplaneProps]: MapOwnAirplanePropsController
.
Type Parameters
Type Parameter | Default type |
---|---|
UseModules | any |
Parameters
Parameter | Type | Description |
---|---|---|
properties | Iterable <MapOwnAirplanePropsKey > | The properties to bind. |
updateFreq | number | Subscribable <number > | The update frequency, in hertz, or a subscribable which provides it. |
Returns
ConditionalReturn
<DefaultIfAny
<UseModules
, Modules
>, MapOwnAirplanePropsControllerModules
, any
, any
, any
, any
, MapSystemBuilder
<Modules
, Layers
, Controllers
, Context
>>
This builder, after it has been configured.
withProjectedSize()
withProjectedSize(
size
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:263
Configures this builder to generate a map with a given projected window size.
Parameters
Parameter | Type | Description |
---|---|---|
size | Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >> | Subscribable <Readonly <Omit <Float64Array , "set" | "sort" | "copyWithin" >>> | The size of the projected window, as [width, height] in pixels, or a subscribable which provides it. |
Returns
this
This builder, after it has been configured.
withRange()
withRange(
range
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:304
Configures this build to generate a map with a specific initial range.
Parameters
Parameter | Type | Description |
---|---|---|
range | NumberUnitInterface <Distance > | The initial range. |
Returns
this
This builder, after it has been configured.
withRangeControlModerator()
withRangeControlModerator():
this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:556
Configures this builder to add a resource moderator for control of the map's range.
Adds the context property [MapSystemKeys.RangeControl]: ResourceModerator<void>
.
Returns
this
This builder, after the resource moderator has been added.
withRangeEndpoints()
withRangeEndpoints(
endpoints
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:294
Configures this builder to generate a map with specific initial range endpoints. The endpoints are defined relative to the width and height of the map's projected window, excluding the dead zone.
Parameters
Parameter | Type | Description |
---|---|---|
endpoints | ReadonlyFloat64Array | The initial range endpoints, as [x1, y1, x2, y2] . |
Returns
this
This builder, after it has been configured.
withRotation()
withRotation():
this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:609
Configures this builder to generate a map which supports common rotation behavior. The rotation behavior will be
active if and only if the controller owns the rotation control resource. The controller's priority for the
resource is 0
.
Requires the module 'ownAirplaneProps': MapOwnAirplanePropsModule
to support player airplane-derived rotation
behavior, such as Heading Up and Track Up.
Adds the following...
Context properties:
'[MapSystemKeys.RotationControl]': ResourceModerator<void>
Modules:
[MapSystemKeys.Rotation]: MapRotationModule
Controllers:
[MapSystemKeys.Rotation]: MapRotationController
Returns
this
This builder, after it has been configured.
withRotationControlModerator()
withRotationControlModerator():
this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:546
Configures this builder to add a resource moderator for control of the map's rotation.
Adds the context property [MapSystemKeys.RotationControl]: ResourceModerator<void>
.
Returns
this
This builder, after the resource moderator has been added.
withTargetControlModerator()
withTargetControlModerator():
this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:536
Configures this builder to add a resource moderator for control of the map's projection target.
Adds the context property [MapSystemKeys.TargetControl]: ResourceModerator<void>
.
Returns
this
This builder, after the resource moderator has been added.
withTargetOffset()
withTargetOffset(
offset
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:283
Configures this builder to generate a map with an initial projected target offset.
Parameters
Parameter | Type | Description |
---|---|---|
offset | ReadonlyFloat64Array | The initial projected target offset, as [x, y] in pixels. |
Returns
this
This builder, after it has been configured.
withTextLayer()
withTextLayer(
enableCulling
,order?
,cssClass?
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:773
Configures this builder to generate a map which includes a layer displaying text.
Adds the following...
Context properties:
[MapSystemKeys.TextManager]: MapCullableTextLabelManager
Layers:
[MapSystemKeys.TextLayer]: MapCullableTextLayer
Parameters
Parameter | Type | Description |
---|---|---|
enableCulling | boolean | Whether to enable text culling. Defaults to false . |
order? | number | The order value to assign to the text layer. Layers with lower assigned order will be attached to the map before and appear below layers with greater assigned order values. Defaults to the number of layers already added to this builder. |
cssClass? | string | SubscribableSet <string > | The CSS class(es) to apply to the text layer. |
Returns
this
This builder, after it has been configured.
withTraffic()
withTraffic<
UseModules
,UseLayers
,UserControllers
,UseContext
>(tcas
,iconFactory
,initCanvasStyles?
,offScaleOobOptions?
,order?
,cssClass?
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:1175
Configures this builder to generate a map which displays TCAS intruders.
Adds the following...
Modules:
[MapSystemKeys.OwnAirplaneProps]: MapOwnAirplanePropsModule
[MapSystemKeys.Traffic]: MapTrafficModule
Layers:
[MapSystemKeys.Traffic]: MapSystemTrafficLayer
Type Parameters
Type Parameter | Default type |
---|---|
UseModules extends ModuleRecord | any |
UseLayers extends LayerRecord | any |
UserControllers extends ControllerRecord | any |
UseContext extends ContextRecord | any |
Parameters
Parameter | Type | Description |
---|---|---|
tcas | Tcas | The TCAS used by the traffic display. |
iconFactory | MapTrafficIntruderIconFactory <DefaultIfAny <UseModules , Modules >, DefaultIfAny <UseLayers , Layers >, DefaultIfAny <UserControllers , Controllers >, DefaultIfAny <UseContext , Context >> | A function which creates intruder icons for the traffic display. |
initCanvasStyles? | (context ) => void | A function which initializes global canvas styles for the traffic display. |
offScaleOobOptions? | (context ) => TrafficOffScaleOobOptions | A function which generates options for handling off-scale and out-of-bounds intruders. |
order? | number | The order to assign to the traffic layer. Layers with lower assigned order will be attached to the map before and appear below layers with greater assigned order values. Defaults to the number of layers already added to this builder. |
cssClass? | string | SubscribableSet <string > | The CSS class(es) to apply to the root of the traffic component. |
Returns
this
This builder, after it has been configured.
withWaypoints()
withWaypoints<
UseContext
>():DefaultIfAny
<UseContext
,Context
> extendsobject
?MapSystemBuilder
<Modules
,Layers
,Controllers
,Context
> :never
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:859
Configures this builder to generate a map which uses a MapSystemWaypointsRenderer to render waypoints.
Requires the [MapSystemKeys.TextManager]: MapCullableTextLabelManager
context property.
Adds the [MapSystemKeys.WaypointRenderer]: MapSystemWaypointsRenderer
context property.
Type Parameters
Type Parameter | Default type |
---|---|
UseContext | any |
Returns
DefaultIfAny
<UseContext
, Context
> extends object
? MapSystemBuilder
<Modules
, Layers
, Controllers
, Context
> : never
This builder, after it has been configured.
create()
static
create(bus
):MapSystemBuilder
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:254
Creates a new Garmin map builder. The builder is initialized with a default projected size of [100, 100]
pixels.
Parameters
Parameter | Type | Description |
---|---|---|
bus | EventBus | The event bus. |
Returns
MapSystemBuilder
A new Garmin map builder.