Creates a KML Model.
An URI to the KML or KMZ file. This can be either a relative or an absolute reference.
The spatial extent of the data in this model.
If the property is null, the extent is unknown.
The coordinate type of geometries in this model.
The model descriptor of this model. The model descriptor object becomes immutable (frozen) when passed to the setter.
An object containing metadata about this model
The spatial reference in which this object is defined. If this
property is null then this object is not spatially
referenced.
The store that backs this model, immutable.
Add a feature to the model. Note that this function will only be available if the underlying store also provides an add function.
The feature to add to the model.
Optionaloptions: anyObject literal that will be passed as is to the model's store.
Returns the identifier of the feature, or a promise for the identifier.
Retrieve a feature from the model by id. Note that this function will only be available if the underlying store also provides a get function.
The identifier of the object.
May return the feature, or a promise for the feature.
Update an existing feature in the model object. Note that this function will only be available if the underlying store also provides a put function.
The feature to update.
Optionaloptions: anyObject literal that will be passed as is to the model's store.
Returns the identifier of the feature, or a promise for the identifier.
Since the URLStore does not implement feature events, the results of this query are used to provide those messages from the KMLModel
Optionalquery: anyOptionaloptions: QueryOptionsQuery the model for features in a spatial extent. Note that this function will only be available if the underlying store also provides a spatialQuery function.
Optionalbounds: BoundsThe spatial extent.
Optionalquery: anyAn object which represents a query which may be understood and satisfied by the store. The structure of this object is dependent on the specific store.
Optionaloptions: QueryOptionsObject literal that will be passed as is to the model's store.
cursor or a promise for a cursor
Note: the FeatureModel requires a Store which supports events in order
to automatically fire ModelChanged events. When the store does not support events, it is up to the user of this class
to fire those events manually.
The "ModelChanged" event type
the feature that was added, updated or removed. In case of remove events, this may be undefined.
Optionalcontext: anythe context in which the callback function should be invoked. implementation dependent.
An event that is emitted when the contents of the model changes.
"ModelChanged"
Registers a callback function for the "KMLNetworkLink" event to process KMLNetworkLinks.
Always set to "KMLNetworkLink" for this event type.
The callback function to be executed when the NetworkLink cursor is decoded by the KMLCodec.decode function.
Optionalcontext: anyThe context in which the callback function should be invoked.
"KMLNetworkLink"
Registers a callback function for the "KMLTree" event. The callback function receives an array of
KMLFeatures.
Always set to "KMLTree" for this event type.
The callback function to be executed when the KMLCodec.decode function is called.
Optionalcontext: anyThe context in which the function should be invoked.
"KMLTree"
Registers a callback function for the "KMLGroundOverlay" event, that allows a listener to process KML ground overlays.
Always set to "KMLGroundOverlay" for this event type.
The callback function to be executed when the KMLCodec.decode function is called.
Optionalcontext: anyThe context in which the function should be invoked.
"KMLGroundOverlay"
Registers a callback function for the "KMLScreenOverlay" event, that allows a listener to process KML ground overlays.
Always set to "KMLScreenOverlay" for this event type.
The callback function to be executed when the KMLCodec.decode function is called.
Optionalcontext: anyThe context in which the function should be invoked.
"KMLScreenOverlay"
Registers a callback function for the "KMLFatalError" event, that allows a listener to process errors which cause the KMLCodec to abort operations.
Always set to "KMLFatalError" for this event type.
The callback function to be executed when the KMLCodec encounters a fatal error.
Optionalcontext: anyThe context in which the function should be invoked.
"KMLFatalError"
Represents a KML Model for a given URI. The KML model will be decoded asynchronously and lazily when needed. This KML Model is decoded just before it is painted. The model is read only; only the query method is supported. The FeatureModel.put, FeatureModel.spatialQuery methods are not supported.
Note that, internally, the
KMLModeluses the KMLCodec.