itowns
Version:
A JS/WebGL framework for 3D geospatial data visualization
43 lines (42 loc) • 1.7 kB
TypeScript
declare namespace _default {
/**
* Return a function that converts [Features]{@link module:GeoJsonParser} to Meshes. Feature collection will be converted to a
* a THREE.Group.
*
* @param {Object} options - options controlling the conversion
* @param {function} [options.batchId] - optional function to create batchId attribute.
* It is passed the feature property and the feature index. As the batchId is using an unsigned int structure on 32 bits,
* the batchId could be between 0 and 4,294,967,295.
* @param {StyleOptions} [options.style] - optional style properties. Only needed if the convert is used without instancing
* a layer beforehand.
* @return {function}
* @example <caption>Example usage of batchId with featureId.</caption>
* view.addLayer({
* id: 'WFS Buildings',
* type: 'geometry',
* update: itowns.FeatureProcessing.update,
* convert: itowns.Feature2Mesh.convert({
* batchId: (property, featureId) => featureId,
* }),
* filter: acceptFeature,
* source,
* });
*
* @example <caption>Example usage of batchId with property.</caption>
* view.addLayer({
* id: 'WFS Buildings',
* type: 'geometry',
* update: itowns.FeatureProcessing.update,
* convert: itowns.Feature2Mesh.convert({
* batchId: (property, featureId) => property.house ? 10 : featureId,
* }),
* filter: acceptFeature,
* source,
* });
*/
function convert(options?: {
batchId?: Function | undefined;
style?: any;
}): Function;
}
export default _default;