Last updated

API / geotoolkit / deviation / ProportionalWidthStrategy / ProportionalWidthStrategy

Class: 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

Hierarchy

Table of contents

Constructors
Methods
Css Properties
Name Type Description
maxwidthnumberMaximum width of track for scaling on zoom in pixels
minwidthnumberMinimum width of track for scaling on zoom in pixels
widthscalenumberWidth scale

Contents

Constructors

new ProportionalWidthStrategy(options)

new ProportionalWidthStrategy(options?)

Parameters

Name Type
Optional optionsOptions

Overrides

TrackWidthStrategy.constructor

Methods

getClassName

getClassName(): string

Returns

string

Inherited from

TrackWidthStrategy.getClassName


getDeviceLength

getDeviceLength(trajectory, tr): Object

Calculates trajectory widths (both: model and device)

Parameters

Name Type Description
trajectoryTrajectory2dtrajectory
trTransformationtransformation to device

Returns

Object

NameType
devicelengthnumber
lengthnumber

Inherited from

TrackWidthStrategy.getDeviceLength


getProperties

getProperties(): Required<Options>

Gets all the properties pertaining to this object

Returns

Required<Options>

of this object


getWidth

getWidth(tr, options): number

Return track width in pixels

Parameters

Name Type Description
trTransformationtransformation to device
optionsObjectoptions
options.trajectoryTrajectory2d
options.widthnumber

Returns

number

Overrides

TrackWidthStrategy.getWidth


setProperties

setProperties(properties?): ProportionalWidthStrategy

Sets all the properties pertaining to this object

Parameters

Name Type Description
Optional propertiesOptionsAn object containing the properties to set

Returns

ProportionalWidthStrategy

this


getClassName

Static getClassName(): string

Returns

string

Inherited from

TrackWidthStrategy.getClassName