OpenLayers.Format.OSM

OSM parser.  Create a new instance with the OpenLayers.Format.OSM constructor.

Inherits from

Summary
OpenLayers.Format.OSMOSM parser.
Properties
checkTags{Boolean} Should tags be checked to determine whether something should be treated as a separate node.
shareNode{Boolean} Should nodes be shared between geometries.
areaTags{Array} List of tags indicating that something is an area.
relationsParsers{Map({String, Function})} Map relation type to a functions that parce the relation.
Constructor
OpenLayers.Format.OSMCreate a new parser for OSM.
Functions
writeTakes a list of features, returns a serialized OSM format file for use in tools like JOSM.

Properties

checkTags

{Boolean} Should tags be checked to determine whether something should be treated as a separate node.  Will slow down parsing.  Default is false.

shareNode

{Boolean} Should nodes be shared between geometries.

areaTags

{Array} List of tags indicating that something is an area.  Must be set when creating the format.  Will only be used if checkTags is true.

relationsParsers

{Map({String, Function})} Map relation type to a functions that parce the relation.  This can be set for example to: { multipolygon: OpenLayers.Format.OSM.multipolygonParser, boundary: OpenLayers.Format.OSM.multipolygonParser, route: OpenLayers.Format.OSM.routeParser }

Constructor

OpenLayers.Format.OSM

Create a new parser for OSM.

Parameters

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

Functions

write

write: function(features)

Takes a list of features, returns a serialized OSM format file for use in tools like JOSM.

Parameters

features{Array(OpenLayers.Feature.Vector)}
write: function(features)
Takes a list of features, returns a serialized OSM format file for use in tools like JOSM.
Create a new parser for OSM.
Read and write XML.
Vector features use the OpenLayers.Geometry classes as geometry description.
Close