new trackFeature(arg) → {geo.trackFeature}
- Description:
Create a new instance of class trackFeature.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
arg |
geo.trackFeature.spec |
Returns:
- Type
- geo.trackFeature
Extends
Members
idle
- Description:
Getter for the idle state. Read only.
- Source:
- Inherited From:
Properties:
Name | Type | Description |
---|---|---|
idle |
boolean |
|
Getter for the idle state. Read only.
ready
- Source:
- Inherited From:
Properties:
Name | Type | Description |
---|---|---|
ready |
boolean |
|
Methods
addChild(child) → {this}
- Description:
Add a child (or an array of children) to the object.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
child |
geo.object | Array.<geo.object> | A child object or array of child objects. |
Returns:
- Type
- this
addPromise(promise) → {this}
- Description:
Add the promise here and also propagate up the scene tree.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
promise |
Promise | A promise object. |
Returns:
- Type
- this
bin(valopt, actualValueopt) → {number|this}
- Description:
Get/Set bin of the feature. The bin number is used to determine the order of multiple features on the same layer. It has no effect except on the webgl renderer. A negative value hides the feature without stopping interaction with it. Otherwise, features with higher bin numbers are drawn above those with lower bin numbers. If two features have the same bin number, their order relative to one another is indeterminate and may be unstable.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
number |
<optional> |
The new bin number. If |
actualValue |
boolean |
<optional> |
If truthy and |
Returns:
The current bin number or a reference to this
.
- Type
- number | this
boxSearch(lowerLeft, upperRight, optsopt, gcsopt) → {geo.feature.searchResult}
- Description:
Search for features contained within a rectangular region.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lowerLeft |
geo.geoPosition | Lower-left corner. |
|||||||||||
upperRight |
geo.geoPosition | Upper-right corner. |
|||||||||||
opts |
object |
<optional> |
Additional search options. Properties
|
||||||||||
gcs |
string | geo.transform | null |
<optional> |
Input gcs. |
Returns:
An object with a list of features and feature indices that are located at the specified point.
buildTime(valopt) → {geo.timestamp|this}
- Description:
Get/Set timestamp of last time a build happened.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
geo.timestamp |
<optional> |
The new build timestamp object or |
Returns:
- Type
- geo.timestamp | this
calculateTimePosition(time, gcsopt, calcAngleopt) → {Array.<geo.geoPosition>}
- Description:
Calculate an interpolated position given a time. If the time is outside the range of a track, the first or last point is returned.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
time |
number | The time to compute a position array for. |
|
gcs |
string | geo.transform | null |
<optional> |
|
calcAngle |
boolean |
<optional> |
If truthy, also calculate the angle. |
Returns:
An array of positions, one per track. If the
angle is computed, these position objects are supplemented with an
angle
key in radians.
- Type
- Array.<geo.geoPosition>
children() → {Array.<geo.object>}
- Description:
Get an array of the child objects.
- Source:
- Inherited From:
Returns:
A copy of the array of child objects.
- Type
- Array.<geo.object>
currentStyle()
- Description:
Calls
geo.annotation#style
withstyleType='currentStyle'
.
- Source:
data(dataopt) → {array|this}
- Description:
Get/Set the data array for the feature. This is equivalent to getting or setting the
data
style, except that setting the data array via this method updates the data timestamp, whereas setting it via the style does not.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
array |
<optional> |
A new data array or |
Returns:
- Type
- array | this
dataTime(valopt) → {geo.timestamp|this}
- Description:
Get/Set timestamp of data change.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
geo.timestamp |
<optional> |
The new data timestamp object or |
Returns:
- Type
- geo.timestamp | this
dependentFeatures(argopt) → {Array.<geo.feature>|this}
- Description:
Get/Set a list of dependent features. Dependent features have their visibility changed at the same time as the feature.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arg |
Array.<geo.feature> |
<optional> |
If specified, the new list of dependent features. Otherwise, return the current list of dependent features. |
Returns:
The current list of dependent features or
a reference to this
.
- Type
- Array.<geo.feature> | this
draw() → {object}
- Description:
Redraw the object.
- Source:
- Overrides:
Returns:
The results of the superclass draw function.
- Type
- object
duration(valopt) → {number|null|this}
- Description:
Get or set the duration.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
number | null |
<optional> |
If specified, the new duration. |
Returns:
If set, the instance. Otherwise, the current duration.
- Type
- number | null | this
endTime(valopt) → {number|null|this}
- Description:
Get or set the end time.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
number | null |
<optional> |
If specified, the new end time. |
Returns:
If set, the instance. Otherwise, the current end time value.
- Type
- number | null | this
featureGcsToDisplay(c) → {geo.screenPosition}
- Description:
Convert from the feature's gcs coordinates to display coordinates.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
c |
geo.geoPosition | The input coordinate to convert. |
Returns:
Display space coordinates.
- Type
- geo.screenPosition
futureStyle()
- Description:
Calls
geo.annotation#style
withstyleType='futureStyle'
.
- Source:
gcs(valopt, nullable) → {string|this}
- Description:
Get/Set the projection of the feature.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
string |
<optional> <nullable> |
If |
Returns:
A string used by geo.transform
. If the
map interface gcs is in use, that value will be returned. If the gcs
is set, return the current class instance.
- Type
- string | this
geoIsOn(event, handleropt) → {boolean}
- Description:
Report if an event handler is bound to this object.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
event |
string | Array.<string> | An event or list of events to check. |
|
handler |
function |
<optional> |
A function that might be bound. If
|
Returns:
true if any of the specified events are bound to the specified handler.
- Type
- boolean
geoOff(eventopt, argopt, nullable) → {this}
- Description:
Remove handlers from one event or an array of events. If no event is provided all handlers will be removed.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
event |
string | Array.<string> |
<optional> |
An event or a list of events from
|
arg |
function | Array.<function()> |
<optional> <nullable> |
A function or array of functions to remove from the events or a falsy value to remove all handlers from the events. |
Returns:
- Type
- this
geoOn(event, handler) → {this}
- Description:
Bind an event handler to this object.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
event |
string | An event from |
handler |
function | A function that is called when |
Returns:
- Type
- this
geoOnce(event, handler) → {function}
- Description:
Bind an event handler to this object that will fire once and then deregister itself.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
event |
string | An event from |
handler |
function | A function that is called when |
Returns:
The actual bound handler. This is a wrapper around the handler that was passed to the function.
- Type
- function
geoTrigger(event, args, childrenOnlyopt) → {this}
- Description:
Trigger an event (or events) on this object and call all handlers.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
event |
string | The event to trigger. |
|
args |
object | Arbitrary argument to pass to the handler. |
|
childrenOnly |
boolean |
<optional> |
If truthy, only propagate down the tree. |
Returns:
- Type
- this
layer() → {geo.layer}
- Description:
Get the layer referenced by the feature.
- Source:
- Inherited From:
Returns:
The layer associated with the feature.
- Type
- geo.layer
markerStyle()
- Description:
Calls
geo.annotation#style
withstyleType='markerStyle'
.
- Source:
modified() → {object}
- Description:
Update the timestamp to the next global timestamp value. Mark sub-features as modified, too.
- Source:
- Overrides:
Returns:
The results of the superclass modified function.
- Type
- object
mouseOverOrderHighestIndex(evt)
- Description:
If the selectionAPI is on, then setting
this.geoOn(geo.event.feature.mouseover_order, this.mouseOverOrderHighestIndex)
will make it so that the mouseon events prefer the highest index feature.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
evt |
geo.event | The event; this should be triggered from
|
onIdle(handler) → {this}
- Description:
Bind a handler that will be called one time when all internal promises are resolved. If there are no outstanding promises, this is invoked synchronously.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | A function taking no arguments. |
Returns:
- Type
- this
parent(argopt) → {this|geo.sceneObject}
- Description:
Get/set parent of the object.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arg |
geo.sceneObject |
<optional> |
The new parent or |
Returns:
- Type
- this | geo.sceneObject
pastStyle()
- Description:
Calls
geo.annotation#style
withstyleType='pastStyle'
.
- Source:
pointSearch(p) → {object}
- Description:
Returns an array of datum indices that contain the given point.
- Source:
- Overrides:
Parameters:
Name | Type | Description |
---|---|---|
p |
geo.geoPosition | point to search for in map interface gcs. |
Returns:
An object with index
: a list of track indices, found
:
a list of tracks that contain the specified coordinate, extra
: an
object with keys that are track indices and values that are the first
segment index for which the track was matched, and where
: an object
with keys that are track indices and values that are past
, future
,
or marker
if the point was found in that part of the track, or unset
if the point was found in the current part of the track.
- Type
- object
polygonSearch(poly, optsopt) → {object}
- Description:
Returns tracks that are contained in the given polygon.
- Source:
- Overrides:
Parameters:
Name | Type | Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
poly |
geo.polygonObject | A polygon as an array of coordinates or an
object with |
|||||||||||
opts |
object |
<optional> |
Additional search options. Properties
|
Returns:
An object with index
: a list of track indices,
found
: a list of tracks within the polygon, extra
: an object with
index keys containing an object with a segment
key with a value
indicating one of the track segments that is inside the polygon and
partial
key and a boolean value to indicate if the track is on the
polygon's border, and where
: an object with keys that are track
indices and values that are past
, future
, or marker
if the point
was found in that part of the track, or unset if the point was found in
the current part of the track.
- Type
- object
position(valopt) → {geo.geoPosition|function|this}
- Description:
Get/Set position accessor.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
geo.geoPosition | function |
<optional> |
If not specified, return the
current position accessor. If specified, use this for the position
accessor and return |
Returns:
The current position or this feature.
- Type
- geo.geoPosition | function | this
removeChild(child) → {this}
- Description:
Remove a child (or array of children) from the object.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
child |
geo.object | Array.<geo.object> | A child object or array of child objects. |
Returns:
- Type
- this
removePromise(promise) → {this}
- Description:
Remove the promise here and also propagate up the scene tree.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
promise |
Promise | A promise object. |
Returns:
- Type
- this
renderer() → {geo.renderer}
- Description:
Get the renderer used by the feature.
- Source:
- Inherited From:
Returns:
The renderer used to render the feature.
- Type
- geo.renderer
selectionAPI(argopt, directopt) → {boolean|string|this}
- Description:
Get/Set if the selection API is enabled for this feature.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arg |
boolean | string |
<optional> |
|
direct |
boolean |
<optional> |
If |
Returns:
Either the selectionAPI state or the feature instance.
- Type
- boolean | string | this
startTime(valopt) → {number|null|this}
- Description:
Get or set the start time.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
number | null |
<optional> |
If specified, the new start time. |
Returns:
If set, the instance. Otherwise, the current start time value.
- Type
- number | null | this
style(arg1opt, arg2opt, styleTypeopt) → {object|this}
- Description:
Get or set style.
- Source:
- Overrides:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
arg1 |
string | object |
<optional> |
If |
|
arg2 |
* |
<optional> |
If |
|
styleType |
string |
<optional> |
'style'
|
The name of the style type, such as
|
Returns:
Either the entire style object, the value of a specific style, or the current class instance.
- Type
- object | this
style.get(keyopt) → {function|object}
- Description:
A uniform getter that always returns a function even for constant styles. This can also return all defined styles as functions in a single object.
If the style
key
is a color, the returned function will also coerce the result to be ageo.geoColorObject
.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
key |
string |
<optional> |
If defined, return a function for the named style. Otherwise, return an object with a function for all defined styles. |
Returns:
Either a function for the named style or an object with functions for all defined styles.
- Type
- function | object
textStyle()
- Description:
Calls
geo.annotation#style
withstyleType='textStyle'
.
- Source:
time(valopt) → {number|function|this}
- Description:
Get/Set time accessor.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
number |
<optional> |
If not specified, return the current time accessor.
If specified, use this for the time accessor and return |
Returns:
The current time or this feature.
- Type
- number | function | this
timeRange(valopt) → {object|this}
- Description:
Set or query the time range for the tracks. Tracks are rendered differently before the start time and after the end time. The track's marker or text is rendered at the position corresponding to the end time.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
object |
<optional> |
An object with any of |
Returns:
Either the instance or the current settings. If
the current settings, start
and end
are included with the
calculated start and end times, and minimum
and maximum
are values
computed from the data.
- Type
- object | this
timestamp() → {number}
- Description:
Get time.
- Source:
- Inherited From:
Returns:
The timestamp. This is 0 if the timestamp has never been modified.
- Type
- number
track(valopt) → {object|function|this}
- Description:
Get/set track accessor.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
object | function |
<optional> |
If not specified, return the current track
accessor. If specified, use this for the track accessor and return
|
Returns:
The current track accessor or this feature.
- Type
- object | function | this
updateStyleFromArray(keyOrObject, styleArray, refreshopt) → {this}
- Description:
Set style(s) from array(s). For each style, the array should have one value per data item. The values are not converted or validated. Color values should be
geo.geoColorObject
s. If invalid values are given the behavior is undefined. For some feature styles, if the first entry of an array is itself an array, then each entry of the array is expected to be an array, and values are used from these subarrays. This allows a style to apply, for instance, per vertex of a data item rather than per data item.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
keyOrObject |
string | object | Either the name of a single style or an object where the keys are the names of styles and the values are each arrays. |
||
styleArray |
array | If keyOrObject is a string, an array of values for the style. If keyOrObject is an object, this parameter is ignored. |
||
refresh |
boolean |
<optional> |
false
|
|
Returns:
The feature instance.
- Type
- this
updateTime(valopt) → {geo.timestamp|this}
- Description:
Get/Set timestamp of last time an update happened.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
geo.timestamp |
<optional> |
The new update timestamp object or
|
Returns:
- Type
- geo.timestamp | this
visible(valopt, directopt) → {boolean|this}
- Description:
Get/Set the visibility of the feature.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
boolean |
<optional> |
A boolean to change the visibility, or |
direct |
boolean |
<optional> |
If |
Returns:
Either the visibility (if getting) or the feature (if setting).
- Type
- boolean | this
Type Definitions
spec
- Description:
Track feature specification.
- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
position |
geo.geoPosition | function |
<optional> |
Position of the data. Default is (data). |
|
time |
number | function |
<optional> |
Time of the data. Default is |
|
track |
object | function |
<optional> |
Tracks from the data. Default is
(data). Typically, the data is an array of tracks, each of which is an
array of points, each of which has a position and time. The position and
time functions are called for each point as |
|
startTime |
number | null |
<optional> |
null
|
Start time. Used for styling. If
|
endTime |
number |
<optional> |
null
|
End time. Used for styling and position
of the track head. If |
duration |
number |
<optional> |
null
|
Duration between start and end times. Ignored if both start and end times are specified. |
text |
number | function |
<optional> |
Text to use for the head of the track.
If specified, the track head is rendered as text. If |
|
style |
geo.trackFeature.styleSpec |
<optional> |
Style object with default style options. |
|
pastStyle |
geo.lineFeature.styleSpec |
<optional> |
Style object with style options for the track before the start time. |
|
currentStyle |
geo.lineFeature.styleSpec |
<optional> |
Style object with style options for the track between the start and end time. |
|
futureStyle |
geo.lineFeature.styleSpec |
<optional> |
Style object with style options for the track after the end time. |
|
markerStyle |
geo.markerFeature.styleSpec |
<optional> |
Style object with style options for the track head marker. |
|
textStyle |
geo.textFeature.styleSpec |
<optional> |
Style object with style options for the track head text. |
|
layer |
geo.layer |
<optional> |
the parent layer associated with the feature. |
|
selectionAPI |
boolean | 'auto' |
<optional> |
'auto'
|
If
where the handler is passed a |
visible |
boolean |
<optional> |
true
|
If truthy, show the feature. If falsy, hide the feature and do not allow interaction with it. |
gcs |
string |
<optional> |
The interface gcs for this feature. If |
|
bin |
number |
<optional> |
null
|
The bin number is used to determine the order
of multiple features on the same layer. It has no effect except on the
webgl renderer. A negative value hides the feature without stopping
interaction with it. Otherwise, more features with higher bin numbers are
drawn above those with lower bin numbers. If two features have the same
bin number, their order relative to one another is indeterminate and may
be unstable. A value of |
renderer |
geo.renderer |
<optional> |
A reference to the renderer used for
the feature. If |
Track feature specification.
Type:
styleSpec
- Description:
Style specification for a track feature. Extends
geo.lineFeasture.styleSpec
.
- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
strokeColor |
geo.geoColor | function |
<optional> |
Color to stroke each line. The color can vary by point. |
|
strokeOpacity |
number | function |
<optional> |
Opacity for each line stroke. The opacity can vary by point. Opacity is on a [0-1] scale. |
|
strokeWidth |
number | function |
<optional> |
The weight of the line stroke in pixels. The width can vary by point. |
|
strokeOffset |
number | function |
<optional> |
This is a value from -1 (left) to 1 (right), with 0 being centered. This can vary by point. |
|
lineCap |
string | function |
<optional> |
'butt'
|
One of 'butt', 'square', or 'round'. This can vary by point. |
lineJoin |
string | function |
<optional> |
'miter'
|
One of 'miter', 'bevel', 'round', or 'miter-clip'. This can vary by point. |
closed |
boolean | function |
<optional> |
false
|
If true and the renderer
supports it, connect the first and last points of a line if the line has
more than two points. This applies per line (if a function, it is called
with |
miterLimit |
number | function |
<optional> |
10
|
For lines of more than two
segments that are mitered, if the miter length exceeds the |
uniformLine |
boolean | string | function |
<optional> |
false
|
Boolean indicating
if each line has a uniform style (uniform stroke color, opacity, and
width). Can vary by line. A value of |
antialiasing |
number | function |
<optional> |
Antialiasing distance in pixels. Values must be non-negative. A value greater than 1 will produce a visible gradient. This is a single value that applies to all lines. |
|
debug |
string | function |
<optional> |
If 'debug', render lines in debug mode. This is a single value that applies to all lines. |
|
origin |
Array.<number> | function |
<optional> |
Origin in map gcs coordinates used for to ensure high precision drawing in this location. When called as a function, this is passed the vertex positions as a single continuous array in map gcs coordinates. It defaults to the first line's first vertex's position. |
Style specification for a track feature. Extends
geo.lineFeasture.styleSpec
.