An object that provides a Feature object.
The reference of the shapes produced by the provideShape method.
When the ShapeProvider
instance is added to a FeatureLayer
, and then
the layer is attached to a map, LuciadRIA determines if it is possible to visualize shapes on the map
by matching the shape provider reference to the map reference.
This property is optional. When it is not set, the FeatureLayer
expects all shape references
to be the same as the reference of the FeatureModel
.
Invalidates the shape for a specific object.
Call this method when any state that determines the mapping for a feature to a shape has changed. Calling this method guarantees that the object will be repainted with a new shape during the next map render.
the feature whose shape should be reevaluated
Invalidates this shape for a specific object by id.
Call this method when any state that determines the mapping for a feature to a shape has changed. Calling this method guarantees that the object will be repainted with a new shape during the next map render.
The id of the feature. It corresponds to luciad/model/feature/Feature#id
.
Registers a callback function for a given event type.
the event type to register on
the callback function to register
Rest
...args: any[]Optional
scope: anythe context in which the callback function should be invoked implementation dependent.
a handle to the registered callback with a single function 'remove'. This function can be used to unregister the callback function.
Returns a shape for the given feature.
the feature for which this method provides a shape.
the shape associated with the input feature.
A ShapeProvider allows you to map Feature from a single model into different geometric representations. It is used by a FeatureLayer.
A common use case is to visualize a model on both a geographic map and a cartesian chart.
For example, a
ShapeProvider
helps you display trajectories on a geodetic map in one layer, and display same trajectories on a vertical chart in another layer.Example for a
ShapeProvider
that provides shapes asynchronously.