Class: MapSystemBuilder<Modules, Layers, Controllers, Context>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:212
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:266
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:266
This builder's event bus.
contextFactories
protected
readonly
contextFactories:Map
<string
,ContextFactory
>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:234
controllerFactories
protected
readonly
controllerFactories:Map
<string
,ControllerFactory
>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:233
deadZone?
protected
optional
deadZone:Subscribable
<Readonly
<Omit
<Float64Array
<ArrayBufferLike
>,"set"
|"sort"
|"copyWithin"
>>>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:239
destroyCallbacks
protected
readonly
destroyCallbacks:Map
<string
, (context
) =>void
>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:236
initCallbacks
protected
readonly
initCallbacks:Map
<string
, (context
) =>void
>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:235
layerFactories
protected
readonly
layerFactories:Map
<string
,LayerFactory
>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:232
moduleFactories
protected
readonly
moduleFactories:Map
<string
,ModuleFactory
>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:231
nominalRangeEndpoints?
protected
optional
nominalRangeEndpoints:Readonly
<Omit
<Float64Array
<ArrayBufferLike
>,"set"
|"sort"
|"copyWithin"
>>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:241
projectedSize
protected
projectedSize:Subscribable
<Readonly
<Omit
<Float64Array
<ArrayBufferLike
>,"set"
|"sort"
|"copyWithin"
>>>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:238
range?
protected
optional
range:number
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:242
targetOffset?
protected
optional
targetOffset:Readonly
<Omit
<Float64Array
<ArrayBufferLike
>,"set"
|"sort"
|"copyWithin"
>>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:240
RESTRICTED_CONTEXT_KEYS
protected
readonly
static
RESTRICTED_CONTEXT_KEYS:Set
<string
>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:219
Accessors
controllerCount
Get Signature
get controllerCount():
number
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:258
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:252
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:246
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:1311
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:1540
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:1276
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:1162
Configures this builder to generate a map which displays airspaces.
If a facility loader has been added to the map context under the MapSystemKeys.FacilityLoader
key, then it will
be used to retrieve airspaces. Otherwise, a new default facility loader instance will be used instead.
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(
bindings?
,updateFreq?
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:768
Configures this builder to add a module describing the player airplane's autopilot properties, and optionally binds the module's properties to external data.
Adds the following...
Modules:
[MapSystemKeys.AutopilotProps]: MapAutopilotPropsModule
Controllers:
[MapSystemKeys.AutopilotProps]: MapAutopilotPropsController
(optional)
Parameters
Parameter | Type | Description |
---|---|---|
bindings? | Iterable <MapAutopilotPropsKey | MapAutopilotPropsControllerBinding , any , any > | An iterable containing definitions of the bindings to create between the autopilot module's properties and external data. If not defined, then no bindings will be created. |
updateFreq? | null | number | Subscribable <null | number > | The default frequency, in hertz, at which to update the module props from their bound data sources. This frequency, if defined, is applied to all bindings that do not explicitly define their own update frequencies. If the frequency is null , then updates will not be throttled by frequency - each property will be updated as soon as the value of its data source changes. If the frequency is not null , then each property will only be updated when the controller's onBeforeUpdated() method is called, and the frequency of updates will not exceed updateFreq . Ignored if bindings 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:515
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
,options?
,order?
,cssClass?
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:842
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 | Description |
---|---|---|
bingId | string | The ID to assign to the Bing Map instance bound to the layer. |
options? | Readonly <MapSystemBuilderBingLayerOptions > | Options with which to configure the layer. |
order? | number | 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 > | The CSS class(es) to apply to the flight plan canvas elements. |
Returns
this
This builder, after it has been configured.
withClockUpdate()
withClockUpdate(
updateFreq
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:545
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:422
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:384
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:293
Configures this builder to generate a map with a given dead zone.
Parameters
Parameter | Type | Description |
---|---|---|
deadZone | Readonly <Omit <Float64Array <ArrayBufferLike >, "set" | "sort" | "copyWithin" >> | Subscribable <Readonly <Omit <Float64Array <ArrayBufferLike >, "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:469
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:1042
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 facility loader has been added to the map context under the MapSystemKeys.FacilityLoader
key, then it will
be used to retrieve facilities for the display of flight pan waypoints. Otherwise, a new default facility loader
instance will be used instead.
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:601
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:442
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:357
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:496
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<
UseContext
>(key
,factory
):this
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:336
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.
Type Parameters
Type Parameter | Default type |
---|---|
UseContext extends ContextRecord | any |
Parameters
Parameter | Type | Description |
---|---|---|
key | string | The key (name) of the module. |
factory | (context ) => 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:942
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 facility loader has been added to the map context under the MapSystemKeys.FacilityLoader
key, then it will
be used to retrieve facilities for the display of nearest waypoints. Otherwise, a new default facility loader
instance will be used instead.
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:664
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 <ArrayBufferLike >, "set" | "sort" | "copyWithin" >> | Subscribable <Readonly <Omit <Float64Array <ArrayBufferLike >, "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:701
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
>(bindings
,updateFreq?
):ConditionalReturn
<DefaultIfAny
<UseModules
,Modules
>,MapOwnAirplanePropsControllerModules
,any
,any
,any
,any
,MapSystemBuilder
<Modules
,Layers
,Controllers
,Context
>>
Defined in: src/sdk/components/mapsystem/MapSystemBuilder.tsx:731
Configures this builder to bind properties in an added MapOwnAirplanePropsModule to external data.
Requires the module [MapSystemKeys.OwnAirplaneProps]: MapOwnAirplanePropsModule
.
Adds the controller [MapSystemKeys.OwnAirplaneProps]: MapOwnAirplanePropsController
.
Type Parameters
Type Parameter | Default type |
---|---|
UseModules | any |
Parameters
Parameter | Type | Description |
---|---|---|
bindings | Iterable <MapOwnAirplanePropsKey | MapOwnAirplanePropsControllerBinding > | An iterable containing definitions of the bindings to create. |
updateFreq? | null | number | Subscribable <null | number > | The default frequency, in hertz, at which to update the module props from their bound data sources. This frequency, if defined, is applied to all bindings that do not explicitly define their own update frequencies. If the frequency is null , then updates will not be throttled by frequency - each property will be updated as soon as the value of its data source changes. If the frequency is not null , then each property will only be updated when the controller's onBeforeUpdated() method is called, and the frequency of updates will not exceed updateFreq . |
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:283
Configures this builder to generate a map with a given projected window size.
Parameters
Parameter | Type | Description |
---|---|---|
size | Readonly <Omit <Float64Array <ArrayBufferLike >, "set" | "sort" | "copyWithin" >> | Subscribable <Readonly <Omit <Float64Array <ArrayBufferLike >, "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:324
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:579
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:314
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:632
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:569
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:559
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:303
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:805
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:1221
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 ) => MapSystemBuilderTrafficOffScaleOobOptions | 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:886
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:274
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.