FlowFieldOverlay object. An instance of this type will be returned when the addFlowFieldOverlay method in the map.MapComponentController class is called. This API inherits from BaseOverlay.
Model restriction: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since version 6.0.0(20).
System capability: SystemCapability.Map.Core.EnhancedOverlay
Since: 6.0.0(20)
Example:
let params: mapCommon.FlowFieldOverlayParams = {
// The value of data must be in JSON format that complies with the GRIB2 specification. Set data by referring to the flow field data format reference.
data: 'xxx'
};
let fieldOverlay = await mapController.addFlowFieldOverlay(params); setStyle(style: mapCommon.ParticleStyle): void
Sets the particle style.
Model restriction: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since version 6.0.0(20).
System capability: SystemCapability.Map.Core.EnhancedOverlay
Since: 6.0.0(20)
Parameters:
| Name | Type | Mandatory | Description |
|---|---|---|---|
| style | mapCommon.ParticleStyle | Yes | Particle style. |
Example:
let style: mapCommon.ParticleStyle = {
count: 200,
color: 0xff009575,
maxSpeed: 60,
speedFactor: 0.3
};
fieldOverlay.setStyle(style); getStyle(): mapCommon.ParticleStyle
Obtains the particle style.
Model restriction: This API can be used only in the stage model.
Atomic service API: This API can be used in atomic services since version 6.0.0(20).
System capability: SystemCapability.Map.Core.EnhancedOverlay
Since: 6.0.0(20)
Returns:
| Type | Description |
|---|---|
| mapCommon.ParticleStyle | Particle style. |
Example:
let style: mapCommon.ParticleStyle = fieldOverlay.getStyle();