Creates an instance of FixtureInstance.
Readonly
$iThe instance of RampMap API scoped to a single Vue R4MP application.
Readonly
idID of this fixture.
Indicates whether to keep the fixture when the language changes. Defaults to true. If only one config is provided for all languages, the fixture will be kept on language change, regardless of the value of the flag.
The instance of Vue R4MP application controlled by this InstanceAPI.
This is just a shorthand for this.$iApi.$vApp
.
Returns LegendConfig
section of the global config file.
Parses the legend config JSON snippet from the config file and save resulting objects to the fixture store.
Optional
legendConfig: LegendConfigAdd a legend item given the legend config, or legend item instance
the config for the legend item or a legend item instance
Optional
parent: LegendItemoptional parent item to create this item under
the added legend item
Add a layer legend item given a layer instance
the layer to create an item for
Optional
parent: LegendItemoptional parent item to create this item under
a promise that resolves with the added layer item
Optional
addedConstruct a legend item given the legend config
legend item config
Optional
parent: LegendItemthe parent legend item for the created item
returns the constructed legend item
Set the expanded state of legend items to expanded
the expanded state the items will be set to
Optional
root: LegendItemthe root item to start updating the expanded state from
Get all legend items with the given expanded state.
Not specifying the expanded state will return all items with expanded set to true
Optional
expanded: booleanthe expanded state to check for
the items with the given expanded state
Get all legend items with the given visibility state.
Not specifying the visibility state will return all items with visibility set to true
Optional
visibility: booleanthe visibility state to check for
the items with the given expanded state
Get a legend item given its uid.
the uid of the legend item
return legend item with given uid. returns undefined if item is not found.
Return every legend block bound to a registered layer. Parent-child layer types will return everything tied to the entire layer (parent & children)
a layer instance, layer id, or layer uid
all legend items bound to the layer
Get the first found layer item connected to the layer with the given id/uid or the given layer instance.
the id/uid of the layer or layer instance
return layer item tied to the found layer. returns undefined if no such item is found.
Returns the full legend tree. Note: This returns a direct reference to the legend tree. Mutations will persist.
returns the full legend tree
Optional
initialized[Optional] Called after the core map logic has executed. If the fixture is added after the map initialization, this is called immediately.
At this point, any custom content (panels, on-map components, etc.) can be added to R4MP. Custom content can also be added throughout the life of the [module].
Helper with programatically creating a component in Vue 3 (replaces the deprecated Vue.extend)
Reload the all legend items connected to the given layer. This preps the items for the reload. It does not reload the actual layer. Parent-child layer types will prep all items related to the layer (both parent and sublayers)
a layer instance, layer id, or layer uid referencing the reloaded layer
returns true if item was successfully reloaded, false otherwise
Removes the legend item with the given uid, or the item instance.
the uid of item or legend item instance to be removed
returns true if item was removed, false otherwise
Remove the layer item connected to the layer with the given id/uid or the given layer instance.
the id/uid of the layer or layer instance
returns true if item was removed, false otherwise
Optional
removedSearch the entire legend for items that satisfy the predicate
predicate boolean predicate to test each item
return all items that satisfies the given predicate.
Search for all legend items that satisfy the predicate, starting from the given root item.
the root item to start searching from
predicate boolean predicate to test each item
return all items that satisfies the given predicate.
Search for the first legend item that satisfies the predicate, starting from the given root item.
the root item to start searching from
boolean predicate to test each item
return the first item that satisfies the given predicate. returns undefined if item is not found.
Set the visibility state of legend items to visibility
the visibility state the items will be set to
Optional
root: LegendItemthe root item to start updating the visibility state from
Update all layer items bound to the given layer. Does nothing if no layer items are found
the layer to update the legend with
Static
updateAdds missing functions and properties to the object implementing FixtureBase interface. This is only needed for external fixtures as they can't inherit from FixtureInstance.
TODO: If you know a better way to deep-mixin props/getters/functions from a class into another class instance, please tell me. I honestly don't know 🤷♂️.
A base class for Fixture subclasses. It provides some utility functions to Fixtures and also gives access to
$iApi
and$vApp
globals.Export
FixtureInstance
Implements