Parser base class
GeoJSON is now a parser. The idea is that we'll want to pass parsers to sources or protocols and want a known type.
This commit is contained in:
21
src/ol/parser/parser.js
Normal file
21
src/ol/parser/parser.js
Normal file
@@ -0,0 +1,21 @@
|
||||
goog.provide('ol.parser.Parser');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
ol.parser.Parser = function() {};
|
||||
|
||||
/**
|
||||
* @param {*} data Data to deserialize.
|
||||
* @return {*} Parsed data.
|
||||
*/
|
||||
ol.parser.Parser.prototype.read = goog.abstractMethod;
|
||||
|
||||
|
||||
/**
|
||||
* @param {*} obj Object to serialize.
|
||||
* @return {*} Serialized object.
|
||||
*/
|
||||
ol.parser.Parser.prototype.write = goog.abstractMethod;
|
||||
Reference in New Issue
Block a user