From 0e6d971ad0300454f3389aed9e70d1342ece3b54 Mon Sep 17 00:00:00 2001 From: tschaub Date: Thu, 5 Jan 2012 10:36:45 -0700 Subject: [PATCH 01/26] Updating API doc menus. After the big reshuffle while deprecating stuff, NaturalDocs started over with a new menu so we lost the structure we had set up. --- apidoc_config/Menu.txt | 52 ++++++++++++------------------------------ doc_config/Menu.txt | 52 ++++++++++++------------------------------ 2 files changed, 30 insertions(+), 74 deletions(-) diff --git a/apidoc_config/Menu.txt b/apidoc_config/Menu.txt index 9d23a1a7aa..7d685cb73c 100644 --- a/apidoc_config/Menu.txt +++ b/apidoc_config/Menu.txt @@ -48,7 +48,6 @@ SubTitle: JavaScript Mapping Library Group: OpenLayers { File: OpenLayers (no auto-title, OpenLayers.js) - File: Ajax (no auto-title, OpenLayers/Ajax.js) Group: BaseTypes { @@ -81,9 +80,7 @@ Group: OpenLayers { File: LayerSwitcher (no auto-title, OpenLayers/Control/LayerSwitcher.js) File: Measure (no auto-title, OpenLayers/Control/Measure.js) File: ModifyFeature (no auto-title, OpenLayers/Control/ModifyFeature.js) - File: MouseDefaults (no auto-title, OpenLayers/Control/MouseDefaults.js) File: MousePosition (no auto-title, OpenLayers/Control/MousePosition.js) - File: MouseToolbar (no auto-title, OpenLayers/Control/MouseToolbar.js) File: Navigation (no auto-title, OpenLayers/Control/Navigation.js) File: NavigationHistory (no auto-title, OpenLayers/Control/NavigationHistory.js) File: NavToolbar (no auto-title, OpenLayers/Control/NavToolbar.js) @@ -118,7 +115,6 @@ Group: OpenLayers { File: Feature (no auto-title, OpenLayers/Feature.js) File: Vector (no auto-title, OpenLayers/Feature/Vector.js) - File: WFS (no auto-title, OpenLayers/Feature/WFS.js) } # Group: Feature Group: Filter { @@ -152,9 +148,6 @@ Group: OpenLayers { File: v1_1_0 (no auto-title, OpenLayers/Format/Filter/v1_1_0.js) } # Group: Filter - File: GeoJSON (no auto-title, OpenLayers/Format/GeoJSON.js) - File: GeoRSS (no auto-title, OpenLayers/Format/GeoRSS.js) - Group: GML { File: GML (no auto-title, OpenLayers/Format/GML.js) @@ -163,15 +156,24 @@ Group: OpenLayers { File: v3 (no auto-title, OpenLayers/Format/GML/v3.js) } # Group: GML + Group: SLD { + + File: SLD (no auto-title, OpenLayers/Format/SLD.js) + File: v1 (no auto-title, OpenLayers/Format/SLD/v1.js) + File: v1_0_0 (no auto-title, OpenLayers/Format/SLD/v1_0_0.js) + } # Group: SLD + + File: GeoJSON (no auto-title, OpenLayers/Format/GeoJSON.js) + File: GeoRSS (no auto-title, OpenLayers/Format/GeoRSS.js) File: GPX (no auto-title, OpenLayers/Format/GPX.js) File: JSON (no auto-title, OpenLayers/Format/JSON.js) File: KML (no auto-title, OpenLayers/Format/KML.js) File: OGCExceptionReport (no auto-title, OpenLayers/Format/OGCExceptionReport.js) File: OSM (no auto-title, OpenLayers/Format/OSM.js) - File: OWSCommon (no auto-title, OpenLayers/Format/OWSCommon.js) Group: OWSCommon { + File: OWSCommon (no auto-title, OpenLayers/Format/OWSCommon.js) File: v1 (no auto-title, OpenLayers/Format/OWSCommon/v1.js) File: v1_0_0 (no auto-title, OpenLayers/Format/OWSCommon/v1_0_0.js) File: v1_1_0 (no auto-title, OpenLayers/Format/OWSCommon/v1_1_0.js) @@ -180,19 +182,12 @@ Group: OpenLayers { File: OWSContext (no auto-title, OpenLayers/Format/OWSContext.js) File: OWSContext.v0_3_1 (no auto-title, OpenLayers/Format/OWSContext/v0_3_1.js) File: QueryStringFilter (no auto-title, OpenLayers/Format/QueryStringFilter.js) - - Group: SLD { - - File: SLD (no auto-title, OpenLayers/Format/SLD.js) - File: v1 (no auto-title, OpenLayers/Format/SLD/v1.js) - File: v1_0_0 (no auto-title, OpenLayers/Format/SLD/v1_0_0.js) - } # Group: SLD - File: SOSCapabilities (no auto-title, OpenLayers/Format/SOSCapabilities.js) File: SOSCapabilities.v1_0_0 (no auto-title, OpenLayers/Format/SOSCapabilities/v1_0_0.js) File: SOSGetFeatureOfInterest (no auto-title, OpenLayers/Format/SOSGetFeatureOfInterest.js) File: SOSGetObservation (no auto-title, OpenLayers/Format/SOSGetObservation.js) File: Text (no auto-title, OpenLayers/Format/Text.js) + File: VersionedOGC (OpenLayers/Format/XML/VersionedOGC.js) File: WCSGetCoverage version 1.1.0 (no auto-title, OpenLayers/Format/WCSGetCoverage.js) File: WFS (no auto-title, OpenLayers/Format/WFS.js) @@ -204,8 +199,6 @@ Group: OpenLayers { File: v1_1_0 (no auto-title, OpenLayers/Format/WFSCapabilities/v1_1_0.js) } # Group: WFSCapabilities - File: WFSDescribeFeatureType (no auto-title, OpenLayers/Format/WFSDescribeFeatureType.js) - Group: WFST { File: WFST (no auto-title, OpenLayers/Format/WFST.js) @@ -214,8 +207,6 @@ Group: OpenLayers { File: v1_1_0 (no auto-title, OpenLayers/Format/WFST/v1_1_0.js) } # Group: WFST - File: WKT (no auto-title, OpenLayers/Format/WKT.js) - Group: WMC { File: WMC (no auto-title, OpenLayers/Format/WMC.js) @@ -242,6 +233,8 @@ Group: OpenLayers { File: v1_1 (no auto-title, OpenLayers/Format/WMSDescribeLayer/v1_1.js) } # Group: WMSDescribeLayer + File: WFSDescribeFeatureType (no auto-title, OpenLayers/Format/WFSDescribeFeatureType.js) + File: WKT (no auto-title, OpenLayers/Format/WKT.js) File: WMSGetFeatureInfo (no auto-title, OpenLayers/Format/WMSGetFeatureInfo.js) File: WMTSCapabilities (no auto-title, OpenLayers/Format/WMTSCapabilities.js) File: WMTSCapabilities.v1_0_0 (no auto-title, OpenLayers/Format/WMTSCapabilities/v1_0_0.js) @@ -267,7 +260,6 @@ Group: OpenLayers { File: MultiPolygon (no auto-title, OpenLayers/Geometry/MultiPolygon.js) File: Point (no auto-title, OpenLayers/Geometry/Point.js) File: Polygon (no auto-title, OpenLayers/Geometry/Polygon.js) - File: Rectangle (no auto-title, OpenLayers/Geometry/Rectangle.js) } # Group: Geometry Group: Handler { @@ -349,7 +341,6 @@ Group: OpenLayers { File: EventPane (no auto-title, OpenLayers/Layer/EventPane.js) File: FixedZoomLevels (no auto-title, OpenLayers/Layer/FixedZoomLevels.js) File: GeoRSS (no auto-title, OpenLayers/Layer/GeoRSS.js) - File: GML (no auto-title, OpenLayers/Layer/GML.js) File: Google (no auto-title, OpenLayers/Layer/Google.js) File: Google.v3 (no auto-title, OpenLayers/Layer/Google/v3.js) File: Grid (no auto-title, OpenLayers/Layer/Grid.js) @@ -359,9 +350,7 @@ Group: OpenLayers { File: KaMapCache (no auto-title, OpenLayers/Layer/KaMapCache.js) File: MapGuide (no auto-title, OpenLayers/Layer/MapGuide.js) File: MapServer (no auto-title, OpenLayers/Layer/MapServer.js) - File: MapServer.Untiled (no auto-title, OpenLayers/Layer/MapServer/Untiled.js) File: Markers (no auto-title, OpenLayers/Layer/Markers.js) - File: MultiMap (no auto-title, OpenLayers/Layer/MultiMap.js) File: PointGrid (no auto-title, OpenLayers/Layer/PointGrid.js) File: PointTrack (no auto-title, OpenLayers/Layer/PointTrack.js) File: SphericalMercator (no auto-title, OpenLayers/Layer/SphericalMercator.js) @@ -370,15 +359,10 @@ Group: OpenLayers { File: TMS (no auto-title, OpenLayers/Layer/TMS.js) File: Vector (no auto-title, OpenLayers/Layer/Vector.js) File: Vector.RootContainer (no auto-title, OpenLayers/Layer/Vector/RootContainer.js) - File: VirtualEarth (no auto-title, OpenLayers/Layer/VirtualEarth.js) - File: WFS (no auto-title, OpenLayers/Layer/WFS.js) File: WMS (no auto-title, OpenLayers/Layer/WMS.js) - File: WMS.Untiled (no auto-title, OpenLayers/Layer/WMS/Untiled.js) - File: WMS.Post (no auto-title, OpenLayers/Layer/WMS/Post.js) File: WMTS (no auto-title, OpenLayers/Layer/WMTS.js) File: WorldWind (no auto-title, OpenLayers/Layer/WorldWind.js) File: XYZ (no auto-title, OpenLayers/Layer/XYZ.js) - File: Yahoo (no auto-title, OpenLayers/Layer/Yahoo.js) File: Zoomify (no auto-title, OpenLayers/Layer/Zoomify.js) } # Group: Layer @@ -406,12 +390,6 @@ Group: OpenLayers { File: Protocol (no auto-title, OpenLayers/Protocol.js) File: HTTP (no auto-title, OpenLayers/Protocol/HTTP.js) - Group: SQL { - - File: SQL (no auto-title, OpenLayers/Protocol/SQL.js) - File: Gears (no auto-title, OpenLayers/Protocol/SQL/Gears.js) - } # Group: SQL - Group: WFS { File: WFS (no auto-title, OpenLayers/Protocol/WFS.js) @@ -442,8 +420,8 @@ Group: OpenLayers { File: XMLHttpRequest (no auto-title, OpenLayers/Request/XMLHttpRequest.js) } # Group: Request - File: SingleFile.js (no auto-title, OpenLayers/SingleFile.js) File: Rule (no auto-title, OpenLayers/Rule.js) + File: SingleFile.js (no auto-title, OpenLayers/SingleFile.js) Group: Strategy { @@ -476,11 +454,11 @@ Group: OpenLayers { File: Tile (no auto-title, OpenLayers/Tile.js) File: Image (no auto-title, OpenLayers/Tile/Image.js) File: Image.IFrame (no auto-title, OpenLayers/Tile/Image/IFrame.js) - File: WFS (no auto-title, OpenLayers/Tile/WFS.js) } # Group: Tile File: Tween (no auto-title, OpenLayers/Tween.js) File: Util (no auto-title, OpenLayers/Util.js) + File: Deprecated (no auto-title, deprecated.js) } # Group: OpenLayers Group: Index { diff --git a/doc_config/Menu.txt b/doc_config/Menu.txt index 9d23a1a7aa..7d685cb73c 100644 --- a/doc_config/Menu.txt +++ b/doc_config/Menu.txt @@ -48,7 +48,6 @@ SubTitle: JavaScript Mapping Library Group: OpenLayers { File: OpenLayers (no auto-title, OpenLayers.js) - File: Ajax (no auto-title, OpenLayers/Ajax.js) Group: BaseTypes { @@ -81,9 +80,7 @@ Group: OpenLayers { File: LayerSwitcher (no auto-title, OpenLayers/Control/LayerSwitcher.js) File: Measure (no auto-title, OpenLayers/Control/Measure.js) File: ModifyFeature (no auto-title, OpenLayers/Control/ModifyFeature.js) - File: MouseDefaults (no auto-title, OpenLayers/Control/MouseDefaults.js) File: MousePosition (no auto-title, OpenLayers/Control/MousePosition.js) - File: MouseToolbar (no auto-title, OpenLayers/Control/MouseToolbar.js) File: Navigation (no auto-title, OpenLayers/Control/Navigation.js) File: NavigationHistory (no auto-title, OpenLayers/Control/NavigationHistory.js) File: NavToolbar (no auto-title, OpenLayers/Control/NavToolbar.js) @@ -118,7 +115,6 @@ Group: OpenLayers { File: Feature (no auto-title, OpenLayers/Feature.js) File: Vector (no auto-title, OpenLayers/Feature/Vector.js) - File: WFS (no auto-title, OpenLayers/Feature/WFS.js) } # Group: Feature Group: Filter { @@ -152,9 +148,6 @@ Group: OpenLayers { File: v1_1_0 (no auto-title, OpenLayers/Format/Filter/v1_1_0.js) } # Group: Filter - File: GeoJSON (no auto-title, OpenLayers/Format/GeoJSON.js) - File: GeoRSS (no auto-title, OpenLayers/Format/GeoRSS.js) - Group: GML { File: GML (no auto-title, OpenLayers/Format/GML.js) @@ -163,15 +156,24 @@ Group: OpenLayers { File: v3 (no auto-title, OpenLayers/Format/GML/v3.js) } # Group: GML + Group: SLD { + + File: SLD (no auto-title, OpenLayers/Format/SLD.js) + File: v1 (no auto-title, OpenLayers/Format/SLD/v1.js) + File: v1_0_0 (no auto-title, OpenLayers/Format/SLD/v1_0_0.js) + } # Group: SLD + + File: GeoJSON (no auto-title, OpenLayers/Format/GeoJSON.js) + File: GeoRSS (no auto-title, OpenLayers/Format/GeoRSS.js) File: GPX (no auto-title, OpenLayers/Format/GPX.js) File: JSON (no auto-title, OpenLayers/Format/JSON.js) File: KML (no auto-title, OpenLayers/Format/KML.js) File: OGCExceptionReport (no auto-title, OpenLayers/Format/OGCExceptionReport.js) File: OSM (no auto-title, OpenLayers/Format/OSM.js) - File: OWSCommon (no auto-title, OpenLayers/Format/OWSCommon.js) Group: OWSCommon { + File: OWSCommon (no auto-title, OpenLayers/Format/OWSCommon.js) File: v1 (no auto-title, OpenLayers/Format/OWSCommon/v1.js) File: v1_0_0 (no auto-title, OpenLayers/Format/OWSCommon/v1_0_0.js) File: v1_1_0 (no auto-title, OpenLayers/Format/OWSCommon/v1_1_0.js) @@ -180,19 +182,12 @@ Group: OpenLayers { File: OWSContext (no auto-title, OpenLayers/Format/OWSContext.js) File: OWSContext.v0_3_1 (no auto-title, OpenLayers/Format/OWSContext/v0_3_1.js) File: QueryStringFilter (no auto-title, OpenLayers/Format/QueryStringFilter.js) - - Group: SLD { - - File: SLD (no auto-title, OpenLayers/Format/SLD.js) - File: v1 (no auto-title, OpenLayers/Format/SLD/v1.js) - File: v1_0_0 (no auto-title, OpenLayers/Format/SLD/v1_0_0.js) - } # Group: SLD - File: SOSCapabilities (no auto-title, OpenLayers/Format/SOSCapabilities.js) File: SOSCapabilities.v1_0_0 (no auto-title, OpenLayers/Format/SOSCapabilities/v1_0_0.js) File: SOSGetFeatureOfInterest (no auto-title, OpenLayers/Format/SOSGetFeatureOfInterest.js) File: SOSGetObservation (no auto-title, OpenLayers/Format/SOSGetObservation.js) File: Text (no auto-title, OpenLayers/Format/Text.js) + File: VersionedOGC (OpenLayers/Format/XML/VersionedOGC.js) File: WCSGetCoverage version 1.1.0 (no auto-title, OpenLayers/Format/WCSGetCoverage.js) File: WFS (no auto-title, OpenLayers/Format/WFS.js) @@ -204,8 +199,6 @@ Group: OpenLayers { File: v1_1_0 (no auto-title, OpenLayers/Format/WFSCapabilities/v1_1_0.js) } # Group: WFSCapabilities - File: WFSDescribeFeatureType (no auto-title, OpenLayers/Format/WFSDescribeFeatureType.js) - Group: WFST { File: WFST (no auto-title, OpenLayers/Format/WFST.js) @@ -214,8 +207,6 @@ Group: OpenLayers { File: v1_1_0 (no auto-title, OpenLayers/Format/WFST/v1_1_0.js) } # Group: WFST - File: WKT (no auto-title, OpenLayers/Format/WKT.js) - Group: WMC { File: WMC (no auto-title, OpenLayers/Format/WMC.js) @@ -242,6 +233,8 @@ Group: OpenLayers { File: v1_1 (no auto-title, OpenLayers/Format/WMSDescribeLayer/v1_1.js) } # Group: WMSDescribeLayer + File: WFSDescribeFeatureType (no auto-title, OpenLayers/Format/WFSDescribeFeatureType.js) + File: WKT (no auto-title, OpenLayers/Format/WKT.js) File: WMSGetFeatureInfo (no auto-title, OpenLayers/Format/WMSGetFeatureInfo.js) File: WMTSCapabilities (no auto-title, OpenLayers/Format/WMTSCapabilities.js) File: WMTSCapabilities.v1_0_0 (no auto-title, OpenLayers/Format/WMTSCapabilities/v1_0_0.js) @@ -267,7 +260,6 @@ Group: OpenLayers { File: MultiPolygon (no auto-title, OpenLayers/Geometry/MultiPolygon.js) File: Point (no auto-title, OpenLayers/Geometry/Point.js) File: Polygon (no auto-title, OpenLayers/Geometry/Polygon.js) - File: Rectangle (no auto-title, OpenLayers/Geometry/Rectangle.js) } # Group: Geometry Group: Handler { @@ -349,7 +341,6 @@ Group: OpenLayers { File: EventPane (no auto-title, OpenLayers/Layer/EventPane.js) File: FixedZoomLevels (no auto-title, OpenLayers/Layer/FixedZoomLevels.js) File: GeoRSS (no auto-title, OpenLayers/Layer/GeoRSS.js) - File: GML (no auto-title, OpenLayers/Layer/GML.js) File: Google (no auto-title, OpenLayers/Layer/Google.js) File: Google.v3 (no auto-title, OpenLayers/Layer/Google/v3.js) File: Grid (no auto-title, OpenLayers/Layer/Grid.js) @@ -359,9 +350,7 @@ Group: OpenLayers { File: KaMapCache (no auto-title, OpenLayers/Layer/KaMapCache.js) File: MapGuide (no auto-title, OpenLayers/Layer/MapGuide.js) File: MapServer (no auto-title, OpenLayers/Layer/MapServer.js) - File: MapServer.Untiled (no auto-title, OpenLayers/Layer/MapServer/Untiled.js) File: Markers (no auto-title, OpenLayers/Layer/Markers.js) - File: MultiMap (no auto-title, OpenLayers/Layer/MultiMap.js) File: PointGrid (no auto-title, OpenLayers/Layer/PointGrid.js) File: PointTrack (no auto-title, OpenLayers/Layer/PointTrack.js) File: SphericalMercator (no auto-title, OpenLayers/Layer/SphericalMercator.js) @@ -370,15 +359,10 @@ Group: OpenLayers { File: TMS (no auto-title, OpenLayers/Layer/TMS.js) File: Vector (no auto-title, OpenLayers/Layer/Vector.js) File: Vector.RootContainer (no auto-title, OpenLayers/Layer/Vector/RootContainer.js) - File: VirtualEarth (no auto-title, OpenLayers/Layer/VirtualEarth.js) - File: WFS (no auto-title, OpenLayers/Layer/WFS.js) File: WMS (no auto-title, OpenLayers/Layer/WMS.js) - File: WMS.Untiled (no auto-title, OpenLayers/Layer/WMS/Untiled.js) - File: WMS.Post (no auto-title, OpenLayers/Layer/WMS/Post.js) File: WMTS (no auto-title, OpenLayers/Layer/WMTS.js) File: WorldWind (no auto-title, OpenLayers/Layer/WorldWind.js) File: XYZ (no auto-title, OpenLayers/Layer/XYZ.js) - File: Yahoo (no auto-title, OpenLayers/Layer/Yahoo.js) File: Zoomify (no auto-title, OpenLayers/Layer/Zoomify.js) } # Group: Layer @@ -406,12 +390,6 @@ Group: OpenLayers { File: Protocol (no auto-title, OpenLayers/Protocol.js) File: HTTP (no auto-title, OpenLayers/Protocol/HTTP.js) - Group: SQL { - - File: SQL (no auto-title, OpenLayers/Protocol/SQL.js) - File: Gears (no auto-title, OpenLayers/Protocol/SQL/Gears.js) - } # Group: SQL - Group: WFS { File: WFS (no auto-title, OpenLayers/Protocol/WFS.js) @@ -442,8 +420,8 @@ Group: OpenLayers { File: XMLHttpRequest (no auto-title, OpenLayers/Request/XMLHttpRequest.js) } # Group: Request - File: SingleFile.js (no auto-title, OpenLayers/SingleFile.js) File: Rule (no auto-title, OpenLayers/Rule.js) + File: SingleFile.js (no auto-title, OpenLayers/SingleFile.js) Group: Strategy { @@ -476,11 +454,11 @@ Group: OpenLayers { File: Tile (no auto-title, OpenLayers/Tile.js) File: Image (no auto-title, OpenLayers/Tile/Image.js) File: Image.IFrame (no auto-title, OpenLayers/Tile/Image/IFrame.js) - File: WFS (no auto-title, OpenLayers/Tile/WFS.js) } # Group: Tile File: Tween (no auto-title, OpenLayers/Tween.js) File: Util (no auto-title, OpenLayers/Util.js) + File: Deprecated (no auto-title, deprecated.js) } # Group: OpenLayers Group: Index { From fc43ea715a89193d077cf10edf9588d8405006ab Mon Sep 17 00:00:00 2001 From: tschaub Date: Thu, 5 Jan 2012 10:50:45 -0700 Subject: [PATCH 02/26] Documenting the deprecated.js script. --- lib/deprecated.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/deprecated.js b/lib/deprecated.js index abdc642867..98fa132369 100644 --- a/lib/deprecated.js +++ b/lib/deprecated.js @@ -23,6 +23,20 @@ * @requires OpenLayers/Geometry.js */ +/** + * About: Deprecated + * The deprecated.js script includes all methods, properties, and constructors + * that are not supported as part of the long-term API. If you use any of + * these, you have to explicitly include this script in your application. + * + * For example: + * (code) + * + * (end) + * + * You are strongly encouraged to avoid using deprecated functionality. The + * documentation here should point you to the supported alternatives. + */ /** * Namespace: OpenLayers.Class From b7dee9ca6d7deada7b5122aede49102450d989c7 Mon Sep 17 00:00:00 2001 From: Xavier Mamano Date: Sat, 7 Jan 2012 19:29:41 +0100 Subject: [PATCH 03/26] Some problems in the documentation detected using "closure_verify" --- lib/OpenLayers/Control/KeyboardDefaults.js | 2 +- lib/OpenLayers/Control/LayerSwitcher.js | 15 +++++++++------ lib/OpenLayers/Control/OverviewMap.js | 2 +- lib/OpenLayers/Control/PanZoomBar.js | 2 +- lib/OpenLayers/Control/SLDSelect.js | 3 +++ lib/OpenLayers/Feature/Vector.js | 2 +- lib/OpenLayers/Filter/Comparison.js | 2 +- lib/OpenLayers/Filter/FeatureId.js | 2 +- lib/OpenLayers/Filter/Function.js | 2 +- lib/OpenLayers/Filter/Logical.js | 2 +- lib/OpenLayers/Filter/Spatial.js | 2 +- lib/OpenLayers/Format/ArcXML.js | 2 +- lib/OpenLayers/Format/Atom.js | 5 ++--- lib/OpenLayers/Format/Context.js | 3 +++ lib/OpenLayers/Format/Filter/v1_1_0.js | 3 ++- lib/OpenLayers/Format/GML.js | 2 +- lib/OpenLayers/Format/GPX.js | 2 +- lib/OpenLayers/Format/GeoJSON.js | 2 +- lib/OpenLayers/Format/OSM.js | 8 ++++---- lib/OpenLayers/Format/OWSCommon/v1.js | 3 +++ lib/OpenLayers/Format/OWSCommon/v1_0_0.js | 3 +++ lib/OpenLayers/Format/OWSCommon/v1_1_0.js | 3 +++ lib/OpenLayers/Format/OWSContext.js | 3 +++ lib/OpenLayers/Format/OWSContext/v0_3_1.js | 2 +- lib/OpenLayers/Format/Text.js | 2 +- lib/OpenLayers/Format/WKT.js | 12 ++++++------ lib/OpenLayers/Format/WMC.js | 4 ++-- lib/OpenLayers/Format/WMC/v1.js | 4 ++-- lib/OpenLayers/Geometry.js | 3 ++- lib/OpenLayers/Geometry/Collection.js | 4 ++-- lib/OpenLayers/Geometry/MultiLineString.js | 2 +- lib/OpenLayers/Handler/Feature.js | 3 +++ lib/OpenLayers/Layer/Bing.js | 9 ++++++++- lib/OpenLayers/Layer/GeoRSS.js | 1 - lib/OpenLayers/Layer/Image.js | 5 ++++- lib/OpenLayers/Layer/Text.js | 3 +++ lib/OpenLayers/Renderer/Elements.js | 4 +++- lib/OpenLayers/StyleMap.js | 2 +- lib/OpenLayers/Tile.js | 2 +- lib/OpenLayers/Util.js | 17 ++++++++++------- 40 files changed, 98 insertions(+), 56 deletions(-) diff --git a/lib/OpenLayers/Control/KeyboardDefaults.js b/lib/OpenLayers/Control/KeyboardDefaults.js index 8e8c8b207d..a015a9ae16 100644 --- a/lib/OpenLayers/Control/KeyboardDefaults.js +++ b/lib/OpenLayers/Control/KeyboardDefaults.js @@ -59,7 +59,7 @@ OpenLayers.Control.KeyboardDefaults = OpenLayers.Class(OpenLayers.Control, { * http://unixpapa.com/js/key.html * * Parameters: - * code - {Integer} + * evt - {Event} */ defaultKeyPress: function (evt) { switch(evt.keyCode) { diff --git a/lib/OpenLayers/Control/LayerSwitcher.js b/lib/OpenLayers/Control/LayerSwitcher.js index aeb698bef8..3f81b3bfdc 100644 --- a/lib/OpenLayers/Control/LayerSwitcher.js +++ b/lib/OpenLayers/Control/LayerSwitcher.js @@ -68,7 +68,7 @@ OpenLayers.Control.LayerSwitcher = /** * Property: baseLayers - * {Array()} + * {Array(Object)} */ baseLayers: null, @@ -87,7 +87,7 @@ OpenLayers.Control.LayerSwitcher = /** * Property: dataLayers - * {Array()} + * {Array(Object)} */ dataLayers: null, @@ -372,10 +372,13 @@ OpenLayers.Control.LayerSwitcher = * Parameters: * e - {Event} * - * Context: - * - {DOMElement} inputElem - * - {} layerSwitcher - * - {} layer + * Context: + * - {Object} + * + * Object structure: + * inputElem - {DOMElement} + * layerSwitcher - {} + * layer - {} */ onInputClick: function(e) { diff --git a/lib/OpenLayers/Control/OverviewMap.js b/lib/OpenLayers/Control/OverviewMap.js index 34a195faf3..4ee3c11f1a 100644 --- a/lib/OpenLayers/Control/OverviewMap.js +++ b/lib/OpenLayers/Control/OverviewMap.js @@ -132,7 +132,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, { * Create a new overview map * * Parameters: - * object - {Object} Properties of this object will be set on the overview + * options - {Object} Properties of this object will be set on the overview * map object. Note, to set options on the map object contained in this * control, set as one of the options properties. */ diff --git a/lib/OpenLayers/Control/PanZoomBar.js b/lib/OpenLayers/Control/PanZoomBar.js index e7ce0c647f..ad3ecf48e0 100644 --- a/lib/OpenLayers/Control/PanZoomBar.js +++ b/lib/OpenLayers/Control/PanZoomBar.js @@ -190,7 +190,7 @@ OpenLayers.Control.PanZoomBar = OpenLayers.Class(OpenLayers.Control.PanZoom, { * Method: _addZoomBar * * Parameters: - * location - {} where zoombar drawing is to start. + * centered - {} where zoombar drawing is to start. */ _addZoomBar:function(centered) { var imgLocation = OpenLayers.Util.getImageLocation("slider.png"); diff --git a/lib/OpenLayers/Control/SLDSelect.js b/lib/OpenLayers/Control/SLDSelect.js index 8a4347775f..c192344a15 100644 --- a/lib/OpenLayers/Control/SLDSelect.js +++ b/lib/OpenLayers/Control/SLDSelect.js @@ -183,6 +183,9 @@ OpenLayers.Control.SLDSelect = OpenLayers.Class(OpenLayers.Control, { * layer visibility. So if the source layer is turned off, the * selection layer is also turned off. * + * Context: + * - {} + * * Parameters: * evt - {Object} */ diff --git a/lib/OpenLayers/Feature/Vector.js b/lib/OpenLayers/Feature/Vector.js index 9cd1cd42a9..4e96ea6b53 100644 --- a/lib/OpenLayers/Feature/Vector.js +++ b/lib/OpenLayers/Feature/Vector.js @@ -297,7 +297,7 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { * Moves the feature and redraws it at its new location * * Parameters: - * state - {OpenLayers.LonLat or OpenLayers.Pixel} the + * location - {OpenLayers.LonLat or OpenLayers.Pixel} the * location to which to move the feature. */ move: function(location) { diff --git a/lib/OpenLayers/Filter/Comparison.js b/lib/OpenLayers/Filter/Comparison.js index 164bf6d4db..d0c864d4d6 100644 --- a/lib/OpenLayers/Filter/Comparison.js +++ b/lib/OpenLayers/Filter/Comparison.js @@ -11,7 +11,7 @@ * Class: OpenLayers.Filter.Comparison * This class represents a comparison filter. * - * Inherits from + * Inherits from: * - */ OpenLayers.Filter.Comparison = OpenLayers.Class(OpenLayers.Filter, { diff --git a/lib/OpenLayers/Filter/FeatureId.js b/lib/OpenLayers/Filter/FeatureId.js index 63d146958c..eaa297bd4a 100644 --- a/lib/OpenLayers/Filter/FeatureId.js +++ b/lib/OpenLayers/Filter/FeatureId.js @@ -13,7 +13,7 @@ * This class represents a ogc:FeatureId Filter, as being used for rule-based SLD * styling * - * Inherits from + * Inherits from: * - */ OpenLayers.Filter.FeatureId = OpenLayers.Class(OpenLayers.Filter, { diff --git a/lib/OpenLayers/Filter/Function.js b/lib/OpenLayers/Filter/Function.js index 9052253a28..9ee35ff7b3 100644 --- a/lib/OpenLayers/Filter/Function.js +++ b/lib/OpenLayers/Filter/Function.js @@ -14,7 +14,7 @@ * filters that can contain filter functions as values. * Nesting function as other functions parameter is supported. * - * Inherits from + * Inherits from: * - */ OpenLayers.Filter.Function = OpenLayers.Class(OpenLayers.Filter, { diff --git a/lib/OpenLayers/Filter/Logical.js b/lib/OpenLayers/Filter/Logical.js index ee4a23abe3..97fc2e2566 100644 --- a/lib/OpenLayers/Filter/Logical.js +++ b/lib/OpenLayers/Filter/Logical.js @@ -12,7 +12,7 @@ * Class: OpenLayers.Filter.Logical * This class represents ogc:And, ogc:Or and ogc:Not rules. * - * Inherits from + * Inherits from: * - */ OpenLayers.Filter.Logical = OpenLayers.Class(OpenLayers.Filter, { diff --git a/lib/OpenLayers/Filter/Spatial.js b/lib/OpenLayers/Filter/Spatial.js index 895188fb2f..7753505338 100644 --- a/lib/OpenLayers/Filter/Spatial.js +++ b/lib/OpenLayers/Filter/Spatial.js @@ -12,7 +12,7 @@ * This class represents a spatial filter. * Currently implemented: BBOX, DWithin and Intersects * - * Inherits from + * Inherits from: * - */ OpenLayers.Filter.Spatial = OpenLayers.Class(OpenLayers.Filter, { diff --git a/lib/OpenLayers/Format/ArcXML.js b/lib/OpenLayers/Format/ArcXML.js index 477a947312..a3b9e1dc07 100644 --- a/lib/OpenLayers/Format/ArcXML.js +++ b/lib/OpenLayers/Format/ArcXML.js @@ -17,7 +17,7 @@ * constructor. * * Inherits from: - * - + * - */ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { diff --git a/lib/OpenLayers/Format/Atom.js b/lib/OpenLayers/Format/Atom.js index 29bdf75a89..c0c2be5763 100644 --- a/lib/OpenLayers/Format/Atom.js +++ b/lib/OpenLayers/Format/Atom.js @@ -76,7 +76,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, { * doc - {Element} or {String} * * Returns: - * An Array of s + * Array() */ read: function(doc) { if (typeof doc == "string") { @@ -90,8 +90,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, { * Serialize or more feature nodes to Atom documents. * * Parameters: - * features - a single {} or an - * Array({}). + * features - {} or Array({}) * * Returns: * {String} an Atom entry document if passed one feature node, or a feed diff --git a/lib/OpenLayers/Format/Context.js b/lib/OpenLayers/Format/Context.js index 534c7f0225..a9fce65d92 100644 --- a/lib/OpenLayers/Format/Context.js +++ b/lib/OpenLayers/Format/Context.js @@ -10,6 +10,9 @@ /** * Class: OpenLayers.Format.Context * Base class for both Format.WMC and Format.OWSContext + * + * Inherits from: + * - */ OpenLayers.Format.Context = OpenLayers.Class(OpenLayers.Format.XML.VersionedOGC, { diff --git a/lib/OpenLayers/Format/Filter/v1_1_0.js b/lib/OpenLayers/Format/Filter/v1_1_0.js index 600fa0fa45..1527b36a49 100644 --- a/lib/OpenLayers/Format/Filter/v1_1_0.js +++ b/lib/OpenLayers/Format/Filter/v1_1_0.js @@ -19,7 +19,8 @@ * - writes matchCase attribute from comparison filters of type EQUAL_TO, * NOT_EQUAL_TO and LIKE. * - * Inherits from: + * Inherits from: + * - * - */ OpenLayers.Format.Filter.v1_1_0 = OpenLayers.Class( diff --git a/lib/OpenLayers/Format/GML.js b/lib/OpenLayers/Format/GML.js index a26602daa0..ebf4ee1d6e 100644 --- a/lib/OpenLayers/Format/GML.js +++ b/lib/OpenLayers/Format/GML.js @@ -20,7 +20,7 @@ * constructor. Supports the GML simple features profile. * * Inherits from: - * - + * - */ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { diff --git a/lib/OpenLayers/Format/GPX.js b/lib/OpenLayers/Format/GPX.js index f2de4ab9ff..d75e09ec72 100644 --- a/lib/OpenLayers/Format/GPX.js +++ b/lib/OpenLayers/Format/GPX.js @@ -311,7 +311,7 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, { * Builds a trkpt node given a point * * Parameters: - * line - {OpenLayers.Geometry.Point} + * point - {OpenLayers.Geometry.Point} * * Returns: * {DOMElement} A trkpt node diff --git a/lib/OpenLayers/Format/GeoJSON.js b/lib/OpenLayers/Format/GeoJSON.js index 6ea8a58711..c70779ce72 100644 --- a/lib/OpenLayers/Format/GeoJSON.js +++ b/lib/OpenLayers/Format/GeoJSON.js @@ -635,7 +635,7 @@ OpenLayers.Format.GeoJSON = OpenLayers.Class(OpenLayers.Format.JSON, { * Return an array of linestring arrays from a linestring. * * Parameters: - * linestring - {} + * multilinestring - {} * * Returns: * {Array} An array of linestring arrays representing diff --git a/lib/OpenLayers/Format/OSM.js b/lib/OpenLayers/Format/OSM.js index f0d70f94ba..48ef45ac91 100644 --- a/lib/OpenLayers/Format/OSM.js +++ b/lib/OpenLayers/Format/OSM.js @@ -87,7 +87,7 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { * Return a list of features from a OSM doc * Parameters: - * data - {Element} + * doc - {Element} * * Returns: * An Array of s @@ -176,7 +176,7 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { * Return the node items from a doc. * * Parameters: - * node - {DOMElement} node to parse tags from + * doc - {DOMElement} node to parse tags from */ getNodes: function(doc) { var node_list = doc.getElementsByTagName("node"); @@ -198,7 +198,7 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { * Return the way items from a doc. * * Parameters: - * node - {DOMElement} node to parse tags from + * doc - {DOMElement} node to parse tags from */ getWays: function(doc) { var way_list = doc.getElementsByTagName("way"); @@ -229,7 +229,7 @@ OpenLayers.Format.OSM = OpenLayers.Class(OpenLayers.Format.XML, { * Return the tags list attached to a specific DOM element. * * Parameters: - * node - {DOMElement} node to parse tags from + * dom_node - {DOMElement} node to parse tags from * interesting_tags - {Boolean} whether the return from this function should * return a boolean indicating that it has 'interesting tags' -- * tags like attribution and source are ignored. (To change the list diff --git a/lib/OpenLayers/Format/OWSCommon/v1.js b/lib/OpenLayers/Format/OWSCommon/v1.js index e076e35ebe..4abedd860b 100644 --- a/lib/OpenLayers/Format/OWSCommon/v1.js +++ b/lib/OpenLayers/Format/OWSCommon/v1.js @@ -10,6 +10,9 @@ /** * Class: OpenLayers.Format.OWSCommon.v1 * Common readers and writers for OWSCommon v1.X formats + * + * Inherits from: + * - */ OpenLayers.Format.OWSCommon.v1 = OpenLayers.Class(OpenLayers.Format.XML, { diff --git a/lib/OpenLayers/Format/OWSCommon/v1_0_0.js b/lib/OpenLayers/Format/OWSCommon/v1_0_0.js index 279e3556ab..ca4fe120ae 100644 --- a/lib/OpenLayers/Format/OWSCommon/v1_0_0.js +++ b/lib/OpenLayers/Format/OWSCommon/v1_0_0.js @@ -10,6 +10,9 @@ /** * Class: OpenLayers.Format.OWSCommon.v1_0_0 * Parser for OWS Common version 1.0.0. + * + * Inherits from: + * - */ OpenLayers.Format.OWSCommon.v1_0_0 = OpenLayers.Class(OpenLayers.Format.OWSCommon.v1, { diff --git a/lib/OpenLayers/Format/OWSCommon/v1_1_0.js b/lib/OpenLayers/Format/OWSCommon/v1_1_0.js index 1a40f9f067..acf29bf176 100644 --- a/lib/OpenLayers/Format/OWSCommon/v1_1_0.js +++ b/lib/OpenLayers/Format/OWSCommon/v1_1_0.js @@ -10,6 +10,9 @@ /** * Class: OpenLayers.Format.OWSCommon.v1_1_0 * Parser for OWS Common version 1.1.0. + * + * Inherits from: + * - */ OpenLayers.Format.OWSCommon.v1_1_0 = OpenLayers.Class(OpenLayers.Format.OWSCommon.v1, { diff --git a/lib/OpenLayers/Format/OWSContext.js b/lib/OpenLayers/Format/OWSContext.js index afe88380b1..6f6f5f2208 100644 --- a/lib/OpenLayers/Format/OWSContext.js +++ b/lib/OpenLayers/Format/OWSContext.js @@ -15,6 +15,9 @@ * Web Map Context (WMC), since it is more generic and more types of layers * can be stored. Also, nesting of layers is supported since version 0.3.1. * For more information see: http://www.ogcnetwork.net/context + * + * Inherits from: + * - */ OpenLayers.Format.OWSContext = OpenLayers.Class(OpenLayers.Format.Context,{ diff --git a/lib/OpenLayers/Format/OWSContext/v0_3_1.js b/lib/OpenLayers/Format/OWSContext/v0_3_1.js index 590161bb02..65024f0340 100644 --- a/lib/OpenLayers/Format/OWSContext/v0_3_1.js +++ b/lib/OpenLayers/Format/OWSContext/v0_3_1.js @@ -228,7 +228,7 @@ OpenLayers.Format.OWSContext.v0_3_1 = OpenLayers.Class(OpenLayers.Format.XML, { * * Parameters: * layerArray - {Array({Object})} Array of layerContext objects - * layerContext - {Object} layerContext object + * layer - {Object} layerContext object */ processLayer: function(layerArray, layer) { if (layer.layersContext) { diff --git a/lib/OpenLayers/Format/Text.js b/lib/OpenLayers/Format/Text.js index 6f17eb962c..c590ebf12d 100644 --- a/lib/OpenLayers/Format/Text.js +++ b/lib/OpenLayers/Format/Text.js @@ -69,7 +69,7 @@ OpenLayers.Format.Text = OpenLayers.Class(OpenLayers.Format, { * Return a list of features from a Tab Seperated Values text string. * * Parameters: - * data - {String} + * text - {String} * * Returns: * An Array of s diff --git a/lib/OpenLayers/Format/WKT.js b/lib/OpenLayers/Format/WKT.js index bf88d64a69..7230af2163 100644 --- a/lib/OpenLayers/Format/WKT.js +++ b/lib/OpenLayers/Format/WKT.js @@ -270,7 +270,7 @@ OpenLayers.Format.WKT = OpenLayers.Class(OpenLayers.Format, { /** * Return a multipoint feature given a multipoint WKT fragment. - * @param {String} A WKT fragment representing the multipoint + * @param {String} str A WKT fragment representing the multipoint * @returns {OpenLayers.Feature.Vector} A multipoint feature * @private */ @@ -289,7 +289,7 @@ OpenLayers.Format.WKT = OpenLayers.Class(OpenLayers.Format, { /** * Return a linestring feature given a linestring WKT fragment. - * @param {String} A WKT fragment representing the linestring + * @param {String} str A WKT fragment representing the linestring * @returns {OpenLayers.Feature.Vector} A linestring feature * @private */ @@ -306,7 +306,7 @@ OpenLayers.Format.WKT = OpenLayers.Class(OpenLayers.Format, { /** * Return a multilinestring feature given a multilinestring WKT fragment. - * @param {String} A WKT fragment representing the multilinestring + * @param {String} str A WKT fragment representing the multilinestring * @returns {OpenLayers.Feature.Vector} A multilinestring feature * @private */ @@ -325,7 +325,7 @@ OpenLayers.Format.WKT = OpenLayers.Class(OpenLayers.Format, { /** * Return a polygon feature given a polygon WKT fragment. - * @param {String} A WKT fragment representing the polygon + * @param {String} str A WKT fragment representing the polygon * @returns {OpenLayers.Feature.Vector} A polygon feature * @private */ @@ -346,7 +346,7 @@ OpenLayers.Format.WKT = OpenLayers.Class(OpenLayers.Format, { /** * Return a multipolygon feature given a multipolygon WKT fragment. - * @param {String} A WKT fragment representing the multipolygon + * @param {String} str A WKT fragment representing the multipolygon * @returns {OpenLayers.Feature.Vector} A multipolygon feature * @private */ @@ -365,7 +365,7 @@ OpenLayers.Format.WKT = OpenLayers.Class(OpenLayers.Format, { /** * Return an array of features given a geometrycollection WKT fragment. - * @param {String} A WKT fragment representing the geometrycollection + * @param {String} str A WKT fragment representing the geometrycollection * @returns {Array} An array of OpenLayers.Feature.Vector * @private */ diff --git a/lib/OpenLayers/Format/WMC.js b/lib/OpenLayers/Format/WMC.js index 9bea9290fb..2b56fc3428 100644 --- a/lib/OpenLayers/Format/WMC.js +++ b/lib/OpenLayers/Format/WMC.js @@ -13,7 +13,7 @@ * Read and write Web Map Context documents. * * Inherits from: - * - + * - */ OpenLayers.Format.WMC = OpenLayers.Class(OpenLayers.Format.Context, { @@ -37,7 +37,7 @@ OpenLayers.Format.WMC = OpenLayers.Class(OpenLayers.Format.Context, { * Create a layer context object given a wms layer object. * * Parameters: - * obj - {} The layer. + * layer - {} The layer. * * Returns: * {Object} A layer context object. diff --git a/lib/OpenLayers/Format/WMC/v1.js b/lib/OpenLayers/Format/WMC/v1.js index e39e67427b..e6eed09b44 100644 --- a/lib/OpenLayers/Format/WMC/v1.js +++ b/lib/OpenLayers/Format/WMC/v1.js @@ -1011,7 +1011,7 @@ OpenLayers.Format.WMC.v1 = OpenLayers.Class(OpenLayers.Format.XML, { * null or undefined, null will be returned. * * Parameters: - * object - {Object} An object. + * obj - {Object} An object. * prop - {String} A property. * * Returns: @@ -1143,7 +1143,7 @@ OpenLayers.Format.WMC.v1 = OpenLayers.Class(OpenLayers.Format.XML, { * Create a StyleList node given a layer context. * * Parameters: - * context - {Object} Layer context object. + * layer - {Object} Layer context object. * * Returns: * {Element} A WMC StyleList element node. diff --git a/lib/OpenLayers/Geometry.js b/lib/OpenLayers/Geometry.js index 384a8be445..888f73b83e 100644 --- a/lib/OpenLayers/Geometry.js +++ b/lib/OpenLayers/Geometry.js @@ -67,10 +67,11 @@ OpenLayers.Geometry = OpenLayers.Class({ }, /** + * Method: setBounds * Set the bounds for this Geometry. * * Parameters: - * object - {} + * bounds - {} */ setBounds: function(bounds) { if (bounds) { diff --git a/lib/OpenLayers/Geometry/Collection.js b/lib/OpenLayers/Geometry/Collection.js index 5004210ce9..dc02e162b5 100644 --- a/lib/OpenLayers/Geometry/Collection.js +++ b/lib/OpenLayers/Geometry/Collection.js @@ -22,7 +22,7 @@ * * Create a new instance with the constructor. * - * Inerhits from: + * Inherits from: * - */ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { @@ -468,7 +468,7 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { * are considered equivalent if all components have the same coordinates. * * Parameters: - * geom - {} The geometry to test. + * geometry - {} The geometry to test. * * Returns: * {Boolean} The supplied geometry is equivalent to this geometry. diff --git a/lib/OpenLayers/Geometry/MultiLineString.js b/lib/OpenLayers/Geometry/MultiLineString.js index 27386516a5..09bba30e57 100644 --- a/lib/OpenLayers/Geometry/MultiLineString.js +++ b/lib/OpenLayers/Geometry/MultiLineString.js @@ -42,7 +42,7 @@ OpenLayers.Geometry.MultiLineString = OpenLayers.Class( * Use this geometry (the source) to attempt to split a target geometry. * * Parameters: - * target - {} The target geometry. + * geometry - {} The target geometry. * options - {Object} Properties of this object will be used to determine * how the split is conducted. * diff --git a/lib/OpenLayers/Handler/Feature.js b/lib/OpenLayers/Handler/Feature.js index ef3597d2b1..402b8d66a8 100644 --- a/lib/OpenLayers/Handler/Feature.js +++ b/lib/OpenLayers/Handler/Feature.js @@ -16,6 +16,9 @@ * * This handler stops event propagation for mousedown and mouseup if those * browser events target features that can be selected. + * + * Inherits from: + * - */ OpenLayers.Handler.Feature = OpenLayers.Class(OpenLayers.Handler, { diff --git a/lib/OpenLayers/Layer/Bing.js b/lib/OpenLayers/Layer/Bing.js index 1d9faca2e2..92fe773bb4 100644 --- a/lib/OpenLayers/Layer/Bing.js +++ b/lib/OpenLayers/Layer/Bing.js @@ -21,6 +21,13 @@ */ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { + /** + * APIProperty: key + * {String} API key for Bing maps, get your own key + * at http://bingmapsportal.com/ . + */ + key: null, + /** * Property: serverResolutions * {Array} the resolutions provided by the Bing servers. @@ -82,7 +89,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { * (end) * * Parameters: - * config - {Object} Configuration properties for the layer. + * options - {Object} Configuration properties for the layer. * * Required configuration properties: * key - {String} Bing Maps API key for your application. Get one at diff --git a/lib/OpenLayers/Layer/GeoRSS.js b/lib/OpenLayers/Layer/GeoRSS.js index 968f61cf2a..f23822f7a7 100644 --- a/lib/OpenLayers/Layer/GeoRSS.js +++ b/lib/OpenLayers/Layer/GeoRSS.js @@ -15,7 +15,6 @@ * * Inherits from: * - - * - */ OpenLayers.Layer.GeoRSS = OpenLayers.Class(OpenLayers.Layer.Markers, { diff --git a/lib/OpenLayers/Layer/Image.js b/lib/OpenLayers/Layer/Image.js index d48567f8e9..23d4e1c7c1 100644 --- a/lib/OpenLayers/Layer/Image.js +++ b/lib/OpenLayers/Layer/Image.js @@ -12,7 +12,10 @@ * Class: OpenLayers.Layer.Image * Instances of OpenLayers.Layer.Image are used to display data from a web * accessible image as a map layer. Create a new image layer with the - * constructor. Inherits from . + * constructor. + * + * Inherits from: + * - */ OpenLayers.Layer.Image = OpenLayers.Class(OpenLayers.Layer, { diff --git a/lib/OpenLayers/Layer/Text.js b/lib/OpenLayers/Layer/Text.js index 33e413b84a..9f8cb78cf8 100644 --- a/lib/OpenLayers/Layer/Text.js +++ b/lib/OpenLayers/Layer/Text.js @@ -234,6 +234,9 @@ OpenLayers.Layer.Text = OpenLayers.Class(OpenLayers.Layer.Markers, { * * Parameters: * evt - {Event} + * + * Context: + * - {} */ markerClick: function(evt) { var sameMarkerClicked = (this == this.layer.selectedFeature); diff --git a/lib/OpenLayers/Renderer/Elements.js b/lib/OpenLayers/Renderer/Elements.js index 2def983f27..ca58bb8a3a 100644 --- a/lib/OpenLayers/Renderer/Elements.js +++ b/lib/OpenLayers/Renderer/Elements.js @@ -420,7 +420,9 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { * * Parameters: * containerID - {String} - * options - {Object} options for this renderer. Supported options are: + * options - {Object} options for this renderer. + * + * Supported options are: * * yOrdering - {Boolean} Whether to use y-ordering * * zIndexing - {Boolean} Whether to use z-indexing. Will be ignored * if yOrdering is set to true. diff --git a/lib/OpenLayers/StyleMap.js b/lib/OpenLayers/StyleMap.js index b1cc38a333..4b46336bc9 100644 --- a/lib/OpenLayers/StyleMap.js +++ b/lib/OpenLayers/StyleMap.js @@ -16,7 +16,7 @@ OpenLayers.StyleMap = OpenLayers.Class({ /** * Property: styles - * Hash of {}, keyed by names of well known + * {Object} Hash of {}, keyed by names of well known * rendering intents (e.g. "default", "temporary", "select", "delete"). */ styles: null, diff --git a/lib/OpenLayers/Tile.js b/lib/OpenLayers/Tile.js index f5afb7286c..81f6cb4e54 100644 --- a/lib/OpenLayers/Tile.js +++ b/lib/OpenLayers/Tile.js @@ -9,7 +9,7 @@ * @requires OpenLayers/Util.js */ -/* +/** * Class: OpenLayers.Tile * This is a class designed to designate a single tile, however * it is explicitly designed to do relatively little. Tiles store diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index 417edb5867..61ec5bc2c1 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -24,8 +24,9 @@ OpenLayers.Util = OpenLayers.Util || {}; * * Parameters: * e - {String or DOMElement or Window} + * * Return: - * {Array(DOMElement)} + * {Array(DOMElement) or DOMElement} */ OpenLayers.Util.getElement = function() { var elements = []; @@ -66,7 +67,7 @@ OpenLayers.Util.isElement = function(o) { * Parameters: * a - {Object} the object test. * - * Returns + * Returns: * {Boolean} true if the object is an array. */ OpenLayers.Util.isArray = function(a) { @@ -89,7 +90,7 @@ if(typeof window.$ === "undefined") { * array - {Array} * item - {Object} * - * Return + * Returns: * {Array} A reference to the array */ OpenLayers.Util.removeItem = function(array, item) { @@ -1310,10 +1311,12 @@ OpenLayers.Util.isEquivalentUrl = function(url1, url2, options) { * * Parameters: * url - {String} - * options - {Object} A hash of options. Can be one of: - * ignoreCase: lowercase url, - * ignorePort80: don't include explicit port if port is 80, - * ignoreHash: Don't include part of url after the hash (#). + * options - {Object} A hash of options. + * + * Options can be one of: + * ignoreCase - {Boolean} lowercase url, + * ignorePort80 - {Boolean} don't include explicit port if port is 80, + * ignoreHash - {Boolean} Don't include part of url after the hash (#). * * Returns: * {Object} An object with separate url, a, port, host, and args parsed out From 107edcf0e5aff7d7465fccca26cff6452a7b952d Mon Sep 17 00:00:00 2001 From: Xavier Mamano Date: Sat, 7 Jan 2012 20:07:07 +0100 Subject: [PATCH 04/26] Some minor documentation adjustments. --- lib/OpenLayers/Format/Atom.js | 2 +- lib/OpenLayers/Renderer/Elements.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/OpenLayers/Format/Atom.js b/lib/OpenLayers/Format/Atom.js index c0c2be5763..e984be1eab 100644 --- a/lib/OpenLayers/Format/Atom.js +++ b/lib/OpenLayers/Format/Atom.js @@ -76,7 +76,7 @@ OpenLayers.Format.Atom = OpenLayers.Class(OpenLayers.Format.XML, { * doc - {Element} or {String} * * Returns: - * Array() + * Array({}) */ read: function(doc) { if (typeof doc == "string") { diff --git a/lib/OpenLayers/Renderer/Elements.js b/lib/OpenLayers/Renderer/Elements.js index ca58bb8a3a..49b4ab6f26 100644 --- a/lib/OpenLayers/Renderer/Elements.js +++ b/lib/OpenLayers/Renderer/Elements.js @@ -423,8 +423,8 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, { * options - {Object} options for this renderer. * * Supported options are: - * * yOrdering - {Boolean} Whether to use y-ordering - * * zIndexing - {Boolean} Whether to use z-indexing. Will be ignored + * yOrdering - {Boolean} Whether to use y-ordering + * zIndexing - {Boolean} Whether to use z-indexing. Will be ignored * if yOrdering is set to true. */ initialize: function(containerID, options) { From f64dea59e8b5bb7bd8939783a91306be60586f19 Mon Sep 17 00:00:00 2001 From: Xavier Mamano Date: Sat, 7 Jan 2012 23:33:50 +0100 Subject: [PATCH 05/26] More details manually observed while reviewing documentation. --- lib/OpenLayers/Format/GML.js | 6 +++--- lib/OpenLayers/Format/WFS.js | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/OpenLayers/Format/GML.js b/lib/OpenLayers/Format/GML.js index ebf4ee1d6e..c55e6a7bb5 100644 --- a/lib/OpenLayers/Format/GML.js +++ b/lib/OpenLayers/Format/GML.js @@ -24,7 +24,7 @@ */ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { - /* + /** * APIProperty: featureNS * {String} Namespace used for feature attributes. Default is * "http://mapserver.gis.umn.edu/mapserver". @@ -38,13 +38,13 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { */ featurePrefix: "feature", - /* + /** * APIProperty: featureName * {String} Element name for features. Default is "featureMember". */ featureName: "featureMember", - /* + /** * APIProperty: layerName * {String} Name of data layer. Default is "features". */ diff --git a/lib/OpenLayers/Format/WFS.js b/lib/OpenLayers/Format/WFS.js index 50c604012b..860df0aa5f 100644 --- a/lib/OpenLayers/Format/WFS.js +++ b/lib/OpenLayers/Format/WFS.js @@ -20,20 +20,23 @@ OpenLayers.Format.WFS = OpenLayers.Class(OpenLayers.Format.GML, { /** * Property: layer + * {} */ layer: null, /** * APIProperty: wfsns + * {String} */ wfsns: "http://www.opengis.net/wfs", /** * Property: ogcns + * {String} */ ogcns: "http://www.opengis.net/ogc", - /* + /** * Constructor: OpenLayers.Format.WFS * Create a WFS-T formatter. This requires a layer: that layer should * have two properties: geometry_column and typename. The parser @@ -45,7 +48,6 @@ OpenLayers.Format.WFS = OpenLayers.Class(OpenLayers.Format.GML, { * options - {Object} * layer - {} */ - initialize: function(options, layer) { OpenLayers.Format.GML.prototype.initialize.apply(this, [options]); this.layer = layer; From 0296a46de8b46d06895c5c7ad9ccdc5a875b1357 Mon Sep 17 00:00:00 2001 From: Peter Robins Date: Sun, 8 Jan 2012 14:36:30 +0000 Subject: [PATCH 06/26] Control/Split should work w/o MultiLineString --- lib/OpenLayers/Control/Split.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/OpenLayers/Control/Split.js b/lib/OpenLayers/Control/Split.js index eec6dcc965..69c035e672 100644 --- a/lib/OpenLayers/Control/Split.js +++ b/lib/OpenLayers/Control/Split.js @@ -278,7 +278,7 @@ OpenLayers.Control.Split = OpenLayers.Class(OpenLayers.Control, { if(event.modified) { var feature = event.feature; if(feature.geometry instanceof OpenLayers.Geometry.LineString || - feature.geometry instanceof OpenLayers.Geometry.MultiLineString) { + (OpenLayers.Geometry.MultiLineString && feature.geometry instanceof OpenLayers.Geometry.MultiLineString)) { this.feature = event.feature; this.considerSplit(event.feature); } @@ -317,7 +317,7 @@ OpenLayers.Control.Split = OpenLayers.Class(OpenLayers.Control, { target.state !== OpenLayers.State.DELETE ) && ( target.geometry instanceof OpenLayers.Geometry.LineString || - target.geometry instanceof OpenLayers.Geometry.MultiLineString + (OpenLayers.Geometry.MultiLineString && target.geometry instanceof OpenLayers.Geometry.MultiLineString) ) && ( this.feature !== target ) && ( From 5f6bd6acee342317cdfe2714f8f359fd47de5096 Mon Sep 17 00:00:00 2001 From: Peter Robins Date: Sun, 8 Jan 2012 20:04:35 +0000 Subject: [PATCH 07/26] Revised version for checking geometry splittable --- lib/OpenLayers/Control/Split.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/OpenLayers/Control/Split.js b/lib/OpenLayers/Control/Split.js index 69c035e672..64a159ad29 100644 --- a/lib/OpenLayers/Control/Split.js +++ b/lib/OpenLayers/Control/Split.js @@ -277,8 +277,7 @@ OpenLayers.Control.Split = OpenLayers.Class(OpenLayers.Control, { afterFeatureModified: function(event) { if(event.modified) { var feature = event.feature; - if(feature.geometry instanceof OpenLayers.Geometry.LineString || - (OpenLayers.Geometry.MultiLineString && feature.geometry instanceof OpenLayers.Geometry.MultiLineString)) { + if (typeof feature.geometry.split === "function") { this.feature = event.feature; this.considerSplit(event.feature); } @@ -315,9 +314,7 @@ OpenLayers.Control.Split = OpenLayers.Class(OpenLayers.Control, { isEligible: function(target) { return ( target.state !== OpenLayers.State.DELETE - ) && ( - target.geometry instanceof OpenLayers.Geometry.LineString || - (OpenLayers.Geometry.MultiLineString && target.geometry instanceof OpenLayers.Geometry.MultiLineString) + ) && (typeof target.geometry.split === "function" ) && ( this.feature !== target ) && ( From 9453d0ce7cb621d23bcd2096cef62129c82cc0b0 Mon Sep 17 00:00:00 2001 From: Peter Robins Date: Sun, 8 Jan 2012 20:08:36 +0000 Subject: [PATCH 08/26] Revised version for checking geometry splittable --- lib/OpenLayers/Control/Split.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/OpenLayers/Control/Split.js b/lib/OpenLayers/Control/Split.js index 64a159ad29..26dc680800 100644 --- a/lib/OpenLayers/Control/Split.js +++ b/lib/OpenLayers/Control/Split.js @@ -314,7 +314,8 @@ OpenLayers.Control.Split = OpenLayers.Class(OpenLayers.Control, { isEligible: function(target) { return ( target.state !== OpenLayers.State.DELETE - ) && (typeof target.geometry.split === "function" + ) && ( + typeof target.geometry.split === "function" ) && ( this.feature !== target ) && ( From f4a6d4c7b2f101af7a6eb444facd603bdba60661 Mon Sep 17 00:00:00 2001 From: Xavier Mamano Date: Mon, 9 Jan 2012 00:30:53 +0100 Subject: [PATCH 09/26] Set key as property in Bing.js and many links as {<...>} --- lib/OpenLayers/Feature/Vector.js | 2 +- lib/OpenLayers/Format/ArcXML.js | 6 +++--- lib/OpenLayers/Format/GPX.js | 8 ++++---- lib/OpenLayers/Geometry/Collection.js | 2 +- lib/OpenLayers/Layer/Bing.js | 2 +- lib/OpenLayers/Util.js | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/OpenLayers/Feature/Vector.js b/lib/OpenLayers/Feature/Vector.js index 4e96ea6b53..b0e91009c4 100644 --- a/lib/OpenLayers/Feature/Vector.js +++ b/lib/OpenLayers/Feature/Vector.js @@ -297,7 +297,7 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, { * Moves the feature and redraws it at its new location * * Parameters: - * location - {OpenLayers.LonLat or OpenLayers.Pixel} the + * location - { or } the * location to which to move the feature. */ move: function(location) { diff --git a/lib/OpenLayers/Format/ArcXML.js b/lib/OpenLayers/Format/ArcXML.js index a3b9e1dc07..72ac2096c9 100644 --- a/lib/OpenLayers/Format/ArcXML.js +++ b/lib/OpenLayers/Format/ArcXML.js @@ -135,7 +135,7 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { * * Parameters: * imsize - {Object} An ArcXML imagesize object. - * olsize - {OpenLayers.Size} The image size to set. + * olsize - {} The image size to set. */ addImageSize: function(imsize, olsize) { if (olsize !== null) { @@ -152,7 +152,7 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { * * Parameters: * featOrFilt - {Object} A featurecoordsys or filtercoordsys ArcXML structure. - * fsys - {String} or {OpenLayers.Projection} or {filtercoordsys} or + * fsys - {String} or {} or {filtercoordsys} or * {featurecoordsys} A projection representation. If it's a {String}, * the value is assumed to be the SRID. If it's a {OpenLayers.Projection} * AND Proj4js is available, the projection number and name are extracted @@ -873,7 +873,7 @@ OpenLayers.Format.ArcXML = OpenLayers.Class(OpenLayers.Format.XML, { * node - {} An element to parse or arcxml data from. * * Returns: - * {OpenLayers.Geometry.LinearRing} A linear ring represented by the node's points. + * {} A linear ring represented by the node's points. */ parsePointGeometry: function(node) { var ringPoints = []; diff --git a/lib/OpenLayers/Format/GPX.js b/lib/OpenLayers/Format/GPX.js index d75e09ec72..c6a67f9953 100644 --- a/lib/OpenLayers/Format/GPX.js +++ b/lib/OpenLayers/Format/GPX.js @@ -281,7 +281,7 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, { * * Parameters: * trknode - * geometry - {OpenLayers.Geometry} + * geometry - {} */ buildTrkSegNode: function(geometry) { var node, @@ -311,7 +311,7 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, { * Builds a trkpt node given a point * * Parameters: - * point - {OpenLayers.Geometry.Point} + * point - {} * * Returns: * {DOMElement} A trkpt node @@ -328,7 +328,7 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, { * Builds a wpt node given a point * * Parameters: - * feature - {OpenLayers.Feature.Vector} + * feature - {} * * Returns: * {DOMElement} A wpt node @@ -347,7 +347,7 @@ OpenLayers.Format.GPX = OpenLayers.Class(OpenLayers.Format.XML, { * * Parameters: * node - {DOMElement} the node to append the attribute nodes to. - * feature - {OpenLayers.Feature.Vector} + * feature - {} */ appendAttributesNode: function(node, feature) { var name = this.createElementNS(this.gpxns, 'name'); diff --git a/lib/OpenLayers/Geometry/Collection.js b/lib/OpenLayers/Geometry/Collection.js index dc02e162b5..965c69e208 100644 --- a/lib/OpenLayers/Geometry/Collection.js +++ b/lib/OpenLayers/Geometry/Collection.js @@ -407,7 +407,7 @@ OpenLayers.Geometry.Collection = OpenLayers.Class(OpenLayers.Geometry, { * ratio - {Float} Optional x:y ratio for resizing. Default ratio is 1. * * Returns: - * {OpenLayers.Geometry} - The current geometry. + * {} - The current geometry. */ resize: function(scale, origin, ratio) { for(var i=0; i} */ OpenLayers.Util.getRenderedDimensions = function(contentHTML, size, options) { From 6fd4d2770046fe0c9c7426dc9500946bdb591c4b Mon Sep 17 00:00:00 2001 From: Xavier Mamano Date: Mon, 9 Jan 2012 00:35:54 +0100 Subject: [PATCH 10/26] Change docs to "Valid options:" in Util.createUrlObject --- lib/OpenLayers/Util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/OpenLayers/Util.js b/lib/OpenLayers/Util.js index 9b6a85712b..1cd37b6609 100644 --- a/lib/OpenLayers/Util.js +++ b/lib/OpenLayers/Util.js @@ -1313,7 +1313,7 @@ OpenLayers.Util.isEquivalentUrl = function(url1, url2, options) { * url - {String} * options - {Object} A hash of options. * - * Options can be one of: + * Valid options: * ignoreCase - {Boolean} lowercase url, * ignorePort80 - {Boolean} don't include explicit port if port is 80, * ignoreHash - {Boolean} Don't include part of url after the hash (#). From 0127806ee2100d65f136cec9b4449376883dfc58 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sun, 8 Jan 2012 21:14:17 -0500 Subject: [PATCH 11/26] Assert that split control works with no geometry. --- tests/Control/Split.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/Control/Split.html b/tests/Control/Split.html index a307bdd2c2..86af76c56d 100644 --- a/tests/Control/Split.html +++ b/tests/Control/Split.html @@ -141,7 +141,7 @@ function test_isEligible(t) { - t.plan(9); + t.plan(10); var control = new OpenLayers.Control.Split(); var geometry = OpenLayers.Geometry.fromWKT("LINESTRING(0 1, 1 2)"); @@ -176,6 +176,9 @@ control.targetFilter.value = "baz"; t.eq(control.isEligible(feature), true, "feature is eligible if it matches filter"); + delete feature.geometry; + t.eq(control.isEligible(feature), false, "feature with no geometry is not eligible"); + control.destroy(); } From a6be4a4b6c549a9dfa4e7e9c6712d240252c66ae Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Mon, 9 Jan 2012 09:29:15 +0100 Subject: [PATCH 12/26] start with the patch from OL Trac ticket 2133 --- lib/OpenLayers.js | 2 + lib/OpenLayers/Protocol.js | 8 ++ lib/OpenLayers/Protocol/CSW.js | 32 ++++++ lib/OpenLayers/Protocol/CSW/v2_0_2.js | 145 ++++++++++++++++++++++++++ tests/Protocol/CSW.html | 85 +++++++++++++++ tests/list-tests.html | 1 + 6 files changed, 273 insertions(+) create mode 100644 lib/OpenLayers/Protocol/CSW.js create mode 100644 lib/OpenLayers/Protocol/CSW/v2_0_2.js create mode 100644 tests/Protocol/CSW.html diff --git a/lib/OpenLayers.js b/lib/OpenLayers.js index aaf8a51104..571bee67f7 100644 --- a/lib/OpenLayers.js +++ b/lib/OpenLayers.js @@ -242,6 +242,8 @@ "OpenLayers/Protocol/WFS/v1.js", "OpenLayers/Protocol/WFS/v1_0_0.js", "OpenLayers/Protocol/WFS/v1_1_0.js", + "OpenLayers/Protocol/CSW.js", + "OpenLayers/Protocol/CSW/v2_0_2.js", "OpenLayers/Protocol/Script.js", "OpenLayers/Protocol/SOS.js", "OpenLayers/Protocol/SOS/v1_0_0.js", diff --git a/lib/OpenLayers/Protocol.js b/lib/OpenLayers/Protocol.js index 601e59548c..0f359a874b 100644 --- a/lib/OpenLayers/Protocol.js +++ b/lib/OpenLayers/Protocol.js @@ -235,6 +235,14 @@ OpenLayers.Protocol.Response = OpenLayers.Class({ */ features: null, + /** + * Property: data + * The data returned in the response by the server. + * FIXME : as far as the response doesn't necessary transport features + * it may be helpful to store some non-specific data. + */ + data: null, + /** * Property: reqFeatures * {Array({})} or {} diff --git a/lib/OpenLayers/Protocol/CSW.js b/lib/OpenLayers/Protocol/CSW.js new file mode 100644 index 0000000000..2361fd6bbf --- /dev/null +++ b/lib/OpenLayers/Protocol/CSW.js @@ -0,0 +1,32 @@ +/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD + * license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + +/** + * @requires OpenLayers/Protocol.js + */ + +/** + * Class: OpenLayers.Protocol.CSW + * Used to create a versioned CSW protocol. Default version is 2.0.2. + * + * Inherits from: + * - + */ +OpenLayers.Protocol.CSW = function(options) { + options = OpenLayers.Util.applyDefaults( + options, OpenLayers.Protocol.CSW.DEFAULTS + ); + var cls = OpenLayers.Protocol.CSW["v"+options.version.replace(/\./g, "_")]; + if(!cls) { + throw "Unsupported CSW version: " + options.version; + } + return new cls(options); +}; + +/** + * Constant: OpenLayers.Protocol.CSW.DEFAULTS + */ +OpenLayers.Protocol.CSW.DEFAULTS = { + "version": "2.0.2" +}; \ No newline at end of file diff --git a/lib/OpenLayers/Protocol/CSW/v2_0_2.js b/lib/OpenLayers/Protocol/CSW/v2_0_2.js new file mode 100644 index 0000000000..6c6c2643ca --- /dev/null +++ b/lib/OpenLayers/Protocol/CSW/v2_0_2.js @@ -0,0 +1,145 @@ +/** + * @requires OpenLayers/Protocol/CSW.js + */ + +/** + * Class: OpenLayers.Protocol.CSW.v2_0_2 + * Abstract class for for v2_0_2 protocol. + * + * Inherits from: + * - + */ +OpenLayers.Protocol.CSW.v2_0_2 = OpenLayers.Class(OpenLayers.Protocol, { + + /** + * Property: formatOptions + * {Object} Optional options for the format. If a format is not provided, + * this property can be used to extend the default format options. + */ + formatOptions: null, + + /** + * Constructor: OpenLayers.Protocol.CSW + * A class for CSW protocol management. + * + * Parameters: + * options - {Object} Optional object whose properties will be set on the + * instance. + */ + initialize: function(options) { + OpenLayers.Protocol.prototype.initialize.apply(this, [options]); + if(!options.format) { + /* not tested */ + this.format = new OpenLayers.Format.CSWGetRecords.v2_0_2(OpenLayers.Util.extend({ + }, this.formatOptions)); + } + }, + + /** + * APIMethod: destroy + * Clean up the protocol. + */ + destroy: function() { + if(this.options && !this.options.format) { + this.format.destroy(); + } + this.format = null; + OpenLayers.Protocol.prototype.destroy.apply(this); + }, + + /** + * Method: createCallback + * Returns a function that applies the given public method with resp and + * options arguments. + * + * Parameters: + * method - {Function} The method to be applied by the callback. + * response - {} The protocol response object. + * options - {Object} Options sent to the protocol method (read, create, + * update, or delete). + */ + createCallback: function(method, response, options) { + return OpenLayers.Function.bind(function() { + method.apply(this, [response, options]); + }, this); + }, + + /** + * Method: read + * Construct a request for reading new features. Since WFS splits the + * basic CRUD operations into GetFeature requests (for read) and + * Transactions (for all others), this method does not make use of the + * format's read method (that is only about reading transaction + * responses). + */ + read: function(options) { + options = OpenLayers.Util.extend({}, options); + OpenLayers.Util.applyDefaults(options, this.options || {}); + var response = new OpenLayers.Protocol.Response({requestType: "read"}); + + var data = this.format.write(options.params); + + response.priv = OpenLayers.Request.POST({ + url: options.url, + callback: this.createCallback(this.handleRead, response, options), + params: options.params, + headers: options.headers, + data: data + }); + + return response; + }, + + /** + * Method: handleRead + * Deal with response from the read request. + * + * Parameters: + * response - {} The response object to pass + * to the user callback. + * This response is given a code property, and optionally a records one. + * The latter represents the CSW records as returned by the call to + * the CSW format read method. + * options - {Object} The user options passed to the read call. + */ + handleRead: function(response, options) { + if(options.callback) { + var request = response.priv; + if(request.status >= 200 && request.status < 300) { + // success + response.data = this.parseData(request); + response.code = OpenLayers.Protocol.Response.SUCCESS; + } else { + // failure + response.code = OpenLayers.Protocol.Response.FAILURE; + } + + options.callback.call(options.scope, response); + }; + }, + + /** + * Method: parseData + * Read HTTP response body and return records + * + * Parameters: + * request - {XMLHttpRequest} The request object + * + * Returns: + * {Object} The CSW records as returned by the call to the format read method. + */ + parseData: function(request) { + var doc = request.responseXML; + if(!doc || !doc.documentElement) { + doc = request.responseText; + } + if(!doc || doc.length <= 0) { + return null; + } + + return this.format.read(doc); + }, + + CLASS_NAME: "OpenLayers.Protocol.CSW.v2_0_2" + +}); \ No newline at end of file diff --git a/tests/Protocol/CSW.html b/tests/Protocol/CSW.html new file mode 100644 index 0000000000..96a673da6b --- /dev/null +++ b/tests/Protocol/CSW.html @@ -0,0 +1,85 @@ + + + + + + +
+
+ + \ No newline at end of file diff --git a/tests/list-tests.html b/tests/list-tests.html index db4a56faaf..24f0f36199 100644 --- a/tests/list-tests.html +++ b/tests/list-tests.html @@ -185,6 +185,7 @@
  • Protocol/HTTP.html
  • Protocol/Script.html
  • Protocol/WFS.html
  • +
  • Protocol/CSW.html
  • Protocol/SOS.html
  • Renderer.html
  • Renderer/Canvas.html
  • From 41370b3eb72ea2f3b4e45d172980149698db3bc5 Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Mon, 9 Jan 2012 09:57:32 +0100 Subject: [PATCH 13/26] fix up broken test --- tests/Protocol/CSW.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/Protocol/CSW.html b/tests/Protocol/CSW.html index 96a673da6b..cd2926c9f3 100644 --- a/tests/Protocol/CSW.html +++ b/tests/Protocol/CSW.html @@ -40,6 +40,7 @@ "resultType": "results", "maxRecords": 100, "Query": { + "typeNames": "gmd:MD_Metadata", "ElementSetName": { "value": "full" } @@ -82,4 +83,4 @@ --> - \ No newline at end of file + From ab49a195e39105fe9577a4b58f8061abf73df973 Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Mon, 9 Jan 2012 10:07:26 +0100 Subject: [PATCH 14/26] update copyright --- lib/OpenLayers/Protocol/CSW.js | 7 ++++--- lib/OpenLayers/Protocol/CSW/v2_0_2.js | 9 +++++++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/OpenLayers/Protocol/CSW.js b/lib/OpenLayers/Protocol/CSW.js index 2361fd6bbf..5c7e215883 100644 --- a/lib/OpenLayers/Protocol/CSW.js +++ b/lib/OpenLayers/Protocol/CSW.js @@ -1,5 +1,6 @@ -/* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD - * license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the +/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the * full text of the license. */ /** @@ -29,4 +30,4 @@ OpenLayers.Protocol.CSW = function(options) { */ OpenLayers.Protocol.CSW.DEFAULTS = { "version": "2.0.2" -}; \ No newline at end of file +}; diff --git a/lib/OpenLayers/Protocol/CSW/v2_0_2.js b/lib/OpenLayers/Protocol/CSW/v2_0_2.js index 6c6c2643ca..31295fea70 100644 --- a/lib/OpenLayers/Protocol/CSW/v2_0_2.js +++ b/lib/OpenLayers/Protocol/CSW/v2_0_2.js @@ -1,3 +1,8 @@ +/* Copyright (c) 2006-2012 by OpenLayers Contributors (see authors.txt for + * full list of contributors). Published under the Clear BSD license. + * See http://svn.openlayers.org/trunk/openlayers/license.txt for the + * full text of the license. */ + /** * @requires OpenLayers/Protocol/CSW.js */ @@ -115,7 +120,7 @@ OpenLayers.Protocol.CSW.v2_0_2 = OpenLayers.Class(OpenLayers.Protocol, { } options.callback.call(options.scope, response); - }; + } }, /** @@ -142,4 +147,4 @@ OpenLayers.Protocol.CSW.v2_0_2 = OpenLayers.Class(OpenLayers.Protocol, { CLASS_NAME: "OpenLayers.Protocol.CSW.v2_0_2" -}); \ No newline at end of file +}); From 476d43857839ed7d5a20c033f11ff5b4bb6be6d2 Mon Sep 17 00:00:00 2001 From: Bart van den Eijnden Date: Mon, 9 Jan 2012 10:27:44 +0100 Subject: [PATCH 15/26] minor doc adjustments and a bit more test coverage --- lib/OpenLayers/Protocol/CSW.js | 5 +---- lib/OpenLayers/Protocol/CSW/v2_0_2.js | 18 ++++++------------ tests/Protocol/CSW.html | 8 ++++++-- 3 files changed, 13 insertions(+), 18 deletions(-) diff --git a/lib/OpenLayers/Protocol/CSW.js b/lib/OpenLayers/Protocol/CSW.js index 5c7e215883..11703d9ffb 100644 --- a/lib/OpenLayers/Protocol/CSW.js +++ b/lib/OpenLayers/Protocol/CSW.js @@ -9,10 +9,7 @@ /** * Class: OpenLayers.Protocol.CSW - * Used to create a versioned CSW protocol. Default version is 2.0.2. - * - * Inherits from: - * - + * Used to create a versioned CSW protocol. Default version is 2.0.2. */ OpenLayers.Protocol.CSW = function(options) { options = OpenLayers.Util.applyDefaults( diff --git a/lib/OpenLayers/Protocol/CSW/v2_0_2.js b/lib/OpenLayers/Protocol/CSW/v2_0_2.js index 31295fea70..74418f3acd 100644 --- a/lib/OpenLayers/Protocol/CSW/v2_0_2.js +++ b/lib/OpenLayers/Protocol/CSW/v2_0_2.js @@ -5,11 +5,12 @@ /** * @requires OpenLayers/Protocol/CSW.js + * @requires OpenLayers/Format/CSWGetRecords/v2_0_2.js */ /** * Class: OpenLayers.Protocol.CSW.v2_0_2 - * Abstract class for for v2_0_2 protocol. + * CS-W (Catalogue services for the Web) version 2.0.2 protocol. * * Inherits from: * - @@ -24,8 +25,8 @@ OpenLayers.Protocol.CSW.v2_0_2 = OpenLayers.Class(OpenLayers.Protocol, { formatOptions: null, /** - * Constructor: OpenLayers.Protocol.CSW - * A class for CSW protocol management. + * Constructor: OpenLayers.Protocol.CSW.v2_0_2 + * A class for CSW version 2.0.2 protocol management. * * Parameters: * options - {Object} Optional object whose properties will be set on the @@ -34,7 +35,6 @@ OpenLayers.Protocol.CSW.v2_0_2 = OpenLayers.Class(OpenLayers.Protocol, { initialize: function(options) { OpenLayers.Protocol.prototype.initialize.apply(this, [options]); if(!options.format) { - /* not tested */ this.format = new OpenLayers.Format.CSWGetRecords.v2_0_2(OpenLayers.Util.extend({ }, this.formatOptions)); } @@ -71,11 +71,7 @@ OpenLayers.Protocol.CSW.v2_0_2 = OpenLayers.Class(OpenLayers.Protocol, { /** * Method: read - * Construct a request for reading new features. Since WFS splits the - * basic CRUD operations into GetFeature requests (for read) and - * Transactions (for all others), this method does not make use of the - * format's read method (that is only about reading transaction - * responses). + * Construct a request for reading new records from the Catalogue. */ read: function(options) { options = OpenLayers.Util.extend({}, options); @@ -102,7 +98,7 @@ OpenLayers.Protocol.CSW.v2_0_2 = OpenLayers.Class(OpenLayers.Protocol, { * Parameters: * response - {} The response object to pass * to the user callback. - * This response is given a code property, and optionally a records one. + * This response is given a code property, and optionally a data property. * The latter represents the CSW records as returned by the call to * the CSW format read method. * options - {Object} The user options passed to the read call. @@ -118,7 +114,6 @@ OpenLayers.Protocol.CSW.v2_0_2 = OpenLayers.Class(OpenLayers.Protocol, { // failure response.code = OpenLayers.Protocol.Response.FAILURE; } - options.callback.call(options.scope, response); } }, @@ -141,7 +136,6 @@ OpenLayers.Protocol.CSW.v2_0_2 = OpenLayers.Class(OpenLayers.Protocol, { if(!doc || doc.length <= 0) { return null; } - return this.format.read(doc); }, diff --git a/tests/Protocol/CSW.html b/tests/Protocol/CSW.html index cd2926c9f3..11b4b5e997 100644 --- a/tests/Protocol/CSW.html +++ b/tests/Protocol/CSW.html @@ -4,11 +4,15 @@