new ConstantProperty
A Property whose value never changes.
Parameters:
| Name | Type | Argument | Default | Description |
|---|---|---|---|---|
value |
Object | Number | String | The property value. | ||
clone |
Function |
<optional> |
value.clone | A function which takes the value and a result parameter and clones it. This parameter is only required if the value is not a number or string and does not have a clone function. |
Throws:
-
DeveloperError : value is required.
-
DeveloperError : clone is a required function.
Examples
//Create a constant value from a Cartesian2 instance. var constantProperty = new ConstantProperty(new Cartesian2(10, 12));
//Create a ConstantPropety from a user-defined object.
var myObject = {
value : 6
};
function cloneMyObject(value, result) {
return {
value : value.value
};
}
var constantProperty = new ConstantProperty(myObject, cloneMyObject);
