OpenLayers JavaScript Mapping Library |
OpenLayers. Format.KMLRead/Wite KML. Create a new instance with the OpenLayers.Format.KML constructor. Inherits fromSummary
read
Read data from a string, and return a list of features. Parameters
Returns{Array(OpenLayers.Feature.Vector)} List of features. parseFeature
This function is the core of the KML parsing code in OpenLayers. It creates the geometries that are then attached to the returned feature, and calls parseAttributes() to get attribute data out. Parameters
Returns{OpenLayers.Feature.Vector} A vector feature. parseGeometry. pointGiven a KML node representing a point geometry, create an OpenLayers point geometry. Parameters
Returns{OpenLayers.Geometry.Point} A point geometry. parseGeometry. linestringGiven a KML node representing a linestring geometry, create an OpenLayers linestring geometry. Parameters
Returns{OpenLayers.Geometry.LineString} A linestring geometry. parseGeometry. polygonGiven a KML node representing a polygon geometry, create an OpenLayers polygon geometry. Parameters
Returns{OpenLayers.Geometry.Polygon} A polygon geometry. parseGeometry. multigeometryGiven a KML node representing a multigeometry, create an OpenLayers geometry collection. Parameters
Returns{OpenLayers.Geometry.Collection} A geometry collection. write
Accept Feature Collection, and return a string. Parameters
Returns{String} A KML string. createPlacemarkXML
Creates and returns a KML placemark node representing the given feature. Parameters
Returns{DOMElement} buildGeometryNode
Builds and returns a KML geometry node with the given geometry. Parameters
Returns{DOMElement} buildGeometry. pointGiven an OpenLayers point geometry, create a KML point. Parameters
Returns{DOMElement} A KML point node. buildGeometry. multipointGiven an OpenLayers multipoint geometry, create a KML GeometryCollection. Parameters
Returns{DOMElement} A KML GeometryCollection node. buildGeometry. linestringGiven an OpenLayers linestring geometry, create a KML linestring. Parameters
Returns{DOMElement} A KML linestring node. buildGeometry. multilinestringGiven an OpenLayers multilinestring geometry, create a KML GeometryCollection. Parameters
Returns{DOMElement} A KML GeometryCollection node. buildGeometry. linearringGiven an OpenLayers linearring geometry, create a KML linearring. Parameters
Returns{DOMElement} A KML linearring node. buildGeometry. polygonGiven an OpenLayers polygon geometry, create a KML polygon. Parameters
Returns{DOMElement} A KML polygon node. buildGeometry. multipolygonGiven an OpenLayers multipolygon geometry, create a KML GeometryCollection. Parameters
Returns{DOMElement} A KML GeometryCollection node. buildGeometry. collectionGiven an OpenLayers geometry collection, create a KML MultiGeometry. Parameters
Returns{DOMElement} A KML MultiGeometry node. buildCoordinatesNode
Builds and returns the KML coordinates node with the given geometry <coordinates>...</coordinates> Parameters
Return{DOMElement} |
Read data from a string, and return a list of features.
read: function( data )
This function is the core of the KML parsing code in OpenLayers.
parseFeature: function( node )
parseAttributes: function( node )
Accept Feature Collection, and return a string.
write: function( features )
Creates and returns a KML folder node
createFolderXML: function()
Creates and returns a KML placemark node representing the given feature.
createPlacemarkXML: function( feature )
Builds and returns a KML geometry node with the given geometry.
buildGeometryNode: function( geometry )
Builds and returns the KML coordinates node with the given geometry coordinates...</coordinates>
buildCoordinatesNode: function( geometry )