Skip to content

Commit

Permalink
Expose CZML helper functions.
Browse files Browse the repository at this point in the history
#1080 accidentally removed some helper functions needed for custom CZML processing.  I expect these function to go away in the near future, but they are definitely needed for now in apps that use custom CZML.

CC @emackey
  • Loading branch information
mramato committed Sep 3, 2013
1 parent 5d81084 commit 653bf6d
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions Source/DynamicScene/CzmlDataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -1304,6 +1304,49 @@ define([
});
};

/**
* A helper function used by custom CZML updater functions
* which creates or updates a {@link Property} from a CZML packet.
* @function
*
* @param {Function} type The constructor function for the property being processed.
* @param {Object} object The object on which the property will be added or updated.
* @param {String} propertyName The name of the property on the object.
* @param {Object} packetData The CZML packet being processed.y
* @param {TimeInterval} [interval] A constraining interval for which the data is valid.
* @param {String} [sourceUri] The originating uri of the data being processed.
* @returns {Boolean} True if a new property was created, false otherwise.
*/
CzmlDataSource.processPacketData = processPacketData;

/**
* A helper function used by custom CZML updater functions
* which creates or updates a {@link PositionProperty} from a CZML packet.
* @function
*
* @param {Object} object The object on which the property will be added or updated.
* @param {String} propertyName The name of the property on the object.
* @param {Object} packetData The CZML packet being processed.y
* @param {TimeInterval} [interval] A constraining interval for which the data is valid.
* @param {String} [sourceUri] The originating uri of the data being processed.
* @returns {Boolean} True if a new property was created, false otherwise.
*/
CzmlDataSource.processPositionPacketData = processPositionPacketData;

/**
* A helper function used by custom CZML updater functions
* which creates or updates a {@link MaterialProperty} from a CZML packet.
* @function
*
* @param {Object} object The object on which the property will be added or updated.
* @param {String} propertyName The name of the property on the object.
* @param {Object} packetData The CZML packet being processed.y
* @param {TimeInterval} [interval] A constraining interval for which the data is valid.
* @param {String} [sourceUri] The originating uri of the data being processed.
* @returns {Boolean} True if a new property was created, false otherwise.
*/
CzmlDataSource.processMaterialPacketData = processMaterialPacketData;

CzmlDataSource._processCzml = function(czml, dynamicObjectCollection, sourceUri, updaterFunctions) {
var updatedObjects = [];
var updatedObjectsHash = {};
Expand Down

0 comments on commit 653bf6d

Please sign in to comment.