Class: CompositeProperty

CompositeProperty

new CompositeProperty()

A Property defined by TimeIntervalCollection, where the data property of each TimeInterval is another Property instance calculated at the provided time.

See:
Example
var constantProperty = ...;
var sampledProperty = ...;

//Create a composite property from two previously defined properties
//where the property is valid on August 1st, 2012 and uses a constant
//property for the first half of the day and a sampled property for the
//remaining half.
var composite = new SuperMap3D.CompositeProperty();
composite.intervals.addInterval(SuperMap3D.TimeInterval.fromIso8601({
    iso8601 : '2012-08-01T00:00:00.00Z/2012-08-01T12:00:00.00Z',
    data : constantProperty
}));
composite.intervals.addInterval(SuperMap3D.TimeInterval.fromIso8601({
    iso8601 : '2012-08-01T12:00:00.00Z/2012-08-02T00:00:00.00Z',
    isStartIncluded : false,
    isStopIncluded : false,
    data : sampledProperty
}));

Members

readonly definitionChangedEvent

Get the event thrown when the definition of the attribute changes. If calling getValue at the same time returns different results, it is considered that the definition has been changed.

intervalsTimeIntervalCollection

Retrieve the set of time intervals.

readonly isConstantBoolean

Get a boolean value indicating whether the property is a constant. If getValue always returns the same result in the current definition, then the property is considered a constant.

Methods

equals(other){Boolean}

Compare this attribute with the provided attribute, return true if they are equal, otherwise return false.

Name Type Description
other Property optional

A property value.

Returns:
Type Description
Boolean If left and right are equal, it is true; otherwise, it is false.

getValue(time, result){Object}

Get the attribute value for a given time

Name Type Description
time JulianDate

The time to retrieve the attribute value.

result Object optional

If the object to store numerical values is omitted, a new instance will be created and returned.

Returns:
Type Description
Object The modified result parameters, or a new instance (if no result parameters are provided).