OpenLayers.Format.GeoRSS

Read/write GeoRSS parser.  Create a new instance with the OpenLayers.Format.GeoRSS constructor.

Inherits from

Summary
OpenLayers.Format.GeoRSSRead/write GeoRSS parser.
Properties
rssns{String} RSS namespace to use.
featurens{String} Feature Attributes namespace.
georssns{String} GeoRSS namespace to use.
geons{String} W3C Geo namespace to use.
featureTitle{String} Default title for features.
featureDescription{String} Default description for features.
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.Format.GeoRSSCreate a new parser for GeoRSS.
Functions
createGeometryFromItemReturn a geometry from a GeoRSS Item.
createFeatureFromItemReturn a feature from a GeoRSS Item.
_getChildValue
readReturn a list of features from a GeoRSS doc
writeAccept Feature Collection, and return a string.
createFeatureXMLAccept an OpenLayers.Feature.Vector, and build a geometry for it.
buildGeometryNodebuilds a GeoRSS node with a given geometry
buildCoordinatesNode

Properties

rssns

{String} RSS namespace to use.  Defaults to “http://backend.userland.com/rss2

featurens

{String} Feature Attributes namespace.  Defaults to “http://mapserver.gis.umn.edu/mapserver

georssns

{String} GeoRSS namespace to use.  Defaults to “http://www.georss.org/georss

geons

{String} W3C Geo namespace to use.  Defaults to “http://www.w3.org/2003/01/geo/wgs84_pos#

featureTitle

{String} Default title for features.  Defaults to “Untitled”

featureDescription

{String} Default description for features.  Defaults to “No Description”

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.Format.GeoRSS

Create a new parser for GeoRSS.

Parameters

options{Object} An optional object whose properties will be set on this instance.

Functions

createGeometryFromItem

createGeometryFromItem: function(item)

Return a geometry from a GeoRSS Item.

Parameters

item{DOMElement} A GeoRSS item node.

Returns

{OpenLayers.Geometry} A geometry representing the node.

createFeatureFromItem

createFeatureFromItem: function(item)

Return a feature from a GeoRSS Item.

Parameters

item{DOMElement} A GeoRSS item node.

Returns

{OpenLayers.Feature.Vector} A feature representing the item.

_getChildValue

_getChildValue: function(node,
nsuri,
name,
def)

Parameters

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.

Returns

{String} The value of the first child with the given tag name.  Returns default value or empty string if none found.

read

read: function(doc)

Return a list of features from a GeoRSS doc

Parameters

doc{Element}

Returns

{Array(OpenLayers.Feature.Vector)}

write

write: function(features)

Accept Feature Collection, and return a string.

Parameters

features{Array(OpenLayers.Feature.Vector)} List of features to serialize into a string.

createFeatureXML

createFeatureXML: function(feature)

Accept an OpenLayers.Feature.Vector, and build a geometry for it.

Parameters

feature{OpenLayers.Feature.Vector}

Returns

{DOMElement}

buildGeometryNode

buildGeometryNode: function(geometry)

builds a GeoRSS node with a given geometry

Parameters

geometry{OpenLayers.Geometry}

Returns

{DOMElement} A gml node.

buildCoordinatesNode

buildCoordinatesNode: function(geometry)

Parameters

geometry{OpenLayers.Geometry}
createGeometryFromItem: function(item)
Return a geometry from a GeoRSS Item.
createFeatureFromItem: function(item)
Return a feature from a GeoRSS Item.
_getChildValue: function(node,
nsuri,
name,
def)
read: function(doc)
Return a list of features from a GeoRSS doc
write: function(features)
Accept Feature Collection, and return a string.
createFeatureXML: function(feature)
Accept an OpenLayers.Feature.Vector, and build a geometry for it.
Vector features use the OpenLayers.Geometry classes as geometry description.
buildGeometryNode: function(geometry)
builds a GeoRSS node with a given geometry
buildCoordinatesNode: function(geometry)
Create a new parser for GeoRSS.
A Geometry is a description of a geographic object.
Close