Skip to main content

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 ParameterDefault type
Modules extends ModuleRecordany
Layers extends LayerRecordany
Controllers extends ControllerRecordany
Context extends ContextRecordany

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

ParameterTypeDescription
busEventBusThis 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 ParameterDefault type
UseModules extends ModuleRecordany
UseLayers extends LayerRecordany
UseControllers extends ControllerRecordany
UseContext extends ContextRecordany

Parameters

ParameterTypeDescription
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 ParameterDefault type
Builder extends MapSystemCustomBuilder<any[], any, any, any>-
UseModulesany
UseLayers extends LayerRecordany
UseContextany

Parameters

ParameterTypeDescription
builderBuilderA function which defines a custom build step.
...argsCustomBuilderArgs<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

ParameterTypeDescription
cacheLodBoundaryCacheThe airspace cache to use to store airspaces retrieved for rendering.
showTypesMapAirspaceShowTypesThe 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) => MapAirspaceRendererA function which selects a MapAirspaceRenderer
renderOrder(a, b) => numberA 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?numberThe 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

ParameterTypeDescription
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 ParameterDefault type
UseModules extends ModuleRecordany
UseLayers extends LayerRecordany
UseContext extends ContextRecordany

Parameters

ParameterTypeDescription
keystringThe key of the controller.
bindings(context) => Iterable<MapBinding>The bindings to maintain.
onDestroy?() => voidA 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

ParameterTypeDefault valueDescription
bingIdstringundefinedThe ID to assign to the Bing Map instance bound to the layer.
delaynumber0The delay, in milliseconds, to wait after the Bing layer has been rendered before attempting to bind a Bing Map instance.
mode?EBingModeundefinedThe mode of the map, optional. If omitted, will be EBingMode.PLANE.
order?numberundefinedThe 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>undefinedThe CSS class(es) to apply to the root of the map bing layer.
opacity?Subscribable<number>undefinedThe 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

ParameterTypeDescription
updateFreqnumber | 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 ParameterDefault type
UseContext extends ContextRecordany

Parameters

ParameterTypeDescription
keystringThe key of the property to add.
factory(context) => anyA 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 ParameterDefault type
Controller extends MapSystemController<any, any, any, any>-
UseModules extends ModuleRecordany
UseLayers extends LayerRecordany
UseControllers extends ControllerRecordany
UseContext extends ContextRecordany

Parameters

ParameterTypeDescription
keystringThe key of the controller.
factory(context) => ControllerA 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

ParameterTypeDescription
deadZoneReadonly<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 ParameterDefault type
UseModules extends ModuleRecordany
UseLayers extends LayerRecordany
UseControllers extends ControllerRecordany
UseContext extends ContextRecordany

Parameters

ParameterTypeDescription
keystringThe key of the callback.
callback(context) => voidThe 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

ParameterTypeDefault valueDescription
configure(builder, context) => voidundefinedA function to configure the waypoint display.
flightPlannerFlightPlannerundefinedThe flight planner.
planIndexnumberundefinedThe index of the flight plan to display.
enableTextCullingbooleanfalseWhether to enable text culling on the text manager.
order?numberundefinedThe 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>undefinedThe 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 ParameterDefault type
UseModules extends ModuleRecordany
UseLayers extends LayerRecordany
UseControllers extends ControllerRecordany
UseContext extends ContextRecordany

Parameters

ParameterTypeDescription
keystringThe key of the callback.
callback(context) => voidThe 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 ParameterDefault type
L extends MapLayer<MapLayerProps<any>>any
UseModules extends ModuleRecordany
UseContext extends ContextRecordany

Parameters

ParameterTypeDescription
keystringThe key of the layer.
factory(context) => VNodeA function which renders the layer as a VNode.
order?numberThe 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

ParameterTypeDescription
keykeyof Layers & stringThe key of the layer to which to assign the order value.
ordernumberThe 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

ParameterTypeDescription
keystringThe key (name) of the module.
factory() => anyA 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

ParameterTypeDefault valueDescription
configure(builder) => voidundefinedA function to configure the waypoint display.
enableTextCullingbooleanfalseWhether to enable text culling on the text manager.
order?numberundefinedThe 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>undefinedThe 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

ParameterTypeDescription
iconSizenumber | Subscribable<number>The size of the icon, in pixels.
iconFilePathstring | Subscribable<string>The path to the icon's image asset, or a subscribable which provides it.
iconAnchorReadonly<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?numberThe 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 ParameterDefault type
UseModulesany

Parameters

ParameterTypeDescription
desiredOrientationMapOwnAirplaneIconOrientation | 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 ParameterDefault type
UseModulesany

Parameters

ParameterTypeDescription
propertiesIterable<MapOwnAirplanePropsKey>The properties to bind.
updateFreqnumber | 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

ParameterTypeDescription
sizeReadonly<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

ParameterTypeDescription
rangeNumberUnitInterface<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

ParameterTypeDescription
endpointsReadonlyFloat64ArrayThe 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

ParameterTypeDescription
offsetReadonlyFloat64ArrayThe 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

ParameterTypeDescription
enableCullingbooleanWhether to enable text culling. Defaults to false.
order?numberThe 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 ParameterDefault type
UseModules extends ModuleRecordany
UseLayers extends LayerRecordany
UserControllers extends ControllerRecordany
UseContext extends ContextRecordany

Parameters

ParameterTypeDescription
tcasTcasThe TCAS used by the traffic display.
iconFactoryMapTrafficIntruderIconFactory<DefaultIfAny<UseModules, Modules>, DefaultIfAny<UseLayers, Layers>, DefaultIfAny<UserControllers, Controllers>, DefaultIfAny<UseContext, Context>>A function which creates intruder icons for the traffic display.
initCanvasStyles?(context) => voidA function which initializes global canvas styles for the traffic display.
offScaleOobOptions?(context) => TrafficOffScaleOobOptionsA function which generates options for handling off-scale and out-of-bounds intruders.
order?numberThe 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> extends object ? 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 ParameterDefault type
UseContextany

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

ParameterTypeDescription
busEventBusThe event bus.

Returns

MapSystemBuilder

A new Garmin map builder.