Allow returning RenderFeature in ol/format/Feature

Resolves #8760
This commit is contained in:
Kevin Schmidt
2018-10-01 08:24:30 -06:00
parent a2c7eb80fd
commit 7056eb8536
3 changed files with 26 additions and 22 deletions

View File

@@ -6,6 +6,16 @@ import {assign} from '../obj.js';
import {get as getProjection, equivalent as equivalentProjection, transformExtent} from '../proj.js';
/**
* @typedef {typeof import("../Feature.js").default|typeof import("../render/Feature.js").default} FeatureClass
*/
/**
* @typedef {import("../Feature.js").default|import("../render/Feature.js").default} FeatureLike
*/
/**
* @typedef {Object} ReadOptions
* @property {import("../proj.js").ProjectionLike} [dataProjection] Projection of the data we are reading.
@@ -131,7 +141,7 @@ class FeatureFormat {
* @abstract
* @param {Document|Node|Object|string} source Source.
* @param {ReadOptions=} opt_options Read options.
* @return {import("../Feature.js").default} Feature.
* @return {FeatureLike} Feature.
*/
readFeature(source, opt_options) {}
@@ -141,7 +151,7 @@ class FeatureFormat {
* @abstract
* @param {Document|Node|ArrayBuffer|Object|string} source Source.
* @param {ReadOptions=} opt_options Read options.
* @return {Array<import("../Feature.js").default>} Features.
* @return {Array<FeatureLike>} Features.
*/
readFeatures(source, opt_options) {}