Read/write Atom feeds. Create a new instance with the <OpenLayers.Format.AtomFeed> constructor.
| OpenLayers. | Read/write Atom feeds. |
| Properties | |
| namespaces | {Object} Mapping of namespace aliases to namespace URIs. |
| feedTitle | {String} Atom feed elements require a title. |
| defaultEntryTitle | {String} Atom entry elements require a title. |
| gmlParse | {Object} GML Format object for parsing features Non-API and only created if necessary |
| xy | {Boolean} Order of the GML coordinate: true:(x,y) or false:(y,x) For GeoRSS the default is (y,x), therefore: false |
| Constructor | |
| OpenLayers. | Create a new parser for Atom. |
| Functions | |
| write | Serialize or more feature nodes to Atom documents. |
| buildContentNode | |
| buildEntryNode | Build an Atom entry node from a feature object. |
| initGmlParser | Creates a GML parser. |
| buildGeometryNode | builds a GeoRSS node with a given geometry |
| buildPersonConstructNode | |
| getFirstChildValue | |
| parseFeature | Parse feature from an Atom entry node.. |
| parseFeatures | Return features from an Atom entry or feed. |
| parseLocations | Parse the locations from an Atom entry or feed. |
| parsePersonConstruct | Parse Atom person constructs from an Atom entry node. |
write: function( features )
Serialize or more feature nodes to Atom documents.
| features | a single {OpenLayers.Feature.Vector} or an Array({OpenLayers.Feature.Vector}). |
{String} an Atom entry document if passed one feature node, or a feed document if passed an array of feature nodes.
buildEntryNode: function( feature )
Build an Atom entry node from a feature object.
| feature | {OpenLayers.Feature.Vector} |
{DOMElement} an Atom entry node.
These entries are geared for publication using AtomPub.
TODO: support extension elements
buildGeometryNode: function( geometry )
builds a GeoRSS node with a given geometry
| geometry | {OpenLayers.Geometry} |
{DOMElement} A gml node.
buildPersonConstructNode: function( name, value )
| name | {String} |
| value | {Object} |
{DOMElement} an Atom person construct node.
>> buildPersonConstructNode("author", {name: "John Smith"}){<author><name>John Smith</name></author>}
TODO: how to specify extension elements? Add to the oNames array?
getFirstChildValue: function( node, nsuri, name, def )
| node | {DOMElement} |
| nsuri | {String} Child node namespace uri (“*” for any). |
| name | {String} Child node name. |
| def | {String} Optional string default to return if no child found. |
{String} The value of the first child with the given tag name. Returns default value or empty string if none found.
parseFeatures: function( node )
Return features from an Atom entry or feed.
| node | {DOMElement} An Atom entry or feed node. |
An Array of OpenLayers.Feature.Vectors.
parseLocations: function( node )
Parse the locations from an Atom entry or feed.
| node | {DOMElement} An Atom entry or feed node. |
An Array of OpenLayers.Geometrys.
parsePersonConstructs: function( node, name, data )
Parse Atom person constructs from an Atom entry node.
| node | {DOMElement} An Atom entry or feed node. |
| name | {String} Construcy name (“author” or “contributor”) data = {Object} Object in which to put parsed persons. |
An {Object}.
Serialize or more feature nodes to Atom documents.
write: function( features )
buildContentNode: function( content )
Build an Atom entry node from a feature object.
buildEntryNode: function( feature )
Creates a GML parser.
initGmlParser: function()
builds a GeoRSS node with a given geometry
buildGeometryNode: function( geometry )
buildPersonConstructNode: function( name, value )
getFirstChildValue: function( node, nsuri, name, def )
Parse feature from an Atom entry node..
parseFeature: function( node )
Return features from an Atom entry or feed.
parseFeatures: function( node )
Parse the locations from an Atom entry or feed.
parseLocations: function( node )
Parse Atom person constructs from an Atom entry node.
parsePersonConstructs: function( node, name, data )