Rename ol.reader to ol.format
This commit is contained in:
17
src/ol/format/format.js
Normal file
17
src/ol/format/format.js
Normal file
@@ -0,0 +1,17 @@
|
||||
goog.provide('ol.format');
|
||||
|
||||
|
||||
/**
|
||||
* @param {function(Object, function(this: S, ol.Feature): T, S=)} reader
|
||||
* Reader.
|
||||
* @param {Object} object Object.
|
||||
* @return {Array.<ol.Feature>}
|
||||
* @template S,T
|
||||
*/
|
||||
ol.format.readAllFromObject = function(reader, object) {
|
||||
var features = [];
|
||||
reader(object, function(feature) {
|
||||
features.push(feature);
|
||||
});
|
||||
return features;
|
||||
};
|
||||
Reference in New Issue
Block a user