Class: MapNearestWaypointsLayer<R, P>
Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:72
An abstract implementation of a map layer which displays waypoints (airports, navaids, and intersections) within a search radius.
Extends
MapLayer
<P
>
Type Parameters
Type Parameter | Default type |
---|---|
R extends MapWaypointRenderer <any > | MapWaypointRenderer |
P extends MapAbstractNearestWaypointsLayerProps <R > | MapAbstractNearestWaypointsLayerProps <R > |
Constructors
Constructor
new MapNearestWaypointsLayer<
R
,P
>(props
):MapNearestWaypointsLayer
<R
,P
>
Defined in: src/sdk/components/FSComponent.ts:73
Creates an instance of a DisplayComponent.
Parameters
Parameter | Type | Description |
---|---|---|
props | P | The propertis of the component. |
Returns
MapNearestWaypointsLayer
<R
, P
>
Inherited from
Properties
context?
optional
context: [] =undefined
Defined in: src/sdk/components/FSComponent.ts:64
The context on this component, if any.
Inherited from
contextType?
readonly
optional
contextType: readonly [] =undefined
Defined in: src/sdk/components/FSComponent.ts:67
The type of context for this component, if any.
Inherited from
props
props:
P
&ComponentProps
Defined in: src/sdk/components/FSComponent.ts:61
The properties of the component.
Inherited from
Methods
destroy()
destroy():
void
Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:506
Destroys this component.
Returns
void
Overrides
getContext()
protected
getContext(context
):never
Defined in: src/sdk/components/FSComponent.ts:106
Gets a context data subscription from the context collection.
Parameters
Parameter | Type | Description |
---|---|---|
context | never | The context to get the subscription for. |
Returns
never
The requested context.
Throws
An error if no data for the specified context type could be found.
Inherited from
isVisible()
isVisible():
boolean
Defined in: src/sdk/components/map/MapLayer.ts:38
Checks whether this layer is visible.
Returns
boolean
whether this layer is visible.
Inherited from
onAfterRender()
onAfterRender(
node
):void
Defined in: src/sdk/components/FSComponent.ts:87
A callback that is called after the component is rendered.
Parameters
Parameter | Type | Description |
---|---|---|
node | VNode | The component's VNode. |
Returns
void
Inherited from
onAttached()
onAttached():
void
Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:185
This method is called when this layer is attached to its parent map component.
Returns
void
Overrides
onBeforeRender()
onBeforeRender():
void
Defined in: src/sdk/components/FSComponent.ts:80
A callback that is called before the component is rendered.
Returns
void
Inherited from
onDetached()
onDetached():
void
Defined in: src/sdk/components/map/MapLayer.ts:108
This method is called when this layer is detached from its parent map component.
Returns
void
Inherited from
onMapProjectionChanged()
onMapProjectionChanged(
mapProjection
,changeFlags
):void
Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:230
This method is called when the map projection changes.
Parameters
Parameter | Type | Description |
---|---|---|
mapProjection | MapProjection | this layer's map projection. |
changeFlags | number | The types of changes made to the projection. |
Returns
void
Overrides
MapLayer
.onMapProjectionChanged
onSessionsStarted()
protected
onSessionsStarted(airportSession
,vorSession
,ndbSession
,intSession
,userSession
):void
Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:144
A callback called when the nearest facility search sessions have been started.
Parameters
Parameter | Type | Description |
---|---|---|
airportSession | NearestAirportSearchSession | The airport search session. |
vorSession | NearestVorSearchSession | The VOR search session. |
ndbSession | NearestSearchSession <string , string > | The NDB search session. |
intSession | NearestIntersectionSearchSession | The intersection search session. |
userSession | NearestRepoFacilitySearchSession <UserFacility > | The user facility search session. |
Returns
void
onSleep()
onSleep():
void
Defined in: src/sdk/components/map/MapLayer.ts:81
This method is called when this layer's parent map is put to sleep.
Returns
void
Inherited from
onUpdated()
onUpdated(
time
,elapsed
):void
Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:254
This method is called once every map update cycle.
Parameters
Parameter | Type | Description |
---|---|---|
time | number | The current time as a UNIX timestamp. |
elapsed | number | The elapsed time, in milliseconds, since the last update. |
Returns
void
Overrides
onVisibilityChanged()
onVisibilityChanged(
isVisible
):void
Defined in: src/sdk/components/map/MapLayer.ts:60
This method is called when this layer's visibility changes.
Parameters
Parameter | Type | Description |
---|---|---|
isVisible | boolean | Whether the layer is now visible. |
Returns
void
Inherited from
onWake()
onWake():
void
Defined in: src/sdk/components/map/MapLayer.ts:74
This method is called when this layer's parent map is woken.
Returns
void
Inherited from
refreshWaypoints()
refreshWaypoints():
void
Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:219
Forces a refresh of all the waypoints.
Returns
void
render()
render():
VNode
Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:499
Renders the component.
Returns
A JSX element to be rendered.
Overrides
setVisible()
setVisible(
val
):void
Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:493
Sets this layer's visibility.
Parameters
Parameter | Type | Description |
---|---|---|
val | boolean | Whether this layer should be visible. |
Returns
void
Overrides
tryRefreshAllSearches()
tryRefreshAllSearches(
center?
,radius?
,force?
):void
Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:293
Attempts to refresh all of the nearest facility searches. Searches will only be refreshed if the desired search radius is different from the last refreshed search radius or the desired search center is outside of the margin of the last refreshed search center.
Parameters
Parameter | Type | Description |
---|---|---|
center? | LatLonInterface | The center of the search area. Defaults to this layer's automatically calculated search center. |
radius? | number | The radius of the search area, in great-arc radians. Defaults to this layer's automatically calculated search radius. |
force? | boolean | Whether to force a refresh of all waypoints. Defaults to false. |
Returns
void
tryRefreshSearch()
tryRefreshSearch(
type
,center?
,radius?
,force?
):void
Defined in: src/sdk/components/map/layers/MapNearestWaypointsLayer.tsx:310
Attempts to refresh a nearest search. The search will only be refreshed if the desired search radius is different from the last refreshed search radius or the desired search center is outside of the margin of the last refreshed search center.
Parameters
Parameter | Type | Description |
---|---|---|
type | MapNearestWaypointsLayerSearchTypes | The type of nearest search to refresh. |
center? | LatLonInterface | The center of the search area. Defaults to this layer's automatically calculated search center. |
radius? | number | The radius of the search area, in great-arc radians. Defaults to this layer's automatically calculated search radius. |
force? | boolean | Whether to force a refresh of all waypoints. Defaults to false. |
Returns
void