API / geotoolkit / deviation / ProportionalWidthStrategy / ProportionalWidthStrategy
deviation.ProportionalWidthStrategy.ProportionalWidthStrategy
This class defines strategy how to proportionally scale width according to trajectory length scale in the range from min to max
↳
ProportionalWidthStrategy
Constructors
Css Properties
| Name | Type | Description |
|---|---|---|
maxwidth | number | Maximum width of track for scaling on zoom in pixels |
minwidth | number | Minimum width of track for scaling on zoom in pixels |
widthscale | number | Width scale |
Constructors
• new ProportionalWidthStrategy(options?)
| Name | Type |
|---|---|
Optional options | Options |
TrackWidthStrategy.constructor
Methods
▸ getClassName(): string
string
TrackWidthStrategy.getClassName
▸ getDeviceLength(trajectory, tr): Object
Calculates trajectory widths (both: model and device)
| Name | Type | Description |
|---|---|---|
trajectory | Trajectory2d | trajectory |
tr | Transformation | transformation to device |
Object
| Name | Type |
|---|---|
devicelength | number |
length | number |
TrackWidthStrategy.getDeviceLength
▸ getProperties(): Required<Options>
Gets all the properties pertaining to this object
Required<Options>
of this object
▸ getWidth(tr, options): number
Return track width in pixels
| Name | Type | Description |
|---|---|---|
tr | Transformation | transformation to device |
options | Object | options |
options.trajectory | Trajectory2d | |
options.width | number |
number
▸ setProperties(properties?): ProportionalWidthStrategy
Sets all the properties pertaining to this object
| Name | Type | Description |
|---|---|---|
Optional properties | Options | An object containing the properties to set |
this
▸ Static getClassName(): string
string