[OpenLayers-Commits] r11421 - in sandbox/tschaub/canvas: . build doc examples examples/img lib lib/OpenLayers lib/OpenLayers/BaseTypes lib/OpenLayers/Control lib/OpenLayers/Feature lib/OpenLayers/Filter lib/OpenLayers/Format lib/OpenLayers/Format/ArcXML lib/OpenLayers/Format/CSWGetDomain lib/OpenLayers/Format/CSWGetRecords lib/OpenLayers/Format/Filter lib/OpenLayers/Format/GML lib/OpenLayers/Format/OWSCommon lib/OpenLayers/Format/OWSContext lib/OpenLayers/Format/SLD lib/OpenLayers/Format/SOSCapabilities lib/OpenLayers/Format/WFSCapabilities lib/OpenLayers/Format/WFST lib/OpenLayers/Format/WMC lib/OpenLayers/Format/WMSCapabilities lib/OpenLayers/Format/WMSDescribeLayer lib/OpenLayers/Format/WMTSCapabilities lib/OpenLayers/Geometry lib/OpenLayers/Handler lib/OpenLayers/Lang lib/OpenLayers/Layer lib/OpenLayers/Layer/Google lib/OpenLayers/Layer/MapServer lib/OpenLayers/Layer/Vector lib/OpenLayers/Layer/WMS lib/OpenLayers/Marker lib/OpenLayers/Popup lib/OpenLayers/Protocol lib/OpenLayers/Prot ocol/SOS lib/OpenLayers/Protocol/SQL lib/OpenLayers/Protocol/WFS lib/OpenLayers/Renderer lib/OpenLayers/Request lib/OpenLayers/Strategy lib/OpenLayers/Symbolizer lib/OpenLayers/Tile lib/OpenLayers/Tile/Image lib/Rico tests tests/BaseTypes tests/Control tests/Feature tests/Filter tests/Format tests/Format/ArcXML tests/Format/CSWGetDomain tests/Format/CSWGetRecords tests/Format/Filter tests/Format/GML tests/Format/OWSContext tests/Format/SLD tests/Format/SOSCapabilities tests/Format/WFSCapabilities tests/Format/WFST tests/Format/WMC tests/Format/WMSCapabilities tests/Format/WMTSCapabilities tests/Geometry tests/Handler tests/Layer tests/Layer/Google tests/Layer/Vector tests/Layer/WMS tests/Marker tests/Popup tests/Protocol tests/Protocol/SQL tests/Renderer tests/Request tests/Strategy tests/Symbolizer tests/Tile tests/Tile/Image tests/manual theme/default tools

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Thu Feb 24 10:01:55 EST 2011


Author: bbinet
Date: 2011-02-24 07:01:55 -0800 (Thu, 24 Feb 2011)
New Revision: 11421

Added:
   sandbox/tschaub/canvas/build/tests.cfg
   sandbox/tschaub/canvas/examples/anchor-permalink.html
   sandbox/tschaub/canvas/examples/anchor-permalink.js
   sandbox/tschaub/canvas/examples/bing-tiles.html
   sandbox/tschaub/canvas/examples/bing-tiles.js
   sandbox/tschaub/canvas/examples/browser.html
   sandbox/tschaub/canvas/examples/browser.js
   sandbox/tschaub/canvas/examples/cql-format.html
   sandbox/tschaub/canvas/examples/cql-format.js
   sandbox/tschaub/canvas/examples/donut.html
   sandbox/tschaub/canvas/examples/donut.js
   sandbox/tschaub/canvas/examples/fullScreen.js
   sandbox/tschaub/canvas/examples/geolocation.html
   sandbox/tschaub/canvas/examples/geolocation.js
   sandbox/tschaub/canvas/examples/graphic-name.js
   sandbox/tschaub/canvas/examples/img/
   sandbox/tschaub/canvas/examples/img/marker_shadow.png
   sandbox/tschaub/canvas/examples/img/mobile-zoombar.png
   sandbox/tschaub/canvas/examples/img/popupMatrix.jpg
   sandbox/tschaub/canvas/examples/img/small.jpg
   sandbox/tschaub/canvas/examples/img/thinlong.jpg
   sandbox/tschaub/canvas/examples/img/widelong.jpg
   sandbox/tschaub/canvas/examples/img/wideshort.jpg
   sandbox/tschaub/canvas/examples/kinetic.html
   sandbox/tschaub/canvas/examples/kinetic.js
   sandbox/tschaub/canvas/examples/kml-layer.js
   sandbox/tschaub/canvas/examples/mobile-jq.html
   sandbox/tschaub/canvas/examples/mobile-navigation.html
   sandbox/tschaub/canvas/examples/mobile-navigation.js
   sandbox/tschaub/canvas/examples/mobile-sencha.html
   sandbox/tschaub/canvas/examples/mobile.html
   sandbox/tschaub/canvas/examples/mobile.js
   sandbox/tschaub/canvas/examples/simplify-linestring.html
   sandbox/tschaub/canvas/examples/simplify-linestring.js
   sandbox/tschaub/canvas/examples/single-tile.html
   sandbox/tschaub/canvas/examples/single-tile.js
   sandbox/tschaub/canvas/examples/style.mobile.css
   sandbox/tschaub/canvas/examples/tile-origin.html
   sandbox/tschaub/canvas/examples/tile-origin.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/Geolocate.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/TouchNavigation.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/CQL.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js
   sandbox/tschaub/canvas/lib/OpenLayers/Handler/Pinch.js
   sandbox/tschaub/canvas/lib/OpenLayers/Kinetic.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/Bing.js
   sandbox/tschaub/canvas/tests/Control/ArgParser.html
   sandbox/tschaub/canvas/tests/Control/Geolocate.html
   sandbox/tschaub/canvas/tests/Control/TouchNavigation.html
   sandbox/tschaub/canvas/tests/Format/CQL.html
   sandbox/tschaub/canvas/tests/Format/WMSCapabilities/v1_1_1_WMSC.html
   sandbox/tschaub/canvas/tests/Handler/Box.html
   sandbox/tschaub/canvas/tests/Handler/Pinch.html
   sandbox/tschaub/canvas/tests/Kinetic.html
   sandbox/tschaub/canvas/tests/Layer/Bing.html
   sandbox/tschaub/canvas/tests/OLLoader.js
   sandbox/tschaub/canvas/tests/OpenLayers4.html
   sandbox/tschaub/canvas/tests/OpenLayersJsFiles.html
   sandbox/tschaub/canvas/tests/manual/google-v3-resize.html
   sandbox/tschaub/canvas/tests/manual/page-position.html
Removed:
   sandbox/tschaub/canvas/examples/img/marker_shadow.png
   sandbox/tschaub/canvas/examples/img/mobile-zoombar.png
   sandbox/tschaub/canvas/examples/img/popupMatrix.jpg
   sandbox/tschaub/canvas/examples/img/small.jpg
   sandbox/tschaub/canvas/examples/img/thinlong.jpg
   sandbox/tschaub/canvas/examples/img/widelong.jpg
   sandbox/tschaub/canvas/examples/img/wideshort.jpg
   sandbox/tschaub/canvas/examples/marker_shadow.png
   sandbox/tschaub/canvas/examples/notile.html
   sandbox/tschaub/canvas/examples/popupMatrix.jpg
   sandbox/tschaub/canvas/examples/small.jpg
   sandbox/tschaub/canvas/examples/thinlong.jpg
   sandbox/tschaub/canvas/examples/widelong.jpg
   sandbox/tschaub/canvas/examples/wideshort.jpg
Modified:
   sandbox/tschaub/canvas/
   sandbox/tschaub/canvas/build/build.py
   sandbox/tschaub/canvas/build/full.cfg
   sandbox/tschaub/canvas/build/library.cfg
   sandbox/tschaub/canvas/build/license.txt
   sandbox/tschaub/canvas/build/lite.cfg
   sandbox/tschaub/canvas/doc/authors.txt
   sandbox/tschaub/canvas/examples/GMLParser.html
   sandbox/tschaub/canvas/examples/KMLParser.html
   sandbox/tschaub/canvas/examples/SLDSelect.html
   sandbox/tschaub/canvas/examples/WMSDescribeLayerParser.html
   sandbox/tschaub/canvas/examples/WMSPost.html
   sandbox/tschaub/canvas/examples/accessible.html
   sandbox/tschaub/canvas/examples/all-overlays-google.html
   sandbox/tschaub/canvas/examples/all-overlays.html
   sandbox/tschaub/canvas/examples/animated_panning.html
   sandbox/tschaub/canvas/examples/arcgis93rest.html
   sandbox/tschaub/canvas/examples/arcims-thematic.html
   sandbox/tschaub/canvas/examples/arcims.html
   sandbox/tschaub/canvas/examples/attribution.html
   sandbox/tschaub/canvas/examples/baseLayers.html
   sandbox/tschaub/canvas/examples/behavior-fixed-http-gml.html
   sandbox/tschaub/canvas/examples/bing.html
   sandbox/tschaub/canvas/examples/boxes-vector.html
   sandbox/tschaub/canvas/examples/boxes.html
   sandbox/tschaub/canvas/examples/browser-name.html
   sandbox/tschaub/canvas/examples/buffer.html
   sandbox/tschaub/canvas/examples/canvas.html
   sandbox/tschaub/canvas/examples/click-handler.html
   sandbox/tschaub/canvas/examples/click.html
   sandbox/tschaub/canvas/examples/controls.html
   sandbox/tschaub/canvas/examples/custom-control-point.html
   sandbox/tschaub/canvas/examples/custom-control.html
   sandbox/tschaub/canvas/examples/custom-style.html
   sandbox/tschaub/canvas/examples/debug.html
   sandbox/tschaub/canvas/examples/document-drag.html
   sandbox/tschaub/canvas/examples/doubleSetCenter.html
   sandbox/tschaub/canvas/examples/drag-feature.html
   sandbox/tschaub/canvas/examples/draw-feature.html
   sandbox/tschaub/canvas/examples/dynamic-text-layer.html
   sandbox/tschaub/canvas/examples/editingtoolbar-outside.html
   sandbox/tschaub/canvas/examples/editingtoolbar.html
   sandbox/tschaub/canvas/examples/events.html
   sandbox/tschaub/canvas/examples/example-list.html
   sandbox/tschaub/canvas/examples/example.html
   sandbox/tschaub/canvas/examples/filter-strategy.html
   sandbox/tschaub/canvas/examples/filter.html
   sandbox/tschaub/canvas/examples/fractional-zoom.html
   sandbox/tschaub/canvas/examples/fullScreen.html
   sandbox/tschaub/canvas/examples/geojson.html
   sandbox/tschaub/canvas/examples/georss-flickr.html
   sandbox/tschaub/canvas/examples/georss-markers.html
   sandbox/tschaub/canvas/examples/georss.html
   sandbox/tschaub/canvas/examples/getfeature-wfs.html
   sandbox/tschaub/canvas/examples/getfeatureinfo-control.html
   sandbox/tschaub/canvas/examples/getfeatureinfo-popup.html
   sandbox/tschaub/canvas/examples/getfeatureinfo.html
   sandbox/tschaub/canvas/examples/gml-layer.html
   sandbox/tschaub/canvas/examples/google-reproject.html
   sandbox/tschaub/canvas/examples/google-v3-alloverlays.html
   sandbox/tschaub/canvas/examples/google-v3.html
   sandbox/tschaub/canvas/examples/google-v3.js
   sandbox/tschaub/canvas/examples/google.html
   sandbox/tschaub/canvas/examples/graphic-name.html
   sandbox/tschaub/canvas/examples/graticule.html
   sandbox/tschaub/canvas/examples/gutter.html
   sandbox/tschaub/canvas/examples/highlight-feature.html
   sandbox/tschaub/canvas/examples/hover-handler.html
   sandbox/tschaub/canvas/examples/image-layer.html
   sandbox/tschaub/canvas/examples/intersects.html
   sandbox/tschaub/canvas/examples/kamap.html
   sandbox/tschaub/canvas/examples/kml-layer.html
   sandbox/tschaub/canvas/examples/kml-track.html
   sandbox/tschaub/canvas/examples/late-render.html
   sandbox/tschaub/canvas/examples/layer-opacity.html
   sandbox/tschaub/canvas/examples/layerLoadMonitoring.html
   sandbox/tschaub/canvas/examples/layerswitcher.html
   sandbox/tschaub/canvas/examples/lite.html
   sandbox/tschaub/canvas/examples/mapguide.html
   sandbox/tschaub/canvas/examples/mapserver.html
   sandbox/tschaub/canvas/examples/mapserver_untiled.html
   sandbox/tschaub/canvas/examples/marker-shadow.html
   sandbox/tschaub/canvas/examples/markerResize.html
   sandbox/tschaub/canvas/examples/markers.html
   sandbox/tschaub/canvas/examples/markersTextLayer.html
   sandbox/tschaub/canvas/examples/measure.html
   sandbox/tschaub/canvas/examples/mm.html
   sandbox/tschaub/canvas/examples/modify-feature.html
   sandbox/tschaub/canvas/examples/mouse-position.html
   sandbox/tschaub/canvas/examples/mousewheel-interval.html
   sandbox/tschaub/canvas/examples/multimap-mercator.html
   sandbox/tschaub/canvas/examples/multiserver.html
   sandbox/tschaub/canvas/examples/mvs.html
   sandbox/tschaub/canvas/examples/navigation-control.html
   sandbox/tschaub/canvas/examples/navigation-history.html
   sandbox/tschaub/canvas/examples/navtoolbar-alwaysZoom.html
   sandbox/tschaub/canvas/examples/navtoolbar-outsidemap.html
   sandbox/tschaub/canvas/examples/navtoolbar.html
   sandbox/tschaub/canvas/examples/ordering.html
   sandbox/tschaub/canvas/examples/osm-google.html
   sandbox/tschaub/canvas/examples/osm-layer.html
   sandbox/tschaub/canvas/examples/osm.html
   sandbox/tschaub/canvas/examples/outOfRangeMarkers.html
   sandbox/tschaub/canvas/examples/overviewmap.html
   sandbox/tschaub/canvas/examples/pan-zoom-panels.html
   sandbox/tschaub/canvas/examples/panel.html
   sandbox/tschaub/canvas/examples/point-track-markers.html
   sandbox/tschaub/canvas/examples/popupMatrix.html
   sandbox/tschaub/canvas/examples/popups.html
   sandbox/tschaub/canvas/examples/projected-map.html
   sandbox/tschaub/canvas/examples/protocol-gears.html
   sandbox/tschaub/canvas/examples/proxy.cgi
   sandbox/tschaub/canvas/examples/regular-polygons.html
   sandbox/tschaub/canvas/examples/resize-features.html
   sandbox/tschaub/canvas/examples/restricted-extent.html
   sandbox/tschaub/canvas/examples/rotate-features.html
   sandbox/tschaub/canvas/examples/select-feature-multilayer.html
   sandbox/tschaub/canvas/examples/select-feature-openpopup.html
   sandbox/tschaub/canvas/examples/select-feature.html
   sandbox/tschaub/canvas/examples/setextent.html
   sandbox/tschaub/canvas/examples/sld-parser.html
   sandbox/tschaub/canvas/examples/sld.html
   sandbox/tschaub/canvas/examples/snap-split.html
   sandbox/tschaub/canvas/examples/snapping.html
   sandbox/tschaub/canvas/examples/sos.html
   sandbox/tschaub/canvas/examples/spherical-mercator.html
   sandbox/tschaub/canvas/examples/split-feature.html
   sandbox/tschaub/canvas/examples/strategy-bbox.html
   sandbox/tschaub/canvas/examples/strategy-cluster-extended.html
   sandbox/tschaub/canvas/examples/strategy-cluster-threshold.html
   sandbox/tschaub/canvas/examples/strategy-cluster.html
   sandbox/tschaub/canvas/examples/strategy-paging.html
   sandbox/tschaub/canvas/examples/style-rules.html
   sandbox/tschaub/canvas/examples/style.css
   sandbox/tschaub/canvas/examples/stylemap.html
   sandbox/tschaub/canvas/examples/styles-context.html
   sandbox/tschaub/canvas/examples/styles-rotation.html
   sandbox/tschaub/canvas/examples/styles-unique.html
   sandbox/tschaub/canvas/examples/sundials-spherical-mercator.html
   sandbox/tschaub/canvas/examples/sundials.html
   sandbox/tschaub/canvas/examples/symbolizers-fill-stroke-graphic.html
   sandbox/tschaub/canvas/examples/teleportation.html
   sandbox/tschaub/canvas/examples/tilecache.html
   sandbox/tschaub/canvas/examples/tms.html
   sandbox/tschaub/canvas/examples/transform-feature.html
   sandbox/tschaub/canvas/examples/transition.html
   sandbox/tschaub/canvas/examples/urban.html
   sandbox/tschaub/canvas/examples/ve-novibrate.html
   sandbox/tschaub/canvas/examples/ve.html
   sandbox/tschaub/canvas/examples/vector-features-with-text.html
   sandbox/tschaub/canvas/examples/vector-features.html
   sandbox/tschaub/canvas/examples/vector-formats.html
   sandbox/tschaub/canvas/examples/web-mercator.html
   sandbox/tschaub/canvas/examples/wfs-filter.html
   sandbox/tschaub/canvas/examples/wfs-protocol-transactions.html
   sandbox/tschaub/canvas/examples/wfs-protocol.html
   sandbox/tschaub/canvas/examples/wfs-reprojection.html
   sandbox/tschaub/canvas/examples/wfs-snap-split.html
   sandbox/tschaub/canvas/examples/wfs-states.html
   sandbox/tschaub/canvas/examples/wmc.html
   sandbox/tschaub/canvas/examples/wms-long-url.html
   sandbox/tschaub/canvas/examples/wms-untiled.html
   sandbox/tschaub/canvas/examples/wms-v13.html
   sandbox/tschaub/canvas/examples/wms.html
   sandbox/tschaub/canvas/examples/wmst.html
   sandbox/tschaub/canvas/examples/wmts-capabilities.html
   sandbox/tschaub/canvas/examples/wmts-getfeatureinfo.html
   sandbox/tschaub/canvas/examples/wmts.html
   sandbox/tschaub/canvas/examples/worldwind.html
   sandbox/tschaub/canvas/examples/wrapDateLine.html
   sandbox/tschaub/canvas/examples/xhtml.html
   sandbox/tschaub/canvas/examples/xml.html
   sandbox/tschaub/canvas/examples/xyz-esri.html
   sandbox/tschaub/canvas/examples/xyz-offset.html
   sandbox/tschaub/canvas/examples/yahoo.html
   sandbox/tschaub/canvas/examples/zoomLevels.html
   sandbox/tschaub/canvas/examples/zoomify.html
   sandbox/tschaub/canvas/lib/OpenLayers.js
   sandbox/tschaub/canvas/lib/OpenLayers/Ajax.js
   sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes.js
   sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Bounds.js
   sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Class.js
   sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Element.js
   sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/LonLat.js
   sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Pixel.js
   sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Size.js
   sandbox/tschaub/canvas/lib/OpenLayers/Console.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/ArgParser.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/Attribution.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/Button.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/DragFeature.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/DragPan.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/DrawFeature.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/EditingToolbar.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/GetFeature.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/Graticule.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/KeyboardDefaults.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/LayerSwitcher.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/Measure.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/ModifyFeature.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/MouseDefaults.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/MousePosition.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/MouseToolbar.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/NavToolbar.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/Navigation.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/NavigationHistory.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/OverviewMap.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/Pan.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/PanPanel.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/PanZoom.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/PanZoomBar.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/Panel.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/Permalink.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/SLDSelect.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/Scale.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/ScaleLine.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/SelectFeature.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/Snapping.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/Split.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/TransformFeature.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/WMSGetFeatureInfo.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/WMTSGetFeatureInfo.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomBox.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomIn.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomOut.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomPanel.js
   sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomToMaxExtent.js
   sandbox/tschaub/canvas/lib/OpenLayers/Events.js
   sandbox/tschaub/canvas/lib/OpenLayers/Feature.js
   sandbox/tschaub/canvas/lib/OpenLayers/Feature/Vector.js
   sandbox/tschaub/canvas/lib/OpenLayers/Feature/WFS.js
   sandbox/tschaub/canvas/lib/OpenLayers/Filter.js
   sandbox/tschaub/canvas/lib/OpenLayers/Filter/Comparison.js
   sandbox/tschaub/canvas/lib/OpenLayers/Filter/FeatureId.js
   sandbox/tschaub/canvas/lib/OpenLayers/Filter/Logical.js
   sandbox/tschaub/canvas/lib/OpenLayers/Filter/Spatial.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/ArcXML.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/ArcXML/Features.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/Atom.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/CSWGetDomain.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/CSWGetRecords.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/Context.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/Filter.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/Filter/v1.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/Filter/v1_0_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/Filter/v1_1_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/GML.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/GML/Base.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/GML/v2.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/GML/v3.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/GPX.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/GeoJSON.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/GeoRSS.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/JSON.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/KML.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/OSM.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSCommon/v1.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSCommon/v1_0_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSCommon/v1_1_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSContext.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSContext/v0_3_1.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/SLD.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/SLD/v1.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/SLD/v1_0_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/SOSCapabilities.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/SOSCapabilities/v1_0_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/SOSGetObservation.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/Text.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WFS.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSCapabilities.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSCapabilities/v1.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSDescribeFeatureType.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WFST.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WFST/v1.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WFST/v1_0_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WFST/v1_1_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WKT.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WMC.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WMC/v1.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WMC/v1_0_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WMC/v1_1_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_1.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_1_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_1_1.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_3.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_3_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSDescribeLayer.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSGetFeatureInfo.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WMTSCapabilities.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Format/XML.js
   sandbox/tschaub/canvas/lib/OpenLayers/Geometry.js
   sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Collection.js
   sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Curve.js
   sandbox/tschaub/canvas/lib/OpenLayers/Geometry/LineString.js
   sandbox/tschaub/canvas/lib/OpenLayers/Geometry/LinearRing.js
   sandbox/tschaub/canvas/lib/OpenLayers/Geometry/MultiLineString.js
   sandbox/tschaub/canvas/lib/OpenLayers/Geometry/MultiPoint.js
   sandbox/tschaub/canvas/lib/OpenLayers/Geometry/MultiPolygon.js
   sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Point.js
   sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Polygon.js
   sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Rectangle.js
   sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Surface.js
   sandbox/tschaub/canvas/lib/OpenLayers/Handler.js
   sandbox/tschaub/canvas/lib/OpenLayers/Handler/Box.js
   sandbox/tschaub/canvas/lib/OpenLayers/Handler/Click.js
   sandbox/tschaub/canvas/lib/OpenLayers/Handler/Drag.js
   sandbox/tschaub/canvas/lib/OpenLayers/Handler/Feature.js
   sandbox/tschaub/canvas/lib/OpenLayers/Handler/Hover.js
   sandbox/tschaub/canvas/lib/OpenLayers/Handler/Keyboard.js
   sandbox/tschaub/canvas/lib/OpenLayers/Handler/MouseWheel.js
   sandbox/tschaub/canvas/lib/OpenLayers/Handler/Path.js
   sandbox/tschaub/canvas/lib/OpenLayers/Handler/Point.js
   sandbox/tschaub/canvas/lib/OpenLayers/Handler/Polygon.js
   sandbox/tschaub/canvas/lib/OpenLayers/Handler/RegularPolygon.js
   sandbox/tschaub/canvas/lib/OpenLayers/Icon.js
   sandbox/tschaub/canvas/lib/OpenLayers/Lang.js
   sandbox/tschaub/canvas/lib/OpenLayers/Lang/en.js
   sandbox/tschaub/canvas/lib/OpenLayers/Lang/fr.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/ArcGIS93Rest.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/ArcIMS.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/Boxes.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/EventPane.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/FixedZoomLevels.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/GML.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/GeoRSS.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/Google.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/Google/v3.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/Grid.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/HTTPRequest.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/Image.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/KaMap.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/KaMapCache.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/MapGuide.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/MapServer.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/MapServer/Untiled.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/Markers.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/MultiMap.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/PointTrack.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/SphericalMercator.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/TMS.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/Text.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/TileCache.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/Vector.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/Vector/RootContainer.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/VirtualEarth.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/WFS.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/WMS.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/WMS/Post.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/WMS/Untiled.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/WMTS.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/WorldWind.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/XYZ.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/Yahoo.js
   sandbox/tschaub/canvas/lib/OpenLayers/Layer/Zoomify.js
   sandbox/tschaub/canvas/lib/OpenLayers/Map.js
   sandbox/tschaub/canvas/lib/OpenLayers/Marker.js
   sandbox/tschaub/canvas/lib/OpenLayers/Marker/Box.js
   sandbox/tschaub/canvas/lib/OpenLayers/Popup.js
   sandbox/tschaub/canvas/lib/OpenLayers/Popup/Anchored.js
   sandbox/tschaub/canvas/lib/OpenLayers/Popup/AnchoredBubble.js
   sandbox/tschaub/canvas/lib/OpenLayers/Popup/Framed.js
   sandbox/tschaub/canvas/lib/OpenLayers/Popup/FramedCloud.js
   sandbox/tschaub/canvas/lib/OpenLayers/Projection.js
   sandbox/tschaub/canvas/lib/OpenLayers/Protocol.js
   sandbox/tschaub/canvas/lib/OpenLayers/Protocol/HTTP.js
   sandbox/tschaub/canvas/lib/OpenLayers/Protocol/SOS.js
   sandbox/tschaub/canvas/lib/OpenLayers/Protocol/SOS/v1_0_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Protocol/SQL.js
   sandbox/tschaub/canvas/lib/OpenLayers/Protocol/SQL/Gears.js
   sandbox/tschaub/canvas/lib/OpenLayers/Protocol/WFS.js
   sandbox/tschaub/canvas/lib/OpenLayers/Protocol/WFS/v1.js
   sandbox/tschaub/canvas/lib/OpenLayers/Protocol/WFS/v1_0_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Protocol/WFS/v1_1_0.js
   sandbox/tschaub/canvas/lib/OpenLayers/Renderer.js
   sandbox/tschaub/canvas/lib/OpenLayers/Renderer/Canvas.js
   sandbox/tschaub/canvas/lib/OpenLayers/Renderer/Elements.js
   sandbox/tschaub/canvas/lib/OpenLayers/Renderer/SVG.js
   sandbox/tschaub/canvas/lib/OpenLayers/Renderer/VML.js
   sandbox/tschaub/canvas/lib/OpenLayers/Request.js
   sandbox/tschaub/canvas/lib/OpenLayers/Request/XMLHttpRequest.js
   sandbox/tschaub/canvas/lib/OpenLayers/Rule.js
   sandbox/tschaub/canvas/lib/OpenLayers/SingleFile.js
   sandbox/tschaub/canvas/lib/OpenLayers/Strategy.js
   sandbox/tschaub/canvas/lib/OpenLayers/Strategy/BBOX.js
   sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Cluster.js
   sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Filter.js
   sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Fixed.js
   sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Paging.js
   sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Refresh.js
   sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Save.js
   sandbox/tschaub/canvas/lib/OpenLayers/Style.js
   sandbox/tschaub/canvas/lib/OpenLayers/Style2.js
   sandbox/tschaub/canvas/lib/OpenLayers/StyleMap.js
   sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer.js
   sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Line.js
   sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Point.js
   sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Polygon.js
   sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Raster.js
   sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Text.js
   sandbox/tschaub/canvas/lib/OpenLayers/Tile.js
   sandbox/tschaub/canvas/lib/OpenLayers/Tile/Image.js
   sandbox/tschaub/canvas/lib/OpenLayers/Tile/Image/IFrame.js
   sandbox/tschaub/canvas/lib/OpenLayers/Tile/WFS.js
   sandbox/tschaub/canvas/lib/OpenLayers/Tween.js
   sandbox/tschaub/canvas/lib/OpenLayers/Util.js
   sandbox/tschaub/canvas/lib/Rico/Color.js
   sandbox/tschaub/canvas/lib/Rico/Corner.js
   sandbox/tschaub/canvas/license.txt
   sandbox/tschaub/canvas/readme.txt
   sandbox/tschaub/canvas/tests/Ajax.html
   sandbox/tschaub/canvas/tests/BaseTypes.html
   sandbox/tschaub/canvas/tests/BaseTypes/Bounds.html
   sandbox/tschaub/canvas/tests/BaseTypes/Class.html
   sandbox/tschaub/canvas/tests/BaseTypes/Element.html
   sandbox/tschaub/canvas/tests/BaseTypes/LonLat.html
   sandbox/tschaub/canvas/tests/BaseTypes/Pixel.html
   sandbox/tschaub/canvas/tests/BaseTypes/Size.html
   sandbox/tschaub/canvas/tests/Console.html
   sandbox/tschaub/canvas/tests/Control.html
   sandbox/tschaub/canvas/tests/Control/Attribution.html
   sandbox/tschaub/canvas/tests/Control/Button.html
   sandbox/tschaub/canvas/tests/Control/DragFeature.html
   sandbox/tschaub/canvas/tests/Control/DragPan.html
   sandbox/tschaub/canvas/tests/Control/DrawFeature.html
   sandbox/tschaub/canvas/tests/Control/GetFeature.html
   sandbox/tschaub/canvas/tests/Control/Graticule.html
   sandbox/tschaub/canvas/tests/Control/KeyboardDefaults.html
   sandbox/tschaub/canvas/tests/Control/LayerSwitcher.html
   sandbox/tschaub/canvas/tests/Control/Measure.html
   sandbox/tschaub/canvas/tests/Control/ModifyFeature.html
   sandbox/tschaub/canvas/tests/Control/MousePosition.html
   sandbox/tschaub/canvas/tests/Control/MouseToolbar.html
   sandbox/tschaub/canvas/tests/Control/NavToolbar.html
   sandbox/tschaub/canvas/tests/Control/Navigation.html
   sandbox/tschaub/canvas/tests/Control/NavigationHistory.html
   sandbox/tschaub/canvas/tests/Control/OverviewMap.html
   sandbox/tschaub/canvas/tests/Control/PanPanel.html
   sandbox/tschaub/canvas/tests/Control/PanZoom.html
   sandbox/tschaub/canvas/tests/Control/PanZoomBar.html
   sandbox/tschaub/canvas/tests/Control/Panel.html
   sandbox/tschaub/canvas/tests/Control/Permalink.html
   sandbox/tschaub/canvas/tests/Control/SLDSelect.html
   sandbox/tschaub/canvas/tests/Control/Scale.html
   sandbox/tschaub/canvas/tests/Control/ScaleLine.html
   sandbox/tschaub/canvas/tests/Control/SelectFeature.html
   sandbox/tschaub/canvas/tests/Control/Snapping.html
   sandbox/tschaub/canvas/tests/Control/Split.html
   sandbox/tschaub/canvas/tests/Control/TransformFeature.html
   sandbox/tschaub/canvas/tests/Control/WMSGetFeatureInfo.html
   sandbox/tschaub/canvas/tests/Control/WMTSGetFeatureInfo.html
   sandbox/tschaub/canvas/tests/Events.html
   sandbox/tschaub/canvas/tests/Extras.html
   sandbox/tschaub/canvas/tests/Feature.html
   sandbox/tschaub/canvas/tests/Feature/Vector.html
   sandbox/tschaub/canvas/tests/Filter.html
   sandbox/tschaub/canvas/tests/Filter/Comparison.html
   sandbox/tschaub/canvas/tests/Filter/FeatureId.html
   sandbox/tschaub/canvas/tests/Filter/Logical.html
   sandbox/tschaub/canvas/tests/Filter/Spatial.html
   sandbox/tschaub/canvas/tests/Format.html
   sandbox/tschaub/canvas/tests/Format/ArcXML.html
   sandbox/tschaub/canvas/tests/Format/ArcXML/Features.html
   sandbox/tschaub/canvas/tests/Format/Atom.html
   sandbox/tschaub/canvas/tests/Format/CSWGetDomain.html
   sandbox/tschaub/canvas/tests/Format/CSWGetDomain/v2_0_2.html
   sandbox/tschaub/canvas/tests/Format/CSWGetRecords.html
   sandbox/tschaub/canvas/tests/Format/CSWGetRecords/v2_0_2.html
   sandbox/tschaub/canvas/tests/Format/Filter.html
   sandbox/tschaub/canvas/tests/Format/Filter/v1.html
   sandbox/tschaub/canvas/tests/Format/Filter/v1_0_0.html
   sandbox/tschaub/canvas/tests/Format/Filter/v1_1_0.html
   sandbox/tschaub/canvas/tests/Format/GML.html
   sandbox/tschaub/canvas/tests/Format/GML/v2.html
   sandbox/tschaub/canvas/tests/Format/GML/v3.html
   sandbox/tschaub/canvas/tests/Format/GPX.html
   sandbox/tschaub/canvas/tests/Format/GeoJSON.html
   sandbox/tschaub/canvas/tests/Format/GeoRSS.html
   sandbox/tschaub/canvas/tests/Format/JSON.html
   sandbox/tschaub/canvas/tests/Format/KML.html
   sandbox/tschaub/canvas/tests/Format/OSM.html
   sandbox/tschaub/canvas/tests/Format/OWSContext/v0_3_1.html
   sandbox/tschaub/canvas/tests/Format/SLD.html
   sandbox/tschaub/canvas/tests/Format/SLD/v1_0_0.html
   sandbox/tschaub/canvas/tests/Format/SOSCapabilities/v1_0_0.html
   sandbox/tschaub/canvas/tests/Format/SOSGetFeatureOfInterest.html
   sandbox/tschaub/canvas/tests/Format/SOSGetObservation.html
   sandbox/tschaub/canvas/tests/Format/Text.html
   sandbox/tschaub/canvas/tests/Format/WFS.html
   sandbox/tschaub/canvas/tests/Format/WFSCapabilities.html
   sandbox/tschaub/canvas/tests/Format/WFSCapabilities/v1.html
   sandbox/tschaub/canvas/tests/Format/WFSDescribeFeatureType.html
   sandbox/tschaub/canvas/tests/Format/WFST.html
   sandbox/tschaub/canvas/tests/Format/WFST/v1.html
   sandbox/tschaub/canvas/tests/Format/WFST/v1_0_0.html
   sandbox/tschaub/canvas/tests/Format/WFST/v1_1_0.html
   sandbox/tschaub/canvas/tests/Format/WKT.html
   sandbox/tschaub/canvas/tests/Format/WMC.html
   sandbox/tschaub/canvas/tests/Format/WMC/v1.html
   sandbox/tschaub/canvas/tests/Format/WMC/v1_1_0.html
   sandbox/tschaub/canvas/tests/Format/WMSCapabilities.html
   sandbox/tschaub/canvas/tests/Format/WMSCapabilities/v1_1_1.html
   sandbox/tschaub/canvas/tests/Format/WMSCapabilities/v1_3_0.html
   sandbox/tschaub/canvas/tests/Format/WMSDescribeLayer.html
   sandbox/tschaub/canvas/tests/Format/WMSGetFeatureInfo.html
   sandbox/tschaub/canvas/tests/Format/WMTSCapabilities.html
   sandbox/tschaub/canvas/tests/Format/WMTSCapabilities/v1_0_0.html
   sandbox/tschaub/canvas/tests/Format/XML.html
   sandbox/tschaub/canvas/tests/Geometry.html
   sandbox/tschaub/canvas/tests/Geometry/Collection.html
   sandbox/tschaub/canvas/tests/Geometry/Curve.html
   sandbox/tschaub/canvas/tests/Geometry/LineString.html
   sandbox/tschaub/canvas/tests/Geometry/LinearRing.html
   sandbox/tschaub/canvas/tests/Geometry/MultiLineString.html
   sandbox/tschaub/canvas/tests/Geometry/MultiPoint.html
   sandbox/tschaub/canvas/tests/Geometry/MultiPolygon.html
   sandbox/tschaub/canvas/tests/Geometry/Point.html
   sandbox/tschaub/canvas/tests/Geometry/Polygon.html
   sandbox/tschaub/canvas/tests/Geometry/Rectangle.html
   sandbox/tschaub/canvas/tests/Geometry/Surface.html
   sandbox/tschaub/canvas/tests/Handler.html
   sandbox/tschaub/canvas/tests/Handler/Click.html
   sandbox/tschaub/canvas/tests/Handler/Drag.html
   sandbox/tschaub/canvas/tests/Handler/Feature.html
   sandbox/tschaub/canvas/tests/Handler/Hover.html
   sandbox/tschaub/canvas/tests/Handler/Keyboard.html
   sandbox/tschaub/canvas/tests/Handler/MouseWheel.html
   sandbox/tschaub/canvas/tests/Handler/Path.html
   sandbox/tschaub/canvas/tests/Handler/Point.html
   sandbox/tschaub/canvas/tests/Handler/Polygon.html
   sandbox/tschaub/canvas/tests/Handler/RegularPolygon.html
   sandbox/tschaub/canvas/tests/Icon.html
   sandbox/tschaub/canvas/tests/Lang.html
   sandbox/tschaub/canvas/tests/Layer.html
   sandbox/tschaub/canvas/tests/Layer/ArcGIS93Rest.html
   sandbox/tschaub/canvas/tests/Layer/ArcIMS.html
   sandbox/tschaub/canvas/tests/Layer/EventPane.html
   sandbox/tschaub/canvas/tests/Layer/FixedZoomLevels.html
   sandbox/tschaub/canvas/tests/Layer/GML.html
   sandbox/tschaub/canvas/tests/Layer/GeoRSS.html
   sandbox/tschaub/canvas/tests/Layer/Google.html
   sandbox/tschaub/canvas/tests/Layer/Google/v3.html
   sandbox/tschaub/canvas/tests/Layer/Grid.html
   sandbox/tschaub/canvas/tests/Layer/HTTPRequest.html
   sandbox/tschaub/canvas/tests/Layer/Image.html
   sandbox/tschaub/canvas/tests/Layer/KaMap.html
   sandbox/tschaub/canvas/tests/Layer/MapGuide.html
   sandbox/tschaub/canvas/tests/Layer/MapServer.html
   sandbox/tschaub/canvas/tests/Layer/Markers.html
   sandbox/tschaub/canvas/tests/Layer/MultiMap.html
   sandbox/tschaub/canvas/tests/Layer/PointTrack.html
   sandbox/tschaub/canvas/tests/Layer/SphericalMercator.html
   sandbox/tschaub/canvas/tests/Layer/TMS.html
   sandbox/tschaub/canvas/tests/Layer/Text.html
   sandbox/tschaub/canvas/tests/Layer/TileCache.html
   sandbox/tschaub/canvas/tests/Layer/Vector.html
   sandbox/tschaub/canvas/tests/Layer/Vector/RootContainer.html
   sandbox/tschaub/canvas/tests/Layer/WFS.html
   sandbox/tschaub/canvas/tests/Layer/WMS.html
   sandbox/tschaub/canvas/tests/Layer/WMS/Post.html
   sandbox/tschaub/canvas/tests/Layer/WMTS.html
   sandbox/tschaub/canvas/tests/Layer/WrapDateLine.html
   sandbox/tschaub/canvas/tests/Layer/XYZ.html
   sandbox/tschaub/canvas/tests/Layer/Yahoo.html
   sandbox/tschaub/canvas/tests/Map.html
   sandbox/tschaub/canvas/tests/Marker.html
   sandbox/tschaub/canvas/tests/Marker/Box.html
   sandbox/tschaub/canvas/tests/OpenLayers1.html
   sandbox/tschaub/canvas/tests/OpenLayers2.html
   sandbox/tschaub/canvas/tests/OpenLayers3.html
   sandbox/tschaub/canvas/tests/Popup.html
   sandbox/tschaub/canvas/tests/Popup/Anchored.html
   sandbox/tschaub/canvas/tests/Popup/AnchoredBubble.html
   sandbox/tschaub/canvas/tests/Popup/FramedCloud.html
   sandbox/tschaub/canvas/tests/Projection.html
   sandbox/tschaub/canvas/tests/Protocol.html
   sandbox/tschaub/canvas/tests/Protocol/HTTP.html
   sandbox/tschaub/canvas/tests/Protocol/SOS.html
   sandbox/tschaub/canvas/tests/Protocol/SQL.html
   sandbox/tschaub/canvas/tests/Protocol/SQL/Gears.html
   sandbox/tschaub/canvas/tests/Protocol/WFS.html
   sandbox/tschaub/canvas/tests/Renderer.html
   sandbox/tschaub/canvas/tests/Renderer/Canvas.html
   sandbox/tschaub/canvas/tests/Renderer/Elements.html
   sandbox/tschaub/canvas/tests/Renderer/SVG.html
   sandbox/tschaub/canvas/tests/Renderer/VML.html
   sandbox/tschaub/canvas/tests/Request.html
   sandbox/tschaub/canvas/tests/Request/XMLHttpRequest.html
   sandbox/tschaub/canvas/tests/Rule.html
   sandbox/tschaub/canvas/tests/Strategy.html
   sandbox/tschaub/canvas/tests/Strategy/BBOX.html
   sandbox/tschaub/canvas/tests/Strategy/Cluster.html
   sandbox/tschaub/canvas/tests/Strategy/Filter.html
   sandbox/tschaub/canvas/tests/Strategy/Fixed.html
   sandbox/tschaub/canvas/tests/Strategy/Paging.html
   sandbox/tschaub/canvas/tests/Strategy/Refresh.html
   sandbox/tschaub/canvas/tests/Strategy/Save.html
   sandbox/tschaub/canvas/tests/Style.html
   sandbox/tschaub/canvas/tests/Style2.html
   sandbox/tschaub/canvas/tests/StyleMap.html
   sandbox/tschaub/canvas/tests/Symbolizer.html
   sandbox/tschaub/canvas/tests/Symbolizer/Line.html
   sandbox/tschaub/canvas/tests/Symbolizer/Point.html
   sandbox/tschaub/canvas/tests/Symbolizer/Polygon.html
   sandbox/tschaub/canvas/tests/Symbolizer/Raster.html
   sandbox/tschaub/canvas/tests/Symbolizer/Text.html
   sandbox/tschaub/canvas/tests/Tile.html
   sandbox/tschaub/canvas/tests/Tile/Image.html
   sandbox/tschaub/canvas/tests/Tile/Image/IFrame.html
   sandbox/tschaub/canvas/tests/Tile/WFS.html
   sandbox/tschaub/canvas/tests/Tween.html
   sandbox/tschaub/canvas/tests/Util.html
   sandbox/tschaub/canvas/tests/list-tests.html
   sandbox/tschaub/canvas/tests/run-tests.html
   sandbox/tschaub/canvas/theme/default/google.css
   sandbox/tschaub/canvas/theme/default/style.css
   sandbox/tschaub/canvas/tools/exampleparser.py
   sandbox/tschaub/canvas/tools/mergejs.py
   sandbox/tschaub/canvas/tools/toposort.py
   sandbox/tschaub/canvas/tools/update_dev_dir.sh
Log:
Merge r10736:11416 from trunk.


Property changes on: sandbox/tschaub/canvas
___________________________________________________________________
Modified: svn:mergeinfo
   - /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:10737-10825
   + /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:10737-11416

Modified: sandbox/tschaub/canvas/build/build.py
===================================================================
--- sandbox/tschaub/canvas/build/build.py	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/build/build.py	2011-02-24 15:01:55 UTC (rev 11421)
@@ -3,40 +3,46 @@
 import sys
 sys.path.append("../tools")
 import mergejs
+import optparse
 
-def build():
-    have_compressor = None
+def build(config_file = None, output_file = None, options = None):
+    have_compressor = []
     try:
         import jsmin
-        have_compressor = "jsmin"
+        have_compressor.append("jsmin")
     except ImportError:
-        try:
-            import minimize
-            have_compressor = "minimize"
-        except Exception, E:
-            print E
-            pass
+        print "No jsmin"
+    
+    try:
+        import minimize
+        have_compressor.append("minimize")
+    except ImportError:
+        print "No minimize"
 
+    use_compressor = None
+    if options.compressor and options.compressor in have_compressor:
+        use_compressor = options.compressor
+
     sourceDirectory = "../lib"
     configFilename = "full.cfg"
     outputFilename = "OpenLayers.js"
 
-    if len(sys.argv) > 1:
-        configFilename = sys.argv[1]
+    if config_file:
+        configFilename = config_file
         extension = configFilename[-4:]
 
         if extension  != ".cfg":
-            configFilename = sys.argv[1] + ".cfg"
+            configFilename = config_file + ".cfg"
 
-    if len(sys.argv) > 2:
-        outputFilename = sys.argv[2]
+    if output_file:
+        outputFilename = output_file
 
     print "Merging libraries."
     merged = mergejs.run(sourceDirectory, None, configFilename)
-    if have_compressor == "jsmin":
+    if use_compressor == "jsmin":
         print "Compressing using jsmin."
         minimized = jsmin.jsmin(merged)
-    elif have_compressor == "minimize":
+    elif use_compressor == "minimize":
         print "Compressing using minimize."
         minimized = minimize.minimize(merged)
     else: # fallback
@@ -51,4 +57,7 @@
     print "Done."
 
 if __name__ == '__main__':
-  build()
\ No newline at end of file
+  opt = optparse.OptionParser(usage="%s [options] [config_file] [output_file]\n  Default config_file is 'full.cfg', Default output_file is 'OpenLayers.js'")
+  opt.add_option("-c", "--compressor", dest="compressor", help="compression method: one of 'jsmin', 'minimize', or 'none'", default="jsmin")
+  (options, args) = opt.parse_args()
+  build(*args, options=options)

Modified: sandbox/tschaub/canvas/build/full.cfg
===================================================================
--- sandbox/tschaub/canvas/build/full.cfg	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/build/full.cfg	2011-02-24 15:01:55 UTC (rev 11421)
@@ -2,11 +2,6 @@
 # like Renderers and Formats.
 
 [first]
-OpenLayers/SingleFile.js
-OpenLayers/BaseTypes.js
-OpenLayers/BaseTypes/Class.js
-OpenLayers/Util.js
-Rico/Corner.js
 
 [last]
 

Modified: sandbox/tschaub/canvas/build/library.cfg
===================================================================
--- sandbox/tschaub/canvas/build/library.cfg	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/build/library.cfg	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,13 +1,7 @@
 # This file includes the OpenLayers code to create a build for everything that 
-# does not require vector support. build.py uses this profile if no other one
-# is specified.
+# does not require vector support.
 
 [first]
-OpenLayers/SingleFile.js
-OpenLayers/BaseTypes.js
-OpenLayers/BaseTypes/Class.js
-OpenLayers/Util.js
-Rico/Corner.js
 
 [last]
 

Modified: sandbox/tschaub/canvas/build/license.txt
===================================================================
--- sandbox/tschaub/canvas/build/license.txt	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/build/license.txt	2011-02-24 15:01:55 UTC (rev 11421)
@@ -2,7 +2,7 @@
 
   OpenLayers.js -- OpenLayers Map Viewer Library
 
-  Copyright 2005-2010 OpenLayers Contributors, released under the Clear BSD
+  Copyright 2005-2011 OpenLayers Contributors, released under the Clear BSD
   license. Please see http://svn.openlayers.org/trunk/openlayers/license.txt
   for the full text of the license.
 
@@ -90,3 +90,36 @@
  * issues. Applications that use the code below will continue to work seamlessly
  * when that happens.
  */
+
+/**
+ * OpenLayers.Util.pagePosition is based on Yahoo's getXY method, which is
+ * Copyright (c) 2006, Yahoo! Inc.
+ * All rights reserved.
+ * 
+ * Redistribution and use of this software in source and binary forms, with or
+ * without modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * * Redistributions of source code must retain the above copyright notice,
+ *   this list of conditions and the following disclaimer.
+ * 
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * 
+ * * Neither the name of Yahoo! Inc. nor the names of its contributors may be
+ *   used to endorse or promote products derived from this software without
+ *   specific prior written permission of Yahoo! Inc.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
\ No newline at end of file

Modified: sandbox/tschaub/canvas/build/lite.cfg
===================================================================
--- sandbox/tschaub/canvas/build/lite.cfg	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/build/lite.cfg	2011-02-24 15:01:55 UTC (rev 11421)
@@ -5,10 +5,6 @@
 # Web Mapping BOF.
 
 [first]
-OpenLayers/SingleFile.js
-OpenLayers/BaseTypes.js
-OpenLayers/BaseTypes/Class.js
-OpenLayers/Util.js
 
 [last]
 

Copied: sandbox/tschaub/canvas/build/tests.cfg (from rev 11416, trunk/openlayers/build/tests.cfg)
===================================================================
--- sandbox/tschaub/canvas/build/tests.cfg	                        (rev 0)
+++ sandbox/tschaub/canvas/build/tests.cfg	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,10 @@
+# This build config is supposed to be used for the units tests with "mode=build"
+
+[first]
+
+[last]
+
+[include]
+
+[exclude]
+OpenLayers.js

Modified: sandbox/tschaub/canvas/doc/authors.txt
===================================================================
--- sandbox/tschaub/canvas/doc/authors.txt	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/doc/authors.txt	2011-02-24 15:01:55 UTC (rev 11421)
@@ -15,6 +15,7 @@
 John Frank
 Sean Gilles
 Pierre Giraud
+Ivan Grcic
 Andreas Hocevar
 Ian Johnson
 Eric Lemoine

Modified: sandbox/tschaub/canvas/examples/GMLParser.html
===================================================================
--- sandbox/tschaub/canvas/examples/GMLParser.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/GMLParser.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers GML Parser</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/KMLParser.html
===================================================================
--- sandbox/tschaub/canvas/examples/KMLParser.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/KMLParser.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers KML Parser Example</title>
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/canvas/examples/SLDSelect.html
===================================================================
--- sandbox/tschaub/canvas/examples/SLDSelect.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/SLDSelect.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers SLD based selection control</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/WMSDescribeLayerParser.html
===================================================================
--- sandbox/tschaub/canvas/examples/WMSDescribeLayerParser.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/WMSDescribeLayerParser.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers WMSDescribeLayer Parser Example</title>
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/canvas/examples/WMSPost.html
===================================================================
--- sandbox/tschaub/canvas/examples/WMSPost.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/WMSPost.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Basic WMS Example via HTTP-POST protocol</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/accessible.html
===================================================================
--- sandbox/tschaub/canvas/examples/accessible.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/accessible.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Accessible Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/all-overlays-google.html
===================================================================
--- sandbox/tschaub/canvas/examples/all-overlays-google.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/all-overlays-google.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers All Overlays with Google and OSM</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="../theme/default/google.css" type="text/css">

Modified: sandbox/tschaub/canvas/examples/all-overlays.html
===================================================================
--- sandbox/tschaub/canvas/examples/all-overlays.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/all-overlays.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>All Overlays Example</title>
         
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Copied: sandbox/tschaub/canvas/examples/anchor-permalink.html (from rev 11416, trunk/openlayers/examples/anchor-permalink.html)
===================================================================
--- sandbox/tschaub/canvas/examples/anchor-permalink.html	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/anchor-permalink.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,27 @@
+<html>
+    <head>
+        <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" /> 
+        <meta name="apple-mobile-web-app-capable" content="yes" />
+        <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
+        <link rel="stylesheet" href="style.css" type="text/css" />
+        <title>AnchorPermalink Example</title>
+        <script src="../lib/OpenLayers.js"></script>
+        <script src="anchor-permalink.js"></script>
+    </head>
+    <body onload="init()">
+        <h1 id="title">AnchorPermalink Example</h1>
+        <div id="tags">
+            anchor, permalink
+        </div>
+        <p id="shortdesc">
+            Place a permalink in the anchor of the url. 
+        </p>
+        <div id="map" class="smallmap"></div>
+        <div id="docs">
+            <p>
+                See the <a href="anchor-permalink.js" target="_blank">anchor-permalink.js
+                source</a> to see how this is done.
+            </p> 
+        </div>
+    </body>
+</html>

Copied: sandbox/tschaub/canvas/examples/anchor-permalink.js (from rev 11416, trunk/openlayers/examples/anchor-permalink.js)
===================================================================
--- sandbox/tschaub/canvas/examples/anchor-permalink.js	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/anchor-permalink.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,13 @@
+function init() {
+    var map = new OpenLayers.Map({
+        div: "map",
+        projection: new OpenLayers.Projection("EPSG:900913"),
+        displayProjection: new OpenLayers.Projection("EPSG:4326"),
+        layers: [
+            new OpenLayers.Layer.OSM()
+        ]
+    });
+    if (!map.getCenter()) map.zoomToMaxExtent();
+
+    map.addControl(new OpenLayers.Control.Permalink({anchor: true}));
+}

Modified: sandbox/tschaub/canvas/examples/animated_panning.html
===================================================================
--- sandbox/tschaub/canvas/examples/animated_panning.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/animated_panning.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Animated Panning of the Map via map.panTo</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/arcgis93rest.html
===================================================================
--- sandbox/tschaub/canvas/examples/arcgis93rest.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/arcgis93rest.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/canvas/examples/arcims-thematic.html
===================================================================
--- sandbox/tschaub/canvas/examples/arcims-thematic.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/arcims-thematic.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>ArcIMS Thematic Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/arcims.html
===================================================================
--- sandbox/tschaub/canvas/examples/arcims.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/arcims.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>ArcIMS Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/attribution.html
===================================================================
--- sandbox/tschaub/canvas/examples/attribution.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/attribution.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Attribution Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/baseLayers.html
===================================================================
--- sandbox/tschaub/canvas/examples/baseLayers.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/baseLayers.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Base Layers Example</title>
         
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/behavior-fixed-http-gml.html
===================================================================
--- sandbox/tschaub/canvas/examples/behavior-fixed-http-gml.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/behavior-fixed-http-gml.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Vector Behavior Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Copied: sandbox/tschaub/canvas/examples/bing-tiles.html (from rev 11416, trunk/openlayers/examples/bing-tiles.html)
===================================================================
--- sandbox/tschaub/canvas/examples/bing-tiles.html	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/bing-tiles.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
+    <title>OpenLayers Bing Tiles Example</title>
+    <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
+    <link rel="stylesheet" href="style.css" type="text/css">
+    <style type="text/css">
+    .olControlAttribution {
+        left: 5px;
+        right: inherit;
+        bottom: 5px; 
+    }
+    </style>
+  </head>
+  <body>
+    <h1 id="title">Basic Bing Tiles Example</h1>
+
+    <div id="tags">
+        bing tiles
+    </div>
+
+    <div id="shortdesc">Use Bing with direct tile access</div>
+
+    <div id="map" class="smallmap"></div>
+
+    <div id="docs">
+        <p>This example shows a very simple map with Bing layers that use
+        direct tile access through Bing Maps REST Services.</p><p>See
+        <a target="_blank" href="bing-tiles.js">bing-tiles.js</a> for the
+        source code.</p>
+    </div>
+    <script src="../lib/OpenLayers.js"></script>
+    <script src="bing-tiles.js"></script>
+  </body>
+</html>

Copied: sandbox/tschaub/canvas/examples/bing-tiles.js (from rev 11416, trunk/openlayers/examples/bing-tiles.js)
===================================================================
--- sandbox/tschaub/canvas/examples/bing-tiles.js	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/bing-tiles.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,29 @@
+// API key for http://openlayers.org. Please get your own at
+// http://bingmapsportal.com/ and use that instead.
+var apiKey = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf";
+
+var map = new OpenLayers.Map( 'map');
+
+var road = new OpenLayers.Layer.Bing({
+    key: apiKey,
+    type: "Road",
+    // custom metadata parameter to request the new map style - only useful
+    // before May 1st, 2011
+    metadataParams: {mapVersion: "v1"}
+});
+var aerial = new OpenLayers.Layer.Bing({
+    key: apiKey,
+    type: "Aerial"
+});
+var hybrid = new OpenLayers.Layer.Bing({
+    key: apiKey,
+    type: "AerialWithLabels",
+    name: "Bing Aerial With Labels"
+});
+
+map.addLayers([road, aerial, hybrid]);
+map.addControl(new OpenLayers.Control.LayerSwitcher());
+map.setCenter(new OpenLayers.LonLat(-71.147, 42.472).transform(
+    new OpenLayers.Projection("EPSG:4326"),
+    map.getProjectionObject()
+), 12);

Modified: sandbox/tschaub/canvas/examples/bing.html
===================================================================
--- sandbox/tschaub/canvas/examples/bing.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/bing.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Bing Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/boxes-vector.html
===================================================================
--- sandbox/tschaub/canvas/examples/boxes-vector.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/boxes-vector.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Boxes Vector Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/boxes.html
===================================================================
--- sandbox/tschaub/canvas/examples/boxes.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/boxes.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Boxes Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/browser-name.html
===================================================================
--- sandbox/tschaub/canvas/examples/browser-name.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/browser-name.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Copied: sandbox/tschaub/canvas/examples/browser.html (from rev 11416, trunk/openlayers/examples/browser.html)
===================================================================
--- sandbox/tschaub/canvas/examples/browser.html	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/browser.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,101 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>
+    <meta name="apple-mobile-web-app-capable" content="yes"/>
+    <title>OpenLayers Browser Detection</title>
+    <link rel="stylesheet" href="../theme/default/style.css" type="text/css"/>
+    <link rel="stylesheet" href="style.css" type="text/css"/>
+    <script type="text/javascript" src="browser.js"></script>
+    <style type="text/css">
+        .olControlAttribution {
+            bottom: 5px;
+        }
+    </style>
+    <script type="text/javascript">
+        function init() {
+            var result = document.getElementById('result');
+            result.innerHTML = result.innerHTML + "Browser CodeName: " + navigator.appCodeName + '<br>';
+            result.innerHTML = result.innerHTML + "Browser Name: " + navigator.appName + '<br>';
+            result.innerHTML = result.innerHTML + "Browser Version: " + navigator.appVersion + '<br>';
+            result.innerHTML = result.innerHTML + "Cookies Enabled: " + navigator.cookieEnabled + '<br>';
+            result.innerHTML = result.innerHTML + "Platform: " + navigator.platform + '<br>';
+            result.innerHTML = result.innerHTML + 'User agent: ' + navigator.userAgent + '<br>';
+            divResult('mouse', 'click', null, result);
+            divResult('mouse', 'dblclick', null, result);
+            divResult('mouse', 'mousedown', null, result);
+            divResult('mouse', 'mouseup', null, result);
+            divResult('mouse', 'mouseover', null, result);
+            divResult('mouse', 'mousemove', null, result);
+            divResult('mouse', 'mouseout', null, result);
+
+            divResult('key', 'keypress', null, result);
+            divResult('key', 'keydown', null, result);
+            divResult('key', 'keyup', null, result);
+
+            divResult('HTML', 'load', null, result);
+            divResult('HTML', 'unload', window, result);
+            divResult('HTML', 'abort', null, result);
+            divResult('HTML', 'error', null, result);
+
+            divResult('view', 'resize', window, result);
+            divResult('view', 'scroll', null, result);
+
+            divResult('form', 'submit', null, result);
+            divResult('form', 'reset', null, result);
+
+            divResult('form control', 'select', null, result);
+            divResult('form control', 'change', null, result);
+
+            divResult('activation', 'focus', null, result);
+            divResult('activation', 'blur', null, result);
+
+            divResult('touch', 'touchstart', null, result);
+            divResult('touch', 'touchend', null, result);
+            divResult('touch', 'touchmove', null, result);
+            divResult('touch', 'touchcancel', null, result);
+
+            divResult('gesture', 'gesturestart', null, result);
+            divResult('gesture', 'gesturechange', null, result);
+            divResult('gesture', 'gestureend', null, result);
+
+            divResult('HTML5', 'hashchange', document.body, result);
+            divResult('HTML5', 'online', document.body, result);
+            divResult('HTML5', 'offline', document.body, result);
+            divResult('HTML5', 'message', window, result);
+            divResult('HTML5', 'undo', document.body, result);
+            divResult('HTML5', 'redo', document.body, result);
+            divResult('HTML5', 'storage', window, result);
+            divResult('HTML5', 'popstate', window, result);
+            divResult('HTML5', 'canplay', document.createElement('video'), result);
+            divResult('HTML5', 'seeking', document.createElement('video'), result);
+            divResult('HTML5', 'seekend', document.createElement('video'), result);
+
+            divResult('orientation', 'deviceorientation', window, result);
+            divResult('orientation', 'mozorientation', window, result);
+            divResult('orientation', 'devicemotion', window, result);
+        }
+    </script>
+</head>
+<body onload="init()">
+<h1 id="title">Browser detection</h1>
+<div id="tags">
+  browser, vendor, mobile, events, HTML5, gesture, touch
+</div> 
+<p id="shortdesc">
+    The goal of this script is to inform about the capacity of the browser used by the user.
+</p>
+<div id="docs">
+    <p>
+        See the <a href="browser.js" target="_blank">
+        browser.js source</a> to see how this is done.
+    </p>
+</div>
+
+<h1>Your browser information</h1>
+
+<div id="result">
+
+</div>
+</body>
+</html>

Copied: sandbox/tschaub/canvas/examples/browser.js (from rev 11416, trunk/openlayers/examples/browser.js)
===================================================================
--- sandbox/tschaub/canvas/examples/browser.js	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/browser.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,52 @@
+var isEventSupported = (function(undef) {
+
+    var TAGNAMES = {
+        'select':'input',
+        'change':'input',
+        'submit':'form',
+        'reset':'form',
+        'error':'img',
+        'load':'img',
+        'abort':'img'
+    };
+
+    function isEventSupported(eventName, element) {
+        element = element || document.createElement(TAGNAMES[eventName] || 'div');
+        eventName = 'on' + eventName;
+
+        var isSupported = (eventName in element);
+
+        if (!isSupported) {
+            // if it has no `setAttribute` (i.e. doesn't implement Node interface), try generic element
+            if (!element.setAttribute) {
+                element = document.createElement('div');
+            }
+            if (element.setAttribute && element.removeAttribute) {
+                element.setAttribute(eventName, '');
+                isSupported = typeof element[eventName] == 'function';
+
+                // if property was created, "remove it" (by setting value to `undefined`)
+                if (typeof element[eventName] != 'undefined') {
+                    element[eventName] = undef;
+                }
+                element.removeAttribute(eventName);
+            }
+        }
+
+        element = null;
+        return isSupported;
+    }
+
+    return isEventSupported;
+})();
+
+function divResult(category, name, element, div) {
+    div.innerHTML = div.innerHTML + category + " " + name + ": ";
+    div.innerHTML = div.innerHTML + (
+            isEventSupported(name, element)
+                    ? '<span style="background-color:green;color:white;">true</span></td>'
+                    : '<span style="background-color:red;color:white;">false</span></td>'
+            );
+    div.innerHTML = div.innerHTML + "<br>";
+}
+

Modified: sandbox/tschaub/canvas/examples/buffer.html
===================================================================
--- sandbox/tschaub/canvas/examples/buffer.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/buffer.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Buffer Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/canvas.html
===================================================================
--- sandbox/tschaub/canvas/examples/canvas.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/canvas.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>Canvas Renderer Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/click-handler.html
===================================================================
--- sandbox/tschaub/canvas/examples/click-handler.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/click-handler.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Click Handler Example</title>
         
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/click.html
===================================================================
--- sandbox/tschaub/canvas/examples/click.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/click.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Click Event Example</title>
         
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/controls.html
===================================================================
--- sandbox/tschaub/canvas/examples/controls.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/controls.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Map Controls Example</title>
 
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
@@ -25,23 +27,29 @@
                 });
     
 
-                var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
+                var ol_wms = new OpenLayers.Layer.WMS(
+                    "OpenLayers WMS",
                     "http://vmap0.tiles.osgeo.org/wms/vmap0",
-                    {layers: 'basic'} );
-                var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
-                    "http://t1.hypercube.telascience.org/cgi-bin/landsat7", 
-                    {layers: "landsat7"});
-                var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo",
+                    {layers: 'basic'} 
+                );
+
+                var gwc = new OpenLayers.Layer.WMS(
+                    "Global Imagery",
+                    "http://maps.opengeo.org/geowebcache/service/wms",
+                    {layers: "bluemarble"},
+                    {tileOrigin: new OpenLayers.LonLat(-180, -90)}
+                );
+                var dm_wms = new OpenLayers.Layer.WMS(
+                    "DM Solutions Demo",
                     "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
                     {layers: "bathymetry,land_fn,park,drain_fn,drainage," +
                              "prov_bound,fedlimit,rail,road,popplace",
-                     transparent: "true", format: "image/png" });
+                     transparent: "true", format: "image/png"},
+                    {visibility: false}
+                );
 
-                jpl_wms.setVisibility(false);
-                dm_wms.setVisibility(false);
-
-                map.addLayers([ol_wms, jpl_wms, dm_wms]);
-                if (!map.getCenter()) map.zoomToMaxExtent();
+                map.addLayers([ol_wms, gwc, dm_wms]);
+                map.zoomToMaxExtent();
             }
         </script>
     </head>
@@ -56,8 +64,8 @@
             Attach zooming, panning, layer switcher, overview map, and permalink map controls to an OpenLayers window.
         </p>
 
-        <a style="float:right" href="" id="permalink">Permalink</a>
         <div id="map" class="smallmap"></div>
+        <a href="#" id="permalink">Permalink</a>
 
         <div id="docs"></div>
     </body>

Copied: sandbox/tschaub/canvas/examples/cql-format.html (from rev 11416, trunk/openlayers/examples/cql-format.html)
===================================================================
--- sandbox/tschaub/canvas/examples/cql-format.html	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/cql-format.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<html>
+    <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
+        <title>
+            OpenLayers CQL Example
+        </title>
+        <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
+        <link rel="stylesheet" href="style.css" type="text/css">
+        <style>
+            #cql {
+                width: 400px;
+            }
+            #output {
+                padding-top: 1em;
+                width: 512px;
+                height: 60px;
+                border: none;
+                color: #ff3333;
+            }
+        </style>
+        <script src="../lib/OpenLayers.js"></script>
+    </head>
+    <body>
+        <h1 id="title">CQL Filter Example</h1>
+        <div id="tags">
+            CQL, filter
+        </div>
+        <p id="shortdesc">
+            Demonstrate use the CQL filter.
+        </p>
+        <div id="map" class="smallmap"></div>
+        <div id="docs">
+            <p>
+                Enter text for a CQL filter to update the features displayed.
+                <br>
+                <form name="cql_form" id="cql_form">
+                    <label for="cql">CQL</label>
+                    <input id="cql" type="text" value="STATE_ABBR >= 'B' AND STATE_ABBR <= 'O'">
+                    <input type="submit" value="update">
+                    <input type="reset" value="reset">
+                </form>
+                <textarea id="output"></textarea>
+            </p><p>
+                View the <a href="cql-format.js" target="_blank">cql-format.js source</a> 
+                to see how this is done.
+            </p>
+        </div>
+        <script src="cql-format.js"></script>
+        <script src="http://demo.opengeo.org/geoserver/wfs?service=WFS&amp;version=1.0.0&amp;request=GetFeature&amp;typename=topp:states&amp;outputFormat=json&amp;format_options=callback:loadFeatures" type="text/javascript"></script>
+    </body>
+</html>

Copied: sandbox/tschaub/canvas/examples/cql-format.js (from rev 11416, trunk/openlayers/examples/cql-format.js)
===================================================================
--- sandbox/tschaub/canvas/examples/cql-format.js	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/cql-format.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,61 @@
+
+// use a CQL parser for easy filter creation
+var format = new OpenLayers.Format.CQL();
+
+// this rule will get a filter from the CQL text in the form
+var rule = new OpenLayers.Rule({
+    // We could also set a filter here.  E.g.
+    // filter: format.read("STATE_ABBR >= 'B' AND STATE_ABBR <= 'O'"),
+    symbolizer: {
+        fillColor: "#ff0000",
+        strokeColor: "#ffcccc",
+        fillOpacity: "0.5"
+    }    
+});
+
+var states = new OpenLayers.Layer.Vector("States", {
+    styleMap: new OpenLayers.StyleMap({
+        "default": new OpenLayers.Style(null, {rules: [rule]})
+    })
+});
+
+var map = new OpenLayers.Map({
+    div: "map",
+    layers: [
+        new OpenLayers.Layer.WMS(
+            "OpenLayers WMS",
+            "http://maps.opengeo.org/geowebcache/service/wms",
+            {layers: "openstreetmap", format: "image/png"}
+        ),
+        states
+    ],
+    center: new OpenLayers.LonLat(-101, 39),
+    zoom: 3
+});
+
+// called when features are fetched
+function loadFeatures(data) {
+    var features = new OpenLayers.Format.GeoJSON().read(data);
+    states.addFeatures(features);
+};
+
+// update filter and redraw when form is submitted
+var cql = document.getElementById("cql");
+var output = document.getElementById("output");
+function updateFilter() {
+    var filter;
+    try {
+        filter = format.read(cql.value);
+    } catch (err) {
+        output.value = err.message;
+    }
+    if (filter) {
+        output.value = "";
+        rule.filter = filter;
+        states.redraw();
+    }
+    return false;
+}
+updateFilter();
+var form = document.getElementById("cql_form");
+form.onsubmit = updateFilter;

Modified: sandbox/tschaub/canvas/examples/custom-control-point.html
===================================================================
--- sandbox/tschaub/canvas/examples/custom-control-point.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/custom-control-point.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Custom Control Point Examle</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/custom-control.html
===================================================================
--- sandbox/tschaub/canvas/examples/custom-control.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/custom-control.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>Custom Control Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/custom-style.html
===================================================================
--- sandbox/tschaub/canvas/examples/custom-style.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/custom-style.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>Custom Style Example</title>
         
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/debug.html
===================================================================
--- sandbox/tschaub/canvas/examples/debug.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/debug.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -2,6 +2,8 @@
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Debug Example</title>
         <link rel="stylesheet" href="style.css" type="text/css" />        
         <script src="../lib/Firebug/firebug.js"></script>

Modified: sandbox/tschaub/canvas/examples/document-drag.html
===================================================================
--- sandbox/tschaub/canvas/examples/document-drag.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/document-drag.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Document Drag Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Copied: sandbox/tschaub/canvas/examples/donut.html (from rev 11416, trunk/openlayers/examples/donut.html)
===================================================================
--- sandbox/tschaub/canvas/examples/donut.html	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/donut.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html>
+    <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
+        <title>OpenLayers Polygon Hole Digitizing</title>
+        <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
+        <link rel="stylesheet" href="style.css" type="text/css">
+        <style>
+            #controlToggle li {
+                list-style: none;
+            }
+            .olControlAttribution {
+                font-size: 9px;
+                bottom: 2px;
+            }
+            #output {
+                margin: 1em;
+                font-size: 0.9em;
+            }
+        </style>
+    </head>
+    <body>
+        <h1 id="title">Drawing Holes in Polygons</h1>
+        <div id="tags">
+            draw polygon hole
+        </div>         
+        <p id="shortdesc">
+            The DrawFeature control can be used to digitize donut polygons.
+        </p>
+        
+        <div id="map" class="smallmap"></div>
+        <ul id="controlToggle">
+            <li>
+                <input type="radio" name="type" value="none" id="noneToggle"
+                       onclick="toggleControl(this);" checked="checked">
+                <label for="noneToggle">navigate</label>
+            </li>
+            <li>
+                <input type="radio" name="type" value="polygon" id="polygonToggle" onclick="toggleControl(this);">
+                <label for="polygonToggle">draw polygon</label>
+            </li>
+        </ul>
+        <div id="output"></div>
+        <div id="docs">
+            <p>
+                To digitize holes in polygons, hold down the <code>Alt</code> 
+                key and draw over an existing polygon.  By default, the 
+                <code>Shift</code> key triggers freehand drawing.  Use a 
+                combination of the <code>Shift</code> and <code>Alt</code> keys
+                to digitize holes in freehand mode.
+            </p>
+            <p>
+                See the <a href="donut.js" target="_blank">
+                donut.js source</a> for details on how this is done.
+            </p>
+        </div>
+        <script src="../lib/OpenLayers.js"></script>
+        <script src="donut.js"></script>
+    </body>
+</html>

Copied: sandbox/tschaub/canvas/examples/donut.js (from rev 11416, trunk/openlayers/examples/donut.js)
===================================================================
--- sandbox/tschaub/canvas/examples/donut.js	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/donut.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,38 @@
+var map = new OpenLayers.Map({
+    div: "map",
+    layers: [
+        new OpenLayers.Layer.OSM(),
+        new OpenLayers.Layer.Vector()
+    ],
+    center: new OpenLayers.LonLat(0, 0),
+    zoom: 1
+});
+
+var draw = new OpenLayers.Control.DrawFeature(
+    map.layers[1],
+    OpenLayers.Handler.Polygon,
+    {handlerOptions: {holeModifier: "altKey"}}
+);
+map.addControl(draw);
+
+// optionally listen for sketch events on the layer
+var output = document.getElementById("output");
+function updateOutput(event) {
+    window.setTimeout(function() {
+        output.innerHTML = event.type + " " + event.feature.id;
+    }, 100);
+}
+map.layers[1].events.on({
+    sketchmodified: updateOutput,
+    sketchcomplete: updateOutput
+})
+
+// add behavior to UI elements
+function toggleControl(element) {
+    if (element.value === "polygon" && element.checked) {
+        draw.activate();
+    } else {
+        draw.deactivate();
+    }
+}
+document.getElementById("noneToggle").checked = true;
\ No newline at end of file

Modified: sandbox/tschaub/canvas/examples/doubleSetCenter.html
===================================================================
--- sandbox/tschaub/canvas/examples/doubleSetCenter.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/doubleSetCenter.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Double Set Center Example</title>
        
         <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/canvas/examples/drag-feature.html
===================================================================
--- sandbox/tschaub/canvas/examples/drag-feature.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/drag-feature.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>Drag Feature Example</title>
         
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/draw-feature.html
===================================================================
--- sandbox/tschaub/canvas/examples/draw-feature.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/draw-feature.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>Draw Feature Example</title>
         
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
@@ -62,6 +64,14 @@
                     }
                 }
             }
+
+            function allowPan(element) {
+                var stop = !element.checked;
+                for(var key in drawControls) {
+                    drawControls[key].handler.stopDown = stop;
+                    drawControls[key].handler.stopUp = stop;
+                }
+            }
         </script>
     </head>
     <body onload="init()">
@@ -95,15 +105,20 @@
                 <input type="radio" name="type" value="polygon" id="polygonToggle" onclick="toggleControl(this);" />
                 <label for="polygonToggle">draw polygon</label>
             </li>
+            <li>
+                <input type="checkbox" name="allow-pan" value="allow-pan" id="allowPanCheckbox" checked=true onclick="allowPan(this);" />
+                <label for="allowPanCheckbox">allow pan while drawing</label>
+            </li>
         </ul>
 
         <div id="docs">
-            <p>With the point drawing control active, click on the map to add a point.  You can drag the point
-            before letting the mouse up if you want to adjust the position.</p>
+            <p>With the point drawing control active, click on the map to add a point.</p>
             <p>With the line drawing control active, click on the map to add the points that make up your line.
             Double-click to finish drawing.</p>
             <p>With the polygon drawing control active, click on the map to add the points that make up your
             polygon.  Double-click to finish drawing.</p>
+            <p>With any drawing control active, paning the map can still be achieved.  Drag the map as
+            usual for that.</p>
             <p>Hold down the shift key while drawing to activate freehand mode.  While drawing lines or polygons
             in freehand mode, hold the mouse down and a point will be added with every mouse movement.<p>
         </div>

Modified: sandbox/tschaub/canvas/examples/dynamic-text-layer.html
===================================================================
--- sandbox/tschaub/canvas/examples/dynamic-text-layer.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/dynamic-text-layer.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Vector Behavior Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/editingtoolbar-outside.html
===================================================================
--- sandbox/tschaub/canvas/examples/editingtoolbar-outside.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/editingtoolbar-outside.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Custom Editing Toolbar</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/editingtoolbar.html
===================================================================
--- sandbox/tschaub/canvas/examples/editingtoolbar.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/editingtoolbar.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Editing Toolbar Example</title>
         
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/events.html
===================================================================
--- sandbox/tschaub/canvas/examples/events.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/events.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Event Handling</title>
         <link rel="stylesheet" href="style.css" type="text/css" />
         <style type="text/css">

Modified: sandbox/tschaub/canvas/examples/example-list.html
===================================================================
--- sandbox/tschaub/canvas/examples/example-list.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/example-list.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <!-- This is the example list source: if you are trying to look at the 
         source of an example, YOU ARE IN THE WRONG PLACE. If you want to view
         the source of just one example, you can typically choose 
@@ -12,14 +14,24 @@
         <link rel="stylesheet" href="style.css" type="text/css" />
         <style type="text/css">
             html, body {
-                height: 100%;
-                overflow: hidden;
                 margin: 0;
                 padding: 0;
                 line-height: 1.25em;
             }
+            #logo {
+                text-shadow: 2px 2px 3px gray;
+                color: white;
+                vertical-align: middle;
+                position: absolute;
+                top: 5px;
+                left: 5px;
+                font-size: 34px;
+                font-family: "Trebuchet MS",Helvetica,Arial,sans-serif;
+            }
+            #logo img {
+                vertical-align: middle;
+            }
             .ex_container{
-                border-bottom: 1px solid #cccccc;
             }
             .ex_container a {
                 text-decoration: none;
@@ -55,20 +67,18 @@
                 display: none;
             }
             #toc {
-                width: 30%;
+                width: 100%;
                 height: 100%;
             }
             #filter {
+                position: fixed;
+                text-align: center;
                 top: 0px;
-                height: 50px;
-                padding: 10px 1em 10px 1em;
+                background: #9D9FA1;
+                width: 100%;
+                padding: 1.3em 0;
             }
             #examples {
-                border-top: 1px solid #cccccc;
-                position: absolute;
-                width: 30%;
-                top: 70px;
-                bottom: 0px;
                 overflow: auto;
                 list-style: none;
                 margin: 0;
@@ -78,12 +88,21 @@
                 list-style: none;
                 margin: 0;
                 padding: 0;
+                margin-top: 4em;
             }
             #examples ul li {
-                display: block;
-                margin: 0;
+                display: inline;
+                float: left;
+                width: 350px;
+                margin: 10px 0 0 10px;
                 padding: 0;
+                border: 1px solid #ddd;
+                border-radius: 3px;
             }
+            #examples .mainlink {
+                height: 8em;
+                overflow: hidden;
+            }
             #exwin {
                 position: absolute;
                 top: 0;
@@ -94,6 +113,26 @@
                 border-left: 1px solid #cccccc;
                 margin: 0;
             }
+            @media only screen and (max-width: 600px) {
+                #examples ul {
+                    margin-top: 100px;
+                }
+                #filter {
+                    padding-top: 50px;
+                }
+                #examples ul li {
+                    margin-left: 0;
+                    border-radius: 0;
+                    border-width: 1px 0;
+                    width: 100%;
+                }
+                #examples .mainlink {
+                    height: auto;
+                }
+                #examples .ex_tags, #examples .ex_filename {
+                    display: none;
+                }
+            }
         </style>
         <script type="text/javascript" src="Jugl.js"></script>
         <script type="text/javascript" src="example-list.js"></script>
@@ -131,7 +170,7 @@
                     for(var i=0; i<words.length; ++i) {
                         var word = words[i].toLowerCase()
                         var dict = info.index[word];
-                        if(dict) {
+                        var updateScores = function() {
                             for(exIndex in dict) {
                                 var count = dict[exIndex];
                                 if(scores[exIndex]) {
@@ -146,6 +185,18 @@
                                 }
                             }
                         }
+                        if(dict) {
+                            updateScores();
+                        } else {
+                            var r;
+                            for (idx in info.index) {
+                               r = new RegExp(word);
+                               if (r.test(idx)) {
+                                    dict = info.index[idx];
+                                    updateScores();
+                               }
+                            }
+                        }
                     }
                     examples = [];
                     for(var j in scores) {
@@ -199,10 +250,10 @@
                 }
             }
             window.onload = function() {
+                //document.getElementById('keywords').focus();
                 template = new jugl.Template("template");
                 target = document.getElementById("examples");
                 listExamples(info.examples);
-                document.getElementById("exwin").src = "../examples/example.html";
                 document.getElementById("keywords").onkeyup = inputChange
                 parseQuery();
             };
@@ -211,20 +262,24 @@
     <body>
         <div id="toc">
             <div id="filter">
+                <div id="logo">
+                <img src="http://www.openlayers.org/images/OpenLayers.trac.png"
+                 />
+                 OpenLayers
+             </div>
                 <p>
-                    <label for="keywords">Filter by keywords</label><br />
-                    <input type="text" id="keywords" />
-                    <span id="count"></span><br />
+                    <input autofocus placeholder="filter by keywords..." type="text" id="keywords" />
+                    <span id="count"></span>
                     <a href="javascript:void showAll();">show all</a>
                 </p>
             </div>
             <div id="examples"></div>
         </div>
-        <iframe id="exwin" name="exwin" frameborder="0"></iframe>        
         <div style="display: none;">
             <ul id="template">
                 <li class="ex_container" jugl:repeat="example examples">
-                    <a jugl:attributes="href example.link" target="exwin">
+                <a jugl:attributes="href example.link" class="mainlink"
+                    target="_blank">
                         <h5 class="ex_title">
                             <span jugl:replace="example.title">title</span><br />
                             <span class="ex_filename" jugl:content="'(' + example.example + ')'">filename</span>

Modified: sandbox/tschaub/canvas/examples/example.html
===================================================================
--- sandbox/tschaub/canvas/examples/example.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/example.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="style.css" type="text/css">

Modified: sandbox/tschaub/canvas/examples/filter-strategy.html
===================================================================
--- sandbox/tschaub/canvas/examples/filter-strategy.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/filter-strategy.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Filter Strategy Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="../theme/default/google.css" type="text/css">

Modified: sandbox/tschaub/canvas/examples/filter.html
===================================================================
--- sandbox/tschaub/canvas/examples/filter.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/filter.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <style>

Modified: sandbox/tschaub/canvas/examples/fractional-zoom.html
===================================================================
--- sandbox/tschaub/canvas/examples/fractional-zoom.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/fractional-zoom.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/canvas/examples/fullScreen.html
===================================================================
--- sandbox/tschaub/canvas/examples/fullScreen.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/fullScreen.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,13 +1,14 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
+<!DOCTYPE html>
+<html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>Full Screen Example</title>        
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />
         <style type="text/css">
-            body {
+            html, body, #map {
                 margin: 0;
-            }
-            #map {
                 width: 100%;
                 height: 100%;
             }
@@ -23,30 +24,7 @@
             }
         </style>
         <script src="../lib/OpenLayers.js"></script>
-        <script type="text/javascript">
-            var map;
-            function init(){
-                map = new OpenLayers.Map('map');
-
-            var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
-                    "http://vmap0.tiles.osgeo.org/wms/vmap0",
-                    {layers: 'basic'} );
-            var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
-                "http://t1.hypercube.telascience.org/cgi-bin/landsat7", 
-                {layers: "landsat7"});
-
-                var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo",
-                    "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
-                    {layers: "bathymetry,land_fn,park,drain_fn,drainage," +
-                             "prov_bound,fedlimit,rail,road,popplace",
-                     transparent: "true", format: "image/png" });
-
-                map.addLayers([ol_wms, jpl_wms, dm_wms]);
-                map.addControl(new OpenLayers.Control.LayerSwitcher());
-                map.setCenter(new OpenLayers.LonLat(0, 0), 6);
-                //map.zoomToMaxExtent();
-            }
-        </script>
+        <script src="fullScreen.js"></script>
     </head>
     <body onload="init()">
         <div id="map"></div>
@@ -63,8 +41,11 @@
             </p>
 
             <div id="docs">
-                This example uses CSS to define the dimensions of the map element in order to fill the screen.
-                When the user resizes the window, the map size changes correspondingly. No scroll bars!
+                <p>This example uses CSS to define the dimensions of the map element in order to fill the screen.
+                When the user resizes the window, the map size changes correspondingly. No scroll bars!</p>
+                <p>See the 
+                <a href="fullScreen.js" target="_blank">fullScreen.js source</a> 
+                to see how this is done.</p>
             </div>
         </div>
     </body>

Copied: sandbox/tschaub/canvas/examples/fullScreen.js (from rev 11416, trunk/openlayers/examples/fullScreen.js)
===================================================================
--- sandbox/tschaub/canvas/examples/fullScreen.js	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/fullScreen.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,30 @@
+var map;
+function init(){
+    map = new OpenLayers.Map('map');
+
+    var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
+        "http://vmap0.tiles.osgeo.org/wms/vmap0",
+        {layers: 'basic'} );
+        var ol_wms_nobuffer = new OpenLayers.Layer.WMS( "OpenLayers WMS (no tile buffer)",
+        "http://vmap0.tiles.osgeo.org/wms/vmap0",
+        {layers: 'basic'}, {buffer: 0});
+
+    map.addLayers([ol_wms, ol_wms_nobuffer]);
+    map.addControl(new OpenLayers.Control.LayerSwitcher());
+    map.setCenter(new OpenLayers.LonLat(0, 0), 6);
+}
+var map;
+function init(){
+    map = new OpenLayers.Map('map');
+
+    var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
+        "http://vmap0.tiles.osgeo.org/wms/vmap0",
+        {layers: 'basic'} );
+        var ol_wms_nobuffer = new OpenLayers.Layer.WMS( "OpenLayers WMS (no tile buffer)",
+        "http://vmap0.tiles.osgeo.org/wms/vmap0",
+        {layers: 'basic'}, {buffer: 0});
+
+    map.addLayers([ol_wms, ol_wms_nobuffer]);
+    map.addControl(new OpenLayers.Control.LayerSwitcher());
+    map.setCenter(new OpenLayers.LonLat(0, 0), 6);
+}

Modified: sandbox/tschaub/canvas/examples/geojson.html
===================================================================
--- sandbox/tschaub/canvas/examples/geojson.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/geojson.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Copied: sandbox/tschaub/canvas/examples/geolocation.html (from rev 11416, trunk/openlayers/examples/geolocation.html)
===================================================================
--- sandbox/tschaub/canvas/examples/geolocation.html	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/geolocation.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
+        <meta name="apple-mobile-web-app-capable" content="yes">
+        <title>OpenLayers Geolocation</title>
+
+        <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
+        <link rel="stylesheet" href="style.css" type="text/css">
+        <style>
+            .olControlAttribution {
+                bottom: 3px;
+            }
+        </style>
+    </head>
+    <body>
+        <h1 id="title">Geolocation Example</h1>
+
+        <div id="tags">
+            geolocation, geolocate, mobile
+        </div>
+
+        <p id="shortdesc">
+            Track  current position and display it with its accuracy.
+        </p>
+
+        <div id="map" class="smallmap"></div>
+        <button id="locate">Locate me!</button>
+        <input type="checkbox" name="track" id="track">
+        <label for="track">Track my position</label>
+        <div id="docs">
+            <p>
+                View the <a href="geolocation.js" target="_blank">geolocation.js source</a>
+                to see how this is done.
+            </p>
+        </div>
+        <script src="../lib/OpenLayers.js"></script>
+        <script src="geolocation.js"></script>
+    </body>
+</html>

Copied: sandbox/tschaub/canvas/examples/geolocation.js (from rev 11416, trunk/openlayers/examples/geolocation.js)
===================================================================
--- sandbox/tschaub/canvas/examples/geolocation.js	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/geolocation.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,103 @@
+var style = {
+    fillColor: '#000',
+    fillOpacity: 0.1,
+    strokeWidth: 0
+}
+
+var map = new OpenLayers.Map('map');
+var layer = new OpenLayers.Layer.OSM( "Simple OSM Map");
+var vector = new OpenLayers.Layer.Vector('vector');
+map.addLayers([layer, vector]);
+
+map.setCenter(
+    new OpenLayers.LonLat(-71.147, 42.472).transform(
+        new OpenLayers.Projection("EPSG:4326"),
+        map.getProjectionObject()
+    ), 12
+);
+
+var pulsate = function(feature) {
+    var point = feature.geometry.getCentroid(),
+        bounds = feature.geometry.getBounds(),
+        radius = Math.abs((bounds.right - bounds.left)/2),
+        count = 0,
+        grow = 'up';
+
+    var resize = function(){
+        if (count>16) clearInterval(window.resizeInterval);
+        var interval = radius * 0.03;
+        var ratio = interval/radius;
+        switch(count) {
+            case 4:
+            case 12:
+                grow = 'down'; break;
+            case 8:
+                grow = 'up'; break;
+        }
+        if (grow!=='up') {
+            ratio = - Math.abs(ratio);
+        }
+        feature.geometry.resize(1+ratio, point);
+        vector.drawFeature(feature);
+        count++;
+    }
+    window.resizeInterval = window.setInterval(resize, 50, point, radius);
+};
+
+var geolocate = new OpenLayers.Control.Geolocate({
+    geolocationOptions: {
+        enableHighAccuracy: false,
+        maximumAge: 0,
+        timeout: 7000
+    }
+});
+map.addControl(geolocate);
+geolocate.events.register("locationupdated",this,function(e) {
+    vector.removeAllFeatures();
+    var circle = new OpenLayers.Feature.Vector(
+        OpenLayers.Geometry.Polygon.createRegularPolygon(
+            new OpenLayers.Geometry.Point(e.point.x, e.point.y),
+            e.position.coords.accuracy/2,
+            40,
+            0
+        ),
+        {},
+        style
+    );
+    vector.addFeatures([
+        new OpenLayers.Feature.Vector(
+            e.point,
+            {},
+            {
+                graphicName: 'cross',
+                strokeColor: '#f00',
+                strokeWidth: 2,
+                fillOpacity: 0,
+                pointRadius: 10
+            }
+        ),
+        circle
+    ]);
+    map.zoomToExtent(vector.getDataExtent());
+    pulsate(circle);
+});
+geolocate.events.register("locationfailed",this,function() {
+    OpenLayers.Console.log('Location detection failed');
+});
+
+$('locate').onclick = function() {
+    vector.removeAllFeatures();
+    geolocate.deactivate();
+    $('track').checked = false;
+    geolocate.watch = false;
+    geolocate.activate();
+};
+$('track').onclick = function() {
+    vector.removeAllFeatures();
+    geolocate.deactivate();
+    if (this.checked) {
+        geolocate.watch = true;
+        geolocate.activate();
+    }
+};
+$('track').checked = false;

Modified: sandbox/tschaub/canvas/examples/georss-flickr.html
===================================================================
--- sandbox/tschaub/canvas/examples/georss-flickr.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/georss-flickr.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <style type="text/css">

Modified: sandbox/tschaub/canvas/examples/georss-markers.html
===================================================================
--- sandbox/tschaub/canvas/examples/georss-markers.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/georss-markers.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers GeoRSS Marker Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/georss.html
===================================================================
--- sandbox/tschaub/canvas/examples/georss.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/georss.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers GeoRSS Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/getfeature-wfs.html
===================================================================
--- sandbox/tschaub/canvas/examples/getfeature-wfs.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/getfeature-wfs.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <title>WFS: GetFeature Example (GeoServer)</title>
@@ -18,8 +20,8 @@
             });
             layer = new OpenLayers.Layer.WMS(
                 "States WMS/WFS",
-                "http://demo.opengeo.org/geoserver/ows",
-                {layers: 'topp:states', format: 'image/gif'}
+                "http://v2.suite.opengeo.org/geoserver/ows",
+                {layers: 'usa:states', format: 'image/gif'}
             );
             select = new OpenLayers.Layer.Vector("Selection", {styleMap: 
                 new OpenLayers.Style(OpenLayers.Feature.Vector.style["select"])

Modified: sandbox/tschaub/canvas/examples/getfeatureinfo-control.html
===================================================================
--- sandbox/tschaub/canvas/examples/getfeatureinfo-control.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/getfeatureinfo-control.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html>
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers WMS Feature Info Example (GeoServer)</title>
     <script src="../lib/OpenLayers.js"></script>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/getfeatureinfo-popup.html
===================================================================
--- sandbox/tschaub/canvas/examples/getfeatureinfo-popup.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/getfeatureinfo-popup.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html>
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>GetFeatureInfo Popup</title>
     <script src="../lib/OpenLayers.js"></script>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/getfeatureinfo.html
===================================================================
--- sandbox/tschaub/canvas/examples/getfeatureinfo.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/getfeatureinfo.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html>
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Feature Info Example</title>
     <script src="../lib/OpenLayers.js"></script>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/gml-layer.html
===================================================================
--- sandbox/tschaub/canvas/examples/gml-layer.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/gml-layer.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
       <title>OpenLayers GML Layer Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/google-reproject.html
===================================================================
--- sandbox/tschaub/canvas/examples/google-reproject.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/google-reproject.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Google with Overlay Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/google-v3-alloverlays.html
===================================================================
--- sandbox/tschaub/canvas/examples/google-v3-alloverlays.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/google-v3-alloverlays.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Google (v3) Layer Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="../theme/default/google.css" type="text/css">

Modified: sandbox/tschaub/canvas/examples/google-v3.html
===================================================================
--- sandbox/tschaub/canvas/examples/google-v3.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/google-v3.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,11 +1,13 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Google (v3) Layer Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="../theme/default/google.css" type="text/css">
         <link rel="stylesheet" href="style.css" type="text/css">
-        <script src="http://maps.google.com/maps/api/js?sensor=false"></script>
+        <script src="http://maps.google.com/maps/api/js?v=3.3&amp;sensor=false"></script>
         <script src="../lib/OpenLayers.js"></script>
         <script src="google-v3.js"></script>
     </head>
@@ -19,6 +21,8 @@
         </p>
         <div id="map" class="smallmap"></div>
         <div id="docs">
+            <p><input id="animate" type="checkbox" checked="checked">Animated
+                zoom (if supported by GMaps on your device)</input></p>
             <p>
                 If you use the Google Maps v3 API with a Google layer, you don't
                 need to include an API key.  This layer only works in the 

Modified: sandbox/tschaub/canvas/examples/google-v3.js
===================================================================
--- sandbox/tschaub/canvas/examples/google-v3.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/google-v3.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -29,4 +29,12 @@
         new OpenLayers.Projection("EPSG:4326"),
         map.getProjectionObject()
     ), 5);
+    
+    // add behavior to html
+    var animate = document.getElementById("animate");
+    animate.onclick = function() {
+        for (var i=map.layers.length-1; i>=0; --i) {
+            map.layers[i].animationEnabled = this.checked;
+        }
+    };
 }

Modified: sandbox/tschaub/canvas/examples/google.html
===================================================================
--- sandbox/tschaub/canvas/examples/google.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/google.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Google Layer Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="../theme/default/google.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/graphic-name.html
===================================================================
--- sandbox/tschaub/canvas/examples/graphic-name.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/graphic-name.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,91 +1,41 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <title>OpenLayers Graphic Names</title>
-    <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
-    <link rel="stylesheet" href="style.css" type="text/css" />
-    <script src="../lib/OpenLayers.js"></script>
-    <script type="text/javascript">
-        // user custom graphicname
-        
-        OpenLayers.Renderer.symbol.lightning = [0,0, 4,2, 6,0, 10,5, 6,3, 4,5, 0,0];
-        OpenLayers.Renderer.symbol.rectangle = [0,0, 4,0, 4,10, 0,10, 0,0];
-            
-        var map;
-
-        function init() {
-            map = new OpenLayers.Map('map');
-
-            // list of well-known graphic names
-            var graphics = ["star", "cross", "x", "square", "triangle", "circle", "lightning", "rectangle"];
-            
-            // Create one feature for each well known graphic.
-            // Give features a type attribute with the graphic name.
-            var num = graphics.length;
-            var slot = map.maxExtent.getWidth() / num;
-            var features = Array(num);
-            for(var i=0; i<graphics.length; ++i) {
-                lon = map.maxExtent.left + (i * slot) + (slot / 2);
-                features[i] = new OpenLayers.Feature.Vector(
-                    new OpenLayers.Geometry.Point(
-                        map.maxExtent.left + (i * slot) + (slot / 2), 0
-                    ), {
-                        type: graphics[i]
-                    }
-                );
-            }
-            
-            // Create a style map for painting the features.
-            // The graphicName property of the symbolizer is evaluated using
-            // the type attribute on each feature (set above).
-            var styles = new OpenLayers.StyleMap({
-                "default": {
-                    graphicName: "${type}",
-                    pointRadius: 10,
-                    strokeColor: "fuchsia",
-                    strokeWidth: 2,
-                    fillColor: "lime",
-                    fillOpacity: 0.6
-                },
-                "select": {
-                    pointRadius: 20,
-                    fillOpacity: 1,
-                    rotation: 45
-                }
-            });
-
-            // Create a vector layer and give it your style map.
-            var layer = new OpenLayers.Layer.Vector(
-                "Graphics", {styleMap: styles, isBaseLayer: true}
-            );
-            layer.addFeatures(features);
-            map.addLayer(layer);
-            
-            // Create a select feature control and add it to the map.
-            var select = new OpenLayers.Control.SelectFeature(layer, {hover: true});
-            map.addControl(select);
-            select.activate();
-            
-            map.setCenter(new OpenLayers.LonLat(0, 0), 0);
-        }
-    </script>
-  </head>
-  <body onload="init()">
-    <h1 id="title">Named Graphics Example</h1>
-
-    <div id="tags">
-        vector, named graphic, star, cross, x, square, triangle, circle, style
-    </div>
-
-    <p id="shortdesc">
-        Shows how to use well-known graphic names.
-    </p>
-
-    <div id="map" class="smallmap"></div>
-
-    <div id="docs">
-        OpenLayers supports well-known names for a few graphics.  You can use
-        the names "star", "cross", "x", "square", "triangle", and "circle" as
-        the value for the graphicName property of a symbolizer.
-    </div>
-  </body>
-</html>
\ No newline at end of file
+<!DOCTYPE html>
+<html>
+    <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+        <title>OpenLayers Graphic Names</title>
+        <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
+        <link rel="stylesheet" href="style.css" type="text/css" />
+        <script src="../lib/OpenLayers.js" type="text/javascript"></script>
+        <script src="./graphic-name.js" type="text/javascript"></script>
+    </head>
+    <body onload="init();">
+        <h1 id="title">Named Graphics Example</h1>
+        <div id="tags">
+            vector, named graphic, star, cross, x, square, triangle, circle, style
+        </div>
+        <p id="shortdesc">
+            Shows how to use well-known graphic names.
+        </p>
+        <div id="map" class="smallmap">
+        </div>
+        <div id="docs">
+            <p>
+                OpenLayers supports well-known names for a few graphics.  You 
+                can use the names &quot;star&quot;, &quot;cross&quot;, 
+                &quot;x&quot;, &quot;square&quot;, &quot;triangle&quot;, and 
+                &quot;circle&quot; as value for the graphicName property of a 
+                symbolizer.
+            </p>
+            <p>
+                The named symbols &quot;lightning&quot;, &quot;rectangle&quot; 
+                and &quot;church&quot; are user defined.
+            </p>
+            <p>
+                See <a href="./graphic-name.js">graphic-name.js</a>
+                for the source code of this example.
+            </p>
+        </div>
+    </body>
+</html>

Copied: sandbox/tschaub/canvas/examples/graphic-name.js (from rev 11416, trunk/openlayers/examples/graphic-name.js)
===================================================================
--- sandbox/tschaub/canvas/examples/graphic-name.js	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/graphic-name.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,62 @@
+// user custom graphicname
+OpenLayers.Renderer.symbol.lightning = [0, 0, 4, 2, 6, 0, 10, 5, 6, 3, 4, 5, 0, 0];
+OpenLayers.Renderer.symbol.rectangle = [0, 0, 4, 0, 4, 10, 0, 10, 0, 0];
+OpenLayers.Renderer.symbol.church = [4, 0, 6, 0, 6, 4, 10, 4, 10, 6, 6, 6, 6, 14, 4, 14, 4, 6, 0, 6, 0, 4, 4, 4, 4, 0];
+var map;
+
+function init(){
+    map = new OpenLayers.Map('map', {
+        controls: []
+    });
+    
+    // list of well-known graphic names
+    var graphics = ["star", "cross", "x", "square", "triangle", "circle", "lightning", "rectangle", "church"];
+    
+    // Create one feature for each well known graphic.
+    // Give features a type attribute with the graphic name.
+    var num = graphics.length;
+    var slot = map.maxExtent.getWidth() / num;
+    var features = Array(num);
+    for (var i = 0; i < graphics.length; ++i) {
+        lon = map.maxExtent.left + (i * slot) + (slot / 2);
+        features[i] = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.Point(map.maxExtent.left + (i * slot) + (slot / 2), 0), {
+            type: graphics[i]
+        });
+    }
+    
+    // Create a style map for painting the features.
+    // The graphicName property of the symbolizer is evaluated using
+    // the type attribute on each feature (set above).
+    var styles = new OpenLayers.StyleMap({
+        "default": {
+            graphicName: "${type}",
+            pointRadius: 10,
+            strokeColor: "fuchsia",
+            strokeWidth: 2,
+            fillColor: "lime",
+            fillOpacity: 0.6
+        },
+        "select": {
+            pointRadius: 20,
+            fillOpacity: 1,
+            rotation: 45
+        }
+    });
+    
+    // Create a vector layer and give it your style map.
+    var layer = new OpenLayers.Layer.Vector("Graphics", {
+        styleMap: styles,
+        isBaseLayer: true
+    });
+    layer.addFeatures(features);
+    map.addLayer(layer);
+    
+    // Create a select feature control and add it to the map.
+    var select = new OpenLayers.Control.SelectFeature(layer, {
+        hover: true
+    });
+    map.addControl(select);
+    select.activate();
+    
+    map.zoomToMaxExtent();
+}

Modified: sandbox/tschaub/canvas/examples/graticule.html
===================================================================
--- sandbox/tschaub/canvas/examples/graticule.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/graticule.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Graticule Example</title>
 
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/gutter.html
===================================================================
--- sandbox/tschaub/canvas/examples/gutter.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/gutter.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html>
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
       <title>OpenLayers Gutter Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/highlight-feature.html
===================================================================
--- sandbox/tschaub/canvas/examples/highlight-feature.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/highlight-feature.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>SelectFeature Control for Select and Highlight</title> 
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/hover-handler.html
===================================================================
--- sandbox/tschaub/canvas/examples/hover-handler.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/hover-handler.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Hover Handler Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />        

Modified: sandbox/tschaub/canvas/examples/image-layer.html
===================================================================
--- sandbox/tschaub/canvas/examples/image-layer.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/image-layer.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
       <title>OpenLayers Image Layer Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Deleted: sandbox/tschaub/canvas/examples/img/marker_shadow.png
===================================================================
(Binary files differ)

Copied: sandbox/tschaub/canvas/examples/img/marker_shadow.png (from rev 11416, trunk/openlayers/examples/img/marker_shadow.png)
===================================================================
(Binary files differ)

Deleted: sandbox/tschaub/canvas/examples/img/mobile-zoombar.png
===================================================================
--- trunk/openlayers/examples/img/mobile-zoombar.png	2011-02-24 13:42:39 UTC (rev 11416)
+++ sandbox/tschaub/canvas/examples/img/mobile-zoombar.png	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,27 +0,0 @@
-‰PNG
-
-   
-IHDR   $   l   ™   sBIT|dˆ   	pHYs  ¯  ¯^‘   tEXtSoftware www.inkscape.org›î<  -IDAThí›{T•e¾Ç?ï»/Ü6÷« fj„˜†Z)N*á’Ê0q¼•¶\ÙÊÕLuœ™3+s¦ƒ9x#M0
-5ó¬$DEA‡ƒH(rÚ(°A`ßÞóÇƍ»½1Mç,¿ÿíçúÙÏýù½ÏO$‰¾HVz‚b20¤@Ø]Tƒp	øôÙ’´üjŸÊ¿Y Aø(¤Å@4 ¿Éò
- at .k%éõ]·H>ŠÓ <v“ÝH:â›’ôzÎ-	Â\ú¤³Un£„µ0`©$Í0Þ4 |à²tàéÛcÑ0>'Io6õ
-Ô	“„ß!˜ë*côÏ¡Dk˜²Î–¹Ó0˜ë¥›ëìÈ<fîX7ÙÓӝuZdé2ól’ÿŠ07bŒ»>ûnh!ÓwƺnA’¤ë‹Þ—}-FÜÜ”VaÍÍ:L¦¾­þ(Ó%éõ]+nß×¹\$#c
-Ï>ûUøîÝ?2cÆWèõ¦>–(-v	ð7O×sóÛ ƒ¹SV6ßn\HÈΟïÓ` ƒŸØ¹Qö	æIŠÉ"0án“Ü 	bçâ‘4@Ä|ž¹W$§ëpeWÎÎ
-†÷±Í¤ê6ÏÈ‘¾x{;Ú„i¸vMßSu|Øí¢¡Pˆ:”Àã÷祖›VNNO=•ÁÐý’ v¸»;Ü6€˜˜þ¸»;ô˜¦G »¡û@½©G +WÚÙ²¥ä¶U¶iÓ®\ië1M³@°;tçÔ©—ìæQ«·PVÖhÞÔÔAo·®^÷0I‚ÆÆ›ðæfÛ°®8Ý<7£ÿ¬1t7t¨7Ý2Pe¥–¯¿.·	ß¿ÿÍ·Ôë´ïIr¹ˆ“U˜FÓÖãæÙk™·œ0L\¾ÜúKŠ°ÑÿŸ1t§t¨7õyP;;+HHeÖ¬0BC½psSâì,ÚÚô44´S^ÞÈŽçHM-¦½ÝЧòozÚGDøñùçO3r¤¢(ÐØØÁ¹sW	óæ‹/ÎÒÜÜAPŠ/tÃÛÛ	I’(,¬ç•WrâÄåÛìÊΝS5ªMM|öÙ¿IN. ¶Ö<ÝW­G` ŠÄįmò%!“	¸º*9r¤š„„=ÔÔ´ôÔãš1#”²²ù„‡û Ñ´—Åòå9€·ßÎ%2ҏ¸¸!Vy++µüö·;Ñju¼õÖ÷DFúSQ±€ÄÄ°[Z³æ	ÒÓ§`2Iüã§yãÃ¬]ûr¹u–Ž#³gïãÓO'àím½j?^KJJQQøù­ãèÑ6ožÌêÕ㺒Aìý<pÕª–.}”uëNŸE||‹G —‹øù9sð`…Uúšš¼¼™5+Œ;ÏYÅåæV±xq$žžhµz""üˆŽî‹‹Â¦»@óæ
-cåÊqlÛv–yóÐÚª'3ó<[·–àëëÄ’%‘L™2£QâÚ5W¯¶#I›[Í[o=†FÓFII¢(êÅĉ	
-õdþüáÖ¿•JÉk¯ERZÚÀ™3
-V at Vƒ:(HEEÅ4švRRþÍ;ï±ù«W'2ÒŸÚÚÔê Uœ=Û@K‹Æùrút=áá>ÔÔ´PXXÏ¡C(•2¦Oa„ŒÎî|‘ˆ‚ƒÿ›ººVû@yy/¢Vû1lØF¾ÿþÂÂRÑh¬o	*•‚ÒÒ¹Lžü%EE?áêª$<ÜGG92™@JJ,ï¿ŒôôÐju]]!¨ªz™Ñ£Ó¸t©ggõõ‹(.ÖðØci¶]6fL ï¾;†ººkøúºpòäeÆŽíÏ7ß\´ÒéLøú:âÉwßU¢Ó©ªÒrñbååM¸¹9п¿+{÷–Yå“$xðAw‚ƒÝ8r¤½ÞD}}¯¼2’¬¬
 -­d™2ÉÉO¢Ñ´²WW±±Y¸p..
-›nÛ³§Œiӆ؄ìØñ		¡‚mÜöí¥Ìœ9€èè ‡ÒÒ¢'%e¢%x½9#"üØ´é­­zž~/þóQ
-‘;§Ò¿¿«UÁÇŽÕ¨"8Ø: ´ô
-DEÙZyŽ©¦_?rržgóæÉlÜx†ääÔê d2¡())Qùë_Z2gdüÀGÀÇÇ™¢¢ÙlÛö£G÷Àd’ÈÎ.gêÔî[é¹ç¶
-1—;§áä$§¥EOhè6n,æƒòEÁÒr"@BB(õõ­6—»ìì˜Â±c5lÝú;ŠŠ’øôÓ§hlì !!Ô.СCÄÆ>À’%‘ddL¡¦æ²²âÈÍ­búô¯ðòr´˜µZ
-
-m 9ÀàÁ´´ØZ¶òók1—ÖV=ÉÉ…üýï…DFú3vl“&=Ș147/A§3b0H&ŒF	OOG”JaaÞìÞý#Ë–æÒ%óÁ?,ÌÛÆØ~îÜU†õîòósÆ`0±aÃÓ,\xÐrH×ëM´¶êquUÒØh¾—ÔQPPÇ—_ž#??‘°°Tär¹\@&‘É”J'N$òòËmþ¤V«ÃÕÕ¨²RKX˜wW—98ÈøüóÿÅßß…}û¦àbIÜܬÃÍÍÖØÐÜl.¸©©ƒ††6êê®QSÓBe¥y	puUڝiZ­•Ê¤R)X¹2†‰ÀÁAÖd2I("Ó¦e’“SÅéÓ³Y°`8‚`6*¨T¶S¿¥E‡³³Ân¥×·•Ÿ·„9Ÿ•JÁ¬Ya”–ÎÅÇlj´´á†YÖÞn$ À£Qâ/9ÊøñÛ™5ërsgàbצ#IÐÞnÀÙÙö:°= ßüÆ™LäÕW#ˆ‹ËbÞ¼xz:¡Ó»€´ZÕZSZz…˜˜m|öÙi<=ùöÛæÌ	G©ìúøçáá€Ñ(ÑÚj;åxx8XîlJ¥ŒñãƒÙ¸q{öÄS_ßJTT'OšO‘C†xðÓO×€ÎA]\¬aÔ¨ ›((¨£¬¬‘W_=IJejV¯O^^5¹¹Õ45é8{Öz§¾®¡C½¨¬Ôò‡?D;1c‚(.֐]N~~-ÑÑý­Wƒ¹sâD]Ð_”0iÒƒÄÇ?Ä®]ç-	Ǎ¦  ŽÃ‡+9|¸'¢£ƒxüñþ¼üòH‚‚T\¼¸ÀÈËËAxøaoÖ¯/â…öÒÜlÞh×­›À‰µVi}}Ùµë\Ðöí?°iÓd6ožŒ(î³²fÌaíÚS–ÌMYY?’•õ#J¥ŒÊJ-?Ø -[¦¦¦¦…÷ß?n§Vû³}{©å÷Šc1%6o>Ód0˜(,¬ã¡‡<IN~’G
- 9¹ˆöí»`·[&OijÏfqñ¢Í§wFŒðcÏž2›ðÜ<؃“'/ãêªdÅŠ±,Z4’S§ê,+·e·Ÿ;÷ îî|òÉIyć¼¼™äæVÛ½WEEríšž¢¢Ÿlâö`Ⱥd·hÑH¶l)aÊ”Á””Ì
 !**AX²ä,i, at EE?qòäeÞ}wññ»io7Äš5OÒ¯Ÿ‹UÁ3g%-í¬Ý–KJ
-'-í¬IÆÉI΂ÃQ«xç(fÏÞÇðá¾äåU“—Wc0ujrNŸžÝy&þŠŠ’X³æIxÀ
-WW%		¡lÛf$Š/½Fjj±UبQýÈÌŒC¥R²gO›yï½h
-‘¸¸,ë2nüQ[Û‹/~ÍС^œ?•Ë—[yóÍÂÂRÑëäç'ráÂ|Ú9ÒÏÆ~=}zµµ­47w0wî0ÒÓ§PW·ˆõëc;63¾bÕª|þùωŒÈ‚ßØ‘íÞ\?þx<K—ªIM-æ÷¿ßo	÷÷w¦´t.ë֝B­`ìØ DѼU®®JZZtèõ&¬`ÿþ8p?þñ1ä,\ø
-))±ÌŸ?œ÷Þ;ÆŸþ”kÓÊÝ^¥W¬ÃÛoáøñZžx"övS(/obùró ™LÀÁÁ|¸íµHbb‚ILü¦Íòí^­`ïÞxÔê-ìÞGD„?|’e˾³WmÏwû¤¤pÖ¯Å`0‘™yžðp_}tÖO
-rçøñDbb¶[­Þ~~Îäç'òí·Ìœ9¹\dÎœý¤¥uÿý¤Wcƒ¿¿3™™qDEÒØØΆ
-ŬYS at U•0ïSyy3Ùºµ„5k
-,ùöàðáçðövÂÑQNAAÏ<³«W›äM›cƍæÃÇéL& Ñ´Q^Þˆ££''9ÙÙåôëg>ø‡†záåeþæZPp™…RPPw3ÕôÝ,ìì¬`Îœp¦MÌ A¸àè(Çh4¡Ó™hnîàÌ™ÒÓKÉÌ<Ï•+í})þ—Ù©ï„î9ã} Þt¨7ÝêM÷zÓ} Þt¨7Ýs@½~ÀëîuÌ­è¿ŽHMÄìُÜ -[JHJÚ×ããÝhÞÞNh4¯Þ˜ëòõ]gs»Q÷Üí݆¸AZ³û̽¢¨î.¶©©ƒœœªÛVÛ÷ßWÑÔÔãS°j¹Ù±Èþ¸6LLšô¥Ý·°·¢¢"M//Ñ…K¬~¤­·¥Æ_,!Q}6f/§»-è³ÅNÿ/[»È¯¯\IZ~µsÖÞ]–.†<_><úË}ÈnUÒ1Iz#
-¬VjñÍ»c]·Èì›s7ºNX{£WÞÏö²K¿"́Î:-²2»éŸŠ¹ó*6{áY»Úìöf8c4w¶¥Øó¾ƒÿ§Ik°{Ä­Ôؽáxkvg]“ÿˆ¿=yíÑ    IEND®B`‚
\ No newline at end of file

Copied: sandbox/tschaub/canvas/examples/img/mobile-zoombar.png (from rev 11416, trunk/openlayers/examples/img/mobile-zoombar.png)
===================================================================
--- sandbox/tschaub/canvas/examples/img/mobile-zoombar.png	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/img/mobile-zoombar.png	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,27 @@
+‰PNG
+
+   
+IHDR   $   l   ™   sBIT|dˆ   	pHYs  ¯  ¯^‘   tEXtSoftware www.inkscape.org›î<  -IDAThí›{T•e¾Ç?ï»/Ü6÷« fj„˜†Z)N*á’Ê0q¼•¶\ÙÊÕLuœ™3+s¦ƒ9x#M0
+5ó¬$DEA‡ƒH(rÚ(°A`ßÞóÇƍ»½1Mç,¿ÿíçúÙÏýù½ÏO$‰¾HVz‚b20¤@Ø]Tƒp	øôÙ’´üjŸÊ¿Y Aø(¤Å@4 ¿Éò
+ at .k%éõ]·H>ŠÓ <v“ÝH:â›’ôzÎ-	Â\ú¤³Un£„µ0`©$Í0Þ4 |à²tàéÛcÑ0>'Io6õ
+Ô	“„ß!˜ë*côÏ¡Dk˜²Î–¹Ó0˜ë¥›ëìÈ<fîX7ÙÓӝuZdé2ól’ÿŠ07bŒ»>ûnh!ÓwƺnA’¤ë‹Þ—}-FÜÜ”VaÍÍ:L¦¾­þ(Ó%éõ]+nß×¹\$#c
+Ï>ûUøîÝ?2cÆWèõ¦>–(-v	ð7O×sóÛ ƒ¹SV6ßn\HÈΟïÓ` ƒŸØ¹Qö	æIŠÉ"0án“Ü 	bçâ‘4@Ä|ž¹W$§ëpeWÎÎ
+†÷±Í¤ê6ÏÈ‘¾x{;Ú„i¸vMßSu|Øí¢¡Pˆ:”Àã÷祖›VNNO=•ÁÐý’ v¸»;Ü6€˜˜þ¸»;ô˜¦G »¡û@½©G +WÚÙ²¥ä¶U¶iÓ®\ië1M³@°;tçÔ©—ìæQ«·PVÖhÞÔÔAo·®^÷0I‚ÆÆ›ðæfÛ°®8Ý<7£ÿ¬1t7t¨7Ý2Pe¥–¯¿.·	ß¿ÿÍ·Ôë´ïIr¹ˆ“U˜FÓÖãæÙk™·œ0L\¾ÜúKŠ°ÑÿŸ1t§t¨7õyP;;+HHeÖ¬0BC½psSâì,ÚÚô44´S^ÞÈŽçHM-¦½ÝЧòozÚGDøñùçO3r¤¢(ÐØØÁ¹sW	óæ‹/ÎÒÜÜAPŠ/tÃÛÛ	I’(,¬ç•WrâÄåÛìÊΝS5ªMM|öÙ¿IN. ¶Ö<ÝW­G` ŠÄįmò%!“	¸º*9r¤š„„=ÔÔ´ôÔãš1#”²²ù„‡û Ñ´—Åòå9€·ßÎ%2ҏ¸¸!Vy++µüö·;Ñju¼õÖ÷DFúSQ±€ÄÄ°[Z³æ	ÒÓ§`2Iüã§yãÃ¬]ûr¹u–Ž#³gïãÓO'àím½j?^KJJQQøù­ãèÑ6ožÌêÕ㺒Aìý<pÕª–.}”uëNŸE||‹G —‹øù9sð`…Uúšš¼¼™5+Œ;ÏYÅåæV±xq$žžhµz""üˆŽî‹‹Â¦»@óæ
+cåÊqlÛv–yóÐÚª'3ó<[·–àëëÄ’%‘L™2£QâÚ5W¯¶#I›[Í[o=†FÓFII¢(êÅĉ	
+õdþüáÖ¿•JÉk¯ERZÚÀ™3
+V at Vƒ:(HEEÅ4švRRþÍ;ï±ù«W'2ÒŸÚÚÔê Uœ=Û@K‹Æùrút=áá>ÔÔ´PXXÏ¡C(•2¦Oa„ŒÎî|‘ˆ‚ƒÿ›ººVû@yy/¢Vû1lØF¾ÿþÂÂRÑh¬o	*•‚ÒÒ¹Lžü%EE?áêª$<ÜGG92™@JJ,ï¿ŒôôÐju]]!¨ªz™Ñ£Ó¸t©ggõõ‹(.ÖðØci¶]6fL ï¾;†ººkøúºpòäeÆŽíÏ7ß\´ÒéLøú:âÉwßU¢Ó©ªÒrñbååM¸¹9п¿+{÷–Yå“$xðAw‚ƒÝ8r¤½ÞD}}¯¼2’¬¬
 -­d™2ÉÉO¢Ñ´²WW±±Y¸p..
+›nÛ³§Œiӆ؄ìØñ		¡‚mÜöí¥Ìœ9€èè ‡ÒÒ¢'%e¢%x½9#"üØ´é­­zž~/þóQ
+‘;§Ò¿¿«UÁÇŽÕ¨"8Ø: ´ô
+DEÙZyŽ©¦_?rržgóæÉlÜx†ääÔê d2¡())Qùë_Z2gdüÀGÀÇÇ™¢¢ÙlÛö£G÷Àd’ÈÎ.gêÔî[é¹ç¶
+1—;§áä$§¥EOhè6n,æƒòEÁÒr"@BB(õõ­6—»ìì˜Â±c5lÝú;ŠŠ’øôÓ§hlì !!Ô.СCÄÆ>À’%‘ddL¡¦æ²²âÈÍ­búô¯ðòr´˜µZ
+
+m 9ÀàÁ´´ØZ¶òók1—ÖV=ÉÉ…üýï…DFú3vl“&=Ș147/A§3b0H&ŒF	OOG”JaaÞìÞý#Ë–æÒ%óÁ?,ÌÛÆØ~îÜU†õîòósÆ`0±aÃÓ,\xÐrH×ëM´¶êquUÒØh¾—ÔQPPÇ—_ž#??‘°°Tär¹\@&‘É”J'N$òòËmþ¤V«ÃÕÕ¨²RKX˜wW—98ÈøüóÿÅßß…}û¦àbIÜܬÃÍÍÖØÐÜl.¸©©ƒ††6êê®QSÓBe¥y	puUڝiZ­•Ê¤R)X¹2†‰ÀÁAÖd2I("Ó¦e’“SÅéÓ³Y°`8‚`6*¨T¶S¿¥E‡³³Ân¥×·•Ÿ·„9Ÿ•JÁ¬Ya”–ÎÅÇlj´´á†YÖÞn$ À£Qâ/9ÊøñÛ™5ërsgàbצ#IÐÞnÀÙÙö:°= ßüÆ™LäÕW#ˆ‹ËbÞ¼xz:¡Ó»€´ZÕZSZz…˜˜m|öÙi<=ùöÛæÌ	G©ìúøçáá€Ñ(ÑÚj;åxx8XîlJ¥ŒñãƒÙ¸q{öÄS_ßJTT'OšO‘C†xðÓO×€ÎA]\¬aÔ¨ ›((¨£¬¬‘W_=IJejV¯O^^5¹¹Õ45é8{Öz§¾®¡C½¨¬Ôò‡?D;1c‚(.֐]N~~-ÑÑý­Wƒ¹sâD]Ð_”0iÒƒÄÇ?Ä®]ç-	Ǎ¦  ŽÃ‡+9|¸'¢£ƒxüñþ¼üòH‚‚T\¼¸ÀÈËËAxøaoÖ¯/â…öÒÜlÞh×­›À‰µVi}}Ùµë\Ðöí?°iÓd6ožŒ(î³²fÌaíÚS–ÌMYY?’•õ#J¥ŒÊJ-?Ø -[¦¦¦¦…÷ß?n§Vû³}{©å÷Šc1%6o>Ód0˜(,¬ã¡‡<IN~’G
+ 9¹ˆöí»`·[&OijÏfqñ¢Í§wFŒðcÏž2›ðÜ<؃“'/ãêªdÅŠ±,Z4’S§ê,+·e·Ÿ;÷ îî|òÉIyć¼¼™äæVÛ½WEEríšž¢¢Ÿlâö`Ⱥd·hÑH¶l)aÊ”Á””Ì
 !**AX²ä,i, at EE?qòäeÞ}wññ»io7Äš5OÒ¯Ÿ‹UÁ3g%-í¬Ý–KJ
+'-í¬IÆÉI΂ÃQ«xç(fÏÞÇðá¾äåU“—Wc0ujrNŸžÝy&þŠŠ’X³æIxÀ
+WW%		¡lÛf$Š/½Fjj±UبQýÈÌŒC¥R²gO›yï½h
+‘¸¸,ë2nüQ[Û‹/~ÍС^œ?•Ë—[yóÍÂÂRÑëäç'ráÂ|Ú9ÒÏÆ~=}zµµ­47w0wî0ÒÓ§PW·ˆõëc;63¾bÕª|þùωŒÈ‚ßØ‘íÞ\?þx<K—ªIM-æ÷¿ßo	÷÷w¦´t.ë֝B­`ìØ DѼU®®JZZtèõ&¬`ÿþ8p?þñ1ä,\ø
+))±ÌŸ?œ÷Þ;ÆŸþ”kÓÊÝ^¥W¬ÃÛoáøñZžx"övS(/obùró ™LÀÁÁ|¸íµHbb‚ILü¦Íòí^­`ïÞxÔê-ìÞGD„?|’e˾³WmÏwû¤¤pÖ¯Å`0‘™yžðp_}tÖO
+rçøñDbb¶[­Þ~~Îäç'òí·Ìœ9¹\dÎœý¤¥uÿý¤Wcƒ¿¿3™™qDEÒØØΆ
+ŬYS at U•0ïSyy3Ùºµ„5k
+,ùöàðáçðövÂÑQNAAÏ<³«W›äM›cƍæÃÇéL& Ñ´Q^Þˆ££''9ÙÙåôëg>ø‡†záåeþæZPp™…RPPw3ÕôÝ,ìì¬`Îœp¦MÌ A¸àè(Çh4¡Ó™hnîàÌ™ÒÓKÉÌ<Ï•+í})þ—Ù©ï„î9ã} Þt¨7ÝêM÷zÓ} Þt¨7Ýs@½~ÀëîuÌ­è¿ŽHMÄìُÜ -[JHJÚ×ããÝhÞÞNh4¯Þ˜ëòõ]gs»Q÷Üí݆¸AZ³û̽¢¨î.¶©©ƒœœªÛVÛ÷ßWÑÔÔãS°j¹Ù±Èþ¸6LLšô¥Ý·°·¢¢"M//Ñ…K¬~¤­·¥Æ_,!Q}6f/§»-è³ÅNÿ/[»È¯¯\IZ~µsÖÞ]–.†<_><úË}ÈnUÒ1Iz#
+¬VjñÍ»c]·Èì›s7ºNX{£WÞÏö²K¿"́Î:-²2»éŸŠ¹ó*6{áY»Úìöf8c4w¶¥Øó¾ƒÿ§Ik°{Ä­Ôؽáxkvg]“ÿˆ¿=yíÑ    IEND®B`‚
\ No newline at end of file

Deleted: sandbox/tschaub/canvas/examples/img/popupMatrix.jpg
===================================================================
(Binary files differ)

Copied: sandbox/tschaub/canvas/examples/img/popupMatrix.jpg (from rev 11416, trunk/openlayers/examples/img/popupMatrix.jpg)
===================================================================
(Binary files differ)

Deleted: sandbox/tschaub/canvas/examples/img/small.jpg
===================================================================
(Binary files differ)

Copied: sandbox/tschaub/canvas/examples/img/small.jpg (from rev 11416, trunk/openlayers/examples/img/small.jpg)
===================================================================
(Binary files differ)

Deleted: sandbox/tschaub/canvas/examples/img/thinlong.jpg
===================================================================
(Binary files differ)

Copied: sandbox/tschaub/canvas/examples/img/thinlong.jpg (from rev 11416, trunk/openlayers/examples/img/thinlong.jpg)
===================================================================
(Binary files differ)

Deleted: sandbox/tschaub/canvas/examples/img/widelong.jpg
===================================================================
(Binary files differ)

Copied: sandbox/tschaub/canvas/examples/img/widelong.jpg (from rev 11416, trunk/openlayers/examples/img/widelong.jpg)
===================================================================
(Binary files differ)

Deleted: sandbox/tschaub/canvas/examples/img/wideshort.jpg
===================================================================
(Binary files differ)

Copied: sandbox/tschaub/canvas/examples/img/wideshort.jpg (from rev 11416, trunk/openlayers/examples/img/wideshort.jpg)
===================================================================
(Binary files differ)

Modified: sandbox/tschaub/canvas/examples/intersects.html
===================================================================
--- sandbox/tschaub/canvas/examples/intersects.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/intersects.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Geometry Intersections</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/kamap.html
===================================================================
--- sandbox/tschaub/canvas/examples/kamap.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/kamap.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers KaMap Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Copied: sandbox/tschaub/canvas/examples/kinetic.html (from rev 11416, trunk/openlayers/examples/kinetic.html)
===================================================================
--- sandbox/tschaub/canvas/examples/kinetic.html	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/kinetic.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>OpenLayers Kinetic Dragging Example</title>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
+    <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
+    <link rel="stylesheet" href="style.css" type="text/css">
+  </head>
+  <body>
+      <h1 id="title">Kinetic Dragging Example</h1>
+
+      <div id="tags">
+          kinetic, dragging
+      </div>
+
+      <p id="shortdesc">
+        Demonstrates Kinetic Dragging.
+      </p>
+
+    <div id="map" class="smallmap"></div>
+
+    <div id="docs">
+        <p>
+            OpenLayers Kinetic Dragging inspired from <a href="http://www.tile5.org">Tile5</a>, and
+            <a href="http://code.google.com/p/kineticscrolling/">kineticscrolling</a> for Google Maps API V3.
+        </p><p>
+            As shown in this example Kinetic Dragging is enabled by setting
+            <code>enableKinetic</code> to true in the config object provided to the
+            <code>Control.DragPan</code> constructor. When using
+            <code>Control.Navigation</code> or <code>Control.TouchNavigation</code>
+            providing options to the underlying <code>Control.DragPan</code>
+            instance is done through the <code>dragPanOptions</code> config
+            property.
+        </p><p>
+            View the <a href="kinetic.js" target="_blank">kinetic.js source</a>
+            to see how this is done.
+        </p>
+    </div>
+    <script src="../lib/OpenLayers.js"></script>
+    <script src="kinetic.js"></script>
+  </body>
+</html>

Copied: sandbox/tschaub/canvas/examples/kinetic.js (from rev 11416, trunk/openlayers/examples/kinetic.js)
===================================================================
--- sandbox/tschaub/canvas/examples/kinetic.js	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/kinetic.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,28 @@
+var map = new OpenLayers.Map({
+    div: "map",
+    resolutions: [0.087890625, 0.0439453125, 0.02197265625, 0.010986328125],
+    panDuration: 100,
+    controls: [
+        new OpenLayers.Control.Navigation(
+            {dragPanOptions: {enableKinetic: true}}
+        )
+    ]
+});
+var layer = new OpenLayers.Layer.TileCache("TileCache Layer",
+    ["http://c0.tilecache.osgeo.org/wms-c/cache/",
+     "http://c1.tilecache.osgeo.org/wms-c/cache/",
+     "http://c2.tilecache.osgeo.org/wms-c/cache/",
+     "http://c3.tilecache.osgeo.org/wms-c/cache/",
+     "http://c4.tilecache.osgeo.org/wms-c/cache/"],
+    "basic",
+    {
+        serverResolutions: [0.703125, 0.3515625, 0.17578125, 0.087890625,
+                            0.0439453125, 0.02197265625, 0.010986328125,
+                            0.0054931640625, 0.00274658203125, 0.001373291015625,
+                            0.0006866455078125, 0.00034332275390625, 0.000171661376953125,
+                            0.0000858306884765625, 0.00004291534423828125, 0.000021457672119140625],
+        buffer: 4
+    }
+);
+map.addLayer(layer);
+map.setCenter(new OpenLayers.LonLat(0, 0), 0);
\ No newline at end of file

Modified: sandbox/tschaub/canvas/examples/kml-layer.html
===================================================================
--- sandbox/tschaub/canvas/examples/kml-layer.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/kml-layer.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,45 +1,35 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
-    <link rel="stylesheet" href="style.css" type="text/css" />
-    <script src="../lib/OpenLayers.js"></script>
-    <script type="text/javascript">
-        var lon = 5;
-        var lat = 40;
-        var zoom = 5;
-        var map, layer;
+<!DOCTYPE html>
+<html>
+    <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
+        <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
+        <link rel="stylesheet" href="style.css" type="text/css">
+    </head>
+    <body>
+    <h1 id="title">KML Layer Example</h1>
 
-        function init(){
-            map = new OpenLayers.Map('map');
-            layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
-                    "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
-            map.addLayer(layer);
-            map.addLayer(new OpenLayers.Layer.GML("KML", "kml/lines.kml", 
-               {
-                format: OpenLayers.Format.KML, 
-                formatOptions: {
-                  extractStyles: true, 
-                  extractAttributes: true,
-                  maxDepth: 2
-                }
-               }));
-            map.zoomToExtent(new OpenLayers.Bounds(-112.306698,36.017792,-112.03204,36.18087));
-        }
-    </script>
-  </head>
-  <body onload="init()">
-      <h1 id="title">KML Layer Example</h1>
+    <div id="tags">KML</div>
 
-      <div id="tags">
-        KML
-      </div>
-
-      <p id="shortdesc">
-          Demonstrates loading and displaying a KML file on top of a basemap.
+    <p id="shortdesc">
+        Demonstrates loading and displaying a KML file on top of a basemap.
     </p>
 
     <div id="map" class="smallmap"></div>
 
-    <div id="docs"></div>
-  </body>
+    <div id="docs">
+        <p>
+            A vector layer can be populated with features from a KML document
+            by configuring the layer with an HTTP protocol that points to the 
+            KML document and is configured with a KML format for parsing features.
+            The fixed strategy is used to load all features at once.
+        </p>
+        <p>
+            View the <a href="kml-layer.js" target="_blank">kml-layer.js</a>
+            source to see how this is done.
+        </p>
+    </div>
+    <script src="../lib/OpenLayers.js"></script>
+    <script src="kml-layer.js"></script>
+    </body>
 </html>

Copied: sandbox/tschaub/canvas/examples/kml-layer.js (from rev 11416, trunk/openlayers/examples/kml-layer.js)
===================================================================
--- sandbox/tschaub/canvas/examples/kml-layer.js	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/kml-layer.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,22 @@
+var map = new OpenLayers.Map({
+    div: "map",
+    layers: [
+        new OpenLayers.Layer.WMS(
+            "WMS", "http://vmap0.tiles.osgeo.org/wms/vmap0",
+            {layers: "basic"}
+        ),
+        new OpenLayers.Layer.Vector("KML", {
+            strategies: [new OpenLayers.Strategy.Fixed()],
+            protocol: new OpenLayers.Protocol.HTTP({
+                url: "kml/lines.kml",
+                format: new OpenLayers.Format.KML({
+                    extractStyles: true, 
+                    extractAttributes: true,
+                    maxDepth: 2
+                })
+            })
+        })
+    ],
+    center: new OpenLayers.LonLat(-112.169, 36.099),
+    zoom: 11
+});

Modified: sandbox/tschaub/canvas/examples/kml-track.html
===================================================================
--- sandbox/tschaub/canvas/examples/kml-track.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/kml-track.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers KLM Track Parsing Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="../theme/default/google.css" type="text/css">

Modified: sandbox/tschaub/canvas/examples/late-render.html
===================================================================
--- sandbox/tschaub/canvas/examples/late-render.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/late-render.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Late Rendering Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/layer-opacity.html
===================================================================
--- sandbox/tschaub/canvas/examples/layer-opacity.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/layer-opacity.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
       <title>OpenLayers Layer Opacity Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/layerLoadMonitoring.html
===================================================================
--- sandbox/tschaub/canvas/examples/layerLoadMonitoring.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/layerLoadMonitoring.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Layer Load Monitoring Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/layerswitcher.html
===================================================================
--- sandbox/tschaub/canvas/examples/layerswitcher.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/layerswitcher.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
       <title>OpenLayers Layer Switcher Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/lite.html
===================================================================
--- sandbox/tschaub/canvas/examples/lite.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/lite.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Basic Single WMS Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/mapguide.html
===================================================================
--- sandbox/tschaub/canvas/examples/mapguide.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/mapguide.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers MapGuide Layer Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/mapserver.html
===================================================================
--- sandbox/tschaub/canvas/examples/mapserver.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/mapserver.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>MapServer Layer</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/mapserver_untiled.html
===================================================================
--- sandbox/tschaub/canvas/examples/mapserver_untiled.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/mapserver_untiled.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>MapServer Single Tile Mode</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/marker-shadow.html
===================================================================
--- sandbox/tschaub/canvas/examples/marker-shadow.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/marker-shadow.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Vector Graphics with Shadows</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
@@ -37,7 +39,7 @@
                     styleMap: new OpenLayers.StyleMap({
                         // Set the external graphic and background graphic images.
                         externalGraphic: "../img/marker-gold.png",
-                        backgroundGraphic: "./marker_shadow.png",
+                        backgroundGraphic: "./img/marker_shadow.png",
                         
                         // Makes sure the background graphic is placed correctly relative
                         // to the external graphic.

Modified: sandbox/tschaub/canvas/examples/markerResize.html
===================================================================
--- sandbox/tschaub/canvas/examples/markerResize.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/markerResize.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Resize a Marker</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Deleted: sandbox/tschaub/canvas/examples/marker_shadow.png
===================================================================
(Binary files differ)

Modified: sandbox/tschaub/canvas/examples/markers.html
===================================================================
--- sandbox/tschaub/canvas/examples/markers.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/markers.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Markers Layer Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/markersTextLayer.html
===================================================================
--- sandbox/tschaub/canvas/examples/markersTextLayer.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/markersTextLayer.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Using a Layer.Text to display markers</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/measure.html
===================================================================
--- sandbox/tschaub/canvas/examples/measure.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/measure.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <style type="text/css">
@@ -132,6 +134,13 @@
                 control.geodesic = element.checked;
             }
         }
+        
+        function toggleImmediate(element) {
+            for(key in measureControls) {
+                var control = measureControls[key];
+                control.setImmediate(element.checked);
+            }
+        }
     </script>
   </head>
   <body onload="init()">
@@ -164,13 +173,19 @@
                 <input type="checkbox" name="geodesic" id="geodesicToggle" onclick="toggleGeodesic(this);" />
                 <label for="geodesicToggle">use geodesic measures</label>
             </li>
+            <li>
+                <input type="checkbox" name="immediate" id="immediateToggle" onclick="toggleImmediate(this);" />
+                <label for="immediateToggle">use immediate measures</label>
+            </li>
         </ul>
         <p>Note that the geometries drawn are planar geometries and the
         metrics returned by the measure control are planar measures by
         default.  If your map is in a geographic projection or you have the
         appropriate projection definitions to transform your geometries into
         geographic coordinates, you can set the "geodesic" property of the control
-        to true to calculate geodesic measures instead of planar measures.</p>
+        to true to calculate geodesic measures instead of planar measures.
+        Also you have the possibility to set the "immediate" property to true
+        to get a new calculated value once the mouse has been mooved.</p>
     </div>
   </body>
 </html>

Modified: sandbox/tschaub/canvas/examples/mm.html
===================================================================
--- sandbox/tschaub/canvas/examples/mm.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/mm.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>MultiMap</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Copied: sandbox/tschaub/canvas/examples/mobile-jq.html (from rev 11416, trunk/openlayers/examples/mobile-jq.html)
===================================================================
--- sandbox/tschaub/canvas/examples/mobile-jq.html	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/mobile-jq.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,144 @@
+<!DOCTYPE html>
+<html>
+    <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
+        <title>OpenLayers with jQuery Mobile</title>
+        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0;">
+        <meta name="apple-mobile-web-app-capable" content="yes">
+        <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.css">
+        <script src="http://code.jquery.com/jquery-1.5.min.js"></script>
+        <script src="http://code.jquery.com/mobile/1.0a3/jquery.mobile-1.0a3.min.js"></script>
+        <link rel="stylesheet" href="style.mobile.css" type="text/css">
+        <script src="../lib/OpenLayers.js"></script>
+        <script src="mobile.js"></script>
+        <style>
+            html {
+                height: 100%;
+            }
+            body {
+                margin: 0;
+                padding: 0;
+                height: 100%;
+            }
+            .ui-content {
+                padding: 0;
+            }
+            .ui-footer, .ui-header {
+                text-align: center;
+                padding: 5px 0;
+            }
+            #map {
+                width: 100%;
+                height: 100%;
+            }
+            .olControlAttribution {
+                font-size: 10px;
+                bottom: 5px;
+                right: 5px;
+            }
+            #title, #tags, #shortdesc {
+                display: none;
+            }
+        </style>
+        <script>
+            $(document).ready(function() {
+                // fix height of content to allow for header & footer
+                function fixContentHeight() {
+                    var header = $("div[data-role='header']:visible");
+                    var footer = $("div[data-role='footer']:visible");
+                    var content = $("div[data-role='content']:visible:visible");
+                    var viewHeight = $(window).height();
+
+                    var contentHeight = viewHeight - header.outerHeight() - footer.outerHeight();
+                    if ((content.outerHeight() + header.outerHeight() + footer.outerHeight()) !== viewHeight) {
+                        contentHeight -= (content.outerHeight() - content.height());
+                        content.height(contentHeight);
+                    }
+                    if (window.map) {
+                        map.updateSize();
+                    } else {
+                        // initialize map
+                        init();
+                    }
+                }
+                $(window).bind("orientationchange resize pageshow", fixContentHeight);
+                fixContentHeight();
+                
+                // add behavior to navigation buttons
+                $("#west").click(function() {
+                    pan(-0.25, 0);
+                });
+                $("#north").click(function() {
+                    pan(0, -0.25);
+                });
+                $("#south").click(function() {
+                    pan(0, 0.25);
+                });
+                $("#east").click(function() {
+                    pan(0.25, 0);
+                });
+                
+                // add behavior to drawing controls
+                function deactivateControls() {
+                    $.each(map.getControlsByClass(/DrawFeature/), function(index, control) {
+                        control.deactivate();
+                    });
+                    map.getControlsBy("id", "mod-control")[0].deactivate();
+                }
+                $("#nav, #point, #line, #poly, #mod").change(function(event) {
+                    deactivateControls();
+                    // jquery mobile bug regarding change makes us go through all inputs
+                    // https://github.com/jquery/jquery-mobile/issues/issue/1088
+                    var val = $("input:radio[name=controls]:checked").val();
+                    if (val !== "nav") {
+                        map.getControlsBy("id", val + "-control")[0].activate();
+                    }
+                });
+                
+                $("#nav").click();
+                $("#nav").click(); // jquery mobile bug forces 2 calls to refresh radio ui
+                
+            });
+
+        </script>
+    </head>
+    <body>
+        <h1 id="title">OpenLayers with jQuery Mobile</h1>
+        <div id="tags">
+            mobile, jquery
+        </div>
+        <p id="shortdesc">
+            Using jQuery Mobile to display an OpenLayers map.
+        </p>
+        <div data-role="page">
+            <div data-role="header">
+                <input id="west" type="button" data-icon="arrow-l" value="west">
+                <input id="north" type="button" data-icon="arrow-u" value="north">
+                <input id="south" type="button" data-icon="arrow-d" value="south">
+                <input id="east" type="button" data-icon="arrow-r" value="east">
+            </div>
+
+            <div data-role="content">
+                <div id="map"></div>
+            </div>
+
+            <div data-role="footer">
+                <form id="controls">
+                    <fieldset data-role="controlgroup" data-type="horizontal" data-role="fieldcontain">
+                        <input id="nav" type="radio" name="controls" value="nav" checked="checked">
+                        <label for="nav">navigate</label>
+                        <input id="point" type="radio" name="controls" value="point">
+                        <label for="point">point</label>
+                        <input id="line" type="radio" name="controls" value="line">
+                        <label for="line">line</label>
+                        <input id="poly" type="radio" name="controls" value="poly">
+                        <label for="poly">poly</label>
+                        <input id="mod" type="radio" name="controls" value="mod">
+                        <label for="mod">modify</label>
+                    </fieldset>
+                </form>
+            </div>
+        </div>
+    </body>
+</html>

Copied: sandbox/tschaub/canvas/examples/mobile-navigation.html (from rev 11416, trunk/openlayers/examples/mobile-navigation.html)
===================================================================
--- sandbox/tschaub/canvas/examples/mobile-navigation.html	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/mobile-navigation.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
+    <title>Mobile Navigation Example</title>
+    <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
+    <link rel="stylesheet" href="style.mobile.css" type="text/css" />
+    <link rel="stylesheet" href="style.css" type="text/css" />
+    <script type="text/javascript" src="../lib/OpenLayers.js"></script>
+    <script type="text/javascript" src="mobile-navigation.js"></script>
+  </head>
+  <body onload="init()">
+    <h1 id="title">Mobile Navigation</h1>
+
+    <div id="tags">
+        mobile, touch, drag, move, zoom, navigate
+    </div>
+
+    <div id="shortdesc">Demonstrate map navigation on mobile</div>
+
+    <div id="map" class="smallmap"></div>
+    <div id="docs">
+
+        <p>
+            This example demonstates what OpenLayers provides for map
+            navigation on mobile.
+        </p>
+
+        <p>
+            The TouchNavigation control allows to pan the map with touch
+            gestures on the screen &ndash; "touchstart", "touchmove",
+            "touchend" sequences. It also allows to zoom in with double taps,
+            and to zoom out with two-finger single taps. The latter is only
+            available on devices supporting multi-touch. Note that in most
+            devices Android doesn't support multi-touch in the browser.
+        </p>
+
+        <p>
+            The ZoomPanel control provides + and - buttons for zooming in and
+            out. These buttons should work on any device, and the zoom out
+            button is especially needed for devices that don't support
+            multi-touch.
+        </p> 
+        <p>
+            See the <a href="mobile-navigation.js" target="_blank">mobile-navigation.js
+            source</a> to see how this is done.
+        </p> 
+    </div>
+  </body>
+</html>

Copied: sandbox/tschaub/canvas/examples/mobile-navigation.js (from rev 11416, trunk/openlayers/examples/mobile-navigation.js)
===================================================================
--- sandbox/tschaub/canvas/examples/mobile-navigation.js	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/mobile-navigation.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,17 @@
+var map, layer;
+function init() {
+    map = new OpenLayers.Map('map', { controls: [
+        new OpenLayers.Control.TouchNavigation({
+            dragPanOptions: {
+                interval: 0, // non-zero kills performance on some mobile phones
+                enableKinetic: true
+            }
+        }),
+        new OpenLayers.Control.ZoomPanel()
+    ] });
+    layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
+            "http://vmap0.tiles.osgeo.org/wms/vmap0",
+            {layers: 'basic'} );
+    map.addLayer(layer);
+    map.setCenter(new OpenLayers.LonLat(5, 40), 2);
+}

Copied: sandbox/tschaub/canvas/examples/mobile-sencha.html (from rev 11416, trunk/openlayers/examples/mobile-sencha.html)
===================================================================
--- sandbox/tschaub/canvas/examples/mobile-sencha.html	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/mobile-sencha.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,136 @@
+<!DOCTYPE html>
+<html>
+    <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+        <title>OpenLayers with Sencha Touch</title>
+        <script src="../lib/OpenLayers.js"></script>
+        <link rel="stylesheet" href="style.mobile.css" type="text/css">
+        <link rel="stylesheet" href="http://dev.sencha.com/deploy/touch/resources/css/sencha-touch.css">
+        <script src="http://dev.sencha.com/deploy/touch/sencha-touch.js"></script>
+        <script src="mobile.js"></script>
+        <style>
+            #map {
+                width: 100%;
+                height: 100%;
+            }
+            .olControlAttribution {
+                font-size: 10px;
+                bottom: 5px;
+                right: 5px;
+            }
+            #title, #tags, #shortdesc {
+                display: none;
+            }
+        </style>
+        <script>
+        
+        new Ext.Application({
+            name: "ol",
+            launch: function() {
+                this.viewport = new Ext.Panel({
+                    fullscreen: true,
+                    dockedItems: [{
+                        dock: "top",
+                        xtype: "toolbar",
+                        ui: "light",
+                        layout: {
+                            pack: "center"
+                        },
+                        defaults: {
+                            ui: "plain",
+                            iconMask: true
+                        },
+                        items: [{
+                            iconCls: "arrow_left",
+                            handler: function() {
+                                pan(-0.25, 0);
+                            }
+                        }, {
+                            iconCls: "arrow_up",
+                            handler: function() {
+                                pan(0, -0.25);
+                            }
+                        }, {
+                            iconCls: "arrow_down",
+                            handler: function() {
+                                pan(0, 0.25);
+                            }
+                        }, {
+                            iconCls: "arrow_right",
+                            handler: function() {
+                                pan(0.25, 0);
+                            }
+                        }]
+                    }, {
+                        dock: "bottom",
+                        xtype: "toolbar",
+                        ui: "light",
+                        layout: {
+                            pack: "center"
+                        },
+                        items: [{
+                            xtype: "segmentedbutton",
+                            items: [{
+                                text: "navigate",
+                                pressed: true
+                            }, {
+                                text: "point",
+                                id: "point"
+                            }, {
+                                text: "line",
+                                id: "line"
+                            }, {
+                                text: "poly",
+                                id: "poly"
+                            }, {
+                                text: "modify",
+                                id: "mod"
+                            }],
+                            listeners: {
+                                toggle: function(container, button, pressed) {
+                                    Ext.each(map.getControlsByClass(/DrawFeature/), function(control) {
+                                        control.deactivate();
+                                    });
+                                    map.getControlsBy("id", "mod-control")[0].deactivate();
+                                    if (pressed) {
+                                        var id = button.id + "-control";
+                                        var control = map.getControlsBy("id", id)[0];
+                                        if (control) {
+                                            control.activate();
+                                        }
+                                    }
+                                }
+                            }
+                        }]
+                    }],
+                    items: [{
+                        xtype: "component",
+                        scroll: false,
+                        monitorResize: true,
+                        id: "map",
+                        listeners: {
+                            render: init,
+                            resize: function() {
+                                if (window.map) {
+                                    map.updateSize();
+                                }
+                            }
+                        }
+                    }]
+                });
+            }
+        });
+        </script>
+    </head>
+    <body>
+        <h1 id="title">OpenLayers with Sencha Touch</h1>
+        <div id="tags">
+            mobile, sencha touch
+        </div>
+        <p id="shortdesc">
+            Using Sencha Touch to display an OpenLayers map.
+        </p>
+    </body>
+</html>

Copied: sandbox/tschaub/canvas/examples/mobile.html (from rev 11416, trunk/openlayers/examples/mobile.html)
===================================================================
--- sandbox/tschaub/canvas/examples/mobile.html	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/mobile.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>OpenLayers Mobile</title>
+        <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0;">
+        <meta name="apple-mobile-web-app-capable" content="yes">
+        <link rel="stylesheet" href="style.mobile.css" type="text/css">
+        <script src="../lib/OpenLayers.js"></script>
+        <script src="mobile.js"></script>
+        <style>
+            html, body {
+                margin: 0;
+                padding: 0;
+                height: 100%;
+            }
+            #map {
+                position: relative;
+                width: 100%;
+                height: 100%;
+            }
+            .olControlAttribution {
+                font-size: 10px;
+                bottom: 5px;
+                right: 5px;
+            }
+            #title, #tags, #shortdesc {
+                display: none;
+            }
+        </style>
+    </head>
+    <body>
+        <h1 id="title">Basic Mobile Example</h1>
+        <div id="tags">
+            mobile
+        </div>
+        <p id="shortdesc">
+            A basic full-screen map for mobile devices.
+        </p>
+        <div id="map"></div>
+        <script>
+            init();
+        </script>
+    </body>
+</html>

Copied: sandbox/tschaub/canvas/examples/mobile.js (from rev 11416, trunk/openlayers/examples/mobile.js)
===================================================================
--- sandbox/tschaub/canvas/examples/mobile.js	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/mobile.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,77 @@
+
+// initialize map when page ready
+var map;
+var gg = new OpenLayers.Projection("EPSG:4326");
+var sm = new OpenLayers.Projection("EPSG:900913");
+function init() {
+    
+    // layer for drawn features
+    var vector = new OpenLayers.Layer.Vector();
+
+    // create map
+    map = new OpenLayers.Map({
+        div: "map",
+        projection: sm,
+        units: "m",
+        numZoomLevels: 18,
+        maxResolution: 156543.0339,
+        maxExtent: new OpenLayers.Bounds(
+            -20037508.34, -20037508.34, 20037508.34, 20037508.34
+        ),
+        controls: [
+            new OpenLayers.Control.TouchNavigation({
+                dragPanOptions: {
+                    interval: 0, // non-zero kills performance on some mobile phones
+                    enableKinetic: true
+                }
+            }),
+            new OpenLayers.Control.Attribution(),
+            new OpenLayers.Control.DrawFeature(
+                vector, OpenLayers.Handler.Point, {id: "point-control"}
+            ),
+            new OpenLayers.Control.DrawFeature(
+                vector, OpenLayers.Handler.Path, {id: "line-control"}
+            ),
+            new OpenLayers.Control.DrawFeature(
+                vector, OpenLayers.Handler.Polygon, {id: "poly-control"}
+            ),
+            new OpenLayers.Control.ModifyFeature(vector, {id: "mod-control"}),
+            new OpenLayers.Control.ZoomPanel()
+        ],
+        layers: [new OpenLayers.Layer.OSM(), vector],
+        center: new OpenLayers.LonLat(0, 0),
+        zoom: 1
+    });
+
+    // attempt to get position
+    if (window.navigator && navigator.geolocation) {
+        navigator.geolocation.getCurrentPosition(
+            updatePosition,
+            function failure(error) {
+                OpenLayers.Console.log(error.message);
+            },
+            {
+                enableHighAccuracy: true
+            }
+        );
+    }
+
+};
+
+// get position if possible
+var position;
+function updatePosition(pos) {
+    position = pos;
+    var lon =  position.coords.longitude;
+    var lat = position.coords.latitude;
+    OpenLayers.Console.log("position: lon " + lon + ", lat " + lat);
+    map.setCenter(
+        new OpenLayers.LonLat(lon, lat).transform(gg, sm)
+    );
+}
+
+function pan(fx, fy) {
+    var size = map.getSize();
+    map.pan(size.w * fx, size.h * fy);
+}
+

Modified: sandbox/tschaub/canvas/examples/modify-feature.html
===================================================================
--- sandbox/tschaub/canvas/examples/modify-feature.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/modify-feature.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Modify Feature</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/mouse-position.html
===================================================================
--- sandbox/tschaub/canvas/examples/mouse-position.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/mouse-position.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -2,6 +2,8 @@
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" debug="true">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>MousePosition Control</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/mousewheel-interval.html
===================================================================
--- sandbox/tschaub/canvas/examples/mousewheel-interval.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/mousewheel-interval.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Mousewheel Interval Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/multimap-mercator.html
===================================================================
--- sandbox/tschaub/canvas/examples/multimap-mercator.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/multimap-mercator.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>MultiMap SphericalMercator</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/multiserver.html
===================================================================
--- sandbox/tschaub/canvas/examples/multiserver.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/multiserver.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Tiles from Multiple Servers</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/mvs.html
===================================================================
--- sandbox/tschaub/canvas/examples/mvs.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/mvs.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -5,6 +5,8 @@
      directory it is in.
 -->
 <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
 
     <!-- this gmaps key generated for http://openlayers.org/dev/ -->
     <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA9XNhd8q0UdwNC7YSO4YZghSPUCi5aRYVveCcVYxzezM4iaj_gxQ9t-UajFL70jfcpquH5l1IJ-Zyyw'></script>

Modified: sandbox/tschaub/canvas/examples/navigation-control.html
===================================================================
--- sandbox/tschaub/canvas/examples/navigation-control.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/navigation-control.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Navigation Control</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/navigation-history.html
===================================================================
--- sandbox/tschaub/canvas/examples/navigation-history.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/navigation-history.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Navigation History Example</title>
         <link rel="stylesheet" href="style.css" type="text/css" />
         <style>

Modified: sandbox/tschaub/canvas/examples/navtoolbar-alwaysZoom.html
===================================================================
--- sandbox/tschaub/canvas/examples/navtoolbar-alwaysZoom.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/navtoolbar-alwaysZoom.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 	<head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
 		<title>A navToolbar with an alwaysZoom ZoomBox</title>
 		<link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
 	    <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/navtoolbar-outsidemap.html
===================================================================
--- sandbox/tschaub/canvas/examples/navtoolbar-outsidemap.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/navtoolbar-outsidemap.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Custom Navigation Toolbar</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/navtoolbar.html
===================================================================
--- sandbox/tschaub/canvas/examples/navtoolbar.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/navtoolbar.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <title>NavToolbar Demo</title>

Deleted: sandbox/tschaub/canvas/examples/notile.html
===================================================================
--- sandbox/tschaub/canvas/examples/notile.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/notile.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,42 +0,0 @@
-<html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
-    <title>OpenLayers: Single Tile</title>
-    <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
-    <link rel="stylesheet" href="style.css" type="text/css" />
-    <script src="../lib/OpenLayers.js"></script>
-    <script type="text/javascript">
-        var map;
-        function init(){
-            map = new OpenLayers.Map('mapDiv', {maxResolution: 'auto'});
-
-            var old_ol_wms = new OpenLayers.Layer.WMS.Untiled( "WMS.Untiled", 
-                "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'} );
-            old_ol_wms.addOptions({isBaseLayer: true});
-            
-            var new_ol_wms = new OpenLayers.Layer.WMS( "WMS w/singleTile", 
-                "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'}, 
-                { singleTile: true, ratio: 1 } );
-            new_ol_wms.addOptions({isBaseLayer: true});
-
-            map.addLayers([old_ol_wms, new_ol_wms]);
-            map.addControl(new OpenLayers.Control.LayerSwitcher());
-            map.setCenter(new OpenLayers.LonLat(6.5, 40.5), 4);
-        }
-    </script>
-  </head>
-  <body onload="init()">
-    <h1 id="title">Untiled Example</h1>
-    <div id="tags">
-        tile, ratio, singleTile, performance
-    </div>
-    <p id="shortdesc">
-      Create an untiled WMS layer using the singleTile: true, option or the deprecated
-      WMS.Untiled layer.
-    </p>  
-    <div id="mapDiv" class="smallmap"></div>
-    <p> The first layer is an old OpenLayers.Layer.WMS.Untiled layer, using 
-        a default ratio value of 1.5.
-    <p> The second layer is an OpenLayers.Layer.WMS layer with singleTile set
-        to true, and with a ratio of 1.    
-  </body>
-</html>

Modified: sandbox/tschaub/canvas/examples/ordering.html
===================================================================
--- sandbox/tschaub/canvas/examples/ordering.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/ordering.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Z-Ordering and Y-Ordering of Vector Features</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/osm-google.html
===================================================================
--- sandbox/tschaub/canvas/examples/osm-google.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/osm-google.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,11 +1,13 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers OSM and Google Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="../theme/default/google.css" type="text/css">
         <link rel="stylesheet" href="style.css" type="text/css">
-        <script src="http://maps.google.com/maps/api/js?sensor=false"></script>
+        <script src="http://maps.google.com/maps/api/js?v=3.3&amp;sensor=false"></script>
         <script src="../lib/OpenLayers.js"></script>
         <script src="osm-google.js"></script>
     </head>

Modified: sandbox/tschaub/canvas/examples/osm-layer.html
===================================================================
--- sandbox/tschaub/canvas/examples/osm-layer.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/osm-layer.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: OSM Layer</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/osm.html
===================================================================
--- sandbox/tschaub/canvas/examples/osm.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/osm.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Basic Single WMS Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/outOfRangeMarkers.html
===================================================================
--- sandbox/tschaub/canvas/examples/outOfRangeMarkers.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/outOfRangeMarkers.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Using maxResolution to control overlays</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/overviewmap.html
===================================================================
--- sandbox/tschaub/canvas/examples/overviewmap.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/overviewmap.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>Overview Map Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/pan-zoom-panels.html
===================================================================
--- sandbox/tschaub/canvas/examples/pan-zoom-panels.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/pan-zoom-panels.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html>
 <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Pan and Zoom Panels</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
 

Modified: sandbox/tschaub/canvas/examples/panel.html
===================================================================
--- sandbox/tschaub/canvas/examples/panel.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/panel.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Control Panel</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/point-track-markers.html
===================================================================
--- sandbox/tschaub/canvas/examples/point-track-markers.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/point-track-markers.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Point Track Markers</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/popupMatrix.html
===================================================================
--- sandbox/tschaub/canvas/examples/popupMatrix.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/popupMatrix.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml" debug="true">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Popup Mayhem</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
@@ -81,7 +83,7 @@
 
             layer = new OpenLayers.Layer.Image(
                 "popupMatrix", 
-                "popupMatrix.jpg", 
+                "img/popupMatrix.jpg", 
                 new OpenLayers.Bounds(-82.5,-71.5,97.5,67.5),
                 new OpenLayers.Size(1024,768)
             );
@@ -107,52 +109,52 @@
             //anchored popup small contents no autosize
             ll = new OpenLayers.LonLat(-55,20);
             popupClass = OpenLayers.Popup.Anchored;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML);
 
             //anchored popup small contents no autosize closebox
             var ll = new OpenLayers.LonLat(-50,20);
             popupClass = OpenLayers.Popup.Anchored;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
             //anchored popup small contents autosize
             ll = new OpenLayers.LonLat(-40,20);
             popupClass = AutoSizeAnchored;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML);
 
             //anchored popup small contents autosize closebox
             ll = new OpenLayers.LonLat(-35,20);
             popupClass = AutoSizeAnchored;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
             //anchored popup small contents autosize minsize
             ll = new OpenLayers.LonLat(-25,20);
             popupClass = AutoSizeAnchoredMinSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML);
 
             //anchored popup small contents autosize minsize closebox
             ll = new OpenLayers.LonLat(-20,20);
             popupClass = AutoSizeAnchoredMinSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
             //anchored popup small contents autosize maxsize
             ll = new OpenLayers.LonLat(-10,20);
             popupClass = AutoSizeAnchoredMaxSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML);
 
             //anchored popup small contents autosize maxsize closebox
             ll = new OpenLayers.LonLat(-5,20);
             popupClass = AutoSizeAnchoredMaxSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
@@ -184,39 +186,39 @@
             //anchored popup wide short fixed contents autosize
             ll = new OpenLayers.LonLat(35,20);
             popupClass = AutoSizeAnchored;
-            popupContentHTML = '<img src="wideshort.jpg"></img>';
+            popupContentHTML = '<img src="img/wideshort.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML);
 
             //anchored popup wide short fixed contents autosize closebox
             ll = new OpenLayers.LonLat(40,20);
             popupClass = AutoSizeAnchored;
-            popupContentHTML = '<img src="wideshort.jpg"></img>';
+            popupContentHTML = '<img src="img/wideshort.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
             //anchored popup thin long fixed contents autosize
             ll = new OpenLayers.LonLat(50,20);
             popupClass = AutoSizeAnchored;
-            popupContentHTML = '<img src="thinlong.jpg"></img>';
+            popupContentHTML = '<img src="img/thinlong.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML);
 
             //anchored popup thin long fixed contents autosize closebox
             ll = new OpenLayers.LonLat(55,20);
             popupClass = AutoSizeAnchored;
-            popupContentHTML = '<img src="thinlong.jpg"></img>';
+            popupContentHTML = '<img src="img/thinlong.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
             //anchored popup wide long fixed contents autosize
             ll = new OpenLayers.LonLat(65,20);
             popupClass = AutoSizeAnchored;
-            popupContentHTML = '<img  src="widelong.jpg"></img>' 
+            popupContentHTML = '<img  src="img/widelong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML);
 
             //anchored popup wide long fixed contents autosize closebox
             ll = new OpenLayers.LonLat(70,20);
             popupClass = AutoSizeAnchored;
-            popupContentHTML = '<img  src="widelong.jpg"></img>' 
+            popupContentHTML = '<img  src="img/widelong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, true);
 
         //
@@ -226,52 +228,52 @@
             //anchored popup small contents no autosize overflow
             var ll = new OpenLayers.LonLat(-55,15);
             popupClass = OpenLayers.Popup.Anchored;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored popup small contents no autosize closebox overflow
             var ll = new OpenLayers.LonLat(-50,15);
             popupClass = OpenLayers.Popup.Anchored;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
             //anchored popup small contents autosize overflow
             ll = new OpenLayers.LonLat(-40,15);
             popupClass = AutoSizeAnchored;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored popup small contents autosize closebox overflow
             ll = new OpenLayers.LonLat(-35,15);
             popupClass = AutoSizeAnchored;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
             //anchored popup small contents autosize minsize overflow
             ll = new OpenLayers.LonLat(-25,15);
             popupClass = AutoSizeAnchoredMinSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored popup small contents autosize minsize closebox overflow
             ll = new OpenLayers.LonLat(-20,15);
             popupClass = AutoSizeAnchoredMinSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
             //anchored popup small contents autosize maxsize overflow
             ll = new OpenLayers.LonLat(-10,15);
             popupClass = AutoSizeAnchoredMaxSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored popup small contents autosize maxsize closebox overflow
             ll = new OpenLayers.LonLat(-5,15);
             popupClass = AutoSizeAnchoredMaxSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
@@ -303,39 +305,39 @@
             //anchored popup wide short fixed contents autosize overflow
             ll = new OpenLayers.LonLat(35,15);
             popupClass = AutoSizeAnchored;
-            popupContentHTML = '<img src="wideshort.jpg"></img>' 
+            popupContentHTML = '<img src="img/wideshort.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored popup wide short fixed contents autosize closebox overflow
             ll = new OpenLayers.LonLat(40,15);
             popupClass = AutoSizeAnchored;
-            popupContentHTML = '<img src="wideshort.jpg"></img>' 
+            popupContentHTML = '<img src="img/wideshort.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
             //anchored popup thin long fixed contents autosize overflow
             ll = new OpenLayers.LonLat(50,15);
             popupClass = AutoSizeAnchored;
-            popupContentHTML = '<img src="thinlong.jpg"></img>' 
+            popupContentHTML = '<img src="img/thinlong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored popup thin long fixed contents autosize closebox overflow
             ll = new OpenLayers.LonLat(55,15);
             popupClass = AutoSizeAnchored;
-            popupContentHTML = '<img src="thinlong.jpg"></img>' 
+            popupContentHTML = '<img src="img/thinlong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
             //anchored popup wide long fixed contents autosize overflow
             ll = new OpenLayers.LonLat(65,15);
             popupClass = AutoSizeAnchored;
-            popupContentHTML = '<img src="widelong.jpg"></img>' 
+            popupContentHTML = '<img src="img/widelong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored popup wide long fixed contents autosize closebox overflow
             ll = new OpenLayers.LonLat(70,15);
             popupClass = AutoSizeAnchored;
-            popupContentHTML = '<img src="widelong.jpg"></img>' 
+            popupContentHTML = '<img src="img/widelong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
@@ -346,52 +348,52 @@
             //anchored bubble popup small contents no autosize
             var ll = new OpenLayers.LonLat(-55,5);
             popupClass = OpenLayers.Popup.AnchoredBubble;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false);
 
             //anchored bubble popup small contents no autosize closebox
             var ll = new OpenLayers.LonLat(-50,5);
             popupClass = OpenLayers.Popup.AnchoredBubble;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
             //anchored bubble popup small contents autosize
             ll = new OpenLayers.LonLat(-40,5);
             popupClass = AutoSizeAnchoredBubble;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false);
 
             //anchored bubble popup small contents autosize closebox
             ll = new OpenLayers.LonLat(-35,5);
             popupClass = AutoSizeAnchoredBubble;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
             //anchored bubble popup small contents autosize minsize
             ll = new OpenLayers.LonLat(-25,5);
             popupClass = AutoSizeAnchoredBubbleMinSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false);
 
             //anchored bubble popup small contents autosize minsize closebox
             ll = new OpenLayers.LonLat(-20,5);
             popupClass = AutoSizeAnchoredBubbleMinSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
             //anchored bubble popup small contents autosize maxsize
             ll = new OpenLayers.LonLat(-10,5);
             popupClass = AutoSizeAnchoredBubbleMaxSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false);
 
             //anchored bubble popup small contents autosize maxsize closebox
             ll = new OpenLayers.LonLat(-5,5);
             popupClass = AutoSizeAnchoredBubbleMaxSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
@@ -424,39 +426,39 @@
             //anchored bubble popup wide short fixed contents autosize
             ll = new OpenLayers.LonLat(35,5);
             popupClass = AutoSizeAnchoredBubble;
-            popupContentHTML = '<img src="wideshort.jpg"></img>' 
+            popupContentHTML = '<img src="img/wideshort.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML);
 
             //anchored bubble popup wide short fixed contents autosize closebox
             ll = new OpenLayers.LonLat(40,5);
             popupClass = AutoSizeAnchoredBubble;
-            popupContentHTML = '<img src="wideshort.jpg"></img>' 
+            popupContentHTML = '<img src="img/wideshort.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
             //anchored bubble popup thin long fixed contents autosize
             ll = new OpenLayers.LonLat(50,5);
             popupClass = AutoSizeAnchoredBubble;
-            popupContentHTML = '<img src="thinlong.jpg"></img>' 
+            popupContentHTML = '<img src="img/thinlong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML);
 
             //anchored bubble popup thin long fixed contents autosize closebox
             ll = new OpenLayers.LonLat(55,5);
             popupClass = AutoSizeAnchoredBubble;
-            popupContentHTML = '<img src="thinlong.jpg"></img>' 
+            popupContentHTML = '<img src="img/thinlong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
             //anchored bubble popup wide long fixed contents autosize
             ll = new OpenLayers.LonLat(65,5);
             popupClass = AutoSizeAnchoredBubble;
-            popupContentHTML = '<img src="widelong.jpg"></img>' 
+            popupContentHTML = '<img src="img/widelong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML);
 
             //anchored bubble popup wide long fixed contents autosize closebox
             ll = new OpenLayers.LonLat(70,5);
             popupClass = AutoSizeAnchoredBubble;
-            popupContentHTML = '<img src="widelong.jpg"></img>' 
+            popupContentHTML = '<img src="img/widelong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, true);
 
           //
@@ -466,52 +468,52 @@
               //anchored bubble popup small contents no autosize
             var ll = new OpenLayers.LonLat(-55,0);
             popupClass = OpenLayers.Popup.AnchoredBubble;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
               //anchored bubble popup small contents no autosize closebox
             var ll = new OpenLayers.LonLat(-50,0);
             popupClass = OpenLayers.Popup.AnchoredBubble;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
             //anchored bubble popup small contents autosize
             ll = new OpenLayers.LonLat(-40,0);
             popupClass = AutoSizeAnchoredBubble;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored bubble popup small contents autosize closebox
             ll = new OpenLayers.LonLat(-35,0);
             popupClass = AutoSizeAnchoredBubble;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
             //anchored bubble popup small contents autosize minsize
             ll = new OpenLayers.LonLat(-25,0);
             popupClass = AutoSizeAnchoredBubbleMinSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored bubble popup small contents autosize minsize closebox
             ll = new OpenLayers.LonLat(-20,0);
             popupClass = AutoSizeAnchoredBubbleMinSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
             //anchored bubble popup small contents autosize maxsize
             ll = new OpenLayers.LonLat(-10,0);
             popupClass = AutoSizeAnchoredBubbleMaxSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored bubble popup small contents autosize maxsize closebox
             ll = new OpenLayers.LonLat(-5,0);
             popupClass = AutoSizeAnchoredBubbleMaxSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
@@ -544,39 +546,39 @@
             //anchored bubble popup wide short fixed contents autosize overflow
             ll = new OpenLayers.LonLat(35,0);
             popupClass = AutoSizeAnchoredBubble;
-            popupContentHTML = '<img src="wideshort.jpg"></img>' 
+            popupContentHTML = '<img src="img/wideshort.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored bubble popup wide short fixed contents autosize closebox overflow
             ll = new OpenLayers.LonLat(40,0);
             popupClass = AutoSizeAnchoredBubble;
-            popupContentHTML = '<img src="wideshort.jpg"></img>' 
+            popupContentHTML = '<img src="img/wideshort.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
             //anchored bubble popup thin long fixed contents autosize overflow
             ll = new OpenLayers.LonLat(50,0);
             popupClass = AutoSizeAnchoredBubble;
-            popupContentHTML = '<img src="thinlong.jpg"></img>' 
+            popupContentHTML = '<img src="img/thinlong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored bubble popup thin long fixed contents autosize closebox overflow
             ll = new OpenLayers.LonLat(55,0);
             popupClass = AutoSizeAnchoredBubble;
-            popupContentHTML = '<img src="thinlong.jpg"></img>' 
+            popupContentHTML = '<img src="img/thinlong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
             //anchored bubble popup wide long fixed contents autosize overflow
             ll = new OpenLayers.LonLat(65,0);
             popupClass = AutoSizeAnchoredBubble;
-            popupContentHTML = '<img src="widelong.jpg"></img>' 
+            popupContentHTML = '<img src="img/widelong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored bubble popup wide long fixed contents autosize closebox overflow
             ll = new OpenLayers.LonLat(70,0);
             popupClass = AutoSizeAnchoredBubble;
-            popupContentHTML = '<img src="widelong.jpg"></img>' 
+            popupContentHTML = '<img src="img/widelong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
    //FRAMED
@@ -588,52 +590,52 @@
               //anchored bubble popup small contents no autosize
             var ll = new OpenLayers.LonLat(-55,-15);
             popupClass = OpenLayers.Popup.FramedCloud;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false);
 
               //anchored bubble popup small contents no autosize closebox
             var ll = new OpenLayers.LonLat(-50,-15);
             popupClass = OpenLayers.Popup.FramedCloud;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
             //anchored bubble popup small contents autosize
             ll = new OpenLayers.LonLat(-40,-15);
             popupClass = AutoSizeFramedCloud;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false);
 
             //anchored bubble popup small contents autosize closebox
             ll = new OpenLayers.LonLat(-35,-15);
             popupClass = AutoSizeFramedCloud;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
             //anchored bubble popup small contents autosize minsize
             ll = new OpenLayers.LonLat(-25,-15);
             popupClass = AutoSizeFramedCloudMinSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false);
 
             //anchored bubble popup small contents autosize minsize closebox
             ll = new OpenLayers.LonLat(-20,-15);
             popupClass = AutoSizeFramedCloudMinSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
             //anchored bubble popup small contents autosize maxsize
             ll = new OpenLayers.LonLat(-10,-15);
             popupClass = AutoSizeFramedCloudMaxSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false);
 
             //anchored bubble popup small contents autosize maxsize closebox
             ll = new OpenLayers.LonLat(-5,-15);
             popupClass = AutoSizeFramedCloudMaxSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
@@ -666,39 +668,39 @@
             //anchored bubble popup wide short fixed contents autosize
             ll = new OpenLayers.LonLat(35,-15);
             popupClass = AutoSizeFramedCloud;
-            popupContentHTML = '<img src="wideshort.jpg"></img>' 
+            popupContentHTML = '<img src="img/wideshort.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML);
 
             //anchored bubble popup wide short fixed contents autosize closebox
             ll = new OpenLayers.LonLat(40,-15);
             popupClass = AutoSizeFramedCloud;
-            popupContentHTML = '<img src="wideshort.jpg"></img>' 
+            popupContentHTML = '<img src="img/wideshort.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
             //anchored bubble popup thin long fixed contents autosize
             ll = new OpenLayers.LonLat(50,-15);
             popupClass = AutoSizeFramedCloud;
-            popupContentHTML = '<img src="thinlong.jpg"></img>' 
+            popupContentHTML = '<img src="img/thinlong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML);
 
             //anchored bubble popup thin long fixed contents autosize closebox
             ll = new OpenLayers.LonLat(55,-15);
             popupClass = AutoSizeFramedCloud;
-            popupContentHTML = '<img src="thinlong.jpg"></img>' 
+            popupContentHTML = '<img src="img/thinlong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, true);
 
 
             //anchored bubble popup wide long fixed contents autosize
             ll = new OpenLayers.LonLat(65,-15);
             popupClass = AutoSizeFramedCloud;
-            popupContentHTML = '<img src="widelong.jpg"></img>' 
+            popupContentHTML = '<img src="img/widelong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML);
 
             //anchored bubble popup wide long fixed contents autosize closebox
             ll = new OpenLayers.LonLat(70,-15);
             popupClass = AutoSizeFramedCloud;
-            popupContentHTML = '<img src="widelong.jpg"></img>' 
+            popupContentHTML = '<img src="img/widelong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, true);
 
           //
@@ -708,52 +710,52 @@
               //anchored bubble popup small contents no autosize
             var ll = new OpenLayers.LonLat(-55,-20);
             popupClass = OpenLayers.Popup.FramedCloud;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
               //anchored bubble popup small contents no autosize closebox
             var ll = new OpenLayers.LonLat(-50,-20);
             popupClass = OpenLayers.Popup.FramedCloud;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
             //anchored bubble popup small contents autosize
             ll = new OpenLayers.LonLat(-40,-20);
             popupClass = AutoSizeFramedCloud;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored bubble popup small contents autosize closebox
             ll = new OpenLayers.LonLat(-35,-20);
             popupClass = AutoSizeFramedCloud;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
             //anchored bubble popup small contents autosize minsize
             ll = new OpenLayers.LonLat(-25,-20);
             popupClass = AutoSizeFramedCloudMinSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored bubble popup small contents autosize minsize closebox
             ll = new OpenLayers.LonLat(-20,-20);
             popupClass = AutoSizeFramedCloudMinSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
             //anchored bubble popup small contents autosize maxsize
             ll = new OpenLayers.LonLat(-10,-20);
             popupClass = AutoSizeFramedCloudMaxSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored bubble popup small contents autosize maxsize closebox
             ll = new OpenLayers.LonLat(-5,-20);
             popupClass = AutoSizeFramedCloudMaxSize;
-            popupContentHTML = '<img src="small.jpg"></img>';
+            popupContentHTML = '<img src="img/small.jpg"></img>';
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
@@ -786,39 +788,39 @@
             //anchored bubble popup wide short fixed contents autosize overflow
             ll = new OpenLayers.LonLat(35,-20);
             popupClass = AutoSizeFramedCloud;
-            popupContentHTML = '<img src="wideshort.jpg"></img>' 
+            popupContentHTML = '<img src="img/wideshort.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored bubble popup wide short fixed contents autosize closebox overflow
             ll = new OpenLayers.LonLat(40,-20);
             popupClass = AutoSizeFramedCloud;
-            popupContentHTML = '<img src="wideshort.jpg"></img>' 
+            popupContentHTML = '<img src="img/wideshort.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
             //anchored bubble popup thin long fixed contents autosize overflow
             ll = new OpenLayers.LonLat(50,-20);
             popupClass = AutoSizeFramedCloud;
-            popupContentHTML = '<img src="thinlong.jpg"></img>' 
+            popupContentHTML = '<img src="img/thinlong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored bubble popup thin long fixed contents autosize closebox overflow
             ll = new OpenLayers.LonLat(55,-20);
             popupClass = AutoSizeFramedCloud;
-            popupContentHTML = '<img src="thinlong.jpg"></img>' 
+            popupContentHTML = '<img src="img/thinlong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, true, true);
 
 
             //anchored bubble popup wide long fixed contents autosize overflow
             ll = new OpenLayers.LonLat(65,-20);
             popupClass = AutoSizeFramedCloud;
-            popupContentHTML = '<img src="widelong.jpg"></img>' 
+            popupContentHTML = '<img src="img/widelong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, false, true);
 
             //anchored bubble popup wide long fixed contents autosize closebox overflow
             ll = new OpenLayers.LonLat(70,-20);
             popupClass = AutoSizeFramedCloud;
-            popupContentHTML = '<img src="widelong.jpg"></img>' 
+            popupContentHTML = '<img src="img/widelong.jpg"></img>' 
             addMarker(ll, popupClass, popupContentHTML, true, true);
  
 
@@ -879,16 +881,16 @@
       <div id="map" class="smallmap"></div>
 
         <!-- preloading these images so the autosize will work correctly -->
-        <img src="wideshort.jpg" style="position:absolute; top:-5000px; left: -5000px"></img>
-        <img src="widelong.jpg" style="position:absolute; top:-5000px; left: -5000px"></img>
-        <img src="thinlong.jpg" style="position:absolute; top:-5000px; left: -5000px"></img>
+        <img src="img/wideshort.jpg" style="position:absolute; top:-5000px; left: -5000px"></img>
+        <img src="img/widelong.jpg" style="position:absolute; top:-5000px; left: -5000px"></img>
+        <img src="img/thinlong.jpg" style="position:absolute; top:-5000px; left: -5000px"></img>
 
        <p> All of the images in this file a pre-cached, meaning they are 
            loaded immediately when you load the page (they are just placed 
            far offscreen, that's why you don't see them). 
        </p>
        <br>    
-       <p> The only image that is *not* preloaded is small.jpg, the brazilian
+       <p> The only image that is *not* preloaded is img/small.jpg, the brazilian
            flag. We do this in order to test out to make sure that our auto-sizing
              code does in fact activate itself as the images load. To verify 
              this, clear your cache and reload this example page. Click on 

Deleted: sandbox/tschaub/canvas/examples/popupMatrix.jpg
===================================================================
(Binary files differ)

Modified: sandbox/tschaub/canvas/examples/popups.html
===================================================================
--- sandbox/tschaub/canvas/examples/popups.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/popups.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>

Modified: sandbox/tschaub/canvas/examples/projected-map.html
===================================================================
--- sandbox/tschaub/canvas/examples/projected-map.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/projected-map.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Non-Geographic Projection</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/protocol-gears.html
===================================================================
--- sandbox/tschaub/canvas/examples/protocol-gears.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/protocol-gears.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <style type="text/css">

Modified: sandbox/tschaub/canvas/examples/proxy.cgi
===================================================================
--- sandbox/tschaub/canvas/examples/proxy.cgi	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/proxy.cgi	2011-02-24 15:01:55 UTC (rev 11421)
@@ -20,7 +20,7 @@
                 'prototype.openmnnd.org', 'geo.openplans.org',
                 'sigma.openplans.org', 'demo.opengeo.org',
                 'www.openstreetmap.org', 'sample.azavea.com',
-                'v-swe.uni-muenster.de:8080', 
+                'v2.suite.opengeo.org', 'v-swe.uni-muenster.de:8080', 
                 'vmap0.tiles.osgeo.org']
 
 method = os.environ["REQUEST_METHOD"]

Modified: sandbox/tschaub/canvas/examples/regular-polygons.html
===================================================================
--- sandbox/tschaub/canvas/examples/regular-polygons.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/regular-polygons.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Regular Polygon Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/resize-features.html
===================================================================
--- sandbox/tschaub/canvas/examples/resize-features.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/resize-features.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Resize Features Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/restricted-extent.html
===================================================================
--- sandbox/tschaub/canvas/examples/restricted-extent.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/restricted-extent.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Restricted Extent Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/rotate-features.html
===================================================================
--- sandbox/tschaub/canvas/examples/rotate-features.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/rotate-features.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Rotate Features Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/select-feature-multilayer.html
===================================================================
--- sandbox/tschaub/canvas/examples/select-feature-multilayer.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/select-feature-multilayer.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>SelectFeature Control on multiple vector layers</title> 
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/select-feature-openpopup.html
===================================================================
--- sandbox/tschaub/canvas/examples/select-feature-openpopup.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/select-feature-openpopup.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Open Popup on Layer.Vector</title> 
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/select-feature.html
===================================================================
--- sandbox/tschaub/canvas/examples/select-feature.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/select-feature.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>SelectFeature Control on Layer.Vector</title> 
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/setextent.html
===================================================================
--- sandbox/tschaub/canvas/examples/setextent.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/setextent.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html>
 <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
 <title>Setting a visual Extent</title>
 <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Copied: sandbox/tschaub/canvas/examples/simplify-linestring.html (from rev 11416, trunk/openlayers/examples/simplify-linestring.html)
===================================================================
--- sandbox/tschaub/canvas/examples/simplify-linestring.html	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/simplify-linestring.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,102 @@
+<!DOCTYPE html>
+<html>
+    <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+        <title>Simplify a LineString geometry</title>
+        <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
+        <link rel="stylesheet" href="style.css" type="text/css">
+        <style type="text/css">
+        #map, #map-simplify {
+            height: 400px;
+            width: 400px;
+            margin: 5px !important;
+            float: left;
+        }
+        #info {
+            width: 300px;
+            float: left;
+        }
+        #docs {
+            clear: both;
+        }
+        </style>
+    </head>
+    <body>
+        <h1 id="title">Simplify a LineString geometry</h1>
+        <div id="tags">
+            Douglas-Peucker, Douglas, Peucker, Peuker, tolerance
+        </div>
+        <p id="shortdesc">
+            Shows the usage of the method &quot;simplify&quot; that implements 
+			the Douglas-Peucker algorithm to remove &quot;insignificant&quot; 
+			vertices from LineString geometries.
+        </p>
+        <div id="control-simplify">
+            <label for="tolerance">Tolerance factor:</label>
+            <input name="tolerance" id="tolerance" type="number" min="0" max="1" step="0.02" value="0.1">
+            <input type="button" id="simplify" value="Simplify LineString">
+            <input type="button" id="animation" value="Start animation">
+        </div>
+        <div id="map" class="smallmap">
+        </div>
+        <div id="map-simplify" class="smallmap">
+        </div>
+        <div id="info">
+        </div>
+        <div id="docs">
+            <p>
+                Instances of OpenLayers.Geometry.LineString have a method simplify,
+                that can be used to simplify linestring geometries.
+                Simplification sometimes is useful to enhance the perfomance of 
+                vector rendering or to reduce complexity of geometries. This 
+                might be especially handy when viewing geometries a small 
+                scales.  
+            </p>
+            <p>
+                OpenLayers.Geometry.LineString::simplify is a recursive 
+				implementation of the famous Douglas-Peucker algorithm. It is 
+				controlled by a tolerance factor that defines the threshold for 
+				vertices to be considered &quot;insignificant&quot; for the 
+                general structure of the geometry.                
+            </p>
+            <p>
+                The LineString on the left map can be simplified according to 
+                the tolerance value one enters in the form-field above the maps.
+                Use a value between 0 and 1 for best results. If you navigate 
+                the left map, the right map will show the same location to make 
+                it easier to spot the differeces between the LineStrings.
+            </p>
+            <p>
+                You can also use the button &quot;Start animation&quot; to get 
+                results for increasing tolerance-factors from 0.02 to 1.0. The
+                animation can be paused by clicking on the button &quot;Stop
+                animation&quot;. 
+            </p>
+            <p>
+                The LineString represents a part of the coastline of 
+                <a href="http://www.openstreetmap.org/?lat=54.7309684753418&amp;lon=83.1809234619141&amp;zoom=11">this 
+                place southeast of Novosibirsk in Russia</a> &mdash; found via 
+                <a href="http://ryba4.com/python/ramer-douglas-peucker">an
+                example implementation of the algorithm in python</a>.
+            </p>
+            <p>
+                For a detailled explanation of the algorithm see 
+                <a href="http://en.wikipedia.org/wiki/Douglas-Peucker_algorithm">the
+                Wikipedia article</a> or the original publication: David Douglas 
+                &amp; Thomas Peucker, "Algorithms for the reduction of the 
+                number of points required to represent a digitized line or its 
+                caricature", The Canadian Cartographer 10(2), 112-122 (1973) 
+                (<a href="http://dx.doi.org/10.3138/FM57-6770-U75U-7727">DOI: 
+                10.3138/FM57-6770-U75U-7727</a>).
+            </p>
+            <p>See <a href="simplify-linestring.js">simplify-linestring.js</a>
+                for the source code of this example.</p>
+        </div>
+        <script type="text/javascript" src="../lib/OpenLayers.js">
+        </script>
+        <script type="text/javascript" src="./simplify-linestring.js">
+        </script>
+    </body>
+</html>

Copied: sandbox/tschaub/canvas/examples/simplify-linestring.js (from rev 11416, trunk/openlayers/examples/simplify-linestring.js)
===================================================================
--- sandbox/tschaub/canvas/examples/simplify-linestring.js	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/simplify-linestring.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,599 @@
+// global variables
+var map, map2;
+
+// wrap the instanciation code in an anonymous function that gets executed
+// immedeately
+(function(){
+    // style the vectorlayer
+    var styleMap = new OpenLayers.StyleMap({
+        'default': new OpenLayers.Style({
+            strokeColor: "#333333",
+            strokeWidth: 1.2,
+            strokeOpacity: 1
+        })
+    });
+    
+    // the vectorlayer
+    var vectorlayer = new OpenLayers.Layer.Vector('Vectorlayer', {
+        isBaseLayer: true,
+        styleMap: styleMap
+    });
+    
+    var original = OpenLayers.Geometry.fromWKT("LINESTRING(" +
+        "6.247872 11.316756," +
+        "6.338566 11.316756," +
+        "6.633323 11.205644," +
+        "6.724018 11.205644," +
+        "6.792039 11.205644," +
+        "7.154817 11.372311," +
+        "7.313532 11.400089," +
+        "7.381553 11.344533," +
+        "7.336206 11.288978," +
+        "7.200164 11.288978," +
+        "7.154817 11.261200," +
+        "7.132143 11.233422," +
+        "7.154817 11.150089," +
+        "7.268185 11.177867," +
+        "7.313532 11.122311," +
+        "7.404227 11.150089," +
+        "7.472248 11.094533," +
+        "7.767005 10.900089," +
+        "7.758951 10.864989," +
+        "7.752684 10.837656," +
+        "7.426900 10.927867," +
+        "6.519955 10.927867," +
+        "6.429261 10.900089," +
+        "6.315893 10.955644," +
+        "6.270545 10.955644," +
+        "6.247872 10.927867," +
+        "6.111830 11.011200," +
+        "6.066483 11.066756," +
+        "5.862420 11.038978," +
+        "5.817073 10.955644," +
+        "5.771726 10.900089," +
+        "5.862420 10.761200," +
+        "5.975788 10.733422," +
+        "6.157177 10.566756," +
+        "6.247872 10.511200," +
+        "6.293219 10.427867," +
+        "6.315893 10.233422," +
+        "6.315893 10.177867," +
+        "6.542629 9.844533," +
+        "6.587976 9.761200," +
+        "6.610650 9.288978," +
+        "6.542629 9.066756," +
+        "6.565303 8.900089," +
+        "6.519955 8.816756," +
+        "6.542629 8.761200," +
+        "6.565303 8.733422," +
+        "6.429261 8.427867," +
+        "6.474608 8.316756," +
+        "6.724018 8.288978," +
+        "6.882733 8.538978," +
+        "6.973428 8.594533," +
+        "6.996101 8.622311," +
+        "7.200164 8.650089," +
+        "7.290859 8.650089," +
+        "7.426900 8.483422," +
+        "7.404227 8.455644," +
+        "7.245511 8.511200," +
+        "6.996101 8.427867," +
+        "7.041449 8.372311," +
+        "7.154817 8.455644," +
+        "7.200164 8.455644," +
+        "7.245511 8.455644," +
+        "7.381553 8.316756," +
+        "7.381553 8.261200," +
+        "7.404227 8.233422," +
+        "7.494921 8.205644," +
+        "7.767005 8.288978," +
+        "7.948394 8.233422," +
+        "8.016415 8.261200," +
+        "8.197804 8.094533," +
+        "8.084435 7.816756," +
+        "8.152456 7.733422," +
+        "8.175130 7.650089," +
+        "8.175130 7.511200," +
+        "8.311172 7.427867," +
+        "8.311172 7.372311," +
+        "8.651276 7.372311," +
+        "8.923360 7.316756," +
+        "8.900686 7.261200," +
+        "8.809991 7.261200," +
+        "8.472735 7.171122," +
+        "8.333845 7.038978," +
+        "8.282022 6.981100," +
+        "8.254778 6.848911," +
+        "8.265824 6.816756," +
+        "8.239206 6.711211," +
+        "8.219743 6.612067," +
+        "8.130227 6.433044," +
+        "8.084435 6.316756," +
+        "8.107109 6.288978," +
+        "7.948394 6.177867," +
+        "7.925720 5.983422," +
+        "7.857699 5.816756," +
+        "7.835026 5.788978," +
+        "7.857699 5.511200," +
+        "7.812352 5.400089," +
+        "7.812352 5.344533," +
+        "7.812352 5.177867," +
+        "8.084435 4.733422," +
+        "8.107109 4.622311," +
+        "7.857699 4.344533," +
+        "7.630963 4.261200," +
+        "7.540268 4.177867," +
+        "7.494921 4.150089," +
+        "7.449574 4.150089," +
+        "7.404227 4.150089," +
+        "7.336206 4.094533," +
+        "7.313532 4.066756," +
+        "7.041449 4.011200," +
+        "6.905407 3.955644," +
+        "6.950754 3.900089," +
+        "7.200164 3.927867," +
+        "7.630963 3.872311," +
+        "7.721657 3.872311," +
+        "7.948394 3.788978," +
+        "7.993741 3.705644," +
+        "7.971067 3.677867," +
+        "7.925720 3.622311," +
+        "8.175130 3.705644," +
+        "8.401866 3.650089," +
+        "8.492561 3.650089," +
+        "8.605929 3.538978," +
+        "8.651276 3.566756," +
+        "8.855339 3.372311," +
+        "8.900686 3.316756," +
+        "8.900686 3.150089," +
+        "8.787318 2.900089," +
+        "8.787318 2.844533," +
+        "8.946033 2.816756," +
+        "8.991380 2.788978," +
+        "9.014054 2.705644," +
+        "8.886928 2.524989," +
+        "8.832665 2.538978," +
+        "8.809991 2.455644," +
+        "8.923360 2.538978," +
+        "9.014054 2.400089," +
+        "9.308811 2.288978," +
+        "9.399506 2.261200," +
+        "9.512874 2.122311," +
+        "9.535548 1.983422," +
+        "9.512874 1.955644," +
+        "9.467527 1.816756," +
+        "9.036728 1.816756," +
+        "8.991380 1.927867," +
+        "8.946033 1.955644," +
+        "8.900686 1.983422," +
+        "8.946033 2.122311," +
+        "8.968707 2.150089," +
+        "9.195443 1.927867," +
+        "9.354158 1.955644," +
+        "9.376832 2.038978," +
+        "9.376832 2.094533," +
+        "9.240790 2.205644," +
+        "9.195443 2.205644," +
+        "9.263464 2.150089," +
+        "9.240790 2.122311," +
+        "9.195443 2.122311," +
+        "9.104749 2.122311," +
+        "8.900686 2.316756," +
+        "8.787318 2.344533," +
+        "8.696623 2.372311," +
+        "8.651276 2.427867," +
+        "8.719297 2.455644," +
+        "8.787318 2.650089," +
+        "8.832665 2.705644," +
+        "8.605929 2.677867," +
+        "8.537908 2.788978," +
+        "8.333845 2.788978," +
+        "7.925720 2.316756," +
+        "7.925720 2.261200," +
+        "7.903046 2.233422," +
+        "7.857699 2.233422," +
+        "7.857699 2.177867," +
+        "7.789678 1.983422," +
+        "7.812352 1.788978," +
+        "7.948394 1.538978," +
+        "7.971067 1.511200," +
+        "8.129783 1.511200," +
+        "8.243151 1.594533," +
+        "8.333845 1.594533," +
+        "8.424540 1.622311," +
+        "8.515234 1.566756," +
+        "8.673950 1.400089," +
+        "8.771174 1.291756," +
+        "8.828938 1.119878," +
+        "8.762504 0.972544," +
+        "9.238614 0.759633," +
+        "9.492323 0.627022," +
+        "9.820891 0.644711," +
+        "10.376567 0.800622," +
+        "10.651961 1.085978," +
+        "10.762173 1.132022," +
+        "10.943045 1.095989," +
+        "11.256739 0.999878," +
+        "11.576074 0.761611," +
+        "11.768247 0.425211," +
+        "11.960165 0.074778," +
+        "11.953907 0.000000," +
+        "11.629411 0.258767," +
+        "11.229920 0.582278," +
+        "11.001633 0.564300," +
+        "10.868476 0.447478," +
+        "10.633849 0.541833," +
+        "10.513370 0.672133," +
+        "11.188700 0.820078," +
+        "11.194014 0.859656," +
+        "11.118212 0.905822," +
+        "10.874860 0.930311," +
+        "10.427319 0.716522," +
+        "10.023620 0.374211," +
+        "9.434614 0.360144," +
+        "8.455131 0.859544," +
+        "8.180481 0.920500," +
+        "7.902529 1.115078," +
+        "7.823108 1.269800," +
+        "7.830482 1.403778," +
+        "7.791937 1.496744," +
+        "7.767005 1.538978," +
+        "7.676310 1.622311," +
+        "7.653637 1.650089," +
+        "7.585616 1.955644," +
+        "7.562942 1.983422," +
+        "7.562942 2.233422," +
+        "7.608289 2.400089," +
+        "7.630963 2.427867," +
+        "7.608289 2.538978," +
+        "7.585616 2.566756," +
+        "7.653637 2.705644," +
+        "7.630963 2.816756," +
+        "7.336206 3.011200," +
+        "7.290859 3.011200," +
+        "7.245511 3.011200," +
+        "7.041449 2.955644," +
+        "6.928081 2.816756," +
+        "6.928081 2.733422," +
+        "6.905407 2.622311," +
+        "6.860060 2.677867," +
+        "6.814712 2.677867," +
+        "6.678671 2.677867," +
+        "6.678671 2.733422," +
+        "6.769365 2.733422," +
+        "6.814712 2.733422," +
+        "6.792039 2.788978," +
+        "6.293219 3.066756," +
+        "6.225198 3.122311," +
+        "6.202525 3.233422," +
+        "6.134504 3.344533," +
+        "5.907767 3.261200," +
+        "5.862420 3.288978," +
+        "6.043809 3.427867," +
+        "6.021136 3.483422," +
+        "5.975788 3.483422," +
+        "5.930441 3.511200," +
+        "5.953115 3.566756," +
+        "5.975788 3.594533," +
+        "5.749052 3.788978," +
+        "5.703705 3.788978," +
+        "5.635684 3.788978," +
+        "5.703705 3.844533," +
+        "5.703705 4.011200," +
+        "5.499642 4.011200," +
+        "5.862420 4.372311," +
+        "5.975788 4.427867," +
+        "6.021136 4.427867," +
+        "6.089156 4.538978," +
+        "6.111830 4.566756," +
+        "6.089156 4.650089," +
+        "5.998462 4.650089," +
+        "5.817073 4.788978," +
+        "5.771726 4.816756," +
+        "5.681031 4.816756," +
+        "5.749052 4.927867," +
+        "5.749052 5.038978," +
+        "5.839747 5.177867," +
+        "5.998462 5.233422," +
+        "6.225198 5.233422," +
+        "6.270545 5.233422," +
+        "6.383914 5.288978," +
+        "6.406587 5.372311," +
+        "6.429261 5.400089," +
+        "6.587976 5.483422," +
+        "6.670626 5.490000," +
+        "6.700845 5.564100," +
+        "6.860060 5.927867," +
+        "6.860060 6.038978," +
+        "6.950754 6.205644," +
+        "6.973428 6.316756," +
+        "7.041449 6.344533," +
+        "7.064122 6.455644," +
+        "7.116072 6.541989," +
+        "7.114313 6.603667," +
+        "7.025305 6.741422," +
+        "6.736924 6.701367," +
+        "6.641658 6.741467," +
+        "6.500574 6.761389," +
+        "6.435410 6.733422," +
+        "6.224291 6.728556," +
+        "6.191759 6.738989," +
+        "6.099124 6.755000," +
+        "6.041805 6.749733," +
+        "6.001672 6.742967," +
+        "5.905382 6.718300," +
+        "5.817073 6.677867," +
+        "5.611713 6.686622," +
+        "5.401366 6.864333," +
+        "5.386274 6.927867," +
+        "5.356608 6.981811," +
+        "5.404095 7.111822," +
+        "5.561958 7.216133," +
+        "5.660643 7.244722," +
+        "5.366149 7.489478," +
+        "5.340927 7.511200," +
+        "5.114998 7.592867," +
+        "4.870667 7.692033," +
+        "4.746560 7.781856," +
+        "4.708060 7.760867," +
+        "4.692225 7.802500," +
+        "4.607090 7.849044," +
+        "4.481324 7.879711," +
+        "4.340031 8.093378," +
+        "4.181171 8.158044," +
+        "4.116415 8.200800," +
+        "4.081135 8.195278," +
+        "4.090912 8.272500," +
+        "4.032232 8.378311," +
+        "3.779566 8.791278," +
+        "3.769654 8.849022," +
+        "3.598177 8.955178," +
+        "3.576828 9.059633," +
+        "3.527037 9.066756," +
+        "3.498069 9.082022," +
+        "3.541865 9.174211," +
+        "3.542409 9.234411," +
+        "3.576275 9.262711," +
+        "3.582279 9.287744," +
+        "3.390995 9.316756," +
+        "3.209606 9.344533," +
+        "3.100836 9.367511," +
+        "2.957466 9.370756," +
+        "2.870844 9.366222," +
+        "2.777211 9.285222," +
+        "2.744851 9.285900," +
+        "2.775397 9.294867," +
+        "2.832661 9.341156," +
+        "2.868114 9.373300," +
+        "2.869502 9.400089," +
+        "2.794434 9.420178," +
+        "2.714423 9.440078," +
+        "2.641124 9.441944," +
+        "2.572096 9.428378," +
+        "2.548379 9.418600," +
+        "2.573130 9.388211," +
+        "2.563126 9.333567," +
+        "2.535855 9.320067," +
+        "2.517670 9.282778," +
+        "2.479488 9.260278," +
+        "2.483125 9.239067," +
+        "2.464034 9.224278," +
+        "2.468586 9.180556," +
+        "2.443129 9.168989," +
+        "2.439084 9.147456," +
+        "2.448389 9.129344," +
+        "2.444897 9.109600," +
+        "2.450720 9.097256," +
+        "2.444897 9.080389," +
+        "2.447808 9.045822," +
+        "2.424536 9.024011," +
+        "2.415811 9.000133," +
+        "2.442457 8.957422," +
+        "2.429887 8.946567," +
+        "2.455028 8.894556," +
+        "2.435936 8.879078," +
+        "2.413136 8.853411," +
+        "2.410805 8.836944," +
+        "2.412202 8.822133," +
+        "2.387533 8.789544," +
+        "2.386608 8.776044," +
+        "2.398706 8.757278," +
+        "2.373103 8.739511," +
+        "2.387070 8.769467," +
+        "2.375434 8.784611," +
+        "2.358674 8.785922," +
+        "2.337270 8.793167," +
+        "2.365195 8.790533," +
+        "2.399169 8.821478," +
+        "2.396376 8.837933," +
+        "2.408946 8.879078," +
+        "2.432218 8.894878," +
+        "2.414995 8.963022," +
+        "2.390961 8.983722," +
+        "2.340091 8.969389," +
+        "2.332091 8.946244," +
+        "2.340091 8.927722," +
+        "2.332091 8.912289," +
+        "2.316093 8.904067," +
+        "2.311730 8.874744," +
+        "2.288975 8.861244," +
+        "2.247727 8.856233," +
+        "2.233180 8.861889," +
+        "2.209436 8.859233," +
+        "2.231003 8.871144," +
+        "2.265911 8.873200," +
+        "2.277548 8.869600," +
+        "2.290635 8.873711," +
+        "2.299360 8.904578," +
+        "2.268088 8.909622," +
+        "2.247727 8.925256," +
+        "2.225734 8.920756," +
+        "2.208747 8.909622," +
+        "2.203768 8.921811," +
+        "2.214352 8.931822," +
+        "2.197138 8.933811," +
+        "2.148725 8.907478," +
+        "2.134577 8.904844," +
+        "2.113354 8.917222," +
+        "2.095107 8.918800," +
+        "2.079961 8.912944," +
+        "2.060761 8.913356," +
+        "2.034577 8.902656," +
+        "1.983589 8.895400," +
+        "2.033997 8.913356," +
+        "2.062502 8.918700," +
+        "2.092758 8.929811," +
+        "2.148090 8.928756," +
+        "2.168397 8.937878," +
+        "2.146421 8.965533," +
+        "2.182173 8.943933," +
+        "2.201537 8.951311," +
+        "2.239138 8.938400," +
+        "2.267063 8.944989," +
+        "2.284939 8.925767," +
+        "2.306887 8.926022," +
+        "2.311086 8.936356," +
+        "2.296312 8.952489," +
+        "2.317254 8.981122," +
+        "2.334939 9.003844," +
+        "2.374500 9.014044," +
+        "2.386136 9.034778," +
+        "2.401962 9.044656," +
+        "2.418723 9.044889," +
+        "2.426287 9.054878," +
+        "2.411739 9.063522," +
+        "2.426867 9.099311," +
+        "2.398362 9.125233," +
+        "2.373339 9.121944," +
+        "2.403595 9.134289," +
+        "2.417680 9.165778," +
+        "2.425860 9.192778," +
+        "2.423783 9.231400," +
+        "2.400330 9.237022," +
+        "2.419494 9.243567," +
+        "2.429815 9.246711," +
+        "2.449495 9.245489," +
+        "2.457676 9.289856," +
+        "2.481311 9.298211," +
+        "2.488585 9.334211," +
+        "2.520255 9.353822," +
+        "2.520400 9.369944," +
+        "2.494960 9.432511," +
+        "2.463671 9.469200," +
+        "2.406950 9.500578," +
+        "2.240907 9.536433," +
+        "2.129969 9.569467," +
+        "2.031530 9.607422," +
+        "1.932328 9.658044," +
+        "1.835167 9.695656," +
+        "1.746196 9.760744," +
+        "1.667446 9.789667," +
+        "1.575400 9.797622," +
+        "1.562104 9.828722," +
+        "1.531422 9.846800," +
+        "1.415859 9.888744," +
+        "1.315206 9.942167," +
+        "1.175573 10.083667," +
+        "1.147394 10.090267," +
+        "1.118064 10.086567," +
+        "0.990883 9.998400," +
+        "0.778930 9.990856," +
+        "0.592924 10.033144," +
+        "0.507490 10.125422," +
+        "0.419562 10.320811," +
+        "0.375403 10.344533," +
+        "0.276464 10.431189," +
+        "0.220170 10.534911," +
+        "0.181271 10.571000," +
+        "0.153745 10.620156," +
+        "0.114973 10.653889," +
+        "0.103274 10.707756," +
+        "0.097914 10.761511," +
+        "0.076256 10.811522," +
+        "0.061935 10.867833," +
+        "0.000000 10.960167)"
+    );
+    vectorlayer.addFeatures([new OpenLayers.Feature.Vector(original)]);
+    var maxExtent = vectorlayer.getDataExtent();
+    // instanciate the map
+    map = new OpenLayers.Map("map", {
+        fractionalZoom: true, 
+        maxExtent: maxExtent,
+        layers: [vectorlayer]
+    });
+    map.zoomToMaxExtent();
+    map.events.register('moveend', map, function(){
+        map2.setCenter(map.getCenter(), map.getZoom());
+    });
+    
+    
+    var vectorlayer2 = new OpenLayers.Layer.Vector('Vectorlayer simplified', {
+        isBaseLayer: true,
+        styleMap: styleMap
+    });
+    
+    map2 =  new OpenLayers.Map("map-simplify", {
+        fractionalZoom: true, 
+        maxExtent: maxExtent,
+        controls: [],
+        layers: [vectorlayer2]
+    });
+    map2.zoomToExtent(maxExtent);
+    
+    // Control behaviour
+    var lastValue = 0.1;
+    var simplify = function() {
+        var min = 0;
+        var max = 1;
+        var givenVal= parseFloat(document.getElementById('tolerance').value);
+        var useVal = lastValue;
+        if (!isNaN(givenVal)) {
+            if (givenVal >= min && givenVal <= max) {
+                useVal = givenVal;
+            } else {
+                useVal = (givenVal < min) ? min : max;
+            }
+        }
+        document.getElementById('tolerance').value = useVal;
+        vectorlayer2.removeFeatures(vectorlayer2.features);
+        var newLineString = original.simplify(useVal);
+        vectorlayer2.addFeatures([new OpenLayers.Feature.Vector(newLineString)]);
+        var originalVerticesCnt = original.getVertices().length;
+        var simplifiedVerticesCnt = newLineString.getVertices().length;
+        var infotxt = '<ul><li>Original LineString: <strong>';
+        infotxt +=  originalVerticesCnt + ' vertices</strong></li>';
+        infotxt += ' <li>Simplified geometry: <strong>' + simplifiedVerticesCnt + ' vertices</strong></li>';
+        infotxt += ' <li>Decreased by <strong>' + (((originalVerticesCnt-simplifiedVerticesCnt)/originalVerticesCnt)*100).toFixed(2) + ' per cent</strong></li></ul>';
+        document.getElementById('info').innerHTML = infotxt;
+        lastValue = useVal;
+    };
+    document.getElementById('tolerance').value = lastValue;
+    document.getElementById('simplify').onclick = simplify;
+    simplify();
+    
+    var animationInterval;
+    var animationHandler = function(){
+        if (this.value === 'Start animation') {
+            document.getElementById('simplify').disabled = true;
+            document.getElementById('animation').value = "Stop animation";
+            animationInterval = window.setInterval(function(){
+                var tolerance = parseFloat(document.getElementById('tolerance').value);
+                if (tolerance < 1) {
+                    tolerance+=0.02;
+                } else {
+                    tolerance = 0.02;
+                }
+                document.getElementById('tolerance').value = tolerance.toFixed(2);
+                simplify();
+            }, 500);
+            simplify();
+        } else {
+            if (animationInterval) {
+                window.clearInterval(animationInterval);
+            }
+            document.getElementById('simplify').disabled = false;
+            document.getElementById('animation').value = "Start animation";
+        }
+    };
+    document.getElementById('animation').onclick = animationHandler;
+})();

Copied: sandbox/tschaub/canvas/examples/single-tile.html (from rev 11416, trunk/openlayers/examples/single-tile.html)
===================================================================
--- sandbox/tschaub/canvas/examples/single-tile.html	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/single-tile.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+    <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
+        <title>OpenLayers: Single Tile</title>
+        <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
+        <link rel="stylesheet" href="style.css" type="text/css">
+    </head>
+    <body>
+        <h1 id="title">Single Tile Example</h1>
+        <div id="tags">tile, ratio, singleTile, performance</div>
+        <p id="shortdesc">
+            Use the singleTile option on gridded layers to request a single tile.
+        </p>  
+        <div id="mapDiv" class="smallmap"></div>
+        <div id="docs">
+            <p>
+                This map demonstrates the use of the singleTile property as an
+                alternative to the default tiled behavior of layers.  The first
+                layer in the map is a WMS layer with the singleTile option set
+                true.  The second layer is a WMS layer with the default options.
+            </p>
+            <p>
+                View the <a href="single-tile.js" target="_blank">single-tile.js</a>
+                source to see how this is done.
+            </p>
+        </div>
+        <script src="../lib/OpenLayers.js"></script>
+        <script src="single-tile.js"></script>
+    </body>
+</html>

Copied: sandbox/tschaub/canvas/examples/single-tile.js (from rev 11416, trunk/openlayers/examples/single-tile.js)
===================================================================
--- sandbox/tschaub/canvas/examples/single-tile.js	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/single-tile.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,20 @@
+var map = new OpenLayers.Map({
+    div: "mapDiv",
+    layers: [
+        new OpenLayers.Layer.WMS(
+            "Single Tile", 
+            "http://vmap0.tiles.osgeo.org/wms/vmap0",
+            {layers: "basic"}, 
+            {singleTile: true, ratio: 1}
+        ), 
+        new OpenLayers.Layer.WMS(
+            "Multiple Tiles", 
+            "http://vmap0.tiles.osgeo.org/wms/vmap0",
+            {layers: "basic"}
+        )
+    ],
+    center: new OpenLayers.LonLat(6.5, 40.5),
+    zoom: 4
+});
+
+map.addControl(new OpenLayers.Control.LayerSwitcher());

Modified: sandbox/tschaub/canvas/examples/sld-parser.html
===================================================================
--- sandbox/tschaub/canvas/examples/sld-parser.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/sld-parser.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers SLD Parser</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/sld.html
===================================================================
--- sandbox/tschaub/canvas/examples/sld.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/sld.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/Firebug/firebug.js"></script>

Deleted: sandbox/tschaub/canvas/examples/small.jpg
===================================================================
(Binary files differ)

Modified: sandbox/tschaub/canvas/examples/snap-split.html
===================================================================
--- sandbox/tschaub/canvas/examples/snap-split.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/snap-split.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Snapping & Splitting</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/snapping.html
===================================================================
--- sandbox/tschaub/canvas/examples/snapping.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/snapping.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Snapping</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
@@ -164,7 +166,7 @@
             });
             draw = new OpenLayers.Control.DrawFeature(
                 poly, OpenLayers.Handler.Polygon,
-                {displayClass: "olControlDrawFeaturePoint", title: "Draw Features"}
+                {displayClass: "olControlDrawFeaturePoint", title: "Draw Features", handlerOptions: {holeModifier: "altKey"}}
             );
             modify = new OpenLayers.Control.ModifyFeature(
                 poly, {displayClass: "olControlModifyFeature", title: "Modify Features"}

Modified: sandbox/tschaub/canvas/examples/sos.html
===================================================================
--- sandbox/tschaub/canvas/examples/sos.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/sos.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,10 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
+  <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
+    <title>SOS Client Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
+    <link rel="stylesheet" href="style.css" type="text/css" />
     <style type="text/css">
     .sosmap {
         width: 768px;
@@ -133,7 +137,7 @@
                         responseMode: 'inline',
                         procedure: feature.attributes.id,
                         offering: name,
-                        observedProperty: offering.observedProperties[0],
+                        observedProperties: offering.observedProperties,
                         responseFormat: this.responseFormat
                     });
                     OpenLayers.Request.POST({

Modified: sandbox/tschaub/canvas/examples/spherical-mercator.html
===================================================================
--- sandbox/tschaub/canvas/examples/spherical-mercator.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/spherical-mercator.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Spherical Mercator</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/split-feature.html
===================================================================
--- sandbox/tschaub/canvas/examples/split-feature.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/split-feature.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>Split Feature Example</title>
         
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/strategy-bbox.html
===================================================================
--- sandbox/tschaub/canvas/examples/strategy-bbox.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/strategy-bbox.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers BBOX Strategy Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/strategy-cluster-extended.html
===================================================================
--- sandbox/tschaub/canvas/examples/strategy-cluster-extended.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/strategy-cluster-extended.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>Extended clustering example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="style.css" type="text/css">

Modified: sandbox/tschaub/canvas/examples/strategy-cluster-threshold.html
===================================================================
--- sandbox/tschaub/canvas/examples/strategy-cluster-threshold.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/strategy-cluster-threshold.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Cluster Strategy Threshold</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/strategy-cluster.html
===================================================================
--- sandbox/tschaub/canvas/examples/strategy-cluster.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/strategy-cluster.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Cluster Strategy Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/strategy-paging.html
===================================================================
--- sandbox/tschaub/canvas/examples/strategy-paging.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/strategy-paging.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Paging Strategy Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/style-rules.html
===================================================================
--- sandbox/tschaub/canvas/examples/style-rules.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/style-rules.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Rule Based Style</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/style.css
===================================================================
--- sandbox/tschaub/canvas/examples/style.css	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/style.css	2011-02-24 15:01:55 UTC (rev 11421)
@@ -84,3 +84,56 @@
 #docs p {
     margin-bottom: 0.5em;
 }
+/* mobile specific */
+ at media only screen and (max-width: 600px) {
+    body {
+        height           : 100%;
+        margin           : 0;
+        padding          : 0;
+        width            : 100%;
+    }
+    #map {
+        background : #7391ad;
+        width      : 100%;
+    }
+    #map {
+        border : 0;
+        height : 250px;
+    }
+    #title {
+        font-size   : 1.3em;
+        line-height : 2em;
+        text-indent : 1em;
+        margin      : 0;
+        padding     : 0;
+    }
+    #docs {
+        bottom     : 0;
+        padding    : 1em;
+    }
+    #shortdesc {
+        color      : #aaa;
+        font-size  : 0.8em;
+        padding    : 1em;
+        text-align : right;
+    }
+    #tags {
+        display : none;
+    }
+}
+ at media only screen and (orientation: landscape) and (max-width: 600px) {
+    #shortdesc {
+       float: right;
+       width: 25%;
+    }
+    #map {
+        width: 70%;
+    }
+    #docs {
+        font-size: 12px;
+    }
+}
+body {
+    -webkit-text-size-adjust: none;
+}
+

Copied: sandbox/tschaub/canvas/examples/style.mobile.css (from rev 11416, trunk/openlayers/examples/style.mobile.css)
===================================================================
--- sandbox/tschaub/canvas/examples/style.mobile.css	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/style.mobile.css	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,25 @@
+div.olControlZoomPanel {
+    height: 108px
+    width: 36px;
+    position: absolute;
+    top: 20px;
+    left: 20px;
+}
+div.olControlZoomPanel div {
+    width: 36px;
+    height: 36px;
+    background-image: url(img/mobile-zoombar.png);
+    left: 0;
+}
+div.olControlZoomPanel .olControlZoomInItemInactive {
+    top: 0;
+    background-position: 0 0;
+}
+div.olControlZoomPanel .olControlZoomToMaxExtentItemInactive {
+    top: 36px;
+    background-position: 0 -36px;
+}
+div.olControlZoomPanel .olControlZoomOutItemInactive {
+    top: 72px;
+    background-position: 0 -72px;
+}

Modified: sandbox/tschaub/canvas/examples/stylemap.html
===================================================================
--- sandbox/tschaub/canvas/examples/stylemap.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/stylemap.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers StyleMap</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/styles-context.html
===================================================================
--- sandbox/tschaub/canvas/examples/styles-context.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/styles-context.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Vector Styles</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/styles-rotation.html
===================================================================
--- sandbox/tschaub/canvas/examples/styles-rotation.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/styles-rotation.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Styles Rotation Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/styles-unique.html
===================================================================
--- sandbox/tschaub/canvas/examples/styles-unique.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/styles-unique.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Styles Unique Value Styles Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/sundials-spherical-mercator.html
===================================================================
--- sandbox/tschaub/canvas/examples/sundials-spherical-mercator.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/sundials-spherical-mercator.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Sundials on a Spherical Mercator Map</title>
     <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
@@ -31,15 +33,7 @@
                                                  20037508.34, 20037508.34)
             };
             map = new OpenLayers.Map('map', options);
-            var mapnik = new OpenLayers.Layer.TMS(
-                "OpenStreetMap (Mapnik)",
-                "http://tile.openstreetmap.org/",
-                {
-                    type: 'png', getURL: osm_getTileURL,
-                    displayOutsideMaxExtent: true,
-                    attribution: '<a href="http://www.openstreetmap.org/">OpenStreetMap</a>'
-                }
-            );
+            var mapnik = new OpenLayers.Layer.OSM("OpenStreetMap (Mapnik)");
             var gmap = new OpenLayers.Layer.Google("Google", {sphericalMercator:true});
             var sundials = new OpenLayers.Layer.Vector("KML", {
                 projection: map.displayProjection,
@@ -96,20 +90,6 @@
                 delete feature.popup;
             }
         }
-        function osm_getTileURL(bounds) {
-            var res = this.map.getResolution();
-            var x = Math.round((bounds.left - this.maxExtent.left) / (res * this.tileSize.w));
-            var y = Math.round((this.maxExtent.top - bounds.top) / (res * this.tileSize.h));
-            var z = this.map.getZoom();
-            var limit = Math.pow(2, z);
-
-            if (y < 0 || y >= limit) {
-                return OpenLayers.Util.getImagesLocation() + "404.png";
-            } else {
-                x = ((x % limit) + limit) % limit;
-                return this.url + z + "/" + x + "/" + y + "." + this.type;
-            }
-        }
     </script>
   </head>
   <body onload="init()">

Modified: sandbox/tschaub/canvas/examples/sundials.html
===================================================================
--- sandbox/tschaub/canvas/examples/sundials.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/sundials.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
 

Modified: sandbox/tschaub/canvas/examples/symbolizers-fill-stroke-graphic.html
===================================================================
--- sandbox/tschaub/canvas/examples/symbolizers-fill-stroke-graphic.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/symbolizers-fill-stroke-graphic.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Fill, Stroke, and Graphic Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/teleportation.html
===================================================================
--- sandbox/tschaub/canvas/examples/teleportation.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/teleportation.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Teleporter Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Deleted: sandbox/tschaub/canvas/examples/thinlong.jpg
===================================================================
(Binary files differ)

Copied: sandbox/tschaub/canvas/examples/tile-origin.html (from rev 11416, trunk/openlayers/examples/tile-origin.html)
===================================================================
--- sandbox/tschaub/canvas/examples/tile-origin.html	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/tile-origin.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+    <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
+        <title>OpenLayers Tile Origin Example</title>
+        <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
+        <link rel="stylesheet" href="../theme/default/google.css" type="text/css">
+        <link rel="stylesheet" href="style.css" type="text/css">
+    </head>
+    <body>
+        <h1 id="title">Tile Origin</h1>
+        <div id="tags">
+            grid, tileOrigin
+        </div>
+        <p id="shortdesc">
+            Demonstrates the use of the tileExtent property to differentiate 
+            between the maximum extent and the tile extent for a layer.
+        </p>
+        <div id="map" class="smallmap"></div>
+        <div id="docs">
+            <p>
+                This example uses a layer that requests map tiles from a WMS
+                that only generates image responses for requests that align with
+                a particular tile lattice.  In this case, the layer's 
+                <code>maxExtent</code> does not align with that tile lattice.  
+                To configure the layer with a tile extent that conforms to the 
+                tile origin configured on the server, use the layer's 
+                <code>tileOrigin</code> property.
+            </p><p>
+                View the <a href="tile-origin.js" target="_blank">tile-origin.js</a>
+                source to see how this is done
+            </p>
+        </div>
+        <script src="../lib/OpenLayers.js"></script>
+        <script src="tile-origin.js"></script>
+    </body>
+</html>

Copied: sandbox/tschaub/canvas/examples/tile-origin.js (from rev 11416, trunk/openlayers/examples/tile-origin.js)
===================================================================
--- sandbox/tschaub/canvas/examples/tile-origin.js	                        (rev 0)
+++ sandbox/tschaub/canvas/examples/tile-origin.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,16 @@
+var map = new OpenLayers.Map({
+    div: "map",
+    maxExtent: new OpenLayers.Bounds(-130, 30, -80, 55),
+    maxResolution: 360 / 256 / Math.pow(2, 4),
+    numZoomLevels: 12,
+    layers: [
+        new OpenLayers.Layer.WMS(
+            "Global Imagery",
+            "http://maps.opengeo.org/geowebcache/service/wms",
+            {layers: "bluemarble"},
+            {tileOrigin: new OpenLayers.LonLat(-180, -90)}
+        )
+    ],
+    center: new OpenLayers.LonLat(-110, 45),
+    zoom: 0
+});

Modified: sandbox/tschaub/canvas/examples/tilecache.html
===================================================================
--- sandbox/tschaub/canvas/examples/tilecache.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/tilecache.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers TileCache Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/tms.html
===================================================================
--- sandbox/tschaub/canvas/examples/tms.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/tms.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Tiled Map Service Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/transform-feature.html
===================================================================
--- sandbox/tschaub/canvas/examples/transform-feature.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/transform-feature.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Transformation Box</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/transition.html
===================================================================
--- sandbox/tschaub/canvas/examples/transition.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/transition.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Transitions Example</title>
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/canvas/examples/urban.html
===================================================================
--- sandbox/tschaub/canvas/examples/urban.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/urban.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
       <title>OpenLayers WorldWind Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/ve-novibrate.html
===================================================================
--- sandbox/tschaub/canvas/examples/ve-novibrate.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/ve-novibrate.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml"> 
-  <head> 
+  <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" /> 
       <title>OpenLayers Virtual Earth Example</title> 
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" /> 
     <link rel="stylesheet" href="style.css" type="text/css" /> 

Modified: sandbox/tschaub/canvas/examples/ve.html
===================================================================
--- sandbox/tschaub/canvas/examples/ve.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/ve.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
       <title>OpenLayers Virtual Earth Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/vector-features-with-text.html
===================================================================
--- sandbox/tschaub/canvas/examples/vector-features-with-text.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/vector-features-with-text.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Labeled Features Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/vector-features.html
===================================================================
--- sandbox/tschaub/canvas/examples/vector-features.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/vector-features.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Vector Features</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/vector-formats.html
===================================================================
--- sandbox/tschaub/canvas/examples/vector-formats.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/vector-formats.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Vector Formats</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/web-mercator.html
===================================================================
--- sandbox/tschaub/canvas/examples/web-mercator.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/web-mercator.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE HTML>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers: Web Mercator</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/wfs-filter.html
===================================================================
--- sandbox/tschaub/canvas/examples/wfs-filter.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/wfs-filter.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers WFS Protocol with Filter</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="../theme/default/google.css" type="text/css">

Modified: sandbox/tschaub/canvas/examples/wfs-protocol-transactions.html
===================================================================
--- sandbox/tschaub/canvas/examples/wfs-protocol-transactions.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/wfs-protocol-transactions.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html>
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>

Modified: sandbox/tschaub/canvas/examples/wfs-protocol.html
===================================================================
--- sandbox/tschaub/canvas/examples/wfs-protocol.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/wfs-protocol.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Vector Behavior Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/wfs-reprojection.html
===================================================================
--- sandbox/tschaub/canvas/examples/wfs-reprojection.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/wfs-reprojection.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>WFS Reprojection Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/wfs-snap-split.html
===================================================================
--- sandbox/tschaub/canvas/examples/wfs-snap-split.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/wfs-snap-split.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html>
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/canvas/examples/wfs-states.html
===================================================================
--- sandbox/tschaub/canvas/examples/wfs-states.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/wfs-states.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />
         <title>WFS: United States (GeoServer)</title>

Deleted: sandbox/tschaub/canvas/examples/widelong.jpg
===================================================================
(Binary files differ)

Deleted: sandbox/tschaub/canvas/examples/wideshort.jpg
===================================================================
(Binary files differ)

Modified: sandbox/tschaub/canvas/examples/wmc.html
===================================================================
--- sandbox/tschaub/canvas/examples/wmc.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/wmc.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <style type="text/css">

Modified: sandbox/tschaub/canvas/examples/wms-long-url.html
===================================================================
--- sandbox/tschaub/canvas/examples/wms-long-url.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/wms-long-url.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>WMS with POST Requests to Avoid Long URLs</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/wms-untiled.html
===================================================================
--- sandbox/tschaub/canvas/examples/wms-untiled.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/wms-untiled.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/canvas/examples/wms-v13.html
===================================================================
--- sandbox/tschaub/canvas/examples/wms-v13.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/wms-v13.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/canvas/examples/wms.html
===================================================================
--- sandbox/tschaub/canvas/examples/wms.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/wms.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/canvas/examples/wmst.html
===================================================================
--- sandbox/tschaub/canvas/examples/wmst.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/wmst.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: WMS + Time</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/wmts-capabilities.html
===================================================================
--- sandbox/tschaub/canvas/examples/wmts-capabilities.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/wmts-capabilities.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers WMTS Capabilities Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css"/>
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/wmts-getfeatureinfo.html
===================================================================
--- sandbox/tschaub/canvas/examples/wmts-getfeatureinfo.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/wmts-getfeatureinfo.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers WMTS GetFeatureInfo Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css"/>
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/wmts.html
===================================================================
--- sandbox/tschaub/canvas/examples/wmts.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/wmts.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers WMTS Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css"/>
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/worldwind.html
===================================================================
--- sandbox/tschaub/canvas/examples/worldwind.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/worldwind.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/canvas/examples/wrapDateLine.html
===================================================================
--- sandbox/tschaub/canvas/examples/wrapDateLine.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/wrapDateLine.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Wrap Date Line</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/xhtml.html
===================================================================
--- sandbox/tschaub/canvas/examples/xhtml.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/xhtml.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -2,6 +2,8 @@
         "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
 <title>XHTML Example</title>
 <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/xml.html
===================================================================
--- sandbox/tschaub/canvas/examples/xml.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/xml.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -2,6 +2,8 @@
         "http://www.w3.org/TR/2000/REC-xhtml1-20000126/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>XML Parsing Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/xyz-esri.html
===================================================================
--- sandbox/tschaub/canvas/examples/xyz-esri.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/xyz-esri.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Basic ESRI Map Cache Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/xyz-offset.html
===================================================================
--- sandbox/tschaub/canvas/examples/xyz-offset.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/xyz-offset.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,8 @@
 <!DOCTYPE HTML>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers XYZ with Offset</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/yahoo.html
===================================================================
--- sandbox/tschaub/canvas/examples/yahoo.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/yahoo.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Yahoo Layer</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/examples/zoomLevels.html
===================================================================
--- sandbox/tschaub/canvas/examples/zoomLevels.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/zoomLevels.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/canvas/examples/zoomify.html
===================================================================
--- sandbox/tschaub/canvas/examples/zoomify.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/examples/zoomify.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Zoomify Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Ajax.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Ajax.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Ajax.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -6,6 +6,7 @@
 /**
  * @requires OpenLayers/Request/XMLHttpRequest.js
  * @requires OpenLayers/Console.js
+ * @requires OpenLayers/Lang.js
  */
 
 OpenLayers.ProxyHost = "";

Modified: sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Bounds.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Bounds.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Bounds.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,10 +1,12 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Console.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**
@@ -613,14 +615,15 @@
  * 
  * Parameters: 
  * str - {String}Comma-separated bounds string. (ex. <i>"5,42,10,45"</i>)
+ * reverseAxisOrder - {Boolean} Does the string use reverse axis order?
  * 
  * Returns:
  * {<OpenLayers.Bounds>} New bounds object built from the 
  *                       passed-in String.
  */
-OpenLayers.Bounds.fromString = function(str) {
+OpenLayers.Bounds.fromString = function(str, reverseAxisOrder) {
     var bounds = str.split(",");
-    return OpenLayers.Bounds.fromArray(bounds);
+    return OpenLayers.Bounds.fromArray(bounds, reverseAxisOrder);
 };
 
 /** 
@@ -630,12 +633,18 @@
  * 
  * Parameters:
  * bbox - {Array(Float)} Array of bounds values (ex. <i>[5,42,10,45]</i>)
+ * reverseAxisOrder - {Boolean} Does the array use reverse axis order?
  *
  * Returns:
  * {<OpenLayers.Bounds>} New bounds object built from the passed-in Array.
  */
-OpenLayers.Bounds.fromArray = function(bbox) {
-    return new OpenLayers.Bounds(parseFloat(bbox[0]),
+OpenLayers.Bounds.fromArray = function(bbox, reverseAxisOrder) {
+    return reverseAxisOrder === true ?
+           new OpenLayers.Bounds(parseFloat(bbox[1]),
+                                 parseFloat(bbox[0]),
+                                 parseFloat(bbox[3]),
+                                 parseFloat(bbox[2])) :
+           new OpenLayers.Bounds(parseFloat(bbox[0]),
                                  parseFloat(bbox[1]),
                                  parseFloat(bbox[2]),
                                  parseFloat(bbox[3]));

Modified: sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Class.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Class.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Class.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/SingleFile.js
+ */
+
+/**
  * Constructor: OpenLayers.Class
  * Base class used to construct all other classes. Includes support for 
  *     multiple inheritance. 
@@ -23,49 +27,22 @@
  *
  */
 OpenLayers.Class = function() {
-    var Class = function() {
-        /**
-         * This following condition can be removed at 3.0 - this is only for
-         * backwards compatibility while the Class.inherit method is still
-         * in use.  So at 3.0, the following three lines would be replaced with
-         * simply:
-         * this.initialize.apply(this, arguments);
-         */
-        if (arguments && arguments[0] != OpenLayers.Class.isPrototype) {
-            this.initialize.apply(this, arguments);
-        }
-    };
-    var extended = {};
-    var parent, initialize, Type;
-    for(var i=0, len=arguments.length; i<len; ++i) {
-        Type = arguments[i];
-        if(typeof Type == "function") {
-            // make the class passed as the first argument the superclass
-            if(i == 0 && len > 1) {
-                initialize = Type.prototype.initialize;
-                // replace the initialize method with an empty function,
-                // because we do not want to create a real instance here
-                Type.prototype.initialize = function() {};
-                // the line below makes sure that the new class has a
-                // superclass
-                extended = new Type();
-                // restore the original initialize method
-                if(initialize === undefined) {
-                    delete Type.prototype.initialize;
-                } else {
-                    Type.prototype.initialize = initialize;
-                }
-            }
-            // get the prototype of the superclass
-            parent = Type.prototype;
-        } else {
-            // in this case we're extending with the prototype
-            parent = Type;
-        }
-        OpenLayers.Util.extend(extended, parent);
+    var len = arguments.length;
+    var P = arguments[0];
+    var F = arguments[len-1];
+
+    var C = typeof F.initialize == "function" ?
+        F.initialize :
+        function(){ P.apply(this, arguments); };
+
+    if (len > 1) {
+        var newArgs = [C, P].concat(
+                Array.prototype.slice.call(arguments).slice(1, len-1), F);
+        OpenLayers.inherit.apply(null, newArgs);
+    } else {
+        C.prototype = F;
     }
-    Class.prototype = extended;
-    return Class;
+    return C;
 };
 
 /**
@@ -90,7 +67,6 @@
     };
 };
 
-
 /**
  * APIFunction: inherit
  * *Deprecated*.  Old method to inherit from one or more OpenLayers style
@@ -102,15 +78,82 @@
  * Returns:
  * An object prototype
  */
-OpenLayers.Class.inherit = function () {
-    var superClass = arguments[0];
-    var proto = new superClass(OpenLayers.Class.isPrototype);
-    for (var i=1, len=arguments.length; i<len; i++) {
-        if (typeof arguments[i] == "function") {
-            var mixin = arguments[i];
-            arguments[i] = new mixin(OpenLayers.Class.isPrototype);
+OpenLayers.Class.inherit = function (P) {
+    var C = function() {
+       P.call(this);
+    };
+    var newArgs = [C].concat(Array.prototype.slice.call(arguments));
+    OpenLayers.inherit.apply(null, newArgs);
+    return C.prototype;
+};
+
+/**
+ * Function: OpenLayers.inherit
+ *
+ * Parameters:
+ * C - {Object} the class that inherits
+ * P - {Object} the superclass to inherit from
+ *
+ * In addition to the mandatory C and P parameters, an arbitrary number of
+ * objects can be passed, which will extend C.
+ */
+OpenLayers.inherit = function(C, P) {
+   var F = function() {};
+   F.prototype = P.prototype;
+   C.prototype = new F;
+   var i, l, o;
+   for(i=2, l=arguments.length; i<l; i++) {
+       o = arguments[i];
+       if(typeof o === "function") {
+           o = o.prototype;
+       }
+       OpenLayers.Util.extend(C.prototype, o);
+   }
+};
+
+/**
+ * APIFunction: extend
+ * Copy all properties of a source object to a destination object.  Modifies
+ *     the passed in destination object.  Any properties on the source object
+ *     that are set to undefined will not be (re)set on the destination object.
+ *
+ * Parameters:
+ * destination - {Object} The object that will be modified
+ * source - {Object} The object with properties to be set on the destination
+ *
+ * Returns:
+ * {Object} The destination object.
+ */
+OpenLayers.Util = OpenLayers.Util || {};
+OpenLayers.Util.extend = function(destination, source) {
+    destination = destination || {};
+    if (source) {
+        for (var property in source) {
+            var value = source[property];
+            if (value !== undefined) {
+                destination[property] = value;
+            }
         }
-        OpenLayers.Util.extend(proto, arguments[i]);
+
+        /**
+         * IE doesn't include the toString property when iterating over an object's
+         * properties with the for(property in object) syntax.  Explicitly check if
+         * the source has its own toString property.
+         */
+
+        /*
+         * FF/Windows < 2.0.0.13 reports "Illegal operation on WrappedNative
+         * prototype object" when calling hawOwnProperty if the source object
+         * is an instance of window.Event.
+         */
+
+        var sourceIsEvt = typeof window.Event == "function"
+                          && source instanceof window.Event;
+
+        if (!sourceIsEvt
+           && source.hasOwnProperty && source.hasOwnProperty("toString")) {
+            destination.toString = source.toString;
+        }
     }
-    return proto;
+    return destination;
 };

Modified: sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Element.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Element.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Element.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,14 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/Util.js
+ * @requires OpenLayers/BaseTypes.js
+ */
+
+/**
  * Namespace: OpenLayers.Element
  */
 OpenLayers.Element = {

Modified: sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/LonLat.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/LonLat.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/LonLat.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,10 +1,12 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Console.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Pixel.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Pixel.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Pixel.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,10 +1,12 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Console.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Size.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Size.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes/Size.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
+ */
+
+/**
  * Class: OpenLayers.Size
  * Instances of this class represent a width/height pair
  */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/BaseTypes.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,16 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
- * @requires OpenLayers/BaseTypes/LonLat.js
- * @requires OpenLayers/BaseTypes/Size.js
- * @requires OpenLayers/BaseTypes/Pixel.js
- * @requires OpenLayers/BaseTypes/Bounds.js
- * @requires OpenLayers/BaseTypes/Element.js
- * @requires OpenLayers/Lang/en.js
+ * @requires OpenLayers/Lang.js
  * @requires OpenLayers/Console.js
  */
  
@@ -464,7 +458,17 @@
      */
     True : function() {
         return true;
-    }
+    },
+    
+    /**
+     * APIFunction: Void
+     * A reusable function that returns ``undefined``.
+     *
+     * Returns:
+     * {undefined}
+     */
+    Void: function() {}
+
 };
 
 if (!Function.prototype.bind) {
@@ -593,7 +597,7 @@
         if ("toISOString" in Date.prototype) {
             return function(date) {
                 return date.toISOString();
-            }
+            };
         } else {
             function pad(num, len) {
                 var str = num + "";
@@ -619,7 +623,7 @@
                         pad(date.getUTCMilliseconds(), 3) + "Z";
                 }
                 return str;
-            }
+            };
         }
 
     })(),
@@ -628,9 +632,11 @@
      * APIMethod: parse
      * Generate a date object from a string.  The format for the string follows
      *     the profile of ISO 8601 for date and time on the Internet (see 
-     *     http://tools.ietf.org/html/rfc3339).  If the parse method on 
-     *     the Date constructor returns a valid date for the given string,
-     *     that method is used.
+     *     http://tools.ietf.org/html/rfc3339).  We don't call the native
+     *     Date.parse because of inconsistency between implmentations.  In 
+     *     Chrome, calling Date.parse with a string that doesn't contain any
+     *     indication of the timezone (e.g. "2011"), the date is interpreted
+     *     in local time.  On Firefox, the assumption is UTC.
      *
      * Parameters:
      * str - {String} A string representing the date (e.g. 
@@ -643,40 +649,33 @@
      */
     parse: function(str) {
         var date;
-        // first check if the native parse method can parse it
-        var elapsed = Date.parse(str);
-        if (!isNaN(elapsed)) {
-            date = new Date(elapsed);
-        } else {
-            var match = str.match(/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))?$/);
-            var date;
-            if (match && (match[1] || match[7])) { // must have at least year or time
-                var year = parseInt(match[1], 10) || 0;
-                var month = (parseInt(match[2], 10) - 1) || 0;
-                var day = parseInt(match[3], 10) || 1;
-                date = new Date(Date.UTC(year, month, day));
-                // optional time
-                var type = match[7];
-                if (type) {
-                    var hours = parseInt(match[4], 10);
-                    var minutes = parseInt(match[5], 10);
-                    var secFrac = parseFloat(match[6]);
-                    var seconds = secFrac | 0;
-                    var milliseconds = Math.round(1000 * (secFrac - seconds));
-                    date.setUTCHours(hours, minutes, seconds, milliseconds);
-                    // check offset
-                    if (type !== "Z") {
-                        var hoursOffset = parseInt(type, 10);
-                        var minutesOffset = parseInt(match[8]) || 0;
-                        var offset = -1000 * (60 * (hoursOffset * 60) + minutesOffset * 60);
-                        date = new Date(date.getTime() + offset);
-                    }
+        var match = str.match(/^(?:(\d{4})(?:-(\d{2})(?:-(\d{2}))?)?)?(?:T(\d{1,2}):(\d{2}):(\d{2}(?:\.\d+)?)(Z|(?:[+-]\d{1,2}(?::(\d{2}))?)))?$/);
+        if (match && (match[1] || match[7])) { // must have at least year or time
+            var year = parseInt(match[1], 10) || 0;
+            var month = (parseInt(match[2], 10) - 1) || 0;
+            var day = parseInt(match[3], 10) || 1;
+            date = new Date(Date.UTC(year, month, day));
+            // optional time
+            var type = match[7];
+            if (type) {
+                var hours = parseInt(match[4], 10);
+                var minutes = parseInt(match[5], 10);
+                var secFrac = parseFloat(match[6]);
+                var seconds = secFrac | 0;
+                var milliseconds = Math.round(1000 * (secFrac - seconds));
+                date.setUTCHours(hours, minutes, seconds, milliseconds);
+                // check offset
+                if (type !== "Z") {
+                    var hoursOffset = parseInt(type, 10);
+                    var minutesOffset = parseInt(match[8], 10) || 0;
+                    var offset = -1000 * (60 * (hoursOffset * 60) + minutesOffset * 60);
+                    date = new Date(date.getTime() + offset);
                 }
-            } else {
-                date = new Date("invalid");
             }
+        } else {
+            date = new Date("invalid");
         }
         return date;
     }
 
-};
\ No newline at end of file
+};

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Console.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Console.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Console.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
+ */
+
+/**
  * Namespace: OpenLayers.Console
  * The OpenLayers.Console namespace is used for debugging and error logging.
  * If the Firebug Lite (../Firebug/firebug.js) is included before this script,

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/ArgParser.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/ArgParser.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/ArgParser.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -64,6 +64,22 @@
         OpenLayers.Control.prototype.initialize.apply(this, arguments);
     },
 
+    getParameters: function(url) {
+        url = url || window.location.href;
+        var parameters = OpenLayers.Util.getParameters(url);
+
+        // If we have an chchor in the url use it to split the url
+        var index = url.indexOf('#');
+        if (index > 0) {
+            // create an url to parce on the getParameters
+            url = '?' + url.substring(index + 1, url.length);
+
+            OpenLayers.Util.extend(parameters,
+                    OpenLayers.Util.getParameters(url));
+        }
+        return parameters;
+    },
+    
     /**
      * Method: setMap
      * Set the map property for the control. 
@@ -92,7 +108,7 @@
         }
         if (i == this.map.controls.length) {
 
-            var args = OpenLayers.Util.getParameters();
+            var args = this.getParameters();
             // Be careful to set layer first, to not trigger unnecessary layer loads
             if (args.layers) {
                 this.layers = args.layers;

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/Attribution.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/Attribution.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/Attribution.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/Button.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/Button.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/Button.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/DragFeature.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/DragFeature.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/DragFeature.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -66,6 +66,28 @@
     onComplete: function(feature, pixel) {},
 
     /**
+     * APIProperty: onEnter
+     * {Function} Define this function if you want to know when the mouse
+     *     goes over a feature and thereby makes this feature a candidate
+     *     for dragging.
+     *
+     * Parameters:
+     * feature - {<OpenLayers.Feature.Vector>} The feature that is ready
+     *     to be dragged.
+     */
+    onEnter: function(feature) {},
+
+    /**
+     * APIProperty: onLeave
+     * {Function} Define this function if you want to know when the mouse
+     *     goes out of the feature that was dragged.
+     *
+     * Parameters:
+     * feature - {<OpenLayers.Feature.Vector>} The feature that was dragged.
+     */
+    onLeave: function(feature) {},
+
+    /**
      * APIProperty: documentDrag
      * {Boolean} If set to true, mouse dragging will continue even if the
      *     mouse cursor leaves the map viewport. Default is false.
@@ -192,6 +214,7 @@
             this.handlers.drag.activate();
             this.over = true;
             OpenLayers.Element.addClass(this.map.viewPortDiv, this.displayClass + "Over");
+            this.onEnter(feature);
         } else {
             if(this.feature.id == feature.id) {
                 this.over = true;
@@ -269,6 +292,7 @@
             OpenLayers.Element.removeClass(
                 this.map.viewPortDiv, this.displayClass + "Over"
             );
+            this.onLeave(feature);
             this.feature = null;
         } else {
             if(this.feature.id == feature.id) {

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/DragPan.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/DragPan.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/DragPan.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -43,16 +43,48 @@
      *     mouse cursor leaves the map viewport. Default is false.
      */
     documentDrag: false,
-    
+
     /**
+     * Property: kinetic
+     * {OpenLayers.Kinetic} The OpenLayers.Kinetic object.
+     */
+    kinetic: null,
+
+    /**
+     * APIProperty: enableKinetic
+     * {Boolean} Set this option to enable "kinetic dragging". Can be
+     *     set to true or to an object. If set to an object this
+     *     object will be passed to the {<OpenLayers.Kinetic>}
+     *     constructor. Defaults to false.
+     */
+    enableKinetic: false,
+
+    /**
+     * APIProperty: kineticInterval
+     * {Integer} Interval in milliseconds between 2 steps in the "kinetic
+     *     scrolling". Applies only if enableKinetic is set. Defaults
+     *     to 10 milliseconds.
+     */
+    kineticInterval: 10,
+
+
+    /**
      * Method: draw
      * Creates a Drag handler, using <panMap> and
      * <panMapDone> as callbacks.
      */    
     draw: function() {
+        if(this.enableKinetic) {
+            var config = {interval: this.kineticInterval};
+            if(typeof this.enableKinetic === "object") {
+                config = OpenLayers.Util.extend(config, this.enableKinetic);
+            }
+            this.kinetic = new OpenLayers.Kinetic(config);
+        }
         this.handler = new OpenLayers.Handler.Drag(this, {
                 "move": this.panMap,
-                "done": this.panMapDone
+                "done": this.panMapDone,
+                "down": this.panMapStart
             }, {
                 interval: this.interval,
                 documentDrag: this.documentDrag
@@ -61,17 +93,29 @@
     },
 
     /**
+     * Method: panMapStart
+     */
+    panMapStart: function() {
+        if(this.kinetic) {
+            this.kinetic.begin();
+        }
+    },
+
+    /**
     * Method: panMap
     *
     * Parameters:
     * xy - {<OpenLayers.Pixel>} Pixel of the mouse position
     */
     panMap: function(xy) {
+        if(this.kinetic) {
+            this.kinetic.update(xy);
+        }
         this.panned = true;
         this.map.pan(
             this.handler.last.x - xy.x,
             this.handler.last.y - xy.y,
-            {dragging: this.handler.dragging, animate: false}
+            {dragging: true, animate: false}
         );
     },
     
@@ -85,7 +129,21 @@
      */
     panMapDone: function(xy) {
         if(this.panned) {
-            this.panMap(xy);
+            var res = null;
+            if (this.kinetic) {
+                res = this.kinetic.end(xy);
+            }
+            this.map.pan(
+                this.handler.last.x - xy.x,
+                this.handler.last.y - xy.y,
+                {dragging: !!res, animate: false}
+            );
+            if (res) {
+                var self = this;
+                this.kinetic.move(res, function(x, y, end) {
+                    self.map.pan(x, y, {dragging: !end, animate: false});
+                });
+            }
             this.panned = false;
         }
     },

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/DrawFeature.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/DrawFeature.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/DrawFeature.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/EditingToolbar.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/EditingToolbar.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/EditingToolbar.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Copied: sandbox/tschaub/canvas/lib/OpenLayers/Control/Geolocate.js (from rev 11416, trunk/openlayers/lib/OpenLayers/Control/Geolocate.js)
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/Geolocate.js	                        (rev 0)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/Geolocate.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,172 @@
+/* Copyright (c) 2006-2011 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/Control.js
+ * @requires OpenLayers/Geometry/Point.js
+ * @requires OpenLayers/Projection.js
+ */
+
+/**
+ * Class: OpenLayers.Control.Geolocate
+ * The Geolocate control wraps w3c geolocation API into control that can be
+ * bound to a map, and generate events on location update
+ *
+ * To use this control requires to load the proj4js library if the projection
+ * of the map is not EPSG:4326 or EPSG:900913.
+ *
+ * Inherits from:
+ *  - <OpenLayers.Control>
+ */
+OpenLayers.Control.Geolocate = OpenLayers.Class(OpenLayers.Control, {
+
+    /**
+     * Constant: EVENT_TYPES
+     * Supported event types:
+     *  - *locationupdated* Triggered when browser return a new position
+     *  - *locationfailed* Triggered when geolocation has failed
+     *  - *locationuncapable* Triggered when control is activated on a browser
+     *  which doesn't support geolocation
+     */
+    EVENT_TYPES: ["locationupdated", "locationfailed", "locationuncapable"],
+
+    /**
+     * Property: geolocation
+     * {Object} The geolocation engine, as a property to be possibly mocked.
+     */
+    geolocation: navigator.geolocation,
+
+    /**
+     * APIProperty: bind
+     * {Boolean} If true, map center will be set on location update.
+     */
+    bind: true,
+
+    /**
+     * APIProperty: watch
+     * {Boolean} If true, position will be update regularly.
+     */
+    watch: false,
+
+    /**
+     * APIProperty: geolocationOptions
+     * {Object} Options to pass to the navigator's geolocation API. See
+     *     <http://dev.w3.org/geo/api/spec-source.html>. No specific
+     *     option is passed to the geolocation API by default.
+     */
+    geolocationOptions: null,
+
+    /**
+     * Constructor: OpenLayers.Control.Geolocate
+     * Create a new control to deal with browser geolocation API
+     *
+     */
+    initialize: function(options) {
+        // concatenate events specific to this control with those from the base
+        this.EVENT_TYPES =
+            OpenLayers.Control.Geolocate.prototype.EVENT_TYPES.concat(
+            OpenLayers.Control.prototype.EVENT_TYPES
+        );
+        this.geolocationOptions = {};
+        OpenLayers.Control.prototype.initialize.apply(this, [options]);
+    },
+
+    /**
+     * Method: activate
+     * Activates the control.
+     *
+     * Returns:
+     * {Boolean} The control was effectively activated.
+     */
+    activate: function () {
+        if (!this.geolocation) {
+            this.events.triggerEvent("locationuncapable");
+            return false;
+        }
+        if (OpenLayers.Control.prototype.activate.apply(this, arguments)) {
+            if (this.watch) {
+                this.watchId = this.geolocation.watchPosition(
+                    OpenLayers.Function.bind(this.geolocate, this),
+                    OpenLayers.Function.bind(this.failure, this),
+                    this.geolocationOptions
+                );
+            } else {
+                this.getCurrentLocation();
+            }
+            return true;
+        }
+        return false;
+    },
+
+    /**
+     * Method: deactivate
+     * Deactivates the control.
+     *
+     * Returns:
+     * {Boolean} The control was effectively deactivated.
+     */
+    deactivate: function () {
+        if (this.active && this.watchId !== null) {
+            this.geolocation.clearWatch(this.watchId);
+        }
+        return OpenLayers.Control.prototype.deactivate.apply(
+            this, arguments
+        );
+    },
+
+    /**
+     * Method: geolocate
+     * Activates the control.
+     *
+     */
+    geolocate: function (position) {
+        var center = new OpenLayers.LonLat(
+            position.coords.longitude,
+            position.coords.latitude
+        ).transform(
+            new OpenLayers.Projection("EPSG:4326"),
+            this.map.getProjectionObject()
+        );
+        if (this.bind) {
+            this.map.setCenter(center);
+        }
+        this.events.triggerEvent("locationupdated", {
+            position: position,
+            point: new OpenLayers.Geometry.Point(
+                center.lon, center.lat
+            )
+        });
+    },
+
+    /**
+     * APIMethod: getCurrentLocation
+     *
+     * Returns:
+     * {Boolean} Returns true if a event will be fired (successfull
+     * registration)
+     */
+    getCurrentLocation: function() {
+        if (!this.active || this.watch) {
+            return false;
+        }
+        this.geolocation.getCurrentPosition(
+            OpenLayers.Function.bind(this.geolocate, this),
+            OpenLayers.Function.bind(this.failure, this),
+            this.geolocationOptions
+        );
+        return true;
+    },
+
+    /**
+     * Method: failure
+     * method called on browser's geolocation failure
+     *
+     */
+    failure: function (error) {
+        this.events.triggerEvent("locationfailed", {error: error});
+    },
+
+    CLASS_NAME: "OpenLayers.Control.Geolocate"
+});

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/GetFeature.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/GetFeature.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/GetFeature.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -207,7 +207,8 @@
      *
      * Parameters:
      * options - {Object} A configuration object which at least has to contain
-     *     a <protocol> property
+     *     a <protocol> property (if not, it has to be set before a request is
+     *     made)
      */
     initialize: function(options) {
         // concatenate events specific to vector with those from the base

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/Graticule.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/Graticule.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/Graticule.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,10 +1,11 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/Control.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/KeyboardDefaults.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/KeyboardDefaults.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/KeyboardDefaults.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/LayerSwitcher.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/LayerSwitcher.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/LayerSwitcher.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,10 +1,12 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/Control.js
+ * @requires OpenLayers/Lang.js
+ * @requires Rico/Corner.js
  */
 
 /**
@@ -314,7 +316,7 @@
                 
                 // create span
                 var labelSpan = document.createElement("span");
-                OpenLayers.Element.addClass(labelSpan, "labelSpan")
+                OpenLayers.Element.addClass(labelSpan, "labelSpan");
                 if (!baseLayer && !layer.inRange) {
                     labelSpan.style.color = "gray";
                 }

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/Measure.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/Measure.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/Measure.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -33,7 +33,8 @@
      *      will receive an event with measure, units, order, and geometry
      *      properties.
      * measurepartial - Triggered when a new point is added to the
-     *      measurement sketch.  Listeners receive an event with measure,
+     *      measurement sketch or if the <immediate> property is true and the
+     *      measurement sketch is modified.  Listeners receive an event with measure,
      *      units, order, and geometry.
      */
     EVENT_TYPES: ['measure', 'measurepartial'],
@@ -104,6 +105,14 @@
     persist: false,
 
     /**
+     * APIProperty: immediate
+     * {Boolean} Activates the immediate measurement so that the "measurepartial"
+     *     event is also fired once the measurement sketch is modified.
+     *     Default is false.
+     */
+    immediate : false,
+
+    /**
      * Constructor: OpenLayers.Control.Measure
      * 
      * Parameters:
@@ -117,10 +126,12 @@
             OpenLayers.Control.prototype.EVENT_TYPES
         );
         OpenLayers.Control.prototype.initialize.apply(this, [options]);
-        this.callbacks = OpenLayers.Util.extend(
-            {done: this.measureComplete, point: this.measurePartial},
-            this.callbacks
-        );
+        var callbacks = {done: this.measureComplete,
+            point: this.measurePartial};
+        if (this.immediate){
+            callbacks.modify = this.measureImmediate;
+        }
+        this.callbacks = OpenLayers.Util.extend(callbacks, this.callbacks);
 
         // let the handler options override, so old code that passes 'persist' 
         // directly to the handler does not need an update
@@ -147,6 +158,20 @@
         this.cancelDelay();
         this.handler.cancel();
     },
+
+    /**
+     * APIMethod: setImmediate
+     * Sets the <immediate> property. Changes the activity of immediate
+     * measurement.
+     */
+    setImmediate: function(immediate) {
+        this.immediate = immediate;
+        if (this.immediate){
+            this.callbacks.modify = this.measureImmediate;
+        } else {
+            delete this.callbacks.modify;
+        }
+    },
     
     /**
      * Method: updateHandler
@@ -206,6 +231,20 @@
     },
 
     /**
+     * Method: measureImmediate
+     * Called each time the measurement sketch is modified.
+     * 
+     * Parameters: point - {<OpenLayers.Geometry.Point>} The point at the
+     * mouseposition. feature - {<OpenLayers.Feature.Vector>} The sketch feature.
+     */
+    measureImmediate : function(point, feature, drawing) {
+        if (drawing && this.delayedTrigger === null &&
+                                !this.handler.freehandMode(this.handler.evt)) {
+            this.measure(feature.geometry, "measurepartial");
+        }
+    },
+
+    /**
      * Method: cancelDelay
      * Cancels the delay measurement that measurePartial began.
      */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/ModifyFeature.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/ModifyFeature.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/ModifyFeature.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -113,6 +113,15 @@
      * {Object} A symbolizer to be used for virtual vertices.
      */
     virtualStyle: null,
+    
+    /**
+     * APIProperty: vertexRenderIntent
+     * {String} The renderIntent to use for vertices. If no <virtualStyle> is
+     * provided, this renderIntent will also be used for virtual vertices, with
+     * a fillOpacity and strokeOpacity of 0.3. Default is null, which means
+     * that the layer's default style will be used for vertices.
+     */
+    vertexRenderIntent: null,
 
     /**
      * APIProperty: mode
@@ -193,11 +202,14 @@
      *     control.
      */
     initialize: function(layer, options) {
+        options = options || {};
         this.layer = layer;
         this.vertices = [];
         this.virtualVertices = [];
         this.virtualStyle = OpenLayers.Util.extend({},
-            this.layer.style || this.layer.styleMap.createSymbolizer());
+            this.layer.style ||
+            this.layer.styleMap.createSymbolizer(null, options.vertexRenderIntent)
+        );
         this.virtualStyle.fillOpacity = 0.3;
         this.virtualStyle.strokeOpacity = 0.3;
         this.deleteCodes = [46, 68];
@@ -339,18 +351,23 @@
     },
 
     /**
-     * Method: selectFeature
-     * Called when the select feature control selects a feature.
+     * APIMethod: selectFeature
+     * Select a feature for modification in standalone mode. In non-standalone
+     * mode, this method is called when the select feature control selects a
+     * feature. Register a listener to the beforefeaturemodified event and
+     * return false to prevent feature modification.
      *
      * Parameters:
      * feature - {<OpenLayers.Feature.Vector>} the selected feature.
      */
     selectFeature: function(feature) {
-        this.feature = feature;
-        this.modified = false;
-        this.resetVertices();
-        this.dragControl.activate();
-        this.onModificationStart(this.feature);
+        if (!this.standalone || this.beforeSelectFeature(feature) !== false) {
+            this.feature = feature;
+            this.modified = false;
+            this.resetVertices();
+            this.dragControl.activate();
+            this.onModificationStart(this.feature);
+        }
     },
 
     /**
@@ -596,6 +613,11 @@
                vertex.geometry.parent) {
                 // remove the vertex
                 vertex.geometry.parent.removeComponent(vertex.geometry);
+                this.layer.events.triggerEvent("vertexremoved", {
+                    vertex: vertex.geometry,
+                    feature: this.feature,
+                    pixel: evt.xy
+                });
                 this.layer.drawFeature(this.feature, this.standalone ?
                                        undefined :
                                        this.selectControl.renderIntent);
@@ -622,6 +644,7 @@
             if(geometry.CLASS_NAME == "OpenLayers.Geometry.Point") {
                 vertex = new OpenLayers.Feature.Vector(geometry);
                 vertex._sketch = true;
+                vertex.renderIntent = control.vertexRenderIntent;
                 control.vertices.push(vertex);
             } else {
                 var numVert = geometry.components.length;
@@ -633,6 +656,7 @@
                     if(component.CLASS_NAME == "OpenLayers.Geometry.Point") {
                         vertex = new OpenLayers.Feature.Vector(component);
                         vertex._sketch = true;
+                        vertex.renderIntent = control.vertexRenderIntent;
                         control.vertices.push(vertex);
                     } else {
                         collectComponentVertices(component);

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/MouseDefaults.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/MouseDefaults.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/MouseDefaults.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/MousePosition.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/MousePosition.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/MousePosition.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/MouseToolbar.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/MouseToolbar.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/MouseToolbar.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/NavToolbar.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/NavToolbar.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/NavToolbar.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/Navigation.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/Navigation.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/Navigation.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/NavigationHistory.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/NavigationHistory.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/NavigationHistory.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/OverviewMap.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/OverviewMap.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/OverviewMap.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -157,7 +157,7 @@
             this.handlers.drag.destroy();
         }
 
-        this.mapDiv.removeChild(this.extentRectangle);
+        this.ovmap && this.ovmap.viewPortDiv.removeChild(this.extentRectangle);
         this.extentRectangle = null;
 
         if (this.rectEvents) {
@@ -229,7 +229,6 @@
         this.extentRectangle.style.position = 'absolute';
         this.extentRectangle.style.zIndex = 1000;  //HACK
         this.extentRectangle.className = this.displayClass+'ExtentRectangle';
-        this.mapDiv.appendChild(this.extentRectangle);
 
         this.element.appendChild(this.mapDiv);  
 
@@ -490,6 +489,7 @@
                         {controls: [], maxResolution: 'auto', 
                          fallThrough: false}, this.mapOptions);
         this.ovmap = new OpenLayers.Map(this.mapDiv, options);
+        this.ovmap.viewPortDiv.appendChild(this.extentRectangle);
         
         // prevent ovmap from being destroyed when the page unloads, because
         // the OverviewMap control has to do this (and does it).

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/Pan.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/Pan.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/Pan.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -20,11 +20,21 @@
     /** 
      * APIProperty: slideFactor
      * {Integer} Number of pixels by which we'll pan the map in any direction 
-     *     on clicking the arrow buttons, defaults to 50.
+     *     on clicking the arrow buttons, defaults to 50.  If you want to pan
+     *     by some ratio of the map dimensions, use <slideRatio> instead.
      */
     slideFactor: 50,
 
     /** 
+     * APIProperty: slideRatio
+     * {Number} The fraction of map width/height by which we'll pan the map            
+     *     on clicking the arrow buttons.  Default is null.  If set, will
+     *     override <slideFactor>. E.g. if slideRatio is .5, then Pan Up will
+     *     pan up half the map height. 
+     */
+    slideRatio: null,
+
+    /** 
      * Property: direction
      * {String} in {'North', 'South', 'East', 'West'}
      */
@@ -61,18 +71,24 @@
      */
     trigger: function(){
     
+        var getSlideFactor = OpenLayers.Function.bind(function (dim) {
+            return this.slideRatio ?
+                this.map.getSize()[dim] * this.slideRatio :
+                this.slideFactor;
+        }, this);
+
         switch (this.direction) {
             case OpenLayers.Control.Pan.NORTH: 
-                this.map.pan(0, -this.slideFactor);
+                this.map.pan(0, -getSlideFactor("h"));
                 break;
             case OpenLayers.Control.Pan.SOUTH: 
-                this.map.pan(0, this.slideFactor);
+                this.map.pan(0, getSlideFactor("h"));
                 break;
             case OpenLayers.Control.Pan.WEST: 
-                this.map.pan(-this.slideFactor, 0);
+                this.map.pan(-getSlideFactor("w"), 0);
                 break;
             case OpenLayers.Control.Pan.EAST: 
-                this.map.pan(this.slideFactor, 0);
+                this.map.pan(getSlideFactor("w"), 0);
                 break;
         }
     },

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/PanPanel.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/PanPanel.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/PanPanel.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -33,10 +33,20 @@
     /** 
      * APIProperty: slideFactor
      * {Integer} Number of pixels by which we'll pan the map in any direction 
-     *     on clicking the arrow buttons, defaults to 50.
+     *     on clicking the arrow buttons, defaults to 50.  If you want to pan
+     *     by some ratio of the map dimensions, use <slideRatio> instead.
      */
     slideFactor: 50,
 
+    /** 
+     * APIProperty: slideRatio
+     * {Number} The fraction of map width/height by which we'll pan the map            
+     *     on clicking the arrow buttons.  Default is null.  If set, will
+     *     override <slideFactor>. E.g. if slideRatio is .5, then Pan Up will
+     *     pan up half the map height. 
+     */
+    slideRatio: null,
+
     /**
      * Constructor: OpenLayers.Control.PanPanel 
      * Add the four directional pan buttons.
@@ -47,15 +57,15 @@
      */
     initialize: function(options) {
         OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
+        var options = {
+            slideFactor: this.slideFactor,
+            slideRatio: this.slideRatio
+        };
         this.addControls([
-            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH,
-                                       {slideFactor: this.slideFactor}),
-            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH,
-                                       {slideFactor: this.slideFactor}),
-            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST,
-                                       {slideFactor: this.slideFactor}),
-            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST,
-                                       {slideFactor: this.slideFactor})
+            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH, options),
+            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH, options),
+            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST, options),
+            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST, options)
         ]);
     },
 

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/PanZoom.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/PanZoom.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/PanZoom.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -123,7 +123,7 @@
         var btn = OpenLayers.Util.createAlphaImageDiv(
                                     this.id + "_" + id, 
                                     xy, sz, imgLocation, "absolute");
-
+        btn.style.cursor = "pointer";
         //we want to add the outer div
         this.div.appendChild(btn);
 

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/PanZoomBar.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/PanZoomBar.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/PanZoomBar.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -73,6 +73,12 @@
     mouseDragStart: null,
 
     /**
+     * Property: deltaY
+     * {Number} The cumulative vertical pixel offset during a zoom bar drag.
+     */
+    deltaY: null,
+
+    /**
      * Property: zoomStart
      * {<OpenLayers.Pixel>}
      */
@@ -180,11 +186,15 @@
                        new OpenLayers.Size(20,9), 
                        imgLocation+"slider.png",
                        "absolute");
+        slider.style.cursor = "move";
         this.slider = slider;
         
         this.sliderEvents = new OpenLayers.Events(this, slider, null, true,
                                             {includeXY: true});
         this.sliderEvents.on({
+            "touchstart": this.zoomBarDown,
+            "touchmove": this.zoomBarDrag,
+            "touchend": this.zoomBarUp,
             "mousedown": this.zoomBarDown,
             "mousemove": this.zoomBarDrag,
             "mouseup": this.zoomBarUp,
@@ -212,12 +222,13 @@
                         sz,
                         imgLocation+"zoombar.png");
         }
-        
+        div.style.cursor = "pointer";
         this.zoombarDiv = div;
         
         this.divEvents = new OpenLayers.Events(this, div, null, true, 
                                                 {includeXY: true});
         this.divEvents.on({
+            "touchmove": this.passEventToSlider,
             "mousedown": this.divClick,
             "mousemove": this.passEventToSlider,
             "dblclick": this.doubleClick,
@@ -241,6 +252,7 @@
      */
     _removeZoomBar: function() {
         this.sliderEvents.un({
+            "touchmove": this.zoomBarDrag,
             "mousedown": this.zoomBarDown,
             "mousemove": this.zoomBarDrag,
             "mouseup": this.zoomBarUp,
@@ -250,6 +262,7 @@
         this.sliderEvents.destroy();
 
         this.divEvents.un({
+            "touchmove": this.passEventToSlider,
             "mousedown": this.divClick,
             "mousemove": this.passEventToSlider,
             "dblclick": this.doubleClick,
@@ -286,9 +299,7 @@
         if (!OpenLayers.Event.isLeftClick(evt)) {
             return;
         }
-        var y = evt.xy.y;
-        var top = OpenLayers.Util.pagePosition(evt.object)[1];
-        var levels = (y - top)/this.zoomStopHeight;
+        var levels = evt.xy.y / this.zoomStopHeight;
         if(this.forceFixedZoomLevel || !this.map.fractionalZoom) {
             levels = Math.floor(levels);
         }    
@@ -306,10 +317,11 @@
      * evt - {<OpenLayers.Event>} 
      */
     zoomBarDown:function(evt) {
-        if (!OpenLayers.Event.isLeftClick(evt)) {
+        if (!OpenLayers.Event.isLeftClick(evt) && !OpenLayers.Event.isSingleTouch(evt)) {
             return;
         }
         this.map.events.on({
+            "touchmove": this.passEventToSlider,
             "mousemove": this.passEventToSlider,
             "mouseup": this.passEventToSlider,
             scope: this
@@ -342,6 +354,8 @@
                 this.slider.style.top = newTop+"px";
                 this.mouseDragStart = evt.xy.clone();
             }
+            // set cumulative displacement
+            this.deltaY = this.zoomStart.y - evt.xy.y;
             OpenLayers.Event.stop(evt);
         }
     },
@@ -355,28 +369,30 @@
      * evt - {<OpenLayers.Event>} 
      */
     zoomBarUp:function(evt) {
-        if (!OpenLayers.Event.isLeftClick(evt)) {
+        if (!OpenLayers.Event.isLeftClick(evt) && evt.type !== "touchend") {
             return;
         }
         if (this.mouseDragStart) {
             this.div.style.cursor="";
             this.map.events.un({
+                "touchmove": this.passEventToSlider,
                 "mouseup": this.passEventToSlider,
                 "mousemove": this.passEventToSlider,
                 scope: this
             });
-            var deltaY = this.zoomStart.y - evt.xy.y;
             var zoomLevel = this.map.zoom;
             if (!this.forceFixedZoomLevel && this.map.fractionalZoom) {
-                zoomLevel += deltaY/this.zoomStopHeight;
+                zoomLevel += this.deltaY/this.zoomStopHeight;
                 zoomLevel = Math.min(Math.max(zoomLevel, 0), 
                                      this.map.getNumZoomLevels() - 1);
             } else {
-                zoomLevel += Math.round(deltaY/this.zoomStopHeight);
+                zoomLevel += this.deltaY/this.zoomStopHeight;
+                zoomLevel = Math.max(Math.round(zoomLevel), 0);      
             }
             this.map.zoomTo(zoomLevel);
             this.mouseDragStart = null;
             this.zoomStart = null;
+            this.deltaY = 0;
             OpenLayers.Event.stop(evt);
         }
     },

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/Panel.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/Panel.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/Panel.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -95,7 +95,6 @@
      * APIMethod: destroy
      */
     destroy: function() {
-        this.deactivate();
         OpenLayers.Control.prototype.destroy.apply(this, arguments);
         for(var i = this.controls.length - 1 ; i >= 0; i--) {
             if(this.controls[i].events) {

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/Permalink.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/Permalink.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/Permalink.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -7,6 +7,7 @@
 /**
  * @requires OpenLayers/Control.js
  * @requires OpenLayers/Control/ArgParser.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**
@@ -35,6 +36,16 @@
     element: null,
     
     /** 
+     * APIProperty: anchor
+     * {Boolean} This option changes 3 things:
+     *     the character '#' is used in place of the character '?',
+     *     the window.href is updated if no element is provided.
+     *     When this option is set to true it's not recommend to provide
+     *     a base without provide an element.
+     */
+    anchor: false,
+
+    /** 
      * APIProperty: base
      * {String}
      */
@@ -58,14 +69,27 @@
      * Parameters: 
      * element - {DOMElement} 
      * base - {String} 
-     * options - {Object} options to the control. 
+     * options - {Object} options to the control.
+     *
+     * Or for anchor:
+     * options - {Object} options to the control.
      */
     initialize: function(element, base, options) {
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);
-        this.element = OpenLayers.Util.getElement(element);        
-        this.base = base || document.location.href;
+        if (element !== null && typeof element == 'object' && !OpenLayers.Util.isElement(element)) {
+            options = element;
+            this.base = document.location.href;
+            OpenLayers.Control.prototype.initialize.apply(this, [options]);
+            if (this.element != null) {
+                this.element = OpenLayers.Util.getElement(this.element);
+            }
+        }
+        else {
+            OpenLayers.Control.prototype.initialize.apply(this, [options]);
+            this.element = OpenLayers.Util.getElement(element);
+            this.base = base || document.location.href;
+        }
     },
-
+    
     /**
      * APIMethod: destroy
      */
@@ -121,7 +145,7 @@
     draw: function() {
         OpenLayers.Control.prototype.draw.apply(this, arguments);
           
-        if (!this.element) {
+        if (!this.element && !this.anchor) {
             this.element = document.createElement("a");
             this.element.innerHTML = OpenLayers.i18n("permalink");
             this.element.href="";
@@ -145,13 +169,19 @@
      * Method: updateLink 
      */
     updateLink: function() {
+        var separator = this.anchor ? '#' : '?';
         var href = this.base;
-        if (href.indexOf('?') != -1) {
-            href = href.substring( 0, href.indexOf('?') );
+        if (href.indexOf(separator) != -1) {
+            href = href.substring( 0, href.indexOf(separator) );
         }
 
-        href += '?' + OpenLayers.Util.getParameterString(this.createParams());
-        this.element.href = href;
+        href += separator + OpenLayers.Util.getParameterString(this.createParams());
+        if (this.anchor && !this.element) {
+            window.location.href = href;
+        }
+        else {
+            this.element.href = href;
+        }
     }, 
     
     /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/SLDSelect.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/SLDSelect.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/SLDSelect.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,11 +1,11 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/Control.js
- * @requires OpenLayers/Layer/WMS/Post.js
+ * @requires OpenLayers/Layer/WMS.js
  * @requires OpenLayers/Handler/RegularPolygon.js
  * @requires OpenLayers/Handler/Polygon.js
  * @requires OpenLayers/Handler/Path.js
@@ -119,7 +119,7 @@
      * APIProperty: layerCache
      * {Object} Cache to use for storing references to the selection layers.
      *     Normally each source layer will have exactly 1 selection layer of
-     *     type OpenLayers.Layer.WMS.Post. If not provided, layers will
+     *     type OpenLayers.Layer.WMS. If not provided, layers will
      *     be cached on the prototype. Note that if <clearOnDeactivate> is
      *     true, the layer will no longer be cached after deactivating the
      *     control.
@@ -158,7 +158,8 @@
             click: this.select}, this.callbacks);
         this.handlerOptions = this.handlerOptions || {};
         this.layerOptions = OpenLayers.Util.applyDefaults(this.layerOptions, {
-            displayInLayerSwitcher: false
+            displayInLayerSwitcher: false,
+            tileOptions: {maxGetUrlLength: 2048}
         });
         if (this.sketchStyle) {
             this.handlerOptions.layerOptions = OpenLayers.Util.applyDefaults(
@@ -207,14 +208,14 @@
      *     is performed.
      *
      * Returns:
-     * {<OpenLayers.Layer.WMS.Post>} A WMS Post layer since SLD selections can
-     *     easily get quite long.
+     * {<OpenLayers.Layer.WMS>} A WMS layer with maxGetUrlLength configured to 2048
+     *     since SLD selections can easily get quite long.
      */
     createSelectionLayer: function(source) {
         // check if we already have a selection layer for the source layer
         var selectionLayer;
         if (!this.layerCache[source.id]) {
-            selectionLayer = new OpenLayers.Layer.WMS.Post(source.name, 
+            selectionLayer = new OpenLayers.Layer.WMS(source.name, 
                 source.url, source.params, 
                 OpenLayers.Util.applyDefaults(
                     this.layerOptions,
@@ -567,4 +568,4 @@
     },
 
     CLASS_NAME: "OpenLayers.Control.SLDSelect"
-});
\ No newline at end of file
+});

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/Scale.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/Scale.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/Scale.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -6,6 +6,7 @@
 
 /**
  * @requires OpenLayers/Control.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/ScaleLine.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/ScaleLine.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/ScaleLine.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/SelectFeature.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/SelectFeature.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/SelectFeature.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/Snapping.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/Snapping.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/Snapping.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -165,6 +165,14 @@
      * filter - {OpenLayers.Filter} Optional filter to evaluate to determine if
      *     feature is eligible for snapping.  If filter evaluates to true for a
      *     target feature a vertex may be snapped to the feature. 
+     * minResolution - {Number} If a minResolution is provided, snapping to this
+     *     target will only be considered if the map resolution is greater than
+     *     or equal to this value (the minResolution is inclusive).  Default is
+     *     no minimum resolution limit.
+     * maxResolution - {Number} If a maxResolution is provided, snapping to this
+     *     target will only be considered if the map resolution is strictly
+     *     less than this value (the maxResolution is exclusive).  Default is
+     *     no maximum resolution limit.
      */
     initialize: function(options) {
         // concatenate events specific to measure with those from the base
@@ -436,10 +444,21 @@
      *     Returns null if candidate is not eligible for snapping.
      */
     testTarget: function(target, loc) {
+        var resolution = this.layer.map.getResolution();
+        if ("minResolution" in target) {
+            if (resolution < target.minResolution) {
+                return null;
+            }
+        }
+        if ("maxResolution" in target) {
+            if (resolution >= target.maxResolution) {
+                return null;
+            }
+        }
         var tolerance = {
-            node: this.getGeoTolerance(target.nodeTolerance),
-            vertex: this.getGeoTolerance(target.vertexTolerance),
-            edge: this.getGeoTolerance(target.edgeTolerance)
+            node: this.getGeoTolerance(target.nodeTolerance, resolution),
+            vertex: this.getGeoTolerance(target.vertexTolerance, resolution),
+            edge: this.getGeoTolerance(target.edgeTolerance, resolution)
         };
         // this could be cached if we don't support setting tolerance values directly
         var maxTolerance = Math.max(
@@ -512,12 +531,12 @@
      *     
      * Parameters:
      * tolerance - {Number} A tolerance value in pixels.
+     * resolution - {Number} Map resolution.
      *
      * Returns:
      * {Number} A tolerance value in map units.
      */
-    getGeoTolerance: function(tolerance) {
-        var resolution = this.layer.map.getResolution();
+    getGeoTolerance: function(tolerance, resolution) {
         if(resolution !== this.resolution) {
             this.resolution = resolution;
             this.geoToleranceCache = {};

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/Split.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/Split.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/Split.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Copied: sandbox/tschaub/canvas/lib/OpenLayers/Control/TouchNavigation.js (from rev 11416, trunk/openlayers/lib/OpenLayers/Control/TouchNavigation.js)
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/TouchNavigation.js	                        (rev 0)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/TouchNavigation.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,148 @@
+/* Copyright (c) 2006-2010 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/Control/DragPan.js
+ * @requires OpenLayers/Handler/Click.js
+ */
+
+/**
+ * Class: OpenLayers.Control.TouchNavigation
+ * The navigation control handles map browsing with touch events (dragging,
+ *     double-tapping, and tap with two fingers).  Create a new navigation
+ *     control with the <OpenLayers.Control.TouchNavigation> control.
+ *
+ * Inherits:
+ *  - <OpenLayers.Control>
+ */
+OpenLayers.Control.TouchNavigation = OpenLayers.Class(OpenLayers.Control, {
+
+    /**
+     * Property: dragPan
+     * {<OpenLayers.Control.DragPan>}
+     */
+    dragPan: null,
+
+    /**
+     * APIProprety: dragPanOptions
+     * {Object} Options passed to the DragPan control.
+     */
+    dragPanOptions: null,
+
+    /**
+     * APIProperty: documentDrag
+     * {Boolean} Allow panning of the map by dragging outside map viewport.
+     *     Default is false.
+     */
+    documentDrag: false,
+
+    /**
+     * APIProperty: autoActivate
+     * {Boolean} Activate the control when it is added to a map.  Default is
+     *     true.
+     */
+    autoActivate: true,
+
+    /**
+     * Constructor: OpenLayers.Control.TouchNavigation
+     * Create a new navigation control
+     *
+     * Parameters:
+     * options - {Object} An optional object whose properties will be set on
+     *                    the control
+     */
+    initialize: function(options) {
+        this.handlers = {};
+        OpenLayers.Control.prototype.initialize.apply(this, arguments);
+    },
+
+    /**
+     * Method: destroy
+     * The destroy method is used to perform any clean up before the control
+     * is dereferenced.  Typically this is where event listeners are removed
+     * to prevent memory leaks.
+     */
+    destroy: function() {
+        this.deactivate();
+        if(this.dragPan) {
+            this.dragPan.destroy();
+        }
+        this.dragPan = null;
+        OpenLayers.Control.prototype.destroy.apply(this,arguments);
+    },
+
+    /**
+     * Method: activate
+     */
+    activate: function() {
+        if(OpenLayers.Control.prototype.activate.apply(this,arguments)) {
+            this.dragPan.activate();
+            this.handlers.click.activate();
+            return true;
+        }
+        return false;
+    },
+
+    /**
+     * Method: deactivate
+     */
+    deactivate: function() {
+        if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)) {
+            this.dragPan.deactivate();
+            this.handlers.click.deactivate();
+            return true;
+        }
+        return false;
+    },
+
+    /**
+     * Method: draw
+     */
+    draw: function() {
+        var clickCallbacks = {
+            'click': this.defaultClick,
+            'dblclick': this.defaultDblClick
+        };
+        var clickOptions = {
+            'double': true,
+            'stopDouble': true
+        };
+        this.handlers.click = new OpenLayers.Handler.Click(
+            this, clickCallbacks, clickOptions
+        );
+        this.dragPan = new OpenLayers.Control.DragPan(
+            OpenLayers.Util.extend({
+                map: this.map,
+                documentDrag: this.documentDrag
+            }, this.dragPanOptions)
+        );
+        this.dragPan.draw();
+    },
+
+    /**
+     * Method: defaultClick
+     *
+     * Parameters:
+     * evt - {Event}
+     */
+    defaultClick: function (evt) {
+        if(evt.lastTouches && evt.lastTouches.length == 2) {
+            this.map.zoomOut();
+        }
+    },
+
+    /**
+     * Method: defaultDblClick
+     *
+     * Parameters:
+     * evt - {Event}
+     */
+    defaultDblClick: function (evt) {
+        var newCenter = this.map.getLonLatFromViewPortPx(evt.xy);
+        this.map.setCenter(newCenter, this.map.zoom + 1);
+    },
+
+    CLASS_NAME: "OpenLayers.Control.TouchNavigation"
+});

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/TransformFeature.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/TransformFeature.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/TransformFeature.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/WMSGetFeatureInfo.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/WMSGetFeatureInfo.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/WMSGetFeatureInfo.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -345,30 +345,38 @@
             layerNames = layerNames.concat(layers[i].params.LAYERS);
             styleNames = styleNames.concat(this.getStyleNames(layers[i]));
         }
+        var firstLayer = layers[0];
+        // use the firstLayer's projection if it matches the map projection -
+        // this assumes that all layers will be available in this projection
+        var projection = this.map.getProjection();
+        var layerProj = firstLayer.projection;
+        if (layerProj && layerProj.equals(this.map.getProjectionObject())) {
+            projection = layerProj.getCode();
+        }
         var params = OpenLayers.Util.extend({
             service: "WMS",
-            version: layers[0].params.VERSION,
+            version: firstLayer.params.VERSION,
             request: "GetFeatureInfo",
             layers: layerNames,
             query_layers: layerNames,
             styles: styleNames,
             bbox: this.map.getExtent().toBBOX(null,
-                layers[0].reverseAxisOrder()),
+                firstLayer.reverseAxisOrder()),
             feature_count: this.maxFeatures,
             height: this.map.getSize().h,
             width: this.map.getSize().w,
             format: format,
             info_format: this.infoFormat
-        }, (parseFloat(layers[0].params.VERSION) >= 1.3) ?
+        }, (parseFloat(firstLayer.params.VERSION) >= 1.3) ?
             {
-                crs: this.map.getProjection(),
-                i: clickPosition.x,
-                j: clickPosition.y
+                crs: projection,
+                i: parseInt(clickPosition.x),
+                j: parseInt(clickPosition.y)
             } :
             {
-                srs: this.map.getProjection(),
-                x: clickPosition.x,
-                y: clickPosition.y
+                srs: projection,
+                x: parseInt(clickPosition.x),
+                y: parseInt(clickPosition.y)
             }
         );
         OpenLayers.Util.applyDefaults(params, this.vendorParams);

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/WMTSGetFeatureInfo.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/WMTSGetFeatureInfo.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/WMTSGetFeatureInfo.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -213,35 +213,6 @@
     },
 
     /**
-     * Method: activate
-     * Activates the control.
-     * 
-     * Returns:
-     * {Boolean} The control was effectively activated.
-     */
-    activate: function () {
-        if (!this.active) {
-            this.handler.activate();
-        }
-        return OpenLayers.Control.prototype.activate.apply(
-            this, arguments
-        );
-    },
-
-    /**
-     * Method: deactivate
-     * Deactivates the control.
-     * 
-     * Returns:
-     * {Boolean} The control was effectively deactivated.
-     */
-    deactivate: function () {
-        return OpenLayers.Control.prototype.deactivate.apply(
-            this, arguments
-        );
-    },
-    
-    /**
      * Method: getInfoForClick 
      * Called on click
      *
@@ -425,18 +396,6 @@
             }
         }
     },
-   
-    /** 
-     * Method: setMap
-     * Set the map property for the control. 
-     * 
-     * Parameters:
-     * map - {<OpenLayers.Map>} 
-     */
-    setMap: function(map) {
-        this.handler.setMap(map);
-        OpenLayers.Control.prototype.setMap.apply(this, arguments);
-    },
 
     CLASS_NAME: "OpenLayers.Control.WMTSGetFeatureInfo"
 });

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomBox.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomBox.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomBox.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomIn.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomIn.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomIn.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomOut.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomOut.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomOut.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomPanel.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomPanel.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomPanel.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomToMaxExtent.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomToMaxExtent.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control/ZoomToMaxExtent.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Control.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Control.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Control.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Console.js
  */
 
@@ -343,10 +344,7 @@
                     this.displayClass.replace(/ /g, "") + "Active"
                 );
             }
-            // deal with the case where the control is destroyed
-            if(this.events) {
-                this.events.triggerEvent("deactivate");
-            }
+            this.events.triggerEvent("deactivate");
             return true;
         }
         return false;

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Events.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Events.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Events.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -91,6 +91,34 @@
     },
 
     /**
+     * Method: isSingleTouch
+     * Determine whether event was caused by a single touch
+     *
+     * Parameters:
+     * event - {Event}
+     *
+     * Returns:
+     * {Boolean}
+     */
+    isSingleTouch: function(event) {
+        return event.touches && event.touches.length == 1;
+    },
+
+    /**
+     * Method: isMultiTouch
+     * Determine whether event was caused by a multi touch
+     *
+     * Parameters:
+     * event - {Event}
+     *
+     * Returns:
+     * {Boolean}
+     */
+    isMultiTouch: function(event) {
+        return event.touches && event.touches.length > 1;
+    },
+
+    /**
      * Method: isLeftClick
      * Determine whether event was caused by a left click. 
      *
@@ -369,7 +397,8 @@
         "mouseover", "mouseout",
         "mousedown", "mouseup", "mousemove", 
         "click", "dblclick", "rightclick", "dblrightclick",
-        "resize", "focus", "blur"
+        "resize", "focus", "blur",
+        "touchstart", "touchmove", "touchend"
     ],
 
     /** 
@@ -449,8 +478,8 @@
      * Construct an OpenLayers.Events object.
      *
      * Parameters:
-     * object - {Object} The js object to which this Events object  is being
-     * added element - {DOMElement} A dom element to respond to browser events
+     * object - {Object} The js object to which this Events object  is being added
+     * element - {DOMElement} A dom element to respond to browser events
      * eventTypes - {Array(String)} Array of custom application events 
      * fallThrough - {Boolean} Allow events to fall through after these have
      *                         been handled?
@@ -742,7 +771,7 @@
 
         // fast path
         if(!listeners || listeners.length == 0) {
-            return;
+            return undefined;
         }
 
         // prep evt object with object & div references
@@ -758,7 +787,8 @@
         // execute all callbacks registered for specified type
         // get a clone of the listeners array to
         // allow for splicing during callbacks
-        var listeners = listeners.slice(), continueChain;
+        listeners = listeners.slice();
+        var continueChain;
         for (var i=0, len=listeners.length; i<len; i++) {
             var callback = listeners[i];
             // bind the context to callback.obj
@@ -786,10 +816,20 @@
      * evt - {Event} 
      */
     handleBrowserEvent: function (evt) {
+        var type = evt.type, listeners = this.listeners[type];
+        if(!listeners || listeners.length == 0) {
+            // noone's listening, bail out
+            return;
+        }
+        // add clientX & clientY to all events - only corresponds to the first touch
+        if (evt.touches && evt.touches[0]) {
+            evt.clientX = evt.touches[0].clientX;
+            evt.clientY = evt.touches[0].clientY;
+        }
         if (this.includeXY) {
             evt.xy = this.getMousePosition(evt);
         } 
-        this.triggerEvent(evt.type, evt);
+        this.triggerEvent(type, evt);
     },
 
     /**
@@ -823,11 +863,10 @@
         }
         
         if (!this.element.scrolls) {
+            var viewportElement = OpenLayers.Util.getViewportElement();
             this.element.scrolls = [
-                (document.documentElement.scrollLeft
-                         || document.body.scrollLeft),
-                (document.documentElement.scrollTop
-                         || document.body.scrollTop)
+                viewportElement.scrollLeft,
+                viewportElement.scrollTop
             ];
         }
 
@@ -840,9 +879,8 @@
         
         if (!this.element.offsets) {
             this.element.offsets = OpenLayers.Util.pagePosition(this.element);
-            this.element.offsets[0] += this.element.scrolls[0];
-            this.element.offsets[1] += this.element.scrolls[1];
         }
+
         return new OpenLayers.Pixel(
             (evt.clientX + this.element.scrolls[0]) - this.element.offsets[0]
                          - this.element.lefttop[0], 

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Feature/Vector.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Feature/Vector.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Feature/Vector.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -267,7 +267,7 @@
 
         if(!this.layer || !this.geometry.move){
             //do nothing if no layer or immoveable geometry
-            return;
+            return undefined;
         }
 
         var pixel;

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Feature/WFS.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Feature/WFS.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Feature/WFS.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Feature.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Feature.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Feature.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,10 +1,11 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Util.js
  * @requires OpenLayers/Marker.js
  * @requires OpenLayers/Popup/AnchoredBubble.js

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Filter/Comparison.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Filter/Comparison.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Filter/Comparison.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -109,9 +109,10 @@
         }
         var result = false;
         var got = context[this.property];
+        var exp;
         switch(this.type) {
             case OpenLayers.Filter.Comparison.EQUAL_TO:
-                var exp = this.value;
+                exp = this.value;
                 if(!this.matchCase &&
                    typeof got == "string" && typeof exp == "string") {
                     result = (got.toUpperCase() == exp.toUpperCase());
@@ -120,7 +121,7 @@
                 }
                 break;
             case OpenLayers.Filter.Comparison.NOT_EQUAL_TO:
-                var exp = this.value;
+                exp = this.value;
                 if(!this.matchCase &&
                    typeof got == "string" && typeof exp == "string") {
                     result = (got.toUpperCase() != exp.toUpperCase());

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Filter/FeatureId.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Filter/FeatureId.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Filter/FeatureId.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Filter/Logical.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Filter/Logical.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Filter/Logical.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -70,9 +70,10 @@
      * {Boolean} The filter applies.
      */
     evaluate: function(context) {
+        var i, len;
         switch(this.type) {
             case OpenLayers.Filter.Logical.AND:
-                for (var i=0, len=this.filters.length; i<len; i++) {
+                for (i=0, len=this.filters.length; i<len; i++) {
                     if (this.filters[i].evaluate(context) == false) {
                         return false;
                     }
@@ -80,7 +81,7 @@
                 return true;
                 
             case OpenLayers.Filter.Logical.OR:
-                for (var i=0, len=this.filters.length; i<len; i++) {
+                for (i=0, len=this.filters.length; i<len; i++) {
                     if (this.filters[i].evaluate(context) == true) {
                         return true;
                     }
@@ -90,6 +91,7 @@
             case OpenLayers.Filter.Logical.NOT:
                 return (!this.filters[0].evaluate(context));
         }
+        return undefined;
     },
     
     /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Filter/Spatial.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Filter/Spatial.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Filter/Spatial.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -6,6 +6,7 @@
 /**
  * @requires OpenLayers/Filter.js
  * @requires OpenLayers/Console.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Filter.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Filter.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Filter.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,10 +1,11 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Util.js
  * @requires OpenLayers/Style.js
  */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/ArcXML/Features.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/ArcXML/Features.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/ArcXML/Features.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/ArcXML.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/ArcXML.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/ArcXML.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/Atom.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/Atom.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/Atom.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Copied: sandbox/tschaub/canvas/lib/OpenLayers/Format/CQL.js (from rev 11416, trunk/openlayers/lib/OpenLayers/Format/CQL.js)
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/CQL.js	                        (rev 0)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/CQL.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,438 @@
+/* Copyright (c) 2006-2011 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/Format/WKT.js
+ */
+
+/**
+ * Class: OpenLayers.Format.CQL
+ * Read CQL strings to get <OpenLayers.Filter> objects.  Write 
+ *     <OpenLayers.Filter> objects to get CQL strings. Create a new parser with 
+ *     the <OpenLayers.Format.CQL> constructor.
+ *
+ * Inherits from:
+ *  - <OpenLayers.Format>
+ */
+OpenLayers.Format.CQL = (function() {
+    
+    var tokens = [
+        "PROPERTY", "COMPARISON", "VALUE", "LOGICAL"
+    ],
+
+    patterns = {
+        PROPERTY: /^[_a-zA-Z]\w*/,
+        COMPARISON: /^(=|<>|<=|<|>=|>|LIKE)/i,
+        COMMA: /^,/,
+        LOGICAL: /^(AND|OR)/i,
+        VALUE: /^('\w+'|\d+(\.\d*)?|\.\d+)/,
+        LPAREN: /^\(/,
+        RPAREN: /^\)/,
+        SPATIAL: /^(BBOX|INTERSECTS|DWITHIN|WITHIN|CONTAINS)/i,
+        NOT: /^NOT/i,
+        BETWEEN: /^BETWEEN/i,
+        GEOMETRY: function(text) {
+            var type = /^(POINT|LINESTRING|POLYGON|MULTIPOINT|MULTILINESTRING|MULTIPOLYGON|GEOMETRYCOLLECTION)/.exec(text);
+            if (type) {
+                var len = text.length;
+                var idx = text.indexOf("(", type[0].length);
+                if (idx > -1) {
+                    var depth = 1;
+                    while (idx < len && depth > 0) {
+                        idx++;
+                        switch(text.charAt(idx)) {
+                            case '(':
+                                depth++;
+                                break;
+                            case ')':
+                                depth--;
+                                break;
+                            default:
+                                // in default case, do nothing
+                        }
+                    }
+                }
+                return [text.substr(0, idx+1)];
+            }
+        },
+        END: /^$/
+    },
+
+    follows = {
+        LPAREN: ['GEOMETRY', 'SPATIAL', 'PROPERTY', 'VALUE', 'LPAREN'],
+        RPAREN: ['NOT', 'LOGICAL', 'END', 'RPAREN'],
+        PROPERTY: ['COMPARISON', 'BETWEEN', 'COMMA'],
+        BETWEEN: ['VALUE'],
+        COMPARISON: ['VALUE'],
+        COMMA: ['GEOMETRY', 'VALUE', 'PROPERTY'],
+        VALUE: ['LOGICAL', 'COMMA', 'RPAREN', 'END'],
+        SPATIAL: ['LPAREN'],
+        LOGICAL: ['NOT', 'VALUE', 'SPATIAL', 'PROPERTY', 'LPAREN'],
+        NOT: ['PROPERTY', 'LPAREN'],
+        GEOMETRY: ['COMMA', 'RPAREN']
+    },
+
+    operators = {
+        '=': OpenLayers.Filter.Comparison.EQUAL_TO,
+        '<>': OpenLayers.Filter.Comparison.NOT_EQUAL_TO,
+        '<': OpenLayers.Filter.Comparison.LESS_THAN,
+        '<=': OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO,
+        '>': OpenLayers.Filter.Comparison.GREATER_THAN,
+        '>=': OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO,
+        'LIKE': OpenLayers.Filter.Comparison.LIKE,
+        'BETWEEN': OpenLayers.Filter.Comparison.BETWEEN
+    },
+
+    operatorReverse = {},
+
+    logicals = {
+        'AND': OpenLayers.Filter.Logical.AND,
+        'OR': OpenLayers.Filter.Logical.OR
+    },
+
+    logicalReverse = {},
+
+    precedence = {
+        'RPAREN': 3,
+        'LOGICAL': 2,
+        'COMPARISON': 1
+    };
+
+    var i;
+    for (i in operators) {
+        if (operators.hasOwnProperty(i)) {
+            operatorReverse[operators[i]] = i;
+        }
+    }
+
+    for (i in logicals) {
+        if (logicals.hasOwnProperty(i)) {
+            logicalReverse[logicals[i]] = i;
+        }
+    }
+
+    function tryToken(text, pattern) {
+        if (pattern instanceof RegExp) {
+            return pattern.exec(text);
+        } else {
+            return pattern(text);
+        }
+    }
+
+    function nextToken(text, tokens) {
+        var i, token, len = tokens.length;
+        for (i=0; i<len; i++) {
+            token = tokens[i];
+            var pat = patterns[token];
+            var matches = tryToken(text, pat);
+            if (matches) {
+                var match = matches[0];
+                var remainder = text.substr(match.length).replace(/^\s*/, "");
+                return {
+                    type: token,
+                    text: match,
+                    remainder: remainder
+                };
+            }
+        }
+
+        var msg = "ERROR: In parsing: [" + text + "], expected one of: ";
+        for (i=0; i<len; i++) {
+            token = tokens[i];
+            msg += "\n    " + token + ": " + patterns[token];
+        }
+
+        throw new Error(msg);
+    }
+
+    function tokenize(text) {
+        var results = [];
+        var token, expect = ["NOT", "GEOMETRY", "SPATIAL", "PROPERTY", "LPAREN"];
+
+        do {
+            token = nextToken(text, expect);
+            text = token.remainder;
+            expect = follows[token.type];
+            if (token.type != "END" && !expect) {
+                throw new Error("No follows list for " + token.type);
+            }
+            results.push(token);
+        } while (token.type != "END");
+
+        return results;
+    }
+
+    function buildAst(tokens) {
+        var operatorStack = [],
+            postfix = [];
+
+        while (tokens.length) {
+            var tok = tokens.shift();
+            switch (tok.type) {
+                case "PROPERTY":
+                case "GEOMETRY":
+                case "VALUE":
+                    postfix.push(tok);
+                    break;
+                case "COMPARISON":
+                case "BETWEEN":
+                case "LOGICAL":
+                    var p = precedence[tok.type];
+
+                    while (operatorStack.length > 0 &&
+                        (precedence[operatorStack[operatorStack.length - 1].type] <= p)
+                    ) {
+                        postfix.push(operatorStack.pop());
+                    }
+
+                    operatorStack.push(tok);
+                    break;
+                case "SPATIAL":
+                case "NOT":
+                case "LPAREN":
+                    operatorStack.push(tok);
+                    break;
+                case "RPAREN":
+                    while (operatorStack.length > 0 &&
+                        (operatorStack[operatorStack.length - 1].type != "LPAREN")
+                    ) {
+                        postfix.push(operatorStack.pop());
+                    }
+                    operatorStack.pop(); // toss out the LPAREN
+
+                    if (operatorStack.length > 0 &&
+                        operatorStack[operatorStack.length-1].type == "SPATIAL") {
+                        postfix.push(operatorStack.pop());
+                    }
+                case "COMMA":
+                case "END":
+                    break;
+                default:
+                    throw new Error("Unknown token type " + tok.type);
+            }
+        }
+
+        while (operatorStack.length > 0) {
+            postfix.push(operatorStack.pop());
+        }
+
+        function buildTree() {
+            var tok = postfix.pop();
+            switch (tok.type) {
+                case "LOGICAL":
+                    var rhs = buildTree(),
+                        lhs = buildTree();
+                    return new OpenLayers.Filter.Logical({
+                        filters: [lhs, rhs],
+                        type: logicals[tok.text.toUpperCase()]
+                    });
+                case "NOT":
+                    var operand = buildTree();
+                    return new OpenLayers.Filter.Logical({
+                        filters: [operand],
+                        type: OpenLayers.Filter.Logical.NOT
+                    });
+                case "BETWEEN":
+                    var min, max, property;
+                    postfix.pop(); // unneeded AND token here
+                    max = buildTree();
+                    min = buildTree();
+                    property = buildTree();
+                    return new OpenLayers.Filter.Comparison({
+                        property: property,
+                        lowerBoundary: min,
+                        upperBoundary: max,
+                        type: OpenLayers.Filter.Comparison.BETWEEN
+                    });
+                case "COMPARISON":
+                    var value = buildTree(),
+                        property = buildTree();
+                    return new OpenLayers.Filter.Comparison({
+                        property: property,
+                        value: value,
+                        type: operators[tok.text.toUpperCase()]
+                    });
+                case "VALUE":
+                    if ((/^'.*'$/).test(tok.text)) {
+                        return tok.text.substr(1, tok.text.length - 2);
+                    } else {
+                        return Number(tok.text);
+                    }
+                case "SPATIAL":
+                    switch(tok.text.toUpperCase()) {
+                        case "BBOX":
+                            var maxy = buildTree(),
+                                maxx = buildTree(),
+                                miny = buildTree(),
+                                minx = buildTree(),
+                                prop = buildTree();
+
+                            return new OpenLayers.Filter.Spatial({
+                                type: OpenLayers.Filter.Spatial.BBOX,
+                                property: prop,
+                                value: OpenLayers.Bounds.fromArray(
+                                    [minx, miny, maxx, maxy]
+                                )
+                            });
+                        case "INTERSECTS":
+                            var value = buildTree(),
+                                property = buildTree();
+                            return new OpenLayers.Filter.Spatial({
+                                type: OpenLayers.Filter.Spatial.INTERSECTS,
+                                property: property,
+                                value: value
+                            });
+                        case "WITHIN":
+                            var value = buildTree(),
+                                property = buildTree();
+                            return new OpenLayers.Filter.Spatial({
+                                type: OpenLayers.Filter.Spatial.WITHIN,
+                                property: property,
+                                value: value
+                            });
+                        case "CONTAINS":
+                            var value = buildTree(),
+                                property = buildTree();
+                            return new OpenLayers.Filter.Spatial({
+                                type: OpenLayers.Filter.Spatial.CONTAINS,
+                                property: property,
+                                value: value
+                            });
+                        case "DWITHIN":
+                            var distance = buildTree(),
+                                value = buildTree(),
+                                property = buildTree();
+                            return new OpenLayers.Filter.Spatial({
+                                type: OpenLayers.Filter.Spatial.DWITHIN,
+                                value: value,
+                                property: property,
+                                distance: Number(distance)
+                            });
+                    }
+                case "GEOMETRY":
+                    return OpenLayers.Geometry.fromWKT(tok.text);
+                default:
+                    return tok.text;
+            }
+        }
+
+        var result = buildTree();
+        if (postfix.length > 0) {
+            var msg = "Remaining tokens after building AST: \n";
+            for (var i = postfix.length - 1; i >= 0; i--) {
+                msg += postfix[i].type + ": " + postfix[i].text + "\n";
+            }
+            throw new Error(msg);
+        }
+
+        return result;
+    }
+
+    return OpenLayers.Class(OpenLayers.Format, {
+        /**
+         * APIMethod: read
+         * Generate a filter from a CQL string.
+
+         * Parameters:
+         * text - {String} The CQL text.
+         *
+         * Returns:
+         * {<OpenLayers.Filter>} A filter based on the CQL text.
+         */
+        read: function(text) { 
+            var result = buildAst(tokenize(text));
+            if (this.keepData) {
+                this.data = result;
+            };
+            return result;
+        },
+
+        /**
+         * APIMethod: write
+         * Convert a filter into a CQL string.
+
+         * Parameters:
+         * filter - {<OpenLayers.Filter>} The filter.
+         *
+         * Returns:
+         * {String} A CQL string based on the filter.
+         */
+        write: function(filter) {
+            if (filter instanceof OpenLayers.Geometry) {
+                return filter.toString();
+            }
+            switch (filter.CLASS_NAME) {
+                case "OpenLayers.Filter.Spatial":
+                    switch(filter.type) {
+                        case OpenLayers.Filter.Spatial.BBOX:
+                            return "BBOX(" +
+                                filter.property + "," +
+                                filter.value.toBBOX() +
+                                ")";
+                        case OpenLayers.Filter.Spatial.DWITHIN:
+                            return "DWITHIN(" +
+                                filter.property + ", " +
+                                this.write(filter.value) + ", " +
+                                filter.distance + ")";
+                        case OpenLayers.Filter.Spatial.WITHIN:
+                            return "WITHIN(" +
+                                filter.property + ", " +
+                                this.write(filter.value) + ")";
+                        case OpenLayers.Filter.Spatial.INTERSECTS:
+                            return "INTERSECTS(" +
+                                filter.property + ", " +
+                                this.write(filter.value) + ")";
+                        case OpenLayers.Filter.Spatial.CONTAINS:
+                            return "CONTAINS(" +
+                                filter.property + ", " +
+                                this.write(filter.value) + ")";
+                        default:
+                            throw new Error("Unknown spatial filter type: " + filter.type);
+                    }
+                case "OpenLayers.Filter.Logical":
+                    if (filter.type == OpenLayers.Filter.Logical.NOT) {
+                        // TODO: deal with precedence of logical operators to 
+                        // avoid extra parentheses (not urgent)
+                        return "NOT (" + this.write(filter.filters[0]) + ")";
+                    } else {
+                        var res = "(";
+                        var first = true;
+                        for (var i = 0; i < filter.filters.length; i++) {
+                            if (first) {
+                                first = false;
+                            } else {
+                                res += ") " + logicalReverse[filter.type] + " (";
+                            }
+                            res += this.write(filter.filters[i]);
+                        }
+                        return res + ")";
+                    }
+                case "OpenLayers.Filter.Comparison":
+                    if (filter.type == OpenLayers.Filter.Comparison.BETWEEN) {
+                        return filter.property + " BETWEEN " + 
+                            this.write(filter.lowerBoundary) + " AND " + 
+                            this.write(filter.upperBoundary);
+                    } else {
+                        
+                        return filter.property +
+                            " " + operatorReverse[filter.type] + " " + 
+                            this.write(filter.value);
+                    }
+                case undefined:
+                    if (typeof filter === "string") {
+                        return "'" + filter + "'";
+                    } else if (typeof filter === "number") {
+                        return String(filter);
+                    }
+                default:
+                    throw new Error("Can't encode: " + filter.CLASS_NAME + " " + filter);
+            }
+        },
+
+        CLASS_NAME: "OpenLayers.Format.CQL"
+
+    });
+})();
+

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -133,7 +133,7 @@
             },
             "Value": function(node, obj) {
                 var attrs = node.attributes;
-                var value = {}
+                var value = {};
                 for(var i=0, len=attrs.length; i<len; ++i) {
                     value[attrs[i].name] = attrs[i].nodeValue;
                 }
@@ -159,7 +159,7 @@
             },
             "MinValue": function(node, obj) {
                 var attrs = node.attributes;
-                var value = {}
+                var value = {};
                 for(var i=0, len=attrs.length; i<len; ++i) {
                     value[attrs[i].name] = attrs[i].nodeValue;
                 }
@@ -168,7 +168,7 @@
             },
             "MaxValue": function(node, obj) {
                 var attrs = node.attributes;
-                var value = {}
+                var value = {};
                 for(var i=0, len=attrs.length; i<len; ++i) {
                     value[attrs[i].name] = attrs[i].nodeValue;
                 }

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/CSWGetDomain.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/CSWGetDomain.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/CSWGetDomain.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/CSWGetRecords.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/CSWGetRecords.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/CSWGetRecords.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/Context.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/Context.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/Context.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/Filter/v1.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/Filter/v1.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/Filter/v1.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/Filter/v1_0_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/Filter/v1_0_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/Filter/v1_0_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/Filter/v1_1_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/Filter/v1_1_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/Filter/v1_1_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/Filter.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/Filter.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/Filter.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/GML/Base.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/GML/Base.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/GML/Base.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/GML/v2.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/GML/v2.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/GML/v2.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/GML/v3.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/GML/v3.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/GML/v3.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/GML.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/GML.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/GML.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -13,6 +13,7 @@
  * @requires OpenLayers/Geometry/Polygon.js
  * @requires OpenLayers/Geometry/MultiPolygon.js
  * @requires OpenLayers/Console.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/GPX.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/GPX.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/GPX.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -162,10 +162,10 @@
         // node is either a wpt, trk or rte
         // attributes are children of the form <attr>value</attr>
         var attributes = {};
-        var attrNode = node.firstChild;
+        var attrNode = node.firstChild, value, name;
         while(attrNode) {
             if(attrNode.nodeType == 1) {
-                var value = attrNode.firstChild;
+                value = attrNode.firstChild;
                 if(value.nodeType == 3 || value.nodeType == 4) {
                     name = (attrNode.prefix) ?
                         attrNode.nodeName.split(":")[1] :

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/GeoJSON.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/GeoJSON.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/GeoJSON.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/GeoRSS.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/GeoRSS.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/GeoRSS.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/JSON.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/JSON.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/JSON.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -60,6 +60,14 @@
     pretty: false,
 
     /**
+     * Property: nativeJSON
+     * {Boolean} Does the browser support native json?
+     */
+    nativeJSON: (function() {
+        return !!(window.JSON && typeof JSON.parse == "function" && typeof JSON.stringify == "function");
+    })(),
+
+    /**
      * Constructor: OpenLayers.Format.JSON
      * Create a new parser for JSON.
      *
@@ -87,15 +95,18 @@
      * {Object} An object, array, string, or number .
      */
     read: function(json, filter) {
-        /**
-         * Parsing happens in three stages. In the first stage, we run the text
-         *     against a regular expression which looks for non-JSON
-         *     characters. We are especially concerned with '()' and 'new'
-         *     because they can cause invocation, and '=' because it can cause
-         *     mutation. But just to be safe, we will reject all unexpected
-         *     characters.
-         */
-        try {
+        var object;
+        if (this.nativeJSON) {
+            object = JSON.parse(json, filter);
+        } else try {
+            /**
+             * Parsing happens in three stages. In the first stage, we run the
+             *     text against a regular expression which looks for non-JSON
+             *     characters. We are especially concerned with '()' and 'new'
+             *     because they can cause invocation, and '=' because it can
+             *     cause mutation. But just to be safe, we will reject all
+             *     unexpected characters.
+             */
             if (/^[\],:{}\s]*$/.test(json.replace(/\\["\\\/bfnrtu]/g, '@').
                                 replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']').
                                 replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) {
@@ -107,7 +118,7 @@
                  *     begin a block or an object literal. We wrap the text in
                  *     parens to eliminate the ambiguity.
                  */
-                var object = eval('(' + json + ')');
+                object = eval('(' + json + ')');
 
                 /**
                  * In the optional third stage, we recursively walk the new
@@ -127,17 +138,16 @@
                     }
                     object = walk('', object);
                 }
-
-                if(this.keepData) {
-                    this.data = object;
-                }
-
-                return object;
             }
         } catch(e) {
             // Fall through if the regexp test fails.
         }
-        return null;
+
+        if(this.keepData) {
+            this.data = object;
+        }
+
+        return object;
     },
 
     /**
@@ -159,7 +169,9 @@
         var type = typeof value;
         if(this.serialize[type]) {
             try {
-                json = this.serialize[type].apply(this, [value]);
+                json = (!this.pretty && this.nativeJSON) ?
+                    JSON.stringify(value) :
+                    this.serialize[type].apply(this, [value]);
             } catch(err) {
                 OpenLayers.Console.error("Trouble serializing: " + err);
             }

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/KML.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/KML.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/KML.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -12,6 +12,7 @@
  * @requires OpenLayers/Geometry/Collection.js
  * @requires OpenLayers/Request/XMLHttpRequest.js
  * @requires OpenLayers/Console.js
+ * @requires OpenLayers/Lang.js
  * @requires OpenLayers/Projection.js
  */
 
@@ -353,11 +354,10 @@
         
         var types = ["LineStyle", "PolyStyle", "IconStyle", "BalloonStyle", 
                      "LabelStyle"];
-        var type, nodeList, geometry, parser;
+        var type, styleTypeNode, nodeList, geometry, parser;
         for(var i=0, len=types.length; i<len; ++i) {
             type = types[i];
-            styleTypeNode = this.getElementsByTagNameNS(node, 
-                                                   "*", type)[0];
+            styleTypeNode = this.getElementsByTagNameNS(node, "*", type)[0];
             if(!styleTypeNode) { 
                 continue;
             }

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/OSM.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/OSM.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/OSM.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -374,13 +374,14 @@
             return already_exists ? [] : [node];
         }, 
         linestring: function(feature) {
+            var id;
             var nodes = [];
             var geometry = feature.geometry;
             if (feature.osm_id) {
                 id = feature.osm_id;
             } else {
-               id = -this.osm_id;
-               this.osm_id++; 
+                id = -this.osm_id;
+                this.osm_id++; 
             }
             var way = this.createElementNS(null, "way");
             way.setAttribute("id", id);

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSCommon/v1.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSCommon/v1.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSCommon/v1.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSCommon/v1_0_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSCommon/v1_0_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSCommon/v1_0_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSCommon/v1_1_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSCommon/v1_1_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSCommon/v1_1_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSContext/v0_3_1.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSContext/v0_3_1.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSContext/v0_3_1.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSContext.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSContext.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/OWSContext.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/SLD/v1.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/SLD/v1.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/SLD/v1.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/SLD/v1_0_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/SLD/v1_0_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/SLD/v1_0_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/SLD.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/SLD.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/SLD.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/SOSCapabilities/v1_0_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/SOSCapabilities/v1_0_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/SOSCapabilities/v1_0_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/SOSCapabilities.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/SOSCapabilities.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/SOSCapabilities.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/SOSGetObservation.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/SOSGetObservation.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/SOSGetObservation.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,262 +1,305 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/Format/XML.js
- * @requires OpenLayers/Format/GML.js
- * @requires OpenLayers/Format/GML/v3.js
- */
-
-/**
- * Class: OpenLayers.Format.SOSGetObservation
- * Read and write SOS GetObersation (to get the actual values from a sensor) 
- *     version 1.0.0
- *
- * Inherits from:
- *  - <OpenLayers.Format.XML>
- */
-OpenLayers.Format.SOSGetObservation = OpenLayers.Class(OpenLayers.Format.XML, {
-    
-    /**
-     * Property: namespaces
-     * {Object} Mapping of namespace aliases to namespace URIs.
-     */
-    namespaces: {
-        ows: "http://www.opengis.net/ows",
-        gml: "http://www.opengis.net/gml",
-        sos: "http://www.opengis.net/sos/1.0",
-        ogc: "http://www.opengis.net/ogc",
-        om: "http://www.opengis.net/om/1.0",
-        xlink: "http://www.w3.org/1999/xlink",
-        xsi: "http://www.w3.org/2001/XMLSchema-instance"
-    },
-
-    /**
-     * Property: regExes
-     * Compiled regular expressions for manipulating strings.
-     */
-    regExes: {
-        trimSpace: (/^\s*|\s*$/g),
-        removeSpace: (/\s*/g),
-        splitSpace: (/\s+/),
-        trimComma: (/\s*,\s*/g)
-    },
-
-    /**
-     * Constant: VERSION
-     * {String} 1.0.0
-     */
-    VERSION: "1.0.0",
-
-    /**
-     * Property: schemaLocation
-     * {String} Schema location
-     */
-    schemaLocation: "http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosGetObservation.xsd",
-
-    /**
-     * Property: defaultPrefix
-     */
-    defaultPrefix: "sos",
-
-    /**
-     * Constructor: OpenLayers.Format.SOSGetObservation
-     *
-     * Parameters:
-     * options - {Object} An optional object whose properties will be set on
-     *     this instance.
-     */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
-
-    /**
-     * Method: read
-     * 
-     * Parameters: 
-     * data - {String} or {DOMElement} data to read/parse.
-     *
-     * Returns:
-     * {Object} An object containing the measurements
-     */
-    read: function(data) {
-        if(typeof data == "string") {
-            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
-        }
-        if(data && data.nodeType == 9) {
-            data = data.documentElement;
-        }
-        var info = {measurements: []};
-        this.readNode(data, info);
-        return info;
-    },
-
-    /**
-     * Method: write
-     *
-     * Parameters:
-     * options - {Object} Optional object.
-     *
-     * Returns:
-     * {String} An SOS GetObservation request XML string.
-     */
-    write: function(options) {
-        var node = this.writeNode("sos:GetObservation", options);
+
+/**
+ * @requires OpenLayers/Format/XML.js
+ * @requires OpenLayers/Format/SOSGetFeatureOfInterest.js
+ */
+
+/**
+ * Class: OpenLayers.Format.SOSGetObservation
+ * Read and write SOS GetObersation (to get the actual values from a sensor) 
+ *     version 1.0.0
+ *
+ * Inherits from:
+ *  - <OpenLayers.Format.XML>
+ */
+OpenLayers.Format.SOSGetObservation = OpenLayers.Class(OpenLayers.Format.XML, {
+    
+    /**
+     * Property: namespaces
+     * {Object} Mapping of namespace aliases to namespace URIs.
+     */
+    namespaces: {
+        ows: "http://www.opengis.net/ows",
+        gml: "http://www.opengis.net/gml",
+        sos: "http://www.opengis.net/sos/1.0",
+        ogc: "http://www.opengis.net/ogc",
+        om: "http://www.opengis.net/om/1.0",
+        sa: "http://www.opengis.net/sampling/1.0",
+        xlink: "http://www.w3.org/1999/xlink",
+        xsi: "http://www.w3.org/2001/XMLSchema-instance"
+    },
+
+    /**
+     * Property: regExes
+     * Compiled regular expressions for manipulating strings.
+     */
+    regExes: {
+        trimSpace: (/^\s*|\s*$/g),
+        removeSpace: (/\s*/g),
+        splitSpace: (/\s+/),
+        trimComma: (/\s*,\s*/g)
+    },
+
+    /**
+     * Constant: VERSION
+     * {String} 1.0.0
+     */
+    VERSION: "1.0.0",
+
+    /**
+     * Property: schemaLocation
+     * {String} Schema location
+     */
+    schemaLocation: "http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosGetObservation.xsd",
+
+    /**
+     * Property: defaultPrefix
+     */
+    defaultPrefix: "sos",
+
+    /**
+     * Constructor: OpenLayers.Format.SOSGetObservation
+     *
+     * Parameters:
+     * options - {Object} An optional object whose properties will be set on
+     *     this instance.
+     */
+    initialize: function(options) {
+        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
+    },
+
+    /**
+     * Method: read
+     * 
+     * Parameters: 
+     * data - {String} or {DOMElement} data to read/parse.
+     *
+     * Returns:
+     * {Object} An object containing the measurements
+     */
+    read: function(data) {
+        if(typeof data == "string") {
+            data = OpenLayers.Format.XML.prototype.read.apply(this, [data]);
+        }
+        if(data && data.nodeType == 9) {
+            data = data.documentElement;
+        }
+        var info = {measurements: [], observations: []};
+        this.readNode(data, info);
+        return info;
+    },
+
+    /**
+     * Method: write
+     *
+     * Parameters:
+     * options - {Object} Optional object.
+     *
+     * Returns:
+     * {String} An SOS GetObservation request XML string.
+     */
+    write: function(options) {
+        var node = this.writeNode("sos:GetObservation", options);
         node.setAttribute("xmlns:om", this.namespaces.om);
-        this.setAttributeNS(
-            node, this.namespaces.xsi,
-            "xsi:schemaLocation", this.schemaLocation
-        );
-        return OpenLayers.Format.XML.prototype.write.apply(this, [node]);
-    }, 
-
-    /**
-     * Property: readers
-     * Contains public functions, grouped by namespace prefix, that will
-     *     be applied when a namespaced node is found matching the function
-     *     name.  The function will be applied in the scope of this parser
-     *     with two arguments: the node being read and a context object passed
-     *     from the parent.
-     */
-    readers: {
-        "om": {
-            "ObservationCollection": function(node, obj) {
-                obj.id = this.getAttributeNS(node, this.namespaces.gml, "id");
-                this.readChildNodes(node, obj);
-            },
-            "member": function(node, observationCollection) {
-                this.readChildNodes(node, observationCollection);
-            },
-            "Measurement": function(node, observationCollection) {
-                var measurement = {};
-                observationCollection.measurements.push(measurement);
-                this.readChildNodes(node, measurement);
-            },
-            "samplingTime": function(node, measurement) {
-                var samplingTime = {};
-                measurement.samplingTime = samplingTime;
-                this.readChildNodes(node, samplingTime);
-            },
-            "observedProperty": function(node, measurement) {
-                measurement.observedProperty = 
-                    this.getAttributeNS(node, this.namespaces.xlink, "href");
-                this.readChildNodes(node, measurement);
-            },
-            "procedure": function(node, measurement) {
-                measurement.procedure = 
-                    this.getAttributeNS(node, this.namespaces.xlink, "href");
-                this.readChildNodes(node, measurement);
-            },
-            "result": function(node, measurement) {
-                var result = {};
-                measurement.result = result;
-                if (this.getChildValue(node) !== '') {
-                    result.value = this.getChildValue(node);
-                    result.uom = node.getAttribute("uom");
-                } else {
-                    this.readChildNodes(node, result);
-                }
-            }
-        },
-        "gml": OpenLayers.Util.applyDefaults({
-            "TimeInstant": function(node, samplingTime) {
-               var timeInstant = {};
-                samplingTime.timeInstant = timeInstant;
-                this.readChildNodes(node, timeInstant);
-            },
-            "timePosition": function(node, timeInstant) {
-                timeInstant.timePosition = this.getChildValue(node);
-            }
-        }, OpenLayers.Format.GML.v3.prototype.readers.gml)
-    },
-
-    /**
-     * Property: writers
-     * As a compliment to the readers property, this structure contains public
-     *     writing functions grouped by namespace alias and named like the
-     *     node names they produce.
-     */
-    writers: {
-        "sos": {
-            "GetObservation": function(options) {
-                var node = this.createElementNSPlus("GetObservation", {
-                    attributes: {
-                        version: this.VERSION,
-                        service: 'SOS'
-                    } 
-                }); 
-                this.writeNode("offering", options, node);
-                this.writeNode("eventTime", options, node);
-                this.writeNode("procedure", options, node);
-                this.writeNode("observedProperty", options, node);
-                this.writeNode("responseFormat", options, node);
-                this.writeNode("resultModel", options, node);                                
-                this.writeNode("responseMode", options, node);
-                return node; 
-            },
-            "responseFormat": function(options) {
-                return this.createElementNSPlus("responseFormat", 
-                    {value: options.responseFormat});
-            },
-            "procedure": function(options) {
-                return this.createElementNSPlus("procedure", 
-                    {value: options.procedure});
-            },
-            "offering": function(options) {
-                return this.createElementNSPlus("offering", {value: 
-                    options.offering});
-            },
-            "observedProperty": function(options) {
-                return this.createElementNSPlus("observedProperty", 
-                    {value: options.observedProperty});
-            },
-            "eventTime": function(options) {
-                var node = this.createElementNSPlus("eventTime");
-                if (options.eventTime === 'latest') {
-                    this.writeNode("ogc:TM_Equals", options, node);
-                }
-                return node;
-            },
-            "resultModel": function(options) {
-                return this.createElementNSPlus("resultModel", {value: 
-                    options.resultModel});
-            },
-            "responseMode": function(options) {
-                return this.createElementNSPlus("responseMode", {value: 
-                    options.responseMode});
-            }
-        },
-        "ogc": {
-            "TM_Equals": function(options) {
-                var node = this.createElementNSPlus("ogc:TM_Equals");
-                this.writeNode("ogc:PropertyName", {property: 
-                    "urn:ogc:data:time:iso8601"}, node);
-                if (options.eventTime === 'latest') {
-                    this.writeNode("gml:TimeInstant", {value: 'latest'}, node);
-                }
-                return node;
-            },
-            "PropertyName": function(options) {
-                return this.createElementNSPlus("ogc:PropertyName", 
-                    {value: options.property});
-            }
-        },
-        "gml": {
-            "TimeInstant": function(options) {
-                var node = this.createElementNSPlus("gml:TimeInstant");
-                this.writeNode("gml:timePosition", options, node);
-                return node;
-            },
-            "timePosition": function(options) {
-                var node = this.createElementNSPlus("gml:timePosition", 
-                    {value: options.value});
-                return node;
-            }
-        }
-    },
-    
-    CLASS_NAME: "OpenLayers.Format.SOSGetObservation" 
-
-});
+        node.setAttribute("xmlns:ogc", this.namespaces.ogc);
+        this.setAttributeNS(
+            node, this.namespaces.xsi,
+            "xsi:schemaLocation", this.schemaLocation
+        );
+        return OpenLayers.Format.XML.prototype.write.apply(this, [node]);
+    }, 
+
+    /**
+     * Property: readers
+     * Contains public functions, grouped by namespace prefix, that will
+     *     be applied when a namespaced node is found matching the function
+     *     name.  The function will be applied in the scope of this parser
+     *     with two arguments: the node being read and a context object passed
+     *     from the parent.
+     */
+    readers: {
+        "om": {
+            "ObservationCollection": function(node, obj) {
+                obj.id = this.getAttributeNS(node, this.namespaces.gml, "id");
+                this.readChildNodes(node, obj);
+            },
+            "member": function(node, observationCollection) {
+                this.readChildNodes(node, observationCollection);
+            },
+            "Measurement": function(node, observationCollection) {
+                var measurement = {};
+                observationCollection.measurements.push(measurement);
+                this.readChildNodes(node, measurement);
+            },
+            "Observation": function(node, observationCollection) {
+                var observation = {};
+                observationCollection.observations.push(observation);
+                this.readChildNodes(node, observation);
+            },
+            "samplingTime": function(node, measurement) {
+                var samplingTime = {};
+                measurement.samplingTime = samplingTime;
+                this.readChildNodes(node, samplingTime);
+            },
+            "observedProperty": function(node, measurement) {
+                measurement.observedProperty = 
+                    this.getAttributeNS(node, this.namespaces.xlink, "href");
+                this.readChildNodes(node, measurement);
+            },
+            "procedure": function(node, measurement) {
+                measurement.procedure = 
+                    this.getAttributeNS(node, this.namespaces.xlink, "href");
+                this.readChildNodes(node, measurement);
+            },
+            "featureOfInterest": function(node, observation) {
+                var foi = {features: []};
+                observation.fois = [];
+                observation.fois.push(foi);
+                this.readChildNodes(node, foi);
+                // postprocessing to get actual features
+                var features = [];
+                for (var i=0, len=foi.features.length; i<len; i++) {
+                    var feature = foi.features[i];
+                    features.push(new OpenLayers.Feature.Vector(
+                        feature.components[0], feature.attributes));
+                }
+                foi.features = features;
+            },
+            "result": function(node, measurement) {
+                var result = {};
+                measurement.result = result;
+                if (this.getChildValue(node) !== '') {
+                    result.value = this.getChildValue(node);
+                    result.uom = node.getAttribute("uom");
+                } else {
+                    this.readChildNodes(node, result);
+                }
+            }
+        },
+        "sa": OpenLayers.Format.SOSGetFeatureOfInterest.prototype.readers.sa,
+        "gml": OpenLayers.Util.applyDefaults({
+            "TimeInstant": function(node, samplingTime) {
+               var timeInstant = {};
+                samplingTime.timeInstant = timeInstant;
+                this.readChildNodes(node, timeInstant);
+            },
+            "timePosition": function(node, timeInstant) {
+                timeInstant.timePosition = this.getChildValue(node);
+            }
+        }, OpenLayers.Format.SOSGetFeatureOfInterest.prototype.readers.gml)
+    },
+
+    /**
+     * Property: writers
+     * As a compliment to the readers property, this structure contains public
+     *     writing functions grouped by namespace alias and named like the
+     *     node names they produce.
+     */
+    writers: {
+        "sos": {
+            "GetObservation": function(options) {
+                var node = this.createElementNSPlus("GetObservation", {
+                    attributes: {
+                        version: this.VERSION,
+                        service: 'SOS'
+                    } 
+                }); 
+                this.writeNode("offering", options, node);
+                if (options.eventTime) {
+                    this.writeNode("eventTime", options, node);
+                }
+                for (var procedure in options.procedures) {
+                    this.writeNode("procedure", options.procedures[procedure], node);
+                }
+                for (var observedProperty in options.observedProperties) {
+                    this.writeNode("observedProperty", options.observedProperties[observedProperty], node);
+                }
+                if (options.foi) {
+                    this.writeNode("featureOfInterest", options.foi, node);
+                }
+                this.writeNode("responseFormat", options, node);
+                if (options.resultModel) {
+                    this.writeNode("resultModel", options, node);
+                }
+                if (options.responseMode) {
+                    this.writeNode("responseMode", options, node);
+                }
+                return node; 
+            },
+            "featureOfInterest": function(foi) {
+                var node = this.createElementNSPlus("featureOfInterest");
+                this.writeNode("ObjectID", foi.objectId, node);
+                return node;
+            },
+            "ObjectID": function(options) {
+                return this.createElementNSPlus("ObjectID",
+                    {value: options});
+            },
+            "responseFormat": function(options) {
+                return this.createElementNSPlus("responseFormat", 
+                    {value: options.responseFormat});
+            },
+            "procedure": function(procedure) {
+                return this.createElementNSPlus("procedure", 
+                    {value: procedure});
+            },
+            "offering": function(options) {
+                return this.createElementNSPlus("offering", {value: 
+                    options.offering});
+            },
+            "observedProperty": function(observedProperty) {
+                return this.createElementNSPlus("observedProperty", 
+                    {value: observedProperty});
+            },
+            "eventTime": function(options) {
+                var node = this.createElementNSPlus("eventTime");
+                if (options.eventTime === 'latest') {
+                    this.writeNode("ogc:TM_Equals", options, node);
+                }
+                return node;
+            },
+            "resultModel": function(options) {
+                return this.createElementNSPlus("resultModel", {value: 
+                    options.resultModel});
+            },
+            "responseMode": function(options) {
+                return this.createElementNSPlus("responseMode", {value: 
+                    options.responseMode});
+            }
+        },
+        "ogc": {
+            "TM_Equals": function(options) {
+                var node = this.createElementNSPlus("ogc:TM_Equals");
+                this.writeNode("ogc:PropertyName", {property: 
+                    "urn:ogc:data:time:iso8601"}, node);
+                if (options.eventTime === 'latest') {
+                    this.writeNode("gml:TimeInstant", {value: 'latest'}, node);
+                }
+                return node;
+            },
+            "PropertyName": function(options) {
+                return this.createElementNSPlus("ogc:PropertyName", 
+                    {value: options.property});
+            }
+        },
+        "gml": {
+            "TimeInstant": function(options) {
+                var node = this.createElementNSPlus("gml:TimeInstant");
+                this.writeNode("gml:timePosition", options, node);
+                return node;
+            },
+            "timePosition": function(options) {
+                var node = this.createElementNSPlus("gml:timePosition", 
+                    {value: options.value});
+                return node;
+            }
+        }
+    },
+    
+    CLASS_NAME: "OpenLayers.Format.SOSGetObservation" 
+
+});

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/Text.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/Text.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/Text.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WFS.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WFS.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WFS.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -6,6 +6,7 @@
 /**
  * @requires OpenLayers/Format/GML.js
  * @requires OpenLayers/Console.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSCapabilities/v1.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSCapabilities/v1.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSCapabilities/v1.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSCapabilities.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSCapabilities.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSCapabilities.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSDescribeFeatureType.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSDescribeFeatureType.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WFSDescribeFeatureType.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WFST/v1.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WFST/v1.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WFST/v1.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -182,7 +182,7 @@
         if(value) {
             this.setAttributeNS(
                 node, this.namespaces["xsi"], "xsi:schemaLocation",  value
-            )
+            );
         }
         return OpenLayers.Format.XML.prototype.write.apply(this, [node]);
     },
@@ -253,8 +253,9 @@
                 
                 // add in geometry
                 if (this.geometryName !== null) {
+                    this.srsName = this.getSrsName(feature);
                     this.writeNode(
-                        "Property", {name: this.geometryName, value: feature}, node
+                        "Property", {name: this.geometryName, value: feature.geometry}, node
                     );
                 }
         
@@ -287,10 +288,9 @@
             },
             "Value": function(obj) {
                 var node;
-                if(obj instanceof OpenLayers.Feature.Vector) {
+                if(obj instanceof OpenLayers.Geometry) {
                     node = this.createElementNSPlus("wfs:Value");
-                    this.srsName = this.getSrsName(obj);
-                    var geom = this.writeNode("feature:_geometry", obj.geometry).firstChild;
+                    var geom = this.writeNode("feature:_geometry", obj).firstChild;
                     node.appendChild(geom);
                 } else {
                     node = this.createElementNSPlus("wfs:Value", {value: obj});                

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WFST/v1_0_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WFST/v1_0_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WFST/v1_0_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WFST/v1_1_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WFST/v1_1_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WFST/v1_1_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WFST.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WFST.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WFST.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WKT.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WKT.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WKT.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -95,7 +95,7 @@
      */
     write: function(features) {
         var collection, geometry, type, data, isCollection;
-        if(features.constructor == Array) {
+        if (features.constructor == Array) {
             collection = features;
             isCollection = true;
         } else {
@@ -103,31 +103,45 @@
             isCollection = false;
         }
         var pieces = [];
-        if(isCollection) {
+        if (isCollection) {
             pieces.push('GEOMETRYCOLLECTION(');
         }
-        for(var i=0, len=collection.length; i<len; ++i) {
-            if(isCollection && i>0) {
+        for (var i=0, len=collection.length; i<len; ++i) {
+            if (isCollection && i>0) {
                 pieces.push(',');
             }
             geometry = collection[i].geometry;
-            type = geometry.CLASS_NAME.split('.')[2].toLowerCase();
-            if(!this.extract[type]) {
-                return null;
-            }
-            if (this.internalProjection && this.externalProjection) {
-                geometry = geometry.clone();
-                geometry.transform(this.internalProjection, 
-                                   this.externalProjection);
-            }                       
-            data = this.extract[type].apply(this, [geometry]);
-            pieces.push(type.toUpperCase() + '(' + data + ')');
+            pieces.push(this.extractGeometry(geometry));
         }
-        if(isCollection) {
+        if (isCollection) {
             pieces.push(')');
         }
         return pieces.join('');
     },
+
+    /**
+     * Method: extractGeometry
+     * Entry point to construct the WKT for a single Geometry object.
+     *
+     * Parameters:
+     * geometry - {<OpenLayers.Geometry.Geometry>}
+     *
+     * Returns:
+     * {String} A WKT string of representing the geometry
+     */
+    extractGeometry: function(geometry) {
+        var type = geometry.CLASS_NAME.split('.')[2].toLowerCase();
+        if (!this.extract[type]) {
+            return null;
+        }
+        if (this.internalProjection && this.externalProjection) {
+            geometry = geometry.clone();
+            geometry.transform(this.internalProjection, this.externalProjection);
+        }                       
+        var wktType = type == 'collection' ? 'GEOMETRYCOLLECTION' : type.toUpperCase();
+        var data = wktType + '(' + this.extract[type].apply(this, [geometry]) + ')';
+        return data;
+    },
     
     /**
      * Object with properties corresponding to the geometry types.
@@ -207,7 +221,7 @@
         /**
          * Return an array of polygon arrays from a multipolygon.
          * @param {<OpenLayers.Geometry.MultiPolygon>} multipolygon
-         * @returns {Array} An array of polygon arrays representing
+         * @returns {String} An array of polygon arrays representing
          *                  the multipolygon
          */
         'multipolygon': function(multipolygon) {
@@ -218,6 +232,19 @@
                            ')');
             }
             return array.join(',');
+        },
+
+        /**
+         * Return the WKT portion between 'GEOMETRYCOLLECTION(' and ')' for an <OpenLayers.Geometry.Collection>
+         * @param {<OpenLayers.Geometry.Collection>} collection
+         * @returns {String} internal WKT representation of the collection
+         */
+        'collection': function(collection) {
+            var array = [];
+            for(var i=0, len=collection.components.length; i<len; ++i) {
+                array.push(this.extractGeometry.apply(this, [collection.components[i]]));
+            }
+            return array.join(',');
         }
 
     },

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WMC/v1.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WMC/v1.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WMC/v1.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WMC/v1_0_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WMC/v1_0_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WMC/v1_0_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WMC/v1_1_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WMC/v1_1_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WMC/v1_1_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WMC.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WMC.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WMC.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_1.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_1.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_1.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_1_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_1_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_1_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_1_1.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_1_1.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_1_1.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Copied: sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js (from rev 11416, trunk/openlayers/lib/OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js)
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js	                        (rev 0)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,90 @@
+/* Copyright (c) 2006-2011 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/Format/WMSCapabilities/v1_1_1.js
+ */
+
+/**
+ * Class: OpenLayers.Format.WMSCapabilities/v1_1_1_WMSC
+ * Read WMS-C Capabilities version 1.1.1.
+ * 
+ * Inherits from:
+ *  - <OpenLayers.Format.WMSCapabilities.v1_1_1>
+ */
+OpenLayers.Format.WMSCapabilities.v1_1_1_WMSC = OpenLayers.Class(
+    OpenLayers.Format.WMSCapabilities.v1_1_1, {
+    
+    /**
+     * Property: version
+     * {String} The specific parser version.
+     */
+    version: "1.1.1",
+    
+    /**
+     * Property: profile
+     * {String} The specific profile
+     */
+    profile: "WMSC",
+    
+    /**
+     * Constructor: OpenLayers.Format.WMSCapabilities.v1_1_1
+     * Create a new parser for WMS-C capabilities version 1.1.1.
+     *
+     * Parameters:
+     * options - {Object} An optional object whose properties will be set on
+     *     this instance.
+     */
+    initialize: function(options) {
+        OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.initialize.apply(
+            this, [options]
+        );
+    },
+
+    /**
+     * Property: readers
+     * Contains public functions, grouped by namespace prefix, that will
+     *     be applied when a namespaced node is found matching the function
+     *     name.  The function will be applied in the scope of this parser
+     *     with two arguments: the node being read and a context object passed
+     *     from the parent.
+     */
+    readers: {
+        "wms": OpenLayers.Util.applyDefaults({
+            "VendorSpecificCapabilities": function(node, obj) {
+                obj.vendorSpecific = {tileSets: []};
+                this.readChildNodes(node, obj.vendorSpecific);
+            },
+            "TileSet": function(node, vendorSpecific) {
+                var tileset = {srs: {}, bbox: {}, resolutions: []};
+                this.readChildNodes(node, tileset);
+                vendorSpecific.tileSets.push(tileset);
+            },
+            "Resolutions": function(node, tileset) {
+                var res = this.getChildValue(node).split(" ");
+                for (var i=0, len=res.length; i<len; i++) {
+                    if (res[i] != "") {
+                        tileset.resolutions.push(parseFloat(res[i]));
+                    }
+                }
+            },
+            "Width": function(node, tileset) {
+                tileset.width = parseInt(this.getChildValue(node));
+            },
+            "Height": function(node, tileset) {
+                tileset.height = parseInt(this.getChildValue(node));
+            },
+            "Layers": function(node, tileset) {
+                tileset.layers = this.getChildValue(node);
+            },
+            "Styles": function(node, tileset) {
+                tileset.styles = this.getChildValue(node);
+            }
+        }, OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.readers["wms"])
+    },
+
+    CLASS_NAME: "OpenLayers.Format.WMSCapabilities.v1_1_1_WMSC" 
+
+});

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_3.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_3.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_3.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,8 +1,8 @@
-/* Copyright (c) 2006-2010 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. */
-
+/* Copyright (c) 2006-2011 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/Format/WMSCapabilities/v1.js
  */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_3_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_3_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities/v1_3_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,8 +1,8 @@
-/* Copyright (c) 2006-2010 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. */
-
+/* Copyright (c) 2006-2011 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/Format/WMSCapabilities/v1_3.js
  */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSCapabilities.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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,6 +29,15 @@
     version: null,
     
     /**
+     * APIProperty: profile
+     * {String} If provided, use a custom profile.
+     *
+     * Currently supported profiles:
+     * - WMSC - parses vendor specific capabilities for WMS-C.
+     */
+    profile: null,
+    
+    /**
      * Property: parser
      * {<OpenLayers.Format>} A cached versioned format used for reading.
      */
@@ -63,12 +72,14 @@
         }
         var root = data.documentElement;
         var version = this.version || root.getAttribute("version") || this.defaultVersion;
+        var profile = this.profile ? "_" + this.profile : "";
         if(!this.parser || this.parser.version !== version) {
             var constr = OpenLayers.Format.WMSCapabilities[
-                "v" + version.replace(/\./g, "_")
+                "v" + version.replace(/\./g, "_") + profile
             ];
             if(!constr) {
-                throw "Can't find a WMS capabilities parser for version " + version;
+                throw "Can't find a WMS capabilities parser for version " +
+                    version + profile;
             }
             this.parser = new constr(this.options);
         }

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSDescribeLayer.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSDescribeLayer.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSDescribeLayer.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSGetFeatureInfo.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSGetFeatureInfo.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WMSGetFeatureInfo.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -191,7 +191,14 @@
             },
             "MatrixHeight": function(node, obj) {
                 obj.matrixHeight = parseInt(this.getChildValue(node)); 
-            },        
+            },
+            "ResourceURL": function(node, obj) {
+                obj.resourceUrl = obj.resourceUrl || {};
+                obj.resourceUrl[node.getAttribute("resourceType")] = {
+                    format: node.getAttribute("format"),
+                    template: node.getAttribute("template")
+                };
+            },
             // not used for now, can be added in the future though
             /*"Themes": function(node, obj) {
                 obj.themes = [];

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/WMTSCapabilities.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/WMTSCapabilities.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/WMTSCapabilities.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -149,7 +149,7 @@
                 OpenLayers.Util.applyDefaults(config, {
                     url: capabilities.operationsMetadata.GetTile.dcp.http.get,
                     name: layerDef.title,
-                    style: style,
+                    style: style.identifier,
                     matrixIds: matrixSet.matrixIds
                 })
             );

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format/XML.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format/XML.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format/XML.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Format.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Format.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Format.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,11 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Util.js
  * @requires OpenLayers/Console.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Collection.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Collection.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Collection.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -108,12 +108,19 @@
      */
     calculateBounds: function() {
         this.bounds = null;
-        if ( this.components && this.components.length > 0) {
-            this.setBounds(this.components[0].getBounds());
-            for (var i=1, len=this.components.length; i<len; i++) {
-                this.extendBounds(this.components[i].getBounds());
+        var bounds = new OpenLayers.Bounds();
+        var components = this.components;
+        if (components) {
+            for (var i=0, len=components.length; i<len; i++) {
+                bounds.extend(components[i].getBounds());
             }
         }
+        // to preserve old behavior, we only set bounds if non-null
+        // in the future, we could add bounds.isEmpty()
+        if (bounds.left != null && bounds.bottom != null && 
+            bounds.right != null && bounds.top != null) {
+            this.setBounds(bounds);
+        }
     },
 
     /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Curve.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Curve.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Curve.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Geometry/LineString.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Geometry/LineString.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Geometry/LineString.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -547,6 +547,98 @@
         }
         return best;
     },
+    
+    /**
+     * APIMethod: simplify
+     * This function will return a simplified LineString.
+     * Simplification is based on the Douglas-Peucker algorithm.
+     *
+     *
+     * Parameters:
+     * tolerance - {number} threshhold for simplification in map units
+     *
+     * Returns:
+     * {OpenLayers.Geometry.LineString} the simplified LineString
+     */
+    simplify: function(tolerance){
+        if (this && this !== null) {
+            var points = this.getVertices();
+            if (points.length < 3) {
+                return this;
+            }
+    
+            var compareNumbers = function(a, b){
+                return (a-b);
+            };
+    
+            /**
+             * Private function doing the Douglas-Peucker reduction
+             */
+            var douglasPeuckerReduction = function(points, firstPoint, lastPoint, tolerance){
+                var maxDistance = 0;
+                var indexFarthest = 0;
+    
+                for (var index = firstPoint, distance; index < lastPoint; index++) {
+                    distance = perpendicularDistance(points[firstPoint], points[lastPoint], points[index]);
+                    if (distance > maxDistance) {
+                        maxDistance = distance;
+                        indexFarthest = index;
+                    }
+                }
+    
+                if (maxDistance > tolerance && indexFarthest != firstPoint) {
+                    //Add the largest point that exceeds the tolerance
+                    pointIndexsToKeep.push(indexFarthest);
+                    douglasPeuckerReduction(points, firstPoint, indexFarthest, tolerance);
+                    douglasPeuckerReduction(points, indexFarthest, lastPoint, tolerance);
+                }
+            };
+    
+            /**
+             * Private function calculating the perpendicular distance
+             * TODO: check whether OpenLayers.Geometry.LineString::distanceTo() is faster or slower
+             */
+            var perpendicularDistance = function(point1, point2, point){
+                //Area = |(1/2)(x1y2 + x2y3 + x3y1 - x2y1 - x3y2 - x1y3)|   *Area of triangle
+                //Base = v((x1-x2)²+(x1-x2)²)                               *Base of Triangle*
+                //Area = .5*Base*H                                          *Solve for height
+                //Height = Area/.5/Base
+    
+                var area = Math.abs(0.5 * (point1.x * point2.y + point2.x * point.y + point.x * point1.y - point2.x * point1.y - point.x * point2.y - point1.x * point.y));
+                var bottom = Math.sqrt(Math.pow(point1.x - point2.x, 2) + Math.pow(point1.y - point2.y, 2));
+                var height = area / bottom * 2;
+    
+                return height;
+            };
+    
+            var firstPoint = 0;
+            var lastPoint = points.length - 1;
+            var pointIndexsToKeep = [];
+    
+            //Add the first and last index to the keepers
+            pointIndexsToKeep.push(firstPoint);
+            pointIndexsToKeep.push(lastPoint);
+    
+            //The first and the last point cannot be the same
+            while (points[firstPoint].equals(points[lastPoint])) {
+                lastPoint--;
+                //Addition: the first point not equal to first point in the LineString is kept as well
+                pointIndexsToKeep.push(lastPoint);
+            }
+    
+            douglasPeuckerReduction(points, firstPoint, lastPoint, tolerance);
+            var returnPoints = [];
+            pointIndexsToKeep.sort(compareNumbers);
+            for (var index = 0; index < pointIndexsToKeep.length; index++) {
+                returnPoints.push(points[pointIndexsToKeep[index]]);
+            }
+            return new OpenLayers.Geometry.LineString(returnPoints);
+    
+        }
+        else {
+            return this;
+        }
+    },
 
     CLASS_NAME: "OpenLayers.Geometry.LineString"
 });

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Geometry/LinearRing.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Geometry/LinearRing.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Geometry/LinearRing.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Geometry/MultiLineString.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Geometry/MultiLineString.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Geometry/MultiLineString.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Geometry/MultiPoint.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Geometry/MultiPoint.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Geometry/MultiPoint.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Geometry/MultiPolygon.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Geometry/MultiPolygon.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Geometry/MultiPolygon.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Point.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Point.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Point.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Polygon.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Polygon.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Polygon.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Rectangle.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Rectangle.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Rectangle.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Surface.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Surface.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Geometry/Surface.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Geometry.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Geometry.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Geometry.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Format/WKT.js
  * @requires OpenLayers/Feature/Vector.js
  */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Handler/Box.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Handler/Box.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Handler/Box.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -43,33 +43,36 @@
      *
      * Parameters:
      * control - {<OpenLayers.Control>} 
-     * callbacks - {Object} An object containing a single function to be
-     *                          called when the drag operation is finished.
-     *                          The callback should expect to recieve a single
-     *                          argument, the point geometry.
+     * callbacks - {Object} An object with a "done" property whose value is a
+     *     callback to be called when the box drag operation is finished.  
+     *     The callback should expect to recieve a single argument, the box 
+     *     bounds or a pixel. If the box dragging didn't span more than a 5 
+     *     pixel distance, a pixel will be returned instead of a bounds object.
      * options - {Object} 
      */
     initialize: function(control, callbacks, options) {
         OpenLayers.Handler.prototype.initialize.apply(this, arguments);
-        var callbacks = {
-            "down": this.startBox, 
-            "move": this.moveBox, 
-            "out":  this.removeBox,
-            "up":   this.endBox
-        };
         this.dragHandler = new OpenLayers.Handler.Drag(
-                                this, callbacks, {keyMask: this.keyMask});
+            this, 
+            {
+                down: this.startBox, 
+                move: this.moveBox, 
+                out: this.removeBox,
+                up: this.endBox
+            }, 
+            {keyMask: this.keyMask}
+        );
     },
 
     /**
      * Method: destroy
      */
     destroy: function() {
+        OpenLayers.Handler.prototype.destroy.apply(this, arguments);
         if (this.dragHandler) {
             this.dragHandler.destroy();
             this.dragHandler = null;
         }            
-        OpenLayers.Handler.prototype.destroy.apply(this, arguments);
     },
 
     /**
@@ -90,7 +93,7 @@
     */
     startBox: function (xy) {
         this.zoomBox = OpenLayers.Util.createDiv('zoomBox',
-                                                 this.dragHandler.start);
+             new OpenLayers.Pixel(-9999, -9999));
         this.zoomBox.className = this.boxDivClassName;                                         
         this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
         this.map.viewPortDiv.appendChild(this.zoomBox);
@@ -206,7 +209,7 @@
                 "border-top-width")) + parseInt(OpenLayers.Element.getStyle(
                 this.zoomBox, "border-bottom-width")) + 1;
             // all browsers use the new box model, except IE in quirks mode
-            var newBoxModel = OpenLayers.Util.getBrowserName() == "msie" ?
+            var newBoxModel = OpenLayers.BROWSER_NAME == "msie" ?
                 document.compatMode != "BackCompat" : true;
             this.boxCharacteristics = {
                 xOffset: xOffset,

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Handler/Click.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Handler/Click.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Handler/Click.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -22,7 +22,6 @@
  *  - <OpenLayers.Handler> 
  */
 OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
-
     /**
      * APIProperty: delay
      * {Number} Number of milliseconds between clicks before the event is
@@ -89,8 +88,21 @@
      * {<OpenLayers.Pixel>} The pixel location of the last mousedown.
      */
     down: null,
-    
+
+    /** 
+     * Property: last
+     * {<OpenLayers.Pixel>} The pixel for the last touchmove. This is
+     * used to 
+     */
+    last: null,
+
     /**
+     * Property: touch
+     * {Boolean} Are we on a touch enabled device? Default is false.
+     */
+    touch: false,
+
+    /**
      * Property: rightclickTimerId
      * {Number} The id of the right mouse timeout waiting to clear the 
      *     <delayedEvent>.
@@ -118,7 +130,7 @@
         // optionally register for mouseup and mousedown
         if(this.pixelTolerance != null) {
             this.mousedown = function(evt) {
-                this.down = evt.xy;
+                this.down = evt;
                 return true;
             };
         }
@@ -135,22 +147,36 @@
     mousedown: null,
 
     /**
+     * Method: touchstart
+     * Handle touchstart.
+     *
+     * Returns:
+     * {Boolean} Continue propagating this event.
+     */
+    touchstart: function(evt) {
+        this.touch = true;
+        this.down = evt;
+        this.last = null;
+        return true;
+    },
+
+    /**
      * Method: mouseup
      * Handle mouseup.  Installed to support collection of right mouse events.
      * 
      * Returns:
      * {Boolean} Continue propagating this event.
      */
-    mouseup:  function (evt) {
+    mouseup: function (evt) {
         var propagate = true;
 
         // Collect right mouse clicks from the mouseup
         //  IE - ignores the second right click in mousedown so using
         //  mouseup instead
-        if (this.checkModifiers(evt) && 
-            this.control.handleRightClicks && 
-            OpenLayers.Event.isRightClick(evt)) {
-          propagate = this.rightclick(evt);
+        if(this.checkModifiers(evt) &&
+           this.control.handleRightClicks &&
+           OpenLayers.Event.isRightClick(evt)) {
+            propagate = this.rightclick(evt);
         }
 
         return propagate;
@@ -216,7 +242,10 @@
      * {Boolean} Continue propagating this event.
      */
     dblclick: function(evt) {
-        if(this.passesTolerance(evt)) {
+        // for touch devices trigger dblclick only for
+        // "one finger" touch
+        if(this.passesTolerance(evt) &&
+           (!evt.lastTouches || evt.lastTouches.length == 1)) {
             if(this["double"]) {
                 this.callback('dblclick', [evt]);
             }
@@ -226,6 +255,30 @@
     },
     
     /**
+     * Method: touchmove
+     *    Store position of last move, because touchend event can have
+     *    an empty "touches" property.
+     */
+    touchmove: function(evt) {
+        this.last = evt;
+    },
+
+    /**
+     * Method: touchend
+     *   Correctly set event xy property, and add lastTouches to have
+     *   touches property from last touchstart or touchmove
+     */
+    touchend: function(evt) {
+        var last = this.last || this.down;
+        if (!evt || !last) {
+            return false;
+        }
+        evt.xy = last.xy;
+        evt.lastTouches = last.touches;
+        return evt.xy ? this.click(evt) : false;
+    },
+
+    /**
      * Method: click
      * Handle click.
      *
@@ -233,10 +286,19 @@
      * {Boolean} Continue propagating this event.
      */
     click: function(evt) {
+        // Sencha Touch emulates click events, see ticket 3079 for more info
+        if (this.touch === true && evt.type === "click") {
+            return !this.stopSingle;
+        }
         if(this.passesTolerance(evt)) {
             if(this.timerId != null) {
                 // already received a click
-                this.clearTimer();
+                if(evt.lastTouches) {
+                    // touch device - we may trigger dblclick
+                    this.dblclick(evt);
+                } else {
+                    this.clearTimer();
+                }
             } else {
                 // set the timer, send evt only if single is true
                 //use a clone of the event object because it will no longer 
@@ -246,7 +308,7 @@
                 this.timerId = window.setTimeout(
                     OpenLayers.Function.bind(this.delayedCall, this, clickEvent),
                     this.delay
-                );
+               );
             }
         }
         return !this.stopSingle;
@@ -265,10 +327,10 @@
      */
     passesTolerance: function(evt) {
         var passes = true;
-        if(this.pixelTolerance != null && this.down) {
+        if(this.pixelTolerance != null && this.down && this.down.xy) {
             var dpx = Math.sqrt(
-                Math.pow(this.down.x - evt.xy.x, 2) +
-                Math.pow(this.down.y - evt.xy.y, 2)
+                Math.pow(this.down.xy.x - evt.xy.x, 2) +
+                Math.pow(this.down.xy.y - evt.xy.y, 2)
             );
             if(dpx > this.pixelTolerance) {
                 passes = false;
@@ -316,6 +378,7 @@
         if(OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
             this.clearTimer();
             this.down = null;
+            this.last = null;
             deactivated = true;
         }
         return deactivated;

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Handler/Drag.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Handler/Drag.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Handler/Drag.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -32,11 +32,11 @@
   
     /** 
      * Property: started
-     * {Boolean} When a mousedown event is received, we want to record it, but
-     *     not set 'dragging' until the mouse moves after starting. 
+     * {Boolean} When a mousedown or touchstart event is received, we want to
+     * record it, but not set 'dragging' until the mouse moves after starting.
      */
     started: false,
-    
+
     /**
      * Property: stopDown
      * {Boolean} Stop propagation of mousedown events from getting to listeners
@@ -94,8 +94,7 @@
     
     /**
      * Property: documentEvents
-     * {<OpenLayers.Events>} Event instance for observing document events. Will
-     *     be set on mouseout if documentDrag is set to true.
+     * {Boolean} Are we currently observing document events?
      */
     documentEvents: null,
 
@@ -117,13 +116,141 @@
      */
     initialize: function(control, callbacks, options) {
         OpenLayers.Handler.prototype.initialize.apply(this, arguments);
+        
+        if (this.documentDrag === true) {
+            var me = this;
+            this._docMove = function(evt) {
+                me.mousemove({
+                    xy: {x: evt.clientX, y: evt.clientY},
+                    element: document
+                });
+            };
+            this._docUp = function(evt) {
+                me.mouseup({xy: {x: evt.clientX, y: evt.clientY}});
+            };
+        }
     },
     
     /**
+     * Method: dragstart
+     * This private method is factorized from mousedown and touchstart methods
+     *
+     * Parameters:
+     * evt - {Event} The event
+     *
+     * Returns:
+     * {Boolean} Let the event propagate.
+     */
+    dragstart: function (evt) {
+        var propagate = true;
+        this.dragging = false;
+        if (this.checkModifiers(evt) &&
+               (OpenLayers.Event.isLeftClick(evt) ||
+                OpenLayers.Event.isSingleTouch(evt))) {
+            this.started = true;
+            this.start = evt.xy;
+            this.last = evt.xy;
+            OpenLayers.Element.addClass(
+                this.map.viewPortDiv, "olDragDown"
+            );
+            this.down(evt);
+            this.callback("down", [evt.xy]);
+
+            OpenLayers.Event.stop(evt);
+
+            if(!this.oldOnselectstart) {
+                this.oldOnselectstart = document.onselectstart ?
+                    document.onselectstart : OpenLayers.Function.True;
+            }
+            document.onselectstart = OpenLayers.Function.False;
+
+            propagate = !this.stopDown;
+        } else {
+            this.started = false;
+            this.start = null;
+            this.last = null;
+        }
+        return propagate;
+    },
+
+    /**
+     * Method: dragmove
+     * This private method is factorized from mousemove and touchmove methods
+     *
+     * Parameters:
+     * evt - {Event} The event
+     *
+     * Returns:
+     * {Boolean} Let the event propagate.
+     */
+    dragmove: function (evt) {
+        if (this.started && !this.timeoutId && (evt.xy.x != this.last.x ||
+                                                evt.xy.y != this.last.y)) {
+            if(this.documentDrag === true && this.documentEvents) {
+                if(evt.element === document) {
+                    this.adjustXY(evt);
+                    // do setEvent manually because the documentEvents are not
+                    // registered with the map
+                    this.setEvent(evt);
+                } else {
+                    this.removeDocumentEvents();
+                }
+            }
+            if (this.interval > 0) {
+                this.timeoutId = setTimeout(
+                    OpenLayers.Function.bind(this.removeTimeout, this),
+                    this.interval);
+            }
+            this.dragging = true;
+
+            this.move(evt);
+            this.callback("move", [evt.xy]);
+            if(!this.oldOnselectstart) {
+                this.oldOnselectstart = document.onselectstart;
+                document.onselectstart = OpenLayers.Function.False;
+            }
+            this.last = this.evt.xy;
+        }
+        return true;
+    },
+
+    /**
+     * Method: dragend
+     * This private method is factorized from mouseup and touchend methods
+     *
+     * Parameters:
+     * evt - {Event} The event
+     *
+     * Returns:
+     * {Boolean} Let the event propagate.
+     */
+    dragend: function (evt) {
+        if (this.started) {
+            if(this.documentDrag === true && this.documentEvents) {
+                this.adjustXY(evt);
+                this.removeDocumentEvents();
+            }
+            var dragged = (this.start != this.last);
+            this.started = false;
+            this.dragging = false;
+            OpenLayers.Element.removeClass(
+                this.map.viewPortDiv, "olDragDown"
+            );
+            this.up(evt);
+            this.callback("up", [evt.xy]);
+            if(dragged) {
+                this.callback("done", [evt.xy]);
+            }
+            document.onselectstart = this.oldOnselectstart;
+        }
+        return true;
+    },
+
+    /**
      * The four methods below (down, move, up, and out) are used by subclasses
      *     to do their own processing related to these mouse events.
      */
-    
+
     /**
      * Method: down
      * This method is called during the handling of the mouse down event.
@@ -134,7 +261,7 @@
      */
     down: function(evt) {
     },
-    
+
     /**
      * Method: move
      * This method is called during the handling of the mouse move event.
@@ -180,77 +307,58 @@
      * Handle mousedown events
      *
      * Parameters:
-     * evt - {Event} 
+     * evt - {Event}
      *
      * Returns:
      * {Boolean} Let the event propagate.
      */
-    mousedown: function (evt) {
-        var propagate = true;
-        this.dragging = false;
-        if (this.checkModifiers(evt) && OpenLayers.Event.isLeftClick(evt)) {
-            this.started = true;
-            this.start = evt.xy;
-            this.last = evt.xy;
-            OpenLayers.Element.addClass(
-                this.map.viewPortDiv, "olDragDown"
-            );
-            this.down(evt);
-            this.callback("down", [evt.xy]);
-            OpenLayers.Event.stop(evt);
-            
-            if(!this.oldOnselectstart) {
-                this.oldOnselectstart = (document.onselectstart) ? document.onselectstart : OpenLayers.Function.True;
-            }
-            document.onselectstart = OpenLayers.Function.False;
-            
-            propagate = !this.stopDown;
-        } else {
-            this.started = false;
-            this.start = null;
-            this.last = null;
-        }
-        return propagate;
+    mousedown: function(evt) {
+        return this.dragstart(evt);
     },
 
     /**
+     * Method: touchstart
+     * Handle touchstart events
+     *
+     * Parameters:
+     * evt - {Event}
+     *
+     * Returns:
+     * {Boolean} Let the event propagate.
+     */
+    touchstart: function(evt) {
+        return this.dragstart(evt);
+    },
+
+    /**
      * Method: mousemove
      * Handle mousemove events
      *
      * Parameters:
-     * evt - {Event} 
+     * evt - {Event}
      *
      * Returns:
      * {Boolean} Let the event propagate.
      */
-    mousemove: function (evt) {
-        if (this.started && !this.timeoutId && (evt.xy.x != this.last.x || evt.xy.y != this.last.y)) {
-            if(this.documentDrag === true && this.documentEvents) {
-                if(evt.element === document) {
-                    this.adjustXY(evt);
-                    // do setEvent manually because the documentEvents are not
-                    // registered with the map
-                    this.setEvent(evt);
-                } else {
-                    this.destroyDocumentEvents();
-                }
-            }
-            if (this.interval > 0) {
-                this.timeoutId = setTimeout(OpenLayers.Function.bind(this.removeTimeout, this), this.interval);
-            }
-            this.dragging = true;
-            this.move(evt);
-            this.callback("move", [evt.xy]);
-            if(!this.oldOnselectstart) {
-                this.oldOnselectstart = document.onselectstart;
-                document.onselectstart = OpenLayers.Function.False;
-            }
-            this.last = this.evt.xy;
-        }
-        return true;
+    mousemove: function(evt) {
+        return this.dragmove(evt);
     },
-    
+
     /**
+     * Method: touchmove
+     * Handle touchmove events
+     *
+     * Parameters:
+     * evt - {Event}
+     *
+     * Returns:
+     * {Boolean} Let the event propagate.
+     */
+    touchmove: function(evt) {
+        return this.dragmove(evt);
+    },
+
+    /**
      * Method: removeTimeout
      * Private. Called by mousemove() to remove the drag timeout.
      */
@@ -263,55 +371,46 @@
      * Handle mouseup events
      *
      * Parameters:
-     * evt - {Event} 
+     * evt - {Event}
      *
      * Returns:
      * {Boolean} Let the event propagate.
      */
-    mouseup: function (evt) {
-        if (this.started) {
-            if(this.documentDrag === true && this.documentEvents) {
-                this.adjustXY(evt);
-                this.destroyDocumentEvents();
-            }
-            var dragged = (this.start != this.last);
-            this.started = false;
-            this.dragging = false;
-            OpenLayers.Element.removeClass(
-                this.map.viewPortDiv, "olDragDown"
-            );
-            this.up(evt);
-            this.callback("up", [evt.xy]);
-            if(dragged) {
-                this.callback("done", [evt.xy]);
-            }
-            document.onselectstart = this.oldOnselectstart;
-        }
-        return true;
+    mouseup: function(evt) {
+        return this.dragend(evt);
     },
 
     /**
+     * Method: touchend
+     * Handle touchend events
+     *
+     * Parameters:
+     * evt - {Event}
+     *
+     * Returns:
+     * {Boolean} Let the event propagate.
+     */
+    touchend: function(evt) {
+        // override evt.xy with last position since touchend does not have
+        // any touch position
+        evt.xy = this.last;
+        return this.dragend(evt);
+    },
+
+    /**
      * Method: mouseout
      * Handle mouseout events
      *
      * Parameters:
-     * evt - {Event} 
+     * evt - {Event}
      *
      * Returns:
      * {Boolean} Let the event propagate.
      */
     mouseout: function (evt) {
-        if (this.started && OpenLayers.Util.mouseLeft(evt, this.map.div)) {
+        if (this.started && OpenLayers.Util.mouseLeft(evt, this.map.viewPortDiv)) {
             if(this.documentDrag === true) {
-                this.documentEvents = new OpenLayers.Events(this, document,
-                                            null, null, {includeXY: true});
-                this.documentEvents.on({
-                    mousemove: this.mousemove,
-                    mouseup: this.mouseup
-                });
-                OpenLayers.Element.addClass(
-                    document.body, "olDragDown"
-                );
+                this.addDocumentEvents();
             } else {
                 var dragged = (this.start != this.last);
                 this.started = false; 
@@ -397,24 +496,34 @@
      * evt - {Object}
      */
     adjustXY: function(evt) {
-        var pos = OpenLayers.Util.pagePosition(this.map.div);
+        var pos = OpenLayers.Util.pagePosition(this.map.viewPortDiv);
         evt.xy.x -= pos[0];
         evt.xy.y -= pos[1];
     },
     
     /**
-     * Method: destroyDocumentEvents
-     * Destroys the events instance that gets added to the document body when
-     * documentDrag is true and the mouse cursor leaves the map viewport while
-     * dragging.
+     * Method: addDocumentEvents
+     * Start observing document events when documentDrag is true and the mouse
+     * cursor leaves the map viewport while dragging.
      */
-    destroyDocumentEvents: function() {
-        OpenLayers.Element.removeClass(
-            document.body, "olDragDown"
-        );
-        this.documentEvents.destroy();
-        this.documentEvents = null;
+    addDocumentEvents: function() {
+        OpenLayers.Element.addClass(document.body, "olDragDown");
+        this.documentEvents = true;
+        OpenLayers.Event.observe(document, "mousemove", this._docMove);
+        OpenLayers.Event.observe(document, "mouseup", this._docUp);
     },
+    
+    /**
+     * Method: removeDocumentEvents
+     * Stops observing document events when documentDrag is true and the mouse
+     * cursor re-enters the map viewport while dragging.
+     */
+    removeDocumentEvents: function() {
+        OpenLayers.Element.removeClass(document.body, "olDragDown");
+        this.documentEvents = false;
+        OpenLayers.Event.stopObserving(document, "mousemove", this._docMove);
+        OpenLayers.Event.stopObserving(document, "mouseup", this._docUp);
+    },
 
     CLASS_NAME: "OpenLayers.Handler.Drag"
 });

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Handler/Feature.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Handler/Feature.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Handler/Feature.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Handler/Hover.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Handler/Hover.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Handler/Hover.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Handler/Keyboard.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Handler/Keyboard.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Handler/Keyboard.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Handler/MouseWheel.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Handler/MouseWheel.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Handler/MouseWheel.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Handler/Path.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Handler/Path.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Handler/Path.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -79,6 +79,9 @@
      *     feature.
      */
     createFeature: function(pixel) {
+        if(!pixel) {
+            pixel = new OpenLayers.Pixel(-50, -50);
+        }
         var lonlat = this.control.map.getLonLatFromPixel(pixel);
         this.point = new OpenLayers.Feature.Vector(
             new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat)
@@ -101,6 +104,17 @@
     },
 
     /**
+     * Method: destroyPersistedFeature
+     * Destroy the persisted feature.
+     */
+    destroyPersistedFeature: function() {
+        var layer = this.layer;
+        if(layer && layer.features.length > 2) {
+            this.layer.features[0].destroy();
+        }
+    },
+
+    /**
      * Method: removePoint
      * Destroy the temporary point.
      */
@@ -151,12 +165,13 @@
      * Parameters:
      * pixel - {<OpenLayers.Pixel>} The updated pixel location for the latest
      *     point.
+     * drawing - {Boolean} Indicate if we're currently drawing.
      */
-    modifyFeature: function(pixel) {
+    modifyFeature: function(pixel, drawing) {
         var lonlat = this.control.map.getLonLatFromPixel(pixel);
         this.point.geometry.x = lonlat.lon;
         this.point.geometry.y = lonlat.lat;
-        this.callback("modify", [this.point.geometry, this.getSketch()]);
+        this.callback("modify", [this.point.geometry, this.getSketch(), drawing]);
         this.point.geometry.clearBounds();
         this.drawFeature();
     },
@@ -209,22 +224,17 @@
      * {Boolean} Allow event propagation
      */
     mousedown: function(evt) {
-        // ignore double-clicks
-        if (this.lastDown && this.lastDown.equals(evt.xy)) {
-            return false;
+        var stopDown = this.stopDown;
+        if(this.freehandMode(evt)) {
+            stopDown = true;
         }
-        if(this.lastDown == null) {
-            if(this.persist) {
-                this.destroyFeature();
-            }
-            this.createFeature(evt.xy);
-        } else if((this.lastUp == null) || !this.lastUp.equals(evt.xy)) {
-            this.addPoint(evt.xy);
+        if(!this.lastDown || !this.lastDown.equals(evt.xy)) {
+            this.modifyFeature(evt.xy, !!this.lastUp);
         }
         this.mouseDown = true;
         this.lastDown = evt.xy;
-        this.drawing = true;
-        return false;
+        this.stoppedDown = stopDown;
+        return !stopDown;
     },
 
     /**
@@ -239,13 +249,16 @@
      * {Boolean} Allow event propagation
      */
     mousemove: function (evt) {
-        if(this.drawing) { 
-            if(this.mouseDown && this.freehandMode(evt)) {
-                this.addPoint(evt.xy);
-            } else {
-                this.modifyFeature(evt.xy);
+        if(this.stoppedDown && this.freehandMode(evt)) {
+            if(this.persist) {
+                this.destroyPersistedFeature();
             }
+            this.addPoint(evt.xy);
+            return false;
         }
+        if(!this.mouseDown || this.stoppedDown) {
+            this.modifyFeature(evt.xy, !!this.lastUp);
+        }
         return true;
     },
     
@@ -261,26 +274,39 @@
      * {Boolean} Allow event propagation
      */
     mouseup: function (evt) {
-        this.mouseDown = false;
-        if(this.drawing) {
-            if(this.freehandMode(evt)) {
+        if(this.mouseDown && (!this.lastUp || !this.lastUp.equals(evt.xy))) {
+            if(this.stoppedDown && this.freehandMode(evt)) {
                 this.removePoint();
                 this.finalize();
             } else {
-                if(this.lastUp == null) {
-                   this.addPoint(evt.xy);
+                if(this.lastDown.equals(evt.xy)) {
+                    if(this.lastUp == null && this.persist) {
+                        this.destroyPersistedFeature();
+                    }
+                    this.addPoint(evt.xy);
+                    this.lastUp = evt.xy;
                 }
-                this.lastUp = evt.xy;
             }
-            return false;
         }
-        return true;
+        this.stoppedDown = this.stopDown;
+        this.mouseDown = false;
+        return !this.stopUp;
     },
+
+    /**
+     * APIMethod: finishGeometry
+     * Finish the geometry and send it back to the control.
+     */
+    finishGeometry: function() {
+        var index = this.line.geometry.components.length - 1;
+        this.line.geometry.removeComponent(this.line.geometry.components[index]);
+        this.removePoint();
+        this.finalize();
+    },
   
     /**
      * Method: dblclick 
-     * Handle double-clicks.  Finish the geometry and send it back
-     * to the control.
+     * Handle double-clicks.
      * 
      * Parameters:
      * evt - {Event} The browser event
@@ -290,10 +316,7 @@
      */
     dblclick: function(evt) {
         if(!this.freehandMode(evt)) {
-            var index = this.line.geometry.components.length - 1;
-            this.line.geometry.removeComponent(this.line.geometry.components[index]);
-            this.removePoint();
-            this.finalize();
+            this.finishGeometry();
         }
         return false;
     },

Copied: sandbox/tschaub/canvas/lib/OpenLayers/Handler/Pinch.js (from rev 11416, trunk/openlayers/lib/OpenLayers/Handler/Pinch.js)
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Handler/Pinch.js	                        (rev 0)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Handler/Pinch.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,227 @@
+/* Copyright (c) 2006-2011 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/Handler.js
+ */
+
+/**
+ * Class: OpenLayers.Handler.Pinch
+ * The pinch handler is used to deal with sequences of browser events related
+ *     to pinch gestures. The handler is used by controls that want to know
+ *     when a pinch sequence begins, when a pinch is happening, and when it has
+ *     finished.
+ *
+ * Controls that use the pinch handler typically construct it with callbacks
+ *     for 'start', 'move', and 'done'.  Callbacks for these keys are
+ *     called when the pinch begins, with each change, and when the pinch is
+ *     done.
+ *
+ * Create a new pinch handler with the <OpenLayers.Handler.Pinch> constructor.
+ *
+ * Inherits from:
+ *  - <OpenLayers.Handler>
+ */
+OpenLayers.Handler.Pinch = OpenLayers.Class(OpenLayers.Handler, {
+
+    /**
+     * Property: started
+     * {Boolean} When a touchstart event is received, we want to record it,
+     *     but not set 'pinching' until the touchmove get started after
+     *     starting.
+     */
+    started: false,
+
+    /**
+     * Property: stopDown
+     * {Boolean} Stop propagation of touchstart events from getting to
+     *     listeners on the same element. Default is true.
+     */
+    stopDown: true,
+
+    /**
+     * Property: pinching
+     * {Boolean}
+     */
+    pinching: false,
+
+    /**
+     * Property: last
+     * {Object} Object that store informations related to pinch last touch.
+     */
+    last: null,
+
+    /**
+     * Property: start
+     * {Object} Object that store informations related to pinch touchstart.
+     */
+    start: null,
+
+    /**
+     * Constructor: OpenLayers.Handler.Pinch
+     * Returns OpenLayers.Handler.Pinch
+     *
+     * Parameters:
+     * control - {<OpenLayers.Control>} The control that is making use of
+     *     this handler.  If a handler is being used without a control, the
+     *     handlers setMap method must be overridden to deal properly with
+     *     the map.
+     * callbacks - {Object} An object containing functions to be called when
+     *     the pinch operation start, change, or is finished. The callbacks
+     *     should expect to receive an object argument, which contains
+     *     information about scale, distance, and position of touch points.
+     * options - {Object}
+     */
+    initialize: function(control, callbacks, options) {
+        OpenLayers.Handler.prototype.initialize.apply(this, arguments);
+    },
+
+    /**
+     * Method: touchstart
+     * Handle touchstart events
+     *
+     * Parameters:
+     * evt - {Event}
+     *
+     * Returns:
+     * {Boolean} Let the event propagate.
+     */
+    touchstart: function(evt) {
+        var propagate = true;
+        this.pinching = false;
+        if (OpenLayers.Event.isMultiTouch(evt)) {
+            this.started = true;
+            this.last = this.start = {
+                distance: this.getDistance(evt.touches),
+                delta: 0,
+                scale: 1
+            };
+            this.callback("start", [evt, this.start]);
+            propagate = !this.stopDown;
+        } else {
+            this.started = false;
+            this.start = null;
+            this.last = null;
+        }
+        OpenLayers.Event.stop(evt);
+        return propagate;
+    },
+
+    /**
+     * Method: touchmove
+     * Handle touchmove events
+     *
+     * Parameters:
+     * evt - {Event}
+     *
+     * Returns:
+     * {Boolean} Let the event propagate.
+     */
+    touchmove: function(evt) {
+        if (this.started && OpenLayers.Event.isMultiTouch(evt)) {
+            this.pinching = true;
+            var current = this.getPinchData(evt);
+            this.callback("move", [evt, current]);
+            this.last = current;
+        }
+        return true;
+    },
+
+    /**
+     * Method: touchend
+     * Handle touchend events
+     *
+     * Parameters:
+     * evt - {Event}
+     *
+     * Returns:
+     * {Boolean} Let the event propagate.
+     */
+    touchend: function(evt) {
+        if (this.started) {
+            this.started = false;
+            this.pinching = false;
+            this.callback("done", [evt, this.start, this.last]);
+            this.start = null;
+            this.last = null;
+        }
+        return true;
+    },
+
+    /**
+     * Method: activate
+     * Activate the handler.
+     *
+     * Returns:
+     * {Boolean} The handler was successfully activated.
+     */
+    activate: function() {
+        var activated = false;
+        if (OpenLayers.Handler.prototype.activate.apply(this, arguments)) {
+            this.pinching = false;
+            activated = true;
+        }
+        return activated;
+    },
+
+    /**
+     * Method: deactivate
+     * Deactivate the handler.
+     *
+     * Returns:
+     * {Boolean} The handler was successfully deactivated.
+     */
+    deactivate: function() {
+        var deactivated = false;
+        if (OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
+            this.started = false;
+            this.pinching = false;
+            this.start = null;
+            this.last = null;
+            deactivated = true;
+        }
+        return deactivated;
+    },
+
+    /**
+     * Method: getDistance
+     * Get the distance in pixels between two touches.
+     *
+     * Parameters:
+     * touches - {Array(Object)}
+     */
+    getDistance: function(touches) {
+        var t0 = touches[0];
+        var t1 = touches[1];
+        return Math.sqrt(
+            Math.pow(t0.clientX - t1.clientX, 2) +
+            Math.pow(t0.clientY - t1.clientY, 2)
+        );
+    },
+
+
+    /**
+     * Method: getPinchData
+     * Get informations about the pinch event.
+     *
+     * Parameters:
+     * evt - {Event}
+     *
+     * Returns:
+     * {Object} Object that contains data about the current pinch.
+     */
+    getPinchData: function(evt) {
+        var distance = this.getDistance(evt.touches);
+        var scale = distance / this.start.distance;
+        return {
+            distance: distance,
+            delta: this.last.distance - distance,
+            scale: scale
+        };
+    },
+
+    CLASS_NAME: "OpenLayers.Handler.Pinch"
+});
+

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Handler/Point.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Handler/Point.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Handler/Point.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -11,9 +11,9 @@
 
 /**
  * Class: OpenLayers.Handler.Point
- * Handler to draw a point on the map.  Point is displayed on mouse down,
- *     moves on mouse move, and is finished on mouse up.  The handler triggers
- *     callbacks for 'done', 'cancel', and 'modify'.  The modify callback is
+ * Handler to draw a point on the map. Point is displayed on activation,
+ *     moves on mouse move, and is finished on mouse up. The handler triggers
+ *     callbacks for 'done', 'cancel', and 'modify'. The modify callback is
  *     called with each change in the sketch and will receive the latest point
  *     drawn.  Create a new instance with the <OpenLayers.Handler.Point>
  *     constructor.
@@ -43,18 +43,19 @@
     multi: false,
     
     /**
-     * Property: drawing 
-     * {Boolean} A point is being drawn
-     */
-    drawing: false,
-    
-    /**
      * Property: mouseDown
      * {Boolean} The mouse is down
      */
     mouseDown: false,
 
     /**
+     * Property: stoppedDown
+     * {Boolean} Indicate whether the last mousedown stopped the event
+     * propagation.
+     */
+    stoppedDown: null,
+
+    /**
      * Property: lastDown
      * {<OpenLayers.Pixel>} Location of the last mouse down
      */
@@ -76,6 +77,20 @@
     persist: false,
 
     /**
+     * APIProperty: stopDown
+     * {Boolean} Stop event propagation on mousedown. Must be false to
+     *     allow "pan while drawing". Defaults to false.
+     */
+    stopDown: false,
+
+    /**
+     * APIPropery: stopUp
+     * {Boolean} Stop event propagation on mouse. Must be false to
+     *     allow "pan while dragging". Defaults to fase.
+     */
+    stopUp: false,
+
+    /**
      * Property: layerOptions
      * {Object} Any optional properties to be set on the sketch layer.
      */
@@ -130,6 +145,7 @@
         }, this.layerOptions);
         this.layer = new OpenLayers.Layer.Vector(this.CLASS_NAME, options);
         this.map.addLayer(this.layer);
+        this.createFeature();
         return true;
     },
     
@@ -141,6 +157,9 @@
      * pixel - {<OpenLayers.Pixel>} A pixel location on the map.
      */
     createFeature: function(pixel) {
+        if(!pixel) {
+            pixel = new OpenLayers.Pixel(-50, -50);
+        }
         var lonlat = this.map.getLonLatFromPixel(pixel);
         this.point = new OpenLayers.Feature.Vector(
             new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat)
@@ -158,17 +177,14 @@
         if(!OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
             return false;
         }
-        // call the cancel callback if mid-drawing
-        if(this.drawing) {
-            this.cancel();
-        }
-        this.destroyFeature();
+        this.cancel(true);
         // If a layer's map property is set to null, it means that that layer
         // isn't added to the map. Since we ourself added the layer to the map
         // in activate(), we can assume that if this.layer.map is null it means
         // that the layer has been destroyed (as a result of map.destroy() for
         // example.
         if (this.layer.map != null) {
+            this.destroyFeature();
             this.layer.destroy(false);
         }
         this.layer = null;
@@ -187,14 +203,27 @@
     },
 
     /**
+     * Method: destroyPersistedFeature
+     * Destroy the persisted feature.
+     */
+    destroyPersistedFeature: function() {
+        var layer = this.layer;
+        if(layer && layer.features.length > 1) {
+            this.layer.features[0].destroy();
+        }
+    },
+
+    /**
      * Method: finalize
      * Finish the geometry and call the "done" callback.
      *
      * Parameters:
      * cancel - {Boolean} Call cancel instead of done callback.  Default is
      *     false.
+     * noNew - {Boolean} Do not create a new feature after
+     *     finalization.  Default is false.
      */
-    finalize: function(cancel) {
+    finalize: function(cancel, noNew) {
         var key = cancel ? "cancel" : "done";
         this.drawing = false;
         this.mouseDown = false;
@@ -204,14 +233,21 @@
         if(cancel || !this.persist) {
             this.destroyFeature();
         }
+        if(!noNew) {
+            this.createFeature();
+        }
     },
 
     /**
      * APIMethod: cancel
      * Finish the geometry and call the "cancel" callback.
+     *
+     * Parameters:
+     * noNew - {Boolean} Do not create a new feature after
+     *     cancelation.  Default is false.
      */
-    cancel: function() {
-        this.finalize(true);
+    cancel: function(noNew) {
+        this.finalize(true, noNew);
     },
 
     /**
@@ -257,7 +293,7 @@
         var lonlat = this.map.getLonLatFromPixel(pixel);
         this.point.geometry.x = lonlat.lon;
         this.point.geometry.y = lonlat.lat;
-        this.callback("modify", [this.point.geometry, this.point]);
+        this.callback("modify", [this.point.geometry, this.point, false]);
         this.point.geometry.clearBounds();
         this.drawFeature();
     },
@@ -310,25 +346,11 @@
      * {Boolean} Allow event propagation
      */
     mousedown: function(evt) {
-        // check keyboard modifiers
-        if(!this.checkModifiers(evt)) {
-            return true;
-        }
-        // ignore double-clicks
-        if(this.lastDown && this.lastDown.equals(evt.xy)) {
-            return true;
-        }
-        this.drawing = true;
-        if(this.lastDown == null) {
-            if(this.persist) {
-                this.destroyFeature();
-            }
-            this.createFeature(evt.xy);
-        } else {
-            this.modifyFeature(evt.xy);
-        }
+        this.mouseDown = true;
         this.lastDown = evt.xy;
-        return false;
+        this.modifyFeature(evt.xy);
+        this.stoppedDown = this.stopDown;
+        return !this.stopDown;
     },
 
     /**
@@ -343,7 +365,7 @@
      * {Boolean} Allow event propagation
      */
     mousemove: function (evt) {
-        if(this.drawing) {
+        if(!this.mouseDown || this.stoppedDown) {
             this.modifyFeature(evt.xy);
         }
         return true;
@@ -361,13 +383,42 @@
      * {Boolean} Allow event propagation
      */
     mouseup: function (evt) {
-        if(this.drawing) {
+        this.mouseDown = false;
+        this.stoppedDown = this.stopDown;
+        // check keyboard modifiers
+        if(!this.checkModifiers(evt)) {
+            return true;
+        }
+        // ignore double-clicks
+        if(this.lastUp && this.lastUp.equals(evt.xy)) {
+            return true;
+        }
+        if(this.lastDown && this.lastDown.equals(evt.xy)) {
+            if(this.persist) {
+                this.destroyPersistedFeature();
+            }
+            this.lastUp = evt.xy;
             this.finalize();
-            return false;
+            return !this.stopUp;
         } else {
             return true;
         }
     },
 
+    /**
+     * Method: mouseout
+     * Handle mouse out.  For better user experience reset mouseDown
+     * and stoppedDown when the mouse leaves the map viewport.
+     *
+     * Parameters:
+     * evt - {Event} The browser event
+     */
+    mouseout: function(evt) {
+        if(OpenLayers.Util.mouseLeft(evt, this.map.viewPortDiv)) {
+            this.stoppedDown = this.stopDown;
+            this.mouseDown = false;
+        }
+    },
+
     CLASS_NAME: "OpenLayers.Handler.Point"
 });

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Handler/Polygon.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Handler/Polygon.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Handler/Polygon.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -20,7 +20,21 @@
  */
 OpenLayers.Handler.Polygon = OpenLayers.Class(OpenLayers.Handler.Path, {
     
+    /** 
+     * APIProperty: holeModifier
+     * {String} Key modifier to trigger hole digitizing.  Acceptable values are
+     *     "altKey", "shiftKey", or "ctrlKey".  If not set, no hole digitizing
+     *     will take place.  Default is null.
+     */
+    holeModifier: null,
+    
     /**
+     * Property: drawingHole
+     * {Boolean} Currently drawing an interior ring.
+     */
+    drawingHole: false,
+    
+    /**
      * Parameter: polygon
      * {<OpenLayers.Feature.Vector>}
      */
@@ -61,6 +75,9 @@
      *     feature.
      */
     createFeature: function(pixel) {
+        if(!pixel) {
+            pixel = new OpenLayers.Pixel(-50, -50);
+        }
         var lonlat = this.control.map.getLonLatFromPixel(pixel);
         this.point = new OpenLayers.Feature.Vector(
             new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat)
@@ -77,6 +94,149 @@
     },
 
     /**
+     * Method: addPoint
+     * Add point to geometry.
+     *
+     * Parameters:
+     * pixel - {<OpenLayers.Pixel>} The pixel location for the new point.
+     */
+    addPoint: function(pixel) {
+        if(!this.drawingHole && this.holeModifier &&
+           this.evt && this.evt[this.holeModifier]) {
+            var geometry = this.point.geometry;
+            var features = this.control.layer.features;
+            var candidate, polygon;
+            // look for intersections, last drawn gets priority
+            for (var i=features.length-1; i>=0; --i) {
+                candidate = features[i].geometry;
+                if ((candidate instanceof OpenLayers.Geometry.Polygon || 
+                    candidate instanceof OpenLayers.Geometry.MultiPolygon) && 
+                    candidate.intersects(geometry)) {
+                    polygon = features[i];
+                    this.control.layer.removeFeatures([polygon], {silent: true});
+                    this.control.layer.events.registerPriority(
+                        "sketchcomplete", this, this.finalizeInteriorRing
+                    );
+                    this.control.layer.events.registerPriority(
+                        "sketchmodified", this, this.enforceTopology
+                    );
+                    polygon.geometry.addComponent(this.line.geometry);
+                    this.polygon = polygon;
+                    this.drawingHole = true;
+                    break;
+                }
+            }
+        }
+        OpenLayers.Handler.Path.prototype.addPoint.apply(this, arguments);
+    },
+    
+    /**
+     * Method: enforceTopology
+     * Simple topology enforcement for drawing interior rings.  Ensures vertices
+     *     of interior rings are contained by exterior ring.  Other topology 
+     *     rules are enforced in <finalizeInteriorRing> to allow drawing of 
+     *     rings that intersect only during the sketch (e.g. a "C" shaped ring
+     *     that nearly encloses another ring).
+     */
+    enforceTopology: function(event) {
+        var point = event.vertex;
+        var components = this.line.geometry.components;
+        // ensure that vertices of interior ring are contained by exterior ring
+        if (!this.polygon.geometry.intersects(point)) {
+            var last = components[components.length-3];
+            point.x = last.x;
+            point.y = last.y;
+        }
+    },
+    
+    /**
+     * Method: finalizeInteriorRing
+     * Enforces that new ring has some area and doesn't contain vertices of any
+     *     other rings.
+     */
+    finalizeInteriorRing: function() {
+        var ring = this.line.geometry;
+        // ensure that ring has some area
+        var modified = (ring.getArea() !== 0);
+        if (modified) {
+            // ensure that new ring doesn't intersect any other rings
+            var rings = this.polygon.geometry.components;
+            for (var i=rings.length-2; i>=0; --i) {
+                if (ring.intersects(rings[i])) {
+                    modified = false;
+                    break;
+                }
+            }
+            if (modified) {
+                // ensure that new ring doesn't contain any other rings
+                var target;
+                outer: for (var i=rings.length-2; i>0; --i) {
+                    var points = rings[i].components;
+                    for (var j=0, jj=points.length; j<jj; ++j) {
+                        if (ring.containsPoint(points[j])) {
+                            modified = false;
+                            break outer;
+                        }
+                    }
+                }
+            }
+        }
+        if (modified) {
+            if (this.polygon.state !== OpenLayers.State.INSERT) {
+                this.polygon.state = OpenLayers.State.UPDATE;
+            }
+        } else {
+            this.polygon.geometry.removeComponent(ring);
+        }
+        this.restoreFeature();
+        return false;
+    },
+
+    /**
+     * APIMethod: cancel
+     * Finish the geometry and call the "cancel" callback.
+     */
+    cancel: function() {
+        if (this.drawingHole) {
+            this.polygon.geometry.removeComponent(this.line.geometry);
+            this.restoreFeature(true);
+        }
+        return OpenLayers.Handler.Path.prototype.cancel.apply(this, arguments);
+    },
+    
+    /**
+     * Method: restoreFeature
+     * Move the feature from the sketch layer to the target layer.
+     *
+     * Properties: 
+     * cancel - {Boolean} Cancel drawing.  If falsey, the "sketchcomplete" event
+     *     will be fired.
+     */
+    restoreFeature: function(cancel) {
+        this.control.layer.events.unregister(
+            "sketchcomplete", this, this.finalizeInteriorRing
+        );
+        this.control.layer.events.unregister(
+            "sketchmodified", this, this.enforceTopology
+        );
+        this.layer.removeFeatures([this.polygon], {silent: true});
+        this.control.layer.addFeatures([this.polygon], {silent: true});
+        this.drawingHole = false;
+        if (!cancel) {
+            // Re-trigger "sketchcomplete" so other listeners can do their
+            // business.  While this is somewhat sloppy (if a listener is 
+            // registered with registerPriority - not common - between the start
+            // and end of a single ring drawing - very uncommon - it will be 
+            // called twice).
+            // TODO: In 3.0, collapse sketch handlers into geometry specific
+            // drawing controls.
+            this.control.layer.events.triggerEvent(
+                "sketchcomplete", {feature : this.polygon}
+            );
+        }
+    },
+
+    /**
      * Method: destroyFeature
      * Destroy temporary geometries
      */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Handler/RegularPolygon.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Handler/RegularPolygon.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Handler/RegularPolygon.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Handler.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Handler.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Handler.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Events.js
  */
 

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Icon.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Icon.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Icon.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
+ */
+
+/**
  * Class: OpenLayers.Icon
  * 
  * The icon represents a graphical icon on the screen.  Typically used in

Copied: sandbox/tschaub/canvas/lib/OpenLayers/Kinetic.js (from rev 11416, trunk/openlayers/lib/OpenLayers/Kinetic.js)
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Kinetic.js	                        (rev 0)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Kinetic.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,183 @@
+/* Copyright (c) 2006-2011 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. */
+
+OpenLayers.Kinetic = OpenLayers.Class({
+
+    /**
+     * Property: threshold
+     * In most cases changing the threshold isn't needed.
+     * In px/ms, default to 0.
+     */
+    threshold: 0,
+
+    /**
+     * Property: interval
+     * {Integer} Interval in milliseconds between 2 steps in the "kinetic
+     *     dragging". Defaults to 10 milliseconds.
+     */
+    interval: 10,
+
+    /**
+     * Property: deceleration
+     * {Float} the deseleration in px/ms², default to 0.0035.
+     */
+    deceleration: 0.0035,
+
+    /**
+     * Property: nbPoints
+     * {Integer} the number of points we use to calculate the kinetic
+     * initial values.
+     */
+    nbPoints: 100,
+
+    /**
+     * Property: delay
+     * {Float} time to consider to calculate the kinetic initial values.
+     * In ms, default to 200.
+     */
+    delay: 200,
+
+    /**
+     * Property: points
+     * List of points use to calculate the kinetic initial values.
+     */
+    points: undefined,
+
+    /**
+     * Property: timerId
+     * ID of the timer.
+     */
+    timerId: undefined,
+
+    /**
+     * Constructor: OpenLayers.Kinetic
+     *
+     * Parameters:
+     * options - {Object}
+     */
+    initialize: function(options) {
+        OpenLayers.Util.extend(this, options);
+    },
+
+    /**
+     * Method: begin
+     * Begins the dragging.
+     */
+    begin: function() {
+        clearInterval(this.timerId);
+        this.timerId = undefined;
+        this.points = [];
+    },
+
+    /**
+     * Method: update
+     * Updates during the dragging.
+     *
+     * Parameters:
+     * xy - {<OpenLayers.Pixel>} The new position.
+     */
+    update: function(xy) {
+        this.points.unshift({xy: xy, tick: new Date().getTime()});
+        if (this.points.length > this.nbPoints) {
+            this.points.pop();
+        }
+    },
+
+    /**
+     * Method: end
+     * Ends the dragging, start the kinetic.
+     *
+     * Parameters:
+     * xy - {<OpenLayers.Pixel>} The last position.
+     *
+     * Returns:
+     * {Object} An object with two properties: "speed", and "theta". The
+     *     "speed" and "theta" values are to be passed to the move 
+     *     function when starting the animation.
+     */
+    end: function(xy) {
+        var last, now = new Date().getTime();
+        for (var i = 0, l = this.points.length, point; i < l; i++) {
+            point = this.points[i];
+            if (now - point.tick > this.delay) {
+                break;
+            }
+            last = point;
+        }
+        if (!last) {
+            return;
+        }
+        var time = new Date().getTime() - last.tick;
+        var dist = Math.sqrt(Math.pow(xy.x - last.xy.x, 2) +
+                             Math.pow(xy.y - last.xy.y, 2));
+        var speed = dist / time;
+        if (speed == 0 || speed < this.threshold) {
+            return;
+        }
+        var theta = Math.asin((xy.y - last.xy.y) / dist);
+        if (last.xy.x <= xy.x) {
+            theta = Math.PI - theta;
+        }
+        return {speed: speed, theta: theta};
+    },
+
+    /**
+     * Method: move
+     * Launch the kinetic move pan.
+     *
+     * Parameters:
+     * info - {Object} An object with two properties, "speed", and "theta".
+     *     These values are those returned from the "end" call.
+     * callback - {Function} Function called on every step of the animation,
+     *     receives x, y (values to pan), end (is the last point).
+     */
+    move: function(info, callback) {
+        var v0 = info.speed;
+        var fx = Math.cos(info.theta);
+        var fy = -Math.sin(info.theta);
+
+        var time = 0;
+        var initialTime = new Date().getTime();
+
+        var lastX = 0;
+        var lastY = 0;
+
+        var timerCallback = function() {
+            if (this.timerId == null) {
+                return;
+            }
+
+            time += this.interval;
+            var realTime = new Date().getTime() - initialTime;
+            var t = (time + realTime) / 2.0;
+
+            var p = (-this.deceleration * Math.pow(t, 2)) / 2.0 + v0 * t;
+            var x = p * fx;
+            var y = p * fy;
+
+            var args = {};
+            args.end = false;
+            var v = -this.deceleration * t + v0;
+
+            if (v <= 0) {
+                clearInterval(this.timerId);
+                this.timerId = null;
+                args.end = true;
+            }
+
+            args.x = x - lastX;
+            args.y = y - lastY;
+            lastX = x;
+            lastY = y;
+            callback(args.x, args.y, args.end);
+        };
+
+        this.timerId = window.setInterval(
+            OpenLayers.Function.bind(timerCallback, this),
+            this.interval);
+    },
+
+    CLASS_NAME: "OpenLayers.Kinetic"
+});

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Lang/en.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Lang/en.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Lang/en.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -122,6 +122,9 @@
     // console message
     'filterEvaluateNotImplemented': "evaluate is not implemented for this filter type.",
 
+    'proxyNeeded': "You probably need to set OpenLayers.ProxyHost to access ${url}."+
+        "See http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost",
+
     // **** end ****
     'end': ''
     

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Lang/fr.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Lang/fr.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Lang/fr.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -75,6 +75,7 @@
 
     'pagePositionFailed': "OpenLayers.Util.pagePosition a échoué: l\'élément d\'id ${elemId} pourrait être mal positionné.",
 
-    'filterEvaluateNotImplemented': "évaluer n\'a pas encore été implémenté pour ce type de filtre."
+    'filterEvaluateNotImplemented': "évaluer n\'a pas encore été implémenté pour ce type de filtre.",
 
+    'proxyNeeded': "Vous avez très probablement besoin de renseigner OpenLayers.ProxyHost pour accéder à ${url}. Voir http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost"
 });

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Lang.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Lang.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Lang.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes.js
  * @requires OpenLayers/Console.js
  */
 
@@ -58,7 +59,7 @@
     setCode: function(code) {
         var lang;
         if(!code) {
-            code = (OpenLayers.Util.getBrowserName() == "msie") ?
+            code = (OpenLayers.BROWSER_NAME == "msie") ?
                 navigator.userLanguage : navigator.language;
         }
         var parts = code.split('-');
@@ -101,7 +102,7 @@
      */
     translate: function(key, context) {
         var dictionary = OpenLayers.Lang[OpenLayers.Lang.getCode()];
-        var message = dictionary[key];
+        var message = dictionary && dictionary[key];
         if(!message) {
             // Message not found, fall back to message key
             message = key;

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/ArcGIS93Rest.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/ArcGIS93Rest.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/ArcGIS93Rest.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/ArcIMS.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/ArcIMS.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/ArcIMS.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Copied: sandbox/tschaub/canvas/lib/OpenLayers/Layer/Bing.js (from rev 11416, trunk/openlayers/lib/OpenLayers/Layer/Bing.js)
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/Bing.js	                        (rev 0)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/Bing.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,256 @@
+/* Copyright (c) 2006-2011 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/Layer/XYZ.js
+ */
+
+/** 
+ * Class: OpenLayers.Layer.Bing
+ * Bing layer using direct tile access as provided by Bing Maps REST Services.
+ * See http://msdn.microsoft.com/en-us/library/ff701713.aspx for more
+ * information.
+ * 
+ * Inherits from:
+ *  - <OpenLayers.Layer.XYZ>
+ */
+OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
+
+    /**
+     * Property: attributionTemplate
+     * {String}
+     */
+    attributionTemplate: '<span class="olBingAttribution ${type}">' +
+         '<div><a target="_blank" href="http://www.bing.com/maps/">' +
+         '<img src="${logo}"></img></div></a>${copyrights}' +
+         '<a style="white-space: nowrap" target="_blank" '+
+         'href="http://www.microsoft.com/maps/product/terms.html">' +
+         'Terms of Use</a></span>',
+
+    /**
+     * Property: metadata
+     * {Object} Metadata for this layer, as returned by the callback script
+     */
+    metadata: null,
+    
+    /**
+     * APIProperty: type
+     * {String} The layer identifier.  Any non-birdseye imageryType
+     *     from http://msdn.microsoft.com/en-us/library/ff701716.aspx can be
+     *     used.  Default is "Road".
+     */
+    type: "Road",
+    
+    /**
+     * APIProperty: metadataParams
+     * {Object} Optional url parameters for the Get Imagery Metadata request
+     * as described here: http://msdn.microsoft.com/en-us/library/ff701716.aspx
+     */
+    metadataParams: null,
+
+    /**
+     * Constructor: OpenLayers.Layer.Bing
+     * Create a new Bing layer.
+     *
+     * Example:
+     * (code)
+     * var road = new OpenLayers.Layer.Bing({
+     *     name: "My Bing Aerial Layer",
+     *     type: "Aerial",
+     *     key: "my-api-key-here",
+     * });
+     * (end)
+     *
+     * Parameters:
+     * config - {Object} Configuration properties for the layer.
+     *
+     * Required configuration properties:
+     * key - {String} Bing Maps API key for your application. Get one at
+     *     http://bingmapsportal.com/.
+     * type - {String} The layer identifier.  Any non-birdseye imageryType
+     *     from http://msdn.microsoft.com/en-us/library/ff701716.aspx can be
+     *     used.
+     *
+     * Any other documented layer properties can be provided in the config object.
+     */
+    initialize: function(options) {
+        options = OpenLayers.Util.applyDefaults({
+            restrictedMinZoom: 1,
+            sphericalMercator: true
+        }, options);
+        var name = options.name || "Bing " + (options.type || this.type);
+        
+        var newArgs = [name, null, options];
+        OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArgs);
+        this.loadMetadata(); 
+    },
+
+    /**
+     * Method: loadMetadata
+     */
+    loadMetadata: function() {
+        this._callbackId = "_callback_" + this.id.replace(/\./g, "_");
+        // link the processMetadata method to the global scope and bind it
+        // to this instance
+        window[this._callbackId] = OpenLayers.Function.bind(
+            OpenLayers.Layer.Bing.processMetadata, this
+        );
+        var params = OpenLayers.Util.applyDefaults({
+            key: this.key,
+            jsonp: this._callbackId,
+            include: "ImageryProviders"
+        }, this.metadataParams);
+        var url = "http://dev.virtualearth.net/REST/v1/Imagery/Metadata/" +
+            this.type + "?" + OpenLayers.Util.getParameterString(params);
+        var script = document.createElement("script");
+        script.type = "text/javascript";
+        script.src = url;
+        script.id = this._callbackId;
+        document.getElementsByTagName("head")[0].appendChild(script);
+    },
+    
+    /**
+     * Method: initLayer
+     *
+     * Sets layer properties according to the metadata provided by the API
+     */
+    initLayer: function() {
+        var res = this.metadata.resourceSets[0].resources[0];
+        var url = res.imageUrl.replace("{quadkey}", "${quadkey}");
+        this.url = [];
+        for (var i=0; i<res.imageUrlSubdomains.length; ++i) {
+            this.url.push(url.replace("{subdomain}", res.imageUrlSubdomains[i]));
+        };
+        this.addOptions({
+            restrictedMinZoom: res.zoomMin,
+            numZoomLevels: res.zoomMax + 1
+        });
+        this.updateAttribution();
+        // redraw to replace "blank.gif" tiles with real tiles
+        this.redraw();
+    },
+
+    /**
+     * Method: getURL
+     *
+     * Paramters:
+     * bounds - {<OpenLayers.Bounds>}
+     */
+    getURL: function(bounds) {
+        if (!this.url) {
+            return OpenLayers.Util.getImagesLocation() + "blank.gif";
+        }
+        var xyz = this.getXYZ(bounds), x = xyz.x, y = xyz.y, z = xyz.z;
+        var quadDigits = [];
+        for (var i = z; i > 0; --i) {
+            var digit = '0';
+            var mask = 1 << (i - 1);
+            if ((x & mask) != 0) {
+                digit++;
+            }
+            if ((y & mask) != 0) {
+                digit++;
+                digit++;
+            }
+            quadDigits.push(digit);
+        }
+        var quadKey = quadDigits.join("");
+        var url = this.selectUrl('' + x + y + z, this.url);
+
+        return OpenLayers.String.format(url, {'quadkey': quadKey});
+    },
+    
+    /**
+     * Method: updateAttribution
+     * Updates the attribution according to the requirements outlined in
+     * http://gis.638310.n2.nabble.com/Bing-imagery-td5789168.html
+     */
+    updateAttribution: function() {
+        var metadata = this.metadata;
+        if (!metadata || !this.map || !this.map.center) {
+            return;
+        }
+        var res = metadata.resourceSets[0].resources[0];
+        var extent = this.map.getExtent().transform(
+            this.map.getProjectionObject(),
+            new OpenLayers.Projection("EPSG:4326")
+        );
+        var providers = res.imageryProviders, zoom = this.map.getZoom() + 1,
+            copyrights = "", provider, i, ii, j, jj, bbox, coverage;
+        for (i=0,ii=providers.length; i<ii; ++i) {
+            provider = providers[i];
+            for (j=0,jj=provider.coverageAreas.length; j<jj; ++j) {
+                coverage = provider.coverageAreas[j];
+                bbox = OpenLayers.Bounds.fromArray(coverage.bbox);
+                if (extent.intersectsBounds(bbox) &&
+                        zoom <= coverage.zoomMax && zoom >= coverage.zoomMin) {
+                    copyrights += provider.attribution + " ";
+                }
+            }
+        }
+        this.attribution = OpenLayers.String.format(this.attributionTemplate, {
+            type: this.type.toLowerCase(),
+            logo: metadata.brandLogoUri,
+            copyrights: copyrights
+        });
+        this.map && this.map.events.triggerEvent("changelayer", {layer: this});
+    },
+    
+    /**
+     * Method: setMap
+     */
+    setMap: function() {
+        OpenLayers.Layer.XYZ.prototype.setMap.apply(this, arguments);
+        this.updateAttribution();
+        this.map.events.register("moveend", this, this.updateAttribution);
+    },
+    
+    /**
+     * APIMethod: clone
+     * 
+     * Parameters:
+     * obj - {Object}
+     * 
+     * Returns:
+     * {<OpenLayers.Layer.Bing>} An exact clone of this <OpenLayers.Layer.Bing>
+     */
+    clone: function(obj) {
+        if (obj == null) {
+            obj = new OpenLayers.Layer.Bing(this.options);
+        }
+        //get all additions from superclasses
+        obj = OpenLayers.Layer.XYZ.prototype.clone.apply(this, [obj]);
+        // copy/set any non-init, non-simple values here
+        return obj;
+    },
+    
+    /**
+     * Method: destroy
+     */
+    destroy: function() {
+        this.map &&
+            this.map.events.unregister("moveend", this, this.updateAttribution);
+        OpenLayers.Layer.XYZ.prototype.destroy.apply(this, arguments);
+    },
+    
+    CLASS_NAME: "OpenLayers.Layer.Bing"
+});
+
+/**
+ * Function: OpenLayers.Layer.Bing.processMetadata
+ * This function will be bound to an instance, linked to the global scope with
+ * an id, and called by the JSONP script returned by the API.
+ *
+ * Parameters:
+ * metadata - {Object} metadata as returned by the API
+ */
+OpenLayers.Layer.Bing.processMetadata = function(metadata) {
+    this.metadata = metadata;
+    this.initLayer();
+    var script = document.getElementById(this._callbackId);
+    script.parentNode.removeChild(script);
+    window[this._callbackId] = undefined; // cannot delete from window in IE
+    delete this._callbackId;
+};

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/Boxes.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/Boxes.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/Boxes.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/EventPane.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/EventPane.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/EventPane.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -102,7 +102,7 @@
         this.pane.style.display = this.div.style.display;
         this.pane.style.width="100%";
         this.pane.style.height="100%";
-        if (OpenLayers.Util.getBrowserName() == "msie") {
+        if (OpenLayers.BROWSER_NAME == "msie") {
             this.pane.style.background = 
                 "url(" + OpenLayers.Util.getImagesLocation() + "blank.gif)";
         }

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/FixedZoomLevels.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/FixedZoomLevels.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/FixedZoomLevels.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/GML.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/GML.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/GML.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -7,6 +7,7 @@
  * @requires OpenLayers/Layer/Vector.js
  * @requires OpenLayers/Request/XMLHttpRequest.js
  * @requires OpenLayers/Console.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/GeoRSS.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/GeoRSS.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/GeoRSS.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/Google/v3.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/Google/v3.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/Google/v3.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -26,13 +26,13 @@
      * (code)
      * {
      *     maxExtent: new OpenLayers.Bounds(
-     *         -128 * 156543.0339,
-     *         -128 * 156543.0339,
-     *         128 * 156543.0339,
-     *         128 * 156543.0339
+     *         -128 * 156543.03390625,
+     *         -128 * 156543.03390625,
+     *         128 * 156543.03390625,
+     *         128 * 156543.03390625
      *     ),
      *     sphericalMercator: true,
-     *     maxResolution: 156543.0339,
+     *     maxResolution: 156543.03390625,
      *     units: "m",
      *     projection: "EPSG:900913"
      * }
@@ -40,17 +40,30 @@
      */
     DEFAULTS: {
         maxExtent: new OpenLayers.Bounds(
-            -128 * 156543.0339,
-            -128 * 156543.0339,
-            128 * 156543.0339,
-            128 * 156543.0339
+            -128 * 156543.03390625,
+            -128 * 156543.03390625,
+            128 * 156543.03390625,
+            128 * 156543.03390625
         ),
         sphericalMercator: true,
-        maxResolution: 156543.0339,
+        maxResolution: 156543.03390625,
         units: "m",
         projection: "EPSG:900913"
     },
 
+    /**
+     * APIProperty: animationEnabled
+     * {Boolean} If set to true, the transition between zoom levels will be
+     *     animated (if supported by the GMaps API for the device used). Set to
+     *     false to match the zooming experience of other layer types. Default
+     *     is true. Note that the GMaps API does not give us control over zoom
+     *     animation, so if set to false, when zooming, this will make the
+     *     layer temporarily invisible, wait until GMaps reports the map being
+     *     idle, and make it visible again. The result will be a blank layer
+     *     for a few moments while zooming.
+     */
+    animationEnabled: true, 
+
     /** 
      * Method: loadMapObject
      * Load the GMap and register appropriate event listeners. If we can't 
@@ -134,6 +147,11 @@
 
         var cache = OpenLayers.Layer.Google.cache[this.map.id];
         var container = this.map.viewPortDiv;
+        
+        // move the Map Data popup to the container, if any
+        while (div.lastChild.style.display == "none") {
+            container.appendChild(div.lastChild);
+        }
 
         // move the ToS and branding stuff up to the container div
         var termsOfUse = div.lastChild;
@@ -335,6 +353,17 @@
      * zoom - {int} MapObject zoom format
      */
     setMapObjectCenter: function(center, zoom) {
+        if (this.animationEnabled === false && zoom != this.mapObject.zoom) {
+            var mapContainer = this.getMapContainer();
+            google.maps.event.addListenerOnce(
+                this.mapObject, 
+                "idle", 
+                function() {
+                    mapContainer.style.visibility = "";
+                }
+            );
+            mapContainer.style.visibility = "hidden";
+        }
         this.mapObject.setOptions({
             center: center,
             zoom: zoom

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/Google.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/Google.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/Google.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -8,6 +8,7 @@
  * @requires OpenLayers/Layer/SphericalMercator.js
  * @requires OpenLayers/Layer/EventPane.js
  * @requires OpenLayers/Layer/FixedZoomLevels.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/Grid.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/Grid.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/Grid.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -24,7 +24,27 @@
      * {<OpenLayers.Size>}
      */
     tileSize: null,
+
+    /**
+     * Property: tileOriginCorner
+     * {String} If the <tileOrigin> property is not provided, the tile origin 
+     *     will be derived from the layer's <maxExtent>.  The corner of the 
+     *     <maxExtent> used is determined by this property.  Acceptable values
+     *     are "tl" (top left), "tr" (top right), "bl" (bottom left), and "br"
+     *     (bottom right).  Default is "bl".
+     */
+    tileOriginCorner: "bl",
     
+    /**
+     * APIProperty: tileOrigin
+     * {<OpenLayers.LonLat>} Optional origin for aligning the grid of tiles.
+     *     If provided, requests for tiles at all resolutions will be aligned
+     *     with this location (no tiles shall overlap this location).  If
+     *     not provided, the grid of tiles will be aligned with the layer's
+     *     <maxExtent>.  Default is ``null``.
+     */
+    tileOrigin: null,
+    
     /** APIProperty: tileOptions
      *  {Object} optional configuration options for <OpenLayers.Tile> instances
      *  created by this Layer, if supported by the tile class.
@@ -68,6 +88,19 @@
     numLoadingTiles: 0,
 
     /**
+     * APIProperty: tileLoadingDelay
+     * {Integer} - Number of milliseconds before we shift and load
+     *     tiles. Default is 100.
+     */
+    tileLoadingDelay: 100,
+
+    /**
+     * Property: timerId
+     * {Number} - The id of the tileLoadingDelay timer.
+     */
+    timerId: null,
+
+    /**
      * Constructor: OpenLayers.Layer.Grid
      * Create a new grid layer
      *
@@ -89,6 +122,10 @@
         this.events.addEventType("tileloaded");
 
         this.grid = [];
+        
+        this._moveGriddedTiles = OpenLayers.Function.bind(
+            this.moveGriddedTiles, this
+        );
     },
 
     /**
@@ -197,8 +234,15 @@
                 if (forceReTile || !tilesBounds.containsBounds(bounds, true)) {
                     this.initGriddedTiles(bounds);
                 } else {
-                    //we might have to shift our buffer tiles
-                    this.moveGriddedTiles(bounds);
+                    // we might have to shift our buffer tiles, schedule
+                    // that
+                    if (this.timerId != null) {
+                        window.clearTimeout(this.timerId);
+                    }
+                    this.timerId = window.setTimeout(
+                        this._moveGriddedTiles,
+                        this.tileLoadingDelay
+                    );
                 }
             }
         }
@@ -309,32 +353,32 @@
 
     /** 
      * Method: calculateGridLayout
-     * Generate parameters for the grid layout. This  
+     * Generate parameters for the grid layout.
      *
      * Parameters:
      * bounds - {<OpenLayers.Bound>}
-     * extent - {<OpenLayers.Bounds>}
+     * origin - {<OpenLayers.LonLat>}
      * resolution - {Number}
      *
      * Returns:
      * Object containing properties tilelon, tilelat, tileoffsetlat,
      * tileoffsetlat, tileoffsetx, tileoffsety
      */
-    calculateGridLayout: function(bounds, extent, resolution) {
+    calculateGridLayout: function(bounds, origin, resolution) {
         var tilelon = resolution * this.tileSize.w;
         var tilelat = resolution * this.tileSize.h;
         
-        var offsetlon = bounds.left - extent.left;
+        var offsetlon = bounds.left - origin.lon;
         var tilecol = Math.floor(offsetlon/tilelon) - this.buffer;
         var tilecolremain = offsetlon/tilelon - tilecol;
         var tileoffsetx = -tilecolremain * this.tileSize.w;
-        var tileoffsetlon = extent.left + tilecol * tilelon;
+        var tileoffsetlon = origin.lon + tilecol * tilelon;
         
-        var offsetlat = bounds.top - (extent.bottom + tilelat);  
+        var offsetlat = bounds.top - (origin.lat + tilelat);  
         var tilerow = Math.ceil(offsetlat/tilelat) + this.buffer;
         var tilerowremain = tilerow - offsetlat/tilelat;
         var tileoffsety = -tilerowremain * this.tileSize.h;
-        var tileoffsetlat = extent.bottom + tilerow * tilelat;
+        var tileoffsetlat = origin.lat + tilerow * tilelat;
         
         return { 
           tilelon: tilelon, tilelat: tilelat,
@@ -343,6 +387,32 @@
         };
 
     },
+    
+    /**
+     * Method: getTileOrigin
+     * Determine the origin for aligning the grid of tiles.  If a <tileOrigin>
+     *     property is supplied, that will be returned.  Otherwise, the origin
+     *     will be derived from the layer's <maxExtent> property.  In this case,
+     *     the tile origin will be the corner of the <maxExtent> given by the 
+     *     <tileOriginCorner> property.
+     *
+     * Returns:
+     * {<OpenLayers.LonLat>} The tile origin.
+     */
+    getTileOrigin: function() {
+        var origin = this.tileOrigin;
+        if (!origin) {
+            var extent = this.getMaxExtent();
+            var edges = ({
+                "tl": ["left", "top"],
+                "tr": ["right", "top"],
+                "bl": ["left", "bottom"],
+                "br": ["right", "bottom"]
+            })[this.tileOriginCorner];
+            origin = new OpenLayers.LonLat(extent[edges[0]], extent[edges[1]]);
+        }
+        return origin;
+    },
 
     /**
      * Method: initGriddedTiles
@@ -361,10 +431,10 @@
         var minCols = Math.ceil(viewSize.w/this.tileSize.w) +
                       Math.max(1, 2 * this.buffer);
         
-        var extent = this.getMaxExtent();
+        var origin = this.getTileOrigin();
         var resolution = this.map.getResolution();
         
-        var tileLayout = this.calculateGridLayout(bounds, extent, resolution);
+        var tileLayout = this.calculateGridLayout(bounds, origin, resolution);
 
         var tileoffsetx = Math.round(tileLayout.tileoffsetx); // heaven help us
         var tileoffsety = Math.round(tileLayout.tileoffsety);
@@ -590,28 +660,29 @@
     
     /**
      * Method: moveGriddedTiles
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
      */
-    moveGriddedTiles: function(bounds) {
+    moveGriddedTiles: function() {
+        var shifted = true;
         var buffer = this.buffer || 1;
-        while (true) {
-            var tlLayer = this.grid[0][0].position;
-            var tlViewPort = 
-                this.map.getViewPortPxFromLayerPx(tlLayer);
-            if (tlViewPort.x > -this.tileSize.w * (buffer - 1)) {
-                this.shiftColumn(true);
-            } else if (tlViewPort.x < -this.tileSize.w * buffer) {
-                this.shiftColumn(false);
-            } else if (tlViewPort.y > -this.tileSize.h * (buffer - 1)) {
-                this.shiftRow(true);
-            } else if (tlViewPort.y < -this.tileSize.h * buffer) {
-                this.shiftRow(false);
-            } else {
-                break;
-            }
-        };
+        var tlLayer = this.grid[0][0].position;
+        var tlViewPort = this.map.getViewPortPxFromLayerPx(tlLayer);
+        if (tlViewPort.x > -this.tileSize.w * (buffer - 1)) {
+            this.shiftColumn(true);
+        } else if (tlViewPort.x < -this.tileSize.w * buffer) {
+            this.shiftColumn(false);
+        } else if (tlViewPort.y > -this.tileSize.h * (buffer - 1)) {
+            this.shiftRow(true);
+        } else if (tlViewPort.y < -this.tileSize.h * buffer) {
+            this.shiftRow(false);
+        } else {
+            shifted = false;
+        }
+        if (shifted) {
+            // we may have other row or columns to shift, schedule it
+            // with a setTimeout, to give the user a chance to sneak
+            // in moveTo's
+            this.timerId = window.setTimeout(this._moveGriddedTiles, 0);
+        }
     },
 
     /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/HTTPRequest.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/HTTPRequest.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/HTTPRequest.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -38,7 +38,7 @@
     
     /** 
      * APIProperty: reproject
-     * *Deprecated*. See http://trac.openlayers.org/wiki/SpatialMercator
+     * *Deprecated*. See http://docs.openlayers.org/library/spherical_mercator.html
      * for information on the replacement for this functionality. 
      * {Boolean} Whether layer should reproject itself based on base layer 
      *           locations. This allows reprojection onto commercial layers. 

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/Image.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/Image.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/Image.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/KaMap.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/KaMap.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/KaMap.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/KaMapCache.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/KaMapCache.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/KaMapCache.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/MapGuide.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/MapGuide.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/MapGuide.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/MapServer/Untiled.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/MapServer/Untiled.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/MapServer/Untiled.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/MapServer.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/MapServer.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/MapServer.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/Markers.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/Markers.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/Markers.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/MultiMap.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/MultiMap.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/MultiMap.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -6,12 +6,14 @@
 /**
  * @requires OpenLayers/Layer/EventPane.js
  * @requires OpenLayers/Layer/FixedZoomLevels.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**
  * Class: OpenLayers.Layer.MultiMap
  * Note that MultiMap does not fully support the sphericalMercator
  * option. See Ticket #953 for more details.
+ * *Deprecated*.  Use OpenLayers.Layer.Bing instead. See #3063
  * 
  * Inherits from:
  *  - <OpenLayers.Layer.EventPane>

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/PointTrack.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/PointTrack.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/PointTrack.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/SphericalMercator.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/SphericalMercator.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/SphericalMercator.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -95,7 +95,7 @@
     initMercatorParameters: function() {
         // set up properties for Mercator - assume EPSG:900913
         this.RESOLUTIONS = [];
-        var maxResolution = 156543.0339;
+        var maxResolution = 156543.03390625;
         for(var zoom=0; zoom<=this.MAX_ZOOM_LEVEL; ++zoom) {
             this.RESOLUTIONS[zoom] = maxResolution / Math.pow(2, zoom);
         }
@@ -186,11 +186,32 @@
 };
 
 /**
- * Note: Two transforms declared
- * Transforms from EPSG:4326 to EPSG:900913 and from EPSG:900913 to EPSG:4326
- *     are set by this class.
+ * Note: Transforms for web mercator <-> EPSG:4326
+ * OpenLayers recognizes EPSG:3857, EPSG:900913, EPSG:102113 and EPSG:102100.
+ * OpenLayers originally started referring to EPSG:900913 as web mercator.
+ * The EPSG has declared EPSG:3857 to be web mercator.  
+ * ArcGIS 10 recognizes the EPSG:3857, EPSG:102113, and EPSG:102100 as 
+ * equivalent.  See http://blogs.esri.com/Dev/blogs/arcgisserver/archive/2009/11/20/ArcGIS-Online-moving-to-Google-_2F00_-Bing-tiling-scheme_3A00_-What-does-this-mean-for-you_3F00_.aspx#12084
  */
-OpenLayers.Projection.addTransform("EPSG:4326", "EPSG:900913",
-    OpenLayers.Layer.SphericalMercator.projectForward);
-OpenLayers.Projection.addTransform("EPSG:900913", "EPSG:4326",
-    OpenLayers.Layer.SphericalMercator.projectInverse);
+(function() {
+    
+    // list of equivalent codes for web mercator
+    var codes = ["EPSG:900913", "EPSG:3857", "EPSG:102113", "EPSG:102100"];
+    
+    var add = OpenLayers.Projection.addTransform;
+    var merc = OpenLayers.Layer.SphericalMercator;
+    var same = OpenLayers.Projection.nullTransform;
+    
+    var i, len, code, other, j;
+    for (i=0, len=codes.length; i<len; ++i) {
+        code = codes[i];
+        add("EPSG:4326", code, merc.projectForward);
+        add(code, "EPSG:4326", merc.projectInverse);
+        for (j=i+1; j<len; ++j) {
+            other = codes[j];
+            add(code, other, same);
+            add(other, code, same);
+        }
+    }
+    
+})();

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/TMS.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/TMS.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/TMS.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/Text.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/Text.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/Text.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/TileCache.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/TileCache.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/TileCache.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/Vector/RootContainer.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/Vector/RootContainer.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/Vector/RootContainer.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/Vector.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/Vector.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/Vector.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -9,6 +9,7 @@
  * @requires OpenLayers/StyleMap.js
  * @requires OpenLayers/Feature/Vector.js
  * @requires OpenLayers/Console.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**
@@ -64,6 +65,10 @@
      * featuresremoved - Triggered after features are removed. The event
      *      object passed to listeners will have a *features* property with a
      *      reference to an array of removed features.
+     * beforefeatureselected - Triggered after a feature is selected.  Listeners
+     *      will receive an object with a *feature* property referencing the
+     *      feature to be selected. To stop the feature from being selectd, a
+     *      listener should return false.
      * featureselected - Triggered after a feature is selected.  Listeners
      *      will receive an object with a *feature* property referencing the
      *      selected feature.
@@ -85,6 +90,12 @@
      *      property referencing the vertex modified (always a point geometry),
      *      and a *pixel* property referencing the pixel location of the
      *      modification.
+     * vertexremoved - Triggered when a vertex within any feature geometry
+     *      has been deleted.  Listeners will receive an object with a
+     *      *feature* property referencing the modified feature, a *vertex*
+     *      property referencing the vertex modified (always a point geometry),
+     *      and a *pixel* property referencing the pixel location of the
+     *      removal.
      * sketchstarted - Triggered when a feature sketch bound for this layer
      *      is started.  Listeners will receive an object with a *feature*
      *      property referencing the new sketch feature and a *vertex* property
@@ -105,8 +116,8 @@
                   "beforefeaturesremoved", "featureremoved", "featuresremoved",
                   "beforefeatureselected", "featureselected", "featureunselected", 
                   "beforefeaturemodified", "featuremodified", "afterfeaturemodified",
-                  "vertexmodified", "sketchstarted", "sketchmodified",
-                  "sketchcomplete", "refresh"],
+                  "vertexmodified", "vertexremoved", "sketchstarted",
+                  "sketchmodified", "sketchcomplete", "refresh"],
 
     /**
      * APIProperty: isBaseLayer
@@ -123,12 +134,6 @@
     isFixed: false,
 
     /** 
-     * APIProperty: isVector
-     * {Boolean} Whether the layer is a vector layer.
-     */
-    isVector: true,
-    
-    /** 
      * APIProperty: features
      * {Array(<OpenLayers.Feature.Vector>)} 
      */
@@ -482,7 +487,7 @@
             // Force a reflow on gecko based browsers to prevent jump/flicker.
             // This seems to happen on only certain configurations; it was originally
             // noticed in FF 2.0 and Linux.
-            if (navigator.userAgent.toLowerCase().indexOf("gecko") != -1) {
+            if (OpenLayers.IS_GECKO === true) {
                 this.div.scrollLeft = this.div.scrollLeft;
             }
             
@@ -774,7 +779,7 @@
         // don't try to draw the feature with the renderer if the layer is not 
         // drawn itself
         if (!this.drawn) {
-            return
+            return;
         }
         if (typeof style != "object") {
             if(!style && feature.state === OpenLayers.State.DELETE) {
@@ -886,6 +891,36 @@
     getFeatureByFid: function(featureFid) {
         return this.getFeatureBy('fid', featureFid);
     },
+    
+    /**
+     * APIMethod: getFeaturesByAttribute
+     * Returns an array of features that have the given attribute key set to the
+     * given value. Comparison of attribute values takes care of datatypes, e.g.
+     * the string '1234' is not equal to the number 1234.
+     *
+     * Parameters:
+     * attrName - {String}
+     * attrValue - {Mixed}
+     *
+     * Returns:
+     * Array(<OpenLayers.Feature.Vector>) An array of features that have the 
+     * passed named attribute set to the given value.
+     */
+    getFeaturesByAttribute: function(attrName, attrValue) {
+        var i,
+            feature,    
+            len = this.features.length,
+            foundFeatures = [];
+        for(i = 0; i < len; i++) {            
+            feature = this.features[i];
+            if(feature && feature.attributes) {
+                if (feature.attributes[attrName] === attrValue) {
+                    foundFeatures.push(feature);
+                }
+            }
+        }
+        return foundFeatures;
+    },
 
     /**
      * Unselect the selected features

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/VirtualEarth.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/VirtualEarth.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/VirtualEarth.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -8,6 +8,7 @@
  * @requires OpenLayers/Layer/SphericalMercator.js
  * @requires OpenLayers/Layer/EventPane.js
  * @requires OpenLayers/Layer/FixedZoomLevels.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/WFS.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/WFS.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/WFS.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -9,6 +9,7 @@
  * @requires OpenLayers/Layer/Vector.js
  * @requires OpenLayers/Layer/Markers.js
  * @requires OpenLayers/Console.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/WMS/Post.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/WMS/Post.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/WMS/Post.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -33,7 +33,7 @@
      * effects of viewport-shaking when panning the map. Both browsers, Opera
      * and Firefox/Mozilla, have no problem with long urls, which is the reason
      * for using POST instead of GET. The strings to pass to this array are
-     * the ones returned by <OpenLayers.Util.getBrowserName()>.
+     * the ones returned by <OpenLayers.BROWSER_NAME>.
      */
     unsupportedBrowsers: ["mozilla", "firefox", "opera"],
 
@@ -77,7 +77,7 @@
         OpenLayers.Layer.WMS.prototype.initialize.apply(this, newArguments);
 
         this.usePost = OpenLayers.Util.indexOf(
-            this.unsupportedBrowsers, OpenLayers.Util.getBrowserName()) == -1;
+            this.unsupportedBrowsers, OpenLayers.BROWSER_NAME) == -1;
     },
     
     /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/WMS/Untiled.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/WMS/Untiled.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/WMS/Untiled.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/WMS.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/WMS.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/WMS.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -252,8 +252,11 @@
      * {String} 
      */
     getFullRequestString:function(newParams, altUrl) {
-        var projectionCode = this.map.getProjection();
-        var value = (projectionCode == "none") ? null : projectionCode
+        var mapProjection = this.map.getProjectionObject();
+        var projectionCode = this.projection.equals(mapProjection) ?
+            this.projection.getCode() :
+            mapProjection.getCode();
+        var value = (projectionCode == "none") ? null : projectionCode;
         if (parseFloat(this.params.VERSION) >= 1.3) {
             this.params.CRS = value;
         } else {

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/WMTS.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/WMTS.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/WMTS.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/WorldWind.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/WorldWind.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/WorldWind.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/XYZ.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/XYZ.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/XYZ.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -40,11 +40,20 @@
      *     for a requested tile.  For example, if you supply a zoomOffset
      *     of 3, when the map is at the zoom 0, tiles will be requested from
      *     level 3 of your cache.  Default is 0 (assumes cache level and map
-     *     zoom are equivalent).
+     *     zoom are equivalent).  Using <zoomOffset> is an alternative to
+     *     setting <serverResolutions> if you only want to expose a subset
+     *     of the server resolutions.
      */
     zoomOffset: 0,
     
     /**
+     * APIProperty: serverResolutions
+     * {Array} A list of all resolutions available on the server.  Only set this
+     *     property if the map resolutions differs from the server.
+     */
+    serverResolutions: null,
+
+    /**
      * Constructor: OpenLayers.Layer.XYZ
      *
      * Parameters:
@@ -56,12 +65,12 @@
         if (options && options.sphericalMercator || this.sphericalMercator) {
             options = OpenLayers.Util.extend({
                 maxExtent: new OpenLayers.Bounds(
-                    -128 * 156543.0339,
-                    -128 * 156543.0339,
-                    128 * 156543.0339,
-                    128 * 156543.0339
+                    -128 * 156543.03390625,
+                    -128 * 156543.03390625,
+                    128 * 156543.03390625,
+                    128 * 156543.03390625
                 ),
-                maxResolution: 156543.0339,
+                maxResolution: 156543.03390625,
                 numZoomLevels: 19,
                 units: "m",
                 projection: "EPSG:900913"
@@ -98,7 +107,7 @@
     },    
 
     /**
-     * Method: getUrl
+     * Method: getURL
      *
      * Parameters:
      * bounds - {<OpenLayers.Bounds>}
@@ -109,23 +118,37 @@
      *          parameters
      */
     getURL: function (bounds) {
+        var xyz = this.getXYZ(bounds);
+        var url = this.url;
+        if (url instanceof Array) {
+            var s = '' + xyz.x + xyz.y + xyz.z;
+            url = this.selectUrl(s, url);
+        }
+        
+        return OpenLayers.String.format(url, xyz);
+    },
+    
+    /**
+     * Method: getXYZ
+     * Calculates x, y and z for the given bounds.
+     *
+     * Parameters:
+     * bounds - {<OpenLayers.Bounds>}
+     *
+     * Returns:
+     * {Object} - an object with x, y and z properties.
+     */
+    getXYZ: function(bounds) {
         var res = this.map.getResolution();
         var x = Math.round((bounds.left - this.maxExtent.left) 
             / (res * this.tileSize.w));
         var y = Math.round((this.maxExtent.top - bounds.top) 
             / (res * this.tileSize.h));
-        var z = this.map.getZoom() + this.zoomOffset;
+        var z = this.serverResolutions != null ?
+            OpenLayers.Util.indexOf(this.serverResolutions, res) :
+            this.map.getZoom() + this.zoomOffset;
 
-        var url = this.url;
-        var s = '' + x + y + z;
-        if (url instanceof Array)
-        {
-            url = this.selectUrl(s, url);
-        }
-        
-        var path = OpenLayers.String.format(url, {'x': x, 'y': y, 'z': z});
-
-        return path;
+        return {'x': x, 'y': y, 'z': z};
     },
     
     /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/Yahoo.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/Yahoo.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/Yahoo.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -8,6 +8,7 @@
  * @requires OpenLayers/Layer/SphericalMercator.js
  * @requires OpenLayers/Layer/EventPane.js
  * @requires OpenLayers/Layer/FixedZoomLevels.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer/Zoomify.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer/Zoomify.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer/Zoomify.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -105,7 +105,7 @@
      */
     initializeZoomify: function( size ) {
 
-        var imageSize = size.clone()
+        var imageSize = size.clone();
         var tiles = new OpenLayers.Size(
             Math.ceil( imageSize.w / this.standardTileSize ),
             Math.ceil( imageSize.h / this.standardTileSize )
@@ -151,9 +151,9 @@
         OpenLayers.Layer.Grid.prototype.destroy.apply(this, arguments);
 
         // Remove from memory the Zoomify pyramid - is that enough?
-        this.tileCountUpToTier.length = 0
-        this.tierSizeInTiles.length = 0
-        this.tierImageSize.length = 0
+        this.tileCountUpToTier.length = 0;
+        this.tierSizeInTiles.length = 0;
+        this.tierImageSize.length = 0;
 
     },
 
@@ -219,7 +219,7 @@
      */
     getImageSize: function() {
         if (arguments.length > 0) {
-            bounds = this.adjustBounds(arguments[0]);
+            var bounds = this.adjustBounds(arguments[0]);
             var res = this.map.getResolution();
             var x = Math.round((bounds.left - this.tileOrigin.lon) / (res * this.tileSize.w));
             var y = Math.round((this.tileOrigin.lat - bounds.top) / (res * this.tileSize.h));

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Layer.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Layer.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Layer.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,10 +1,11 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Map.js
  * @requires OpenLayers/Projection.js
  */
@@ -80,9 +81,15 @@
      * moveend - Triggered when layer is done moving, object passed as
      *     argument has a zoomChanged boolean property which tells that the
      *     zoom has changed.
+     * added - Triggered after the layer is added to a map.  Listeners will
+     *     receive an object with a *map* property referencing the map and a
+     *     *layer* property referencing the layer.
+     * removed - Triggered after the layer is removed from the map.  Listeners
+     *     will receive an object with a *map* property referencing the map and
+     *     a *layer* property referencing the layer.
      */
     EVENT_TYPES: ["loadstart", "loadend", "loadcancel", "visibilitychanged",
-                  "move", "moveend"],
+                  "move", "moveend", "added", "removed"],
 
     /**
      * Constant: RESOLUTION_PROPERTIES
@@ -267,6 +274,18 @@
      * {Integer}
      */
     numZoomLevels: null,
+    
+    /**
+     * Property: restrictedMinZoom
+     * {Integer} Restriction of the minimum zoom level. This is used for layers
+     *     that only use a subset of the resolutions in the <resolutions>
+     *     array. This is independent of <numResolutions>, which always starts
+     *     counting at zoom level 0. If restrictedMinZoom is e.g. set to 2,
+     *     the first two zoom levels (0 and 1) will not be used by this layer.
+     *     If the layer is a base layer, zooming to the map's maxExtent means
+     *     setting the map's zoom to 2.
+     */
+    restrictedMinZoom: 0,
    
     /**
      * APIProperty: minScale
@@ -704,7 +723,9 @@
 
     /** 
      * APIMethod: display
-     * Hide or show the Layer
+     * Hide or show the Layer. This is designed to be used internally, and 
+     *     is not generally the way to enable or disable the layer. For that,
+     *     use the setVisibility function instead..
      * 
      * Parameters:
      * display - {Boolean}
@@ -731,7 +752,8 @@
         } else {
             if (this.map) {
                 var resolution = this.map.getResolution();
-                inRange = ( (resolution >= this.minResolution) &&
+                inRange = ( this.map.getZoom() >= this.restrictedMinZoom &&
+                            (resolution >= this.minResolution) &&
                             (resolution <= this.maxResolution) );
             }
         }
@@ -1162,7 +1184,7 @@
             }
             zoom = Math.max(0, i-1);
         }
-        return zoom;
+        return Math.max(this.restrictedMinZoom, zoom);
     },
     
     /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Map.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Map.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Map.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,13 +1,15 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Util.js
  * @requires OpenLayers/Events.js
  * @requires OpenLayers/Tween.js
  * @requires OpenLayers/Console.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**
@@ -505,18 +507,27 @@
         this.viewPortDiv.className = "olMapViewport";
         this.div.appendChild(this.viewPortDiv);
 
+        // the eventsDiv is where we listen for all map events
+        var eventsDiv = document.createElement("div");
+        eventsDiv.id = this.id + "_events";
+        eventsDiv.style.position = "absolute";
+        eventsDiv.style.width = "100%";
+        eventsDiv.style.height = "100%";
+        eventsDiv.style.zIndex = this.Z_INDEX_BASE.Control - 1;
+        this.viewPortDiv.appendChild(eventsDiv);
+        this.eventsDiv = eventsDiv;
+        this.events = new OpenLayers.Events(
+            this, this.eventsDiv, this.EVENT_TYPES, this.fallThrough, 
+            {includeXY: true}
+        );
+
         // the layerContainerDiv is the one that holds all the layers
         id = this.id + "_OpenLayers_Container";
         this.layerContainerDiv = OpenLayers.Util.createDiv(id);
         this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE['Popup']-1;
         
-        this.viewPortDiv.appendChild(this.layerContainerDiv);
+        this.eventsDiv.appendChild(this.layerContainerDiv);
 
-        this.events = new OpenLayers.Events(this, 
-                                            this.div, 
-                                            this.EVENT_TYPES, 
-                                            this.fallThrough, 
-                                            {includeXY: true});
         this.updateSize();
         if(this.eventListeners instanceof Object) {
             this.events.on(this.eventListeners);
@@ -610,7 +621,6 @@
     render: function(div) {
         this.div = OpenLayers.Util.getElement(div);
         OpenLayers.Element.addClass(this.div, 'olMap');
-        this.events.attachToElement(this.div);
         this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);
         this.div.appendChild(this.viewPortDiv);
         this.updateSize();
@@ -942,6 +952,7 @@
         }
 
         this.events.triggerEvent("addlayer", {layer: layer});
+        layer.events.triggerEvent("added", {map: this, layer: layer});
         layer.afterAdd();
     },
 
@@ -1016,6 +1027,7 @@
         this.resetLayersZIndex();
 
         this.events.triggerEvent("removelayer", {layer: layer});
+        layer.events.triggerEvent("removed", {map: this, layer: layer});
     },
 
     /**
@@ -1797,8 +1809,8 @@
      *           within the min/max range of zoom levels.
      */
     isValidZoomLevel: function(zoomLevel) {
-       return ( (zoomLevel != null) &&
-                (zoomLevel >= 0) && 
+        return ( (zoomLevel != null) &&
+                (zoomLevel >= this.getRestrictedMinZoom()) && 
                 (zoomLevel < this.getNumZoomLevels()) );
     },
     
@@ -1903,6 +1915,20 @@
     },
     
     /**
+     * Method: getRestricteMinZoom
+     *
+     * Returns:
+     * {Integer} the minimum zoom level allowed for the current baseLayer.
+     */
+    getRestrictedMinZoom: function() {
+        var minZoom = null;
+        if (this.baseLayer != null) {
+            minZoom = this.baseLayer.restrictedMinZoom;
+        }
+        return minZoom;
+    },
+    
+    /**
      * APIMethod: getNumZoomLevels
      * 
      * Returns:

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Marker/Box.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Marker/Box.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Marker/Box.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Marker.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Marker.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Marker.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,10 +1,11 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Events.js
  * @requires OpenLayers/Icon.js
  */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Popup/Anchored.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Popup/Anchored.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Popup/Anchored.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -186,10 +186,10 @@
         var size = this.size || this.contentSize;
 
         var top = (this.relativePosition.charAt(0) == 't');
-        newPx.y += (top) ? -(size.h + this.anchor.size.h) : this.anchor.size.h;
+        newPx.y += (top) ? -size.h : this.anchor.size.h;
         
         var left = (this.relativePosition.charAt(1) == 'l');
-        newPx.x += (left) ? -(size.w + this.anchor.size.w) : this.anchor.size.w;
+        newPx.x += (left) ? -size.w : this.anchor.size.w;
 
         return newPx;   
     },

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Popup/AnchoredBubble.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Popup/AnchoredBubble.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Popup/AnchoredBubble.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -6,6 +6,7 @@
 
 /**
  * @requires OpenLayers/Popup/Anchored.js
+ * @requires Rico/Corner.js
  */
 
 /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Popup/Framed.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Popup/Framed.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Popup/Framed.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Popup/FramedCloud.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Popup/FramedCloud.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Popup/FramedCloud.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -6,6 +6,9 @@
 /**
  * @requires OpenLayers/Popup/Framed.js
  * @requires OpenLayers/Util.js
+ * @requires OpenLayers/BaseTypes/Bounds.js
+ * @requires OpenLayers/BaseTypes/Pixel.js
+ * @requires OpenLayers/BaseTypes/Size.js
  */
 
 /**

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Popup.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Popup.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Popup.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
+ */
 
+
 /**
  * Class: OpenLayers.Popup
  * A popup is a small div that can opened and closed on the map.
@@ -337,7 +341,7 @@
         }
         
         //listen to movestart, moveend to disable overflow (FF bug)
-        if (!this.disableFirefoxOverflowHack && OpenLayers.Util.getBrowserName() == 'firefox') {
+        if (!this.disableFirefoxOverflowHack && OpenLayers.BROWSER_NAME == 'firefox') {
             this.map.events.register("movestart", this, function() {
                 var style = document.defaultView.getComputedStyle(
                     this.contentDiv, null
@@ -478,7 +482,7 @@
         //now if our browser is IE, we need to actually make the contents 
         // div itself bigger to take its own padding into effect. this makes 
         // me want to shoot someone, but so it goes.
-        if (OpenLayers.Util.getBrowserName() == "msie") {
+        if (OpenLayers.BROWSER_NAME == "msie") {
             this.contentSize.w += 
                 contentDivPadding.left + contentDivPadding.right;
             this.contentSize.h += 

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Projection.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Projection.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Projection.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Util.js
  */
 
@@ -26,6 +27,12 @@
      * {String}
      */
     projCode: null,
+    
+    /**
+     * Property: titleRegEx
+     * {RegEx} regular expression to strip the title from a proj4js definition
+     */
+    titleRegEx: /\+title=[^\+]*/,
 
     /**
      * Constructor: OpenLayers.Projection
@@ -92,11 +99,20 @@
      * {Boolean} The two projections are equivalent.
      */
     equals: function(projection) {
-        if (projection && projection.getCode) {
-            return this.getCode() == projection.getCode();
-        } else {
-            return false;
-        }    
+        var p = projection, equals = false;
+        if (p) {
+            if (window.Proj4js && this.proj.defData && p.proj.defData) {
+                equals = this.proj.defData.replace(this.titleRegEx, "") ==
+                    p.proj.defData.replace(this.titleRegEx, "");
+            } else if (p.getCode) {
+                var source = this.getCode(), target = p.getCode();
+                equals = source == target ||
+                    !!OpenLayers.Projection.transforms[source] &&
+                    OpenLayers.Projection.transforms[source][target] ===
+                        OpenLayers.Projection.nullTransform;
+            }
+        }
+        return equals;   
     },
 
     /* Method: destroy
@@ -176,3 +192,23 @@
     }
     return point;
 };
+
+/**
+ * APIFunction: nullTransform
+ * A null transformation - useful for defining projection aliases when
+ * proj4js is not available:
+ *
+ * (code)
+ * OpenLayers.Projection.addTransform("EPSG:4326", "EPSG:3857",
+ *     OpenLayers.Layer.SphericalMercator.projectForward);
+ * OpenLayers.Projection.addTransform("EPSG:3857", "EPSG:3857",
+ *     OpenLayers.Layer.SphericalMercator.projectInverse);
+ * OpenLayers.Projection.addTransform("EPSG:3857", "EPSG:900913",
+ *     OpenLayers.Projection.nullTransform);
+ * OpenLayers.Projection.addTransform("EPSG:900913", "EPSG:3857",
+ *     OpenLayers.Projection.nullTransform);
+ * (end)
+ */
+OpenLayers.Projection.nullTransform = function(point) {
+    return point;
+};

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Protocol/HTTP.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Protocol/HTTP.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Protocol/HTTP.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/Console.js
  * @requires OpenLayers/Protocol.js
  * @requires OpenLayers/Feature/Vector.js
  * @requires OpenLayers/Filter/Spatial.js
@@ -79,6 +80,15 @@
     wildcarded: false,
 
     /**
+     * APIProperty: srsInBBOX
+     * {Boolean} Include the SRS identifier in BBOX query string parameter.  
+     *     Default is false.  If true and the layer has a projection object set,
+     *     any BBOX filter will be serialized with a fifth item identifying the
+     *     projection.  E.g. bbox=-1000,-1000,1000,1000,EPSG:900913
+     */
+    srsInBBOX: false,
+
+    /**
      * Constructor: OpenLayers.Protocol.HTTP
      * A class for giving layers generic HTTP protocol.
      *
@@ -199,6 +209,9 @@
                 switch(filter.type) {
                     case OpenLayers.Filter.Spatial.BBOX:
                         params.bbox = filter.value.toArray();
+                        if (this.srsInBBOX && filter.projection) {
+                            params.bbox.push(filter.projection.getCode());
+                        }
                         break;
                     case OpenLayers.Filter.Spatial.DWITHIN:
                         params.tolerance = filter.distance;

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Protocol/SOS/v1_0_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Protocol/SOS/v1_0_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Protocol/SOS/v1_0_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Protocol/SOS.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Protocol/SOS.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Protocol/SOS.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Protocol/SQL/Gears.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Protocol/SQL/Gears.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Protocol/SQL/Gears.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Protocol/SQL.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Protocol/SQL.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Protocol/SQL.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Protocol/WFS/v1.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Protocol/WFS/v1.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Protocol/WFS/v1.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -77,7 +77,7 @@
      *     the response with the default format (WFST) and we need a different 
      *     format for reading. 
      */ 
-    readFormat: null,     
+    readFormat: null,
     
     /**
      * Property: readOptions
@@ -142,12 +142,26 @@
     },
 
     /**
-     * Method: read
+     * APIMethod: 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).
+     *
+     * To use a configured protocol to get e.g. a WFS hit count, applications
+     * could do the following:
+     *
+     * (code)
+     * protocol.read({
+     *     readOptions: {output: "object"},
+     *     resultType: "hits",
+     *     maxFeatures: null,
+     *     callback: function(resp) {
+     *         // process resp.numberOfFeatures here
+     *     }
+     * });
+     * (end)
      */
     read: function(options) {
         OpenLayers.Protocol.prototype.read.apply(this, arguments);
@@ -180,15 +194,18 @@
      * options - {Object} The user options passed to the read call.
      */
     handleRead: function(response, options) {
+        options = OpenLayers.Util.extend({}, options);
+        OpenLayers.Util.applyDefaults(options, this.options);
+
         if(options.callback) {
             var request = response.priv;
             if(request.status >= 200 && request.status < 300) {
                 // success
-                if (this.readOptions && this.readOptions.output == "object") {
+                if (options.readOptions && options.readOptions.output == "object") {
                     OpenLayers.Util.extend(response, 
-                        this.parseResponse(request, this.readOptions));
+                        this.parseResponse(request, options.readOptions));
                 } else {
-                    response.features = this.parseResponse(request);
+                    response.features = this.parseResponse(request, options.readOptions);
                 }
                 response.code = OpenLayers.Protocol.Response.SUCCESS;
             } else {

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Protocol/WFS/v1_0_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Protocol/WFS/v1_0_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Protocol/WFS/v1_0_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Protocol/WFS/v1_1_0.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Protocol/WFS/v1_1_0.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Protocol/WFS/v1_1_0.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -42,7 +42,27 @@
      * featurePrefix - {String} Feature namespace alias (optional - only used
      *     if featureNS is provided).  Default is 'feature'.
      * geometryName - {String} Name of geometry attribute.  Default is 'the_geom'.
+     * outputFormat - {String} Optional output format to use for WFS GetFeature
+     *     requests. This can be any format advertized by the WFS's
+     *     GetCapabilities response. If set, an appropriate readFormat also
+     *     has to be provided, unless outputFormat is GML3, GML2 or JSON.
+     * readFormat - {<OpenLayers.Format>} An appropriate format parser if
+     *     outputFormat is none of GML3, GML2 or JSON.
      */
+    initialize: function(options) {
+        OpenLayers.Protocol.WFS.v1.prototype.initialize.apply(this, arguments);
+        if (this.outputFormat && !this.readFormat) {
+            if (this.outputFormat.toLowerCase() == "gml2") {
+                this.readFormat = new OpenLayers.Format.GML.v2({
+                    featureType: this.featureType,
+                    featureNS: this.featureNS,
+                    geometryName: this.geometryName
+                });
+            } else if (this.outputFormat.toLowerCase() == "json") {
+                this.readFormat = new OpenLayers.Format.GeoJSON();
+            }
+        }
+    },
    
     CLASS_NAME: "OpenLayers.Protocol.WFS.v1_1_0"
 });

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Protocol/WFS.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Protocol/WFS.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Protocol/WFS.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Protocol.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Protocol.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Protocol.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
+ */
+
+/**
  * Class: OpenLayers.Protocol
  * Abstract vector layer protocol class.  Not to be instantiated directly.  Use
  *     one of the protocol subclasses instead.

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Renderer/Canvas.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Renderer/Canvas.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Renderer/Canvas.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -84,22 +84,6 @@
     },    
     
     /**
-     * Method: setExtent
-     * Set the visible part of the layer.
-     *
-     * Resolution has probably changed, so we nullify the resolution 
-     * cache (this.resolution), then redraw. 
-     *
-     * Parameters:
-     * extent - {<OpenLayers.Bounds>} 
-     */
-    setExtent: function(extent) {
-        this.extent = extent.clone();
-        this.resolution = null;
-        this.redraw();
-    },
-    
-    /**
      * Method: setSize
      * Sets the size of the drawing surface.
      *

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Renderer/Elements.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Renderer/Elements.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Renderer/Elements.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -509,10 +509,13 @@
         };
 
         rendered = false;
+        var removeBackground = false;
         if (style.display != "none") {
             if (style.backgroundGraphic) {
                 this.redrawBackgroundNode(geometry.id, geometry, style,
                     featureId);
+            } else {
+                removeBackground = true;
             }
             rendered = this.redrawNode(geometry.id, geometry, style,
                 featureId);
@@ -521,12 +524,18 @@
             var node = document.getElementById(geometry.id);
             if (node) {
                 if (node._style.backgroundGraphic) {
-                    node.parentNode.removeChild(document.getElementById(
-                        geometry.id + this.BACKGROUND_ID_SUFFIX));
+                    removeBackground = true;
                 }
                 node.parentNode.removeChild(node);
             }
         }
+        if (removeBackground) {
+            var node = document.getElementById(
+                geometry.id + this.BACKGROUND_ID_SUFFIX);
+            if (node) {
+                node.parentNode.removeChild(node);
+            }
+        }
         return rendered;
     },
     

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Renderer/SVG.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Renderer/SVG.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Renderer/SVG.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -50,20 +50,6 @@
     symbolMetrics: null,
     
     /**
-     * Property: isGecko
-     * {Boolean}
-     */
-    isGecko: null,
-
-    /**
-     * Property: supportUse
-     * {Boolean} true if defs/use is supported - known to not work as expected
-     * at least in some applewebkit/5* builds.
-     * See https://bugs.webkit.org/show_bug.cgi?id=33322
-     */
-    supportUse: null,
-
-    /**
      * Constructor: OpenLayers.Renderer.SVG
      * 
      * Parameters:
@@ -76,8 +62,6 @@
         OpenLayers.Renderer.Elements.prototype.initialize.apply(this, 
                                                                 arguments);
         this.translationParameters = {x: 0, y: 0};
-        this.supportUse = (navigator.userAgent.toLowerCase().indexOf("applewebkit/5") == -1);
-        this.isGecko = (navigator.userAgent.toLowerCase().indexOf("gecko/") != -1);
         
         this.symbolMetrics = {};
     },
@@ -222,7 +206,7 @@
                 if (style.externalGraphic) {
                     nodeType = "image";
                 } else if (this.isComplexSymbol(style.graphicName)) {
-                    nodeType = this.supportUse === false ? "svg" : "use";
+                    nodeType = "svg";
                 } else {
                     nodeType = "circle";
                 }
@@ -313,17 +297,17 @@
                     parent.removeChild(node);
                 }
                 
-                if(this.supportUse === false) {
-                    // workaround for webkit versions that cannot do defs/use
-                    // (see https://bugs.webkit.org/show_bug.cgi?id=33322):
-                    // copy the symbol instead of referencing it
-                    var src = document.getElementById(id);
-                    node.firstChild && node.removeChild(node.firstChild);
-                    node.appendChild(src.firstChild.cloneNode(true));
-                    node.setAttributeNS(null, "viewBox", src.getAttributeNS(null, "viewBox"));
-                } else {
-                    node.setAttributeNS(this.xlinkns, "href", "#" + id);
-                }
+                // The more appropriate way to implement this would be use/defs,
+                // but due to various issues in several browsers, it is safer to
+                // copy the symbols instead of referencing them. 
+                // See e.g. ticket http://trac.osgeo.org/openlayers/ticket/2985 
+                // and this email thread
+                // http://osgeo-org.1803224.n2.nabble.com/Select-Control-Ctrl-click-on-Feature-with-a-graphicName-opens-new-browser-window-tc5846039.html
+                var src = document.getElementById(id);
+                node.firstChild && node.removeChild(node.firstChild);
+                node.appendChild(src.firstChild.cloneNode(true));
+                node.setAttributeNS(null, "viewBox", src.getAttributeNS(null, "viewBox"));
+                
                 node.setAttributeNS(null, "width", size);
                 node.setAttributeNS(null, "height", size);
                 node.setAttributeNS(null, "x", pos.x - offset);
@@ -341,18 +325,20 @@
             }
 
             var rotation = style.rotation;
+            
             if ((rotation !== undefined || node._rotation !== undefined) && pos) {
                 node._rotation = rotation;
                 rotation |= 0;
-                if(node.nodeName !== "svg") {
-                    node.setAttributeNS(null, "transform",
-                        "rotate(" + rotation + " " + pos.x + " " +
-                        pos.y + ")");
+                if (node.nodeName !== "svg") { 
+                    node.setAttributeNS(null, "transform", 
+                        "rotate(" + rotation + " " + pos.x + " " + 
+                        pos.y + ")"); 
                 } else {
-                     var metrics = this.symbolMetrics[id];
-                     node.firstChild.setAttributeNS(null, "transform",
-                     "rotate(" + style.rotation + " " + metrics[1] +
-                         " " +  metrics[2] + ")");
+                    var metrics = this.symbolMetrics[id];
+                    node.firstChild.setAttributeNS(null, "transform", "rotate(" 
+                        + rotation + " " 
+                        + metrics[1] + " "
+                        + metrics[2] + ")");
                 }
             }
         }
@@ -735,7 +721,7 @@
         label.setAttributeNS(null, "text-anchor",
             OpenLayers.Renderer.SVG.LABEL_ALIGN[align[0]] || "middle");
 
-        if (this.isGecko) {
+        if (OpenLayers.IS_GECKO === true) {
             label.setAttributeNS(null, "dominant-baseline",
                 OpenLayers.Renderer.SVG.LABEL_ALIGN[align[1]] || "central");
         } else {
@@ -958,7 +944,7 @@
      */
     getFeatureIdFromEvent: function(evt) {
         var featureId = OpenLayers.Renderer.Elements.prototype.getFeatureIdFromEvent.apply(this, arguments);
-        if(this.supportUse === false && !featureId) {
+        if(!featureId) {
             var target = evt.target;
             featureId = target.parentNode && target != this.rendererRoot &&
                 target.parentNode._featureId;

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Renderer/VML.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Renderer/VML.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Renderer/VML.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -219,6 +219,7 @@
 
         if (node._geometryClass === "OpenLayers.Geometry.Point") {
             if (style.externalGraphic) {
+                options.isFilled = true;
                 if (style.graphicTitle) {
                     node.title=style.graphicTitle;
                 } 
@@ -751,21 +752,43 @@
         var resolution = this.getResolution();
     
         var path = [];
-        var linearRing, i, j, len, ilen, comp, x, y;
-        for (j = 0, len=geometry.components.length; j<len; j++) {
-            linearRing = geometry.components[j];
-
+        var j, jj, points, area, first, second, i, ii, comp, pathComp, x, y;
+        for (j=0, jj=geometry.components.length; j<jj; j++) {
             path.push("m");
-            for (i=0, ilen=linearRing.components.length; i<ilen; i++) {
-                comp = linearRing.components[i];
+            points = geometry.components[j].components;
+            // we only close paths of interior rings with area
+            area = (j === 0);
+            first = null;
+            second = null;
+            for (i=0, ii=points.length; i<ii; i++) {
+                comp = points[i];
                 x = (comp.x / resolution - this.offset.x) | 0;
                 y = (comp.y / resolution - this.offset.y) | 0;
-                path.push(" " + x + "," + y);
+                pathComp = " " + x + "," + y;
+                path.push(pathComp);
                 if (i==0) {
                     path.push(" l");
                 }
+                if (!area) {
+                    // IE improperly renders sub-paths that have no area.
+                    // Instead of checking the area of every ring, we confirm
+                    // the ring has at least three distinct points.  This does
+                    // not catch all non-zero area cases, but it greatly improves
+                    // interior ring digitizing and is a minor performance hit
+                    // when rendering rings with many points.
+                    if (!first) {
+                        first = pathComp;
+                    } else if (first != pathComp) {
+                        if (!second) {
+                            second = pathComp;
+                        } else if (second != pathComp) {
+                            // stop looking
+                            area = true;
+                        }
+                    }
+                }
             }
-            path.push(" x ");
+            path.push(area ? " x " : " ");
         }
         path.push("e");
         node.path = path.join("");

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Renderer.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Renderer.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Renderer.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
+ */
+
+/**
  * Class: OpenLayers.Renderer 
  * This is the base class for all renderers.
  *
@@ -182,8 +186,8 @@
                 if(style.display != "none" && style.label && rendered !== false) {
                     var location = feature.geometry.getCentroid(); 
                     if(style.labelXOffset || style.labelYOffset) {
-                        xOffset = isNaN(style.labelXOffset) ? 0 : style.labelXOffset;
-                        yOffset = isNaN(style.labelYOffset) ? 0 : style.labelYOffset;
+                        var xOffset = isNaN(style.labelXOffset) ? 0 : style.labelXOffset;
+                        var yOffset = isNaN(style.labelYOffset) ? 0 : style.labelYOffset;
                         var res = this.getResolution();
                         location.move(xOffset*res, yOffset*res);
                     }

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Request/XMLHttpRequest.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Request/XMLHttpRequest.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Request/XMLHttpRequest.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -24,14 +24,20 @@
     // Define on browser type
     var bGecko    = !!window.controllers,
         bIE        = window.document.all && !window.opera,
-        bIE7    = bIE && window.navigator.userAgent.match(/MSIE ([\.0-9]+)/) && RegExp.$1 == 7;
+        bIE7    = bIE && window.navigator.userAgent.match(/MSIE 7.0/);
 
-    // Constructor
-    function cXMLHttpRequest() {
+    // Enables "XMLHttpRequest()" call next to "new XMLHttpReques()"
+    function fXMLHttpRequest() {
         this._object    = oXMLHttpRequest && !bIE7 ? new oXMLHttpRequest : new window.ActiveXObject("Microsoft.XMLHTTP");
         this._listeners    = [];
     };
 
+    // Constructor
+    function cXMLHttpRequest() {
+        return new fXMLHttpRequest;
+    };
+    cXMLHttpRequest.prototype    = fXMLHttpRequest.prototype;
+
     // BUGFIX: Firefox with Firebug installed would break pages if not executed
     if (bGecko && oXMLHttpRequest.wrapped)
         cXMLHttpRequest.wrapped    = oXMLHttpRequest.wrapped;
@@ -50,6 +56,9 @@
     cXMLHttpRequest.prototype.status        = 0;
     cXMLHttpRequest.prototype.statusText    = '';
 
+    // Priority proposal
+    cXMLHttpRequest.prototype.priority        = "NORMAL";
+
     // Instance-level Events Handlers
     cXMLHttpRequest.prototype.onreadystatechange    = null;
 
@@ -85,7 +94,7 @@
                     oRequest.abort();
                 }
             };
-                window.attachEvent("onunload", fOnUnload);
+            window.attachEvent("onunload", fOnUnload);
         }
 
         // Add method sniffer
@@ -100,10 +109,8 @@
         else
             this._object.open(sMethod, sUrl, bAsync);
 
-        if (!bGecko && !bIE) {
-            this.readyState    = cXMLHttpRequest.OPENED;
-            fReadyStateChange(this);
-        }
+        this.readyState    = cXMLHttpRequest.OPENED;
+        fReadyStateChange(this);
 
         this._object.onreadystatechange    = function() {
             if (bGecko && !bAsync)
@@ -125,6 +132,10 @@
             }
 
             if (oRequest.readyState == cXMLHttpRequest.DONE) {
+                // Free up queue
+                delete oRequest._data;
+/*                if (bAsync)
+                    fQueue_remove(oRequest);*/
                 //
                 fCleanTransport(oRequest);
 // Uncomment this block if you need a fix for IE cache
@@ -140,7 +151,7 @@
                     // Re-send request
                     if (sUser) {
                          if (sPassword)
-                    oRequest._object.open(sMethod, sUrl, bAsync, sUser, sPassword);
+                            oRequest._object.open(sMethod, sUrl, bAsync, sUser, sPassword);
                         else
                             oRequest._object.open(sMethod, sUrl, bAsync, sUser);
                     }
@@ -205,38 +216,50 @@
             nState    = oRequest.readyState;
         }
     };
+    function fXMLHttpRequest_send(oRequest) {
+        oRequest._object.send(oRequest._data);
+
+        // BUGFIX: Gecko - missing readystatechange calls in synchronous requests
+        if (bGecko && !oRequest._async) {
+            oRequest.readyState    = cXMLHttpRequest.OPENED;
+
+            // Synchronize state
+            fSynchronizeValues(oRequest);
+
+            // Simulate missing states
+            while (oRequest.readyState < cXMLHttpRequest.DONE) {
+                oRequest.readyState++;
+                fReadyStateChange(oRequest);
+                // Check if we are aborted
+                if (oRequest._aborted)
+                    return;
+            }
+        }
+    };
     cXMLHttpRequest.prototype.send    = function(vData) {
         // Add method sniffer
         if (cXMLHttpRequest.onsend)
             cXMLHttpRequest.onsend.apply(this, arguments);
 
+        if (!arguments.length)
+            vData    = null;
+
         // BUGFIX: Safari - fails sending documents created/modified dynamically, so an explicit serialization required
         // BUGFIX: IE - rewrites any custom mime-type to "text/xml" in case an XMLNode is sent
         // BUGFIX: Gecko - fails sending Element (this is up to the implementation either to standard)
         if (vData && vData.nodeType) {
             vData    = window.XMLSerializer ? new window.XMLSerializer().serializeToString(vData) : vData.xml;
-            if (!this._headers["Content-Type"])
-                this._object.setRequestHeader("Content-Type", "application/xml");
+            if (!oRequest._headers["Content-Type"])
+                oRequest._object.setRequestHeader("Content-Type", "application/xml");
         }
 
-        this._object.send(vData);
-
-        // BUGFIX: Gecko - missing readystatechange calls in synchronous requests
-        if (bGecko && !this._async) {
-            this.readyState    = cXMLHttpRequest.OPENED;
-
-            // Synchronize state
-            fSynchronizeValues(this);
-
-            // Simulate missing states
-            while (this.readyState < cXMLHttpRequest.DONE) {
-                this.readyState++;
-                fReadyStateChange(this);
-                // Check if we are aborted
-                if (this._aborted)
-                    return;
-            }
-        }
+        this._data    = vData;
+/*
+        // Add to queue
+        if (this._async)
+            fQueue_add(this);
+        else*/
+            fXMLHttpRequest_send(this);
     };
     cXMLHttpRequest.prototype.abort    = function() {
         // Add method sniffer
@@ -251,6 +274,12 @@
 
         // BUGFIX: IE - memory leak
         fCleanTransport(this);
+
+        this.readyState    = cXMLHttpRequest.UNSENT;
+
+        delete this._data;
+/*        if (this._async)
+            fQueue_remove(this);*/
     };
     cXMLHttpRequest.prototype.getAllResponseHeaders    = function() {
         return this._object.getAllResponseHeaders();
@@ -361,7 +390,45 @@
         // BUGFIX: IE - memory leak (on-page leak)
         oRequest._object.onreadystatechange    = new window.Function;
     };
+/*
+    // Queue manager
+    var oQueuePending    = {"CRITICAL":[],"HIGH":[],"NORMAL":[],"LOW":[],"LOWEST":[]},
+        aQueueRunning    = [];
+    function fQueue_add(oRequest) {
+        oQueuePending[oRequest.priority in oQueuePending ? oRequest.priority : "NORMAL"].push(oRequest);
+        //
+        setTimeout(fQueue_process);
+    };
 
+    function fQueue_remove(oRequest) {
+        for (var nIndex = 0, bFound    = false; nIndex < aQueueRunning.length; nIndex++)
+            if (bFound)
+                aQueueRunning[nIndex - 1]    = aQueueRunning[nIndex];
+            else
+            if (aQueueRunning[nIndex] == oRequest)
+                bFound    = true;
+        if (bFound)
+            aQueueRunning.length--;
+        //
+        setTimeout(fQueue_process);
+    };
+
+    function fQueue_process() {
+        if (aQueueRunning.length < 6) {
+            for (var sPriority in oQueuePending) {
+                if (oQueuePending[sPriority].length) {
+                    var oRequest    = oQueuePending[sPriority][0];
+                    oQueuePending[sPriority]    = oQueuePending[sPriority].slice(1);
+                    //
+                    aQueueRunning.push(oRequest);
+                    // Send request
+                    fXMLHttpRequest_send(oRequest);
+                    break;
+                }
+            }
+        }
+    };
+*/
     // Internet Explorer 5.0 (missing apply)
     if (!window.Function.prototype.apply) {
         window.Function.prototype.apply    = function(oRequest, oArguments) {
@@ -381,4 +448,4 @@
      *     http://code.google.com/p/xmlhttprequest/.
      */
     OpenLayers.Request.XMLHttpRequest = cXMLHttpRequest;
-})();
\ No newline at end of file
+})();

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Request.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Request.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Request.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -36,6 +36,11 @@
     },
     
     /**
+     * Constant: URL_SPLIT_REGEX
+     */
+    URL_SPLIT_REGEX: /([^:]*:)\/\/([^:]*:?[^@]*@)?([^:\/\?]*):?([^\/\?]*)/,
+    
+    /**
      * APIProperty: events
      * {<OpenLayers.Events>} An events object that handles all 
      *     events on the {<OpenLayers.Request>} object.
@@ -120,19 +125,30 @@
 
         // create request, open, and set headers
         var request = new OpenLayers.Request.XMLHttpRequest();
-        var url = config.url;
-        if(config.params) {
-            var paramString = OpenLayers.Util.getParameterString(config.params);
-            if(paramString.length > 0) {
-                var separator = (url.indexOf('?') > -1) ? '&' : '?';
-                url += separator + paramString;
+        var url = OpenLayers.Util.urlAppend(config.url, 
+            OpenLayers.Util.getParameterString(config.params || {}));
+        var sameOrigin = !(url.indexOf("http") == 0);
+        var urlParts = !sameOrigin && url.match(this.URL_SPLIT_REGEX);
+        if (urlParts) {
+            var location = window.location;
+            sameOrigin =
+                urlParts[1] == location.protocol &&
+                urlParts[3] == location.hostname;
+            var uPort = urlParts[4], lPort = location.port;
+            if (uPort != 80 && uPort != "" || lPort != "80" && lPort != "") {
+                sameOrigin = sameOrigin && uPort == lPort;
             }
         }
-        if(config.proxy && (url.indexOf("http") == 0)) {
-            if(typeof config.proxy == "function") {
-                url = config.proxy(url);
+        if (!sameOrigin) {
+            if (config.proxy) {
+                if (typeof config.proxy == "function") {
+                    url = config.proxy(url);
+                } else {
+                    url = config.proxy + encodeURIComponent(url);
+                }
             } else {
-                url = config.proxy + encodeURIComponent(url);
+                OpenLayers.Console.warn(
+                    OpenLayers.i18n("proxyNeeded"), {url: url});
             }
         }
         request.open(
@@ -169,7 +185,7 @@
             request.send(config.data);
         } else {
             window.setTimeout(function(){
-                if (request._aborted !== true) {
+                if (request.readyState !== 0) { // W3C: 0-UNSENT
                     request.send(config.data);
                 }
             }, 0);

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Rule.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Rule.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Rule.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,10 +1,11 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Util.js
  * @requires OpenLayers/Style.js
  * @requires OpenLayers/Symbolizer/Point.js

Modified: sandbox/tschaub/canvas/lib/OpenLayers/SingleFile.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/SingleFile.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/SingleFile.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,19 +1,43 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
 
 var OpenLayers = {
+    /**
+     * Constant: VERSION_NUMBER
+     */
+    VERSION_NUMBER: "$Revision$",
+
+    /**
+     * Constant: singleFile
+     * TODO: remove this in 3.0 when we stop supporting build profiles that
+     * include OpenLayers.js
+     */
     singleFile: true,
+
+    /**
+     * Method: _getScriptLocation
+     * Return the path to this script. This is also implemented in
+     * OpenLayers.js
+     *
+     * Returns:
+     * {String} Path to this script
+     */
     _getScriptLocation: (function() {
-        var s = document.getElementsByTagName('script');
-        var match = s[s.length-1].getAttribute("src").match(/(^|(.*?\/))(OpenLayers\.js)(\?|$)/);
-        var l = match ? match[1] : "";
+        var r = new RegExp("(^|(.*?\\/))(OpenLayers\.js)(\\?|$)"),
+            s = document.getElementsByTagName('script'),
+            src, m, l = "";
+        for(var i=0, len=s.length; i<len; i++) {
+            src = s[i].getAttribute('src');
+            if(src) {
+                var m = src.match(r);
+                if(m) {
+                    l = m[1];
+                    break;
+                }
+            }
+        }
         return (function() { return l; });
     })()
 };
-
-/**
- * Constant: VERSION_NUMBER
- */
-OpenLayers.VERSION_NUMBER="$Revision$";

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Strategy/BBOX.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Strategy/BBOX.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Strategy/BBOX.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Cluster.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Cluster.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Cluster.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Filter.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Filter.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Filter.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -45,14 +45,10 @@
      *
      * Parameters:
      * options - {Object} Optional object whose properties will be set on the
-     *     instance.  Strategy must be constructed with at least a <filter> 
-     *     property.
+     *     instance.
      */
     initialize: function(options) {
         OpenLayers.Strategy.prototype.initialize.apply(this, [options]);
-        if (!this.filter || !(this.filter instanceof OpenLayers.Filter)) {
-            throw new Error("Filter strategy must be constructed with a filter");
-        }
     },
 
     /**
@@ -102,7 +98,7 @@
      * Method: handleAdd
      */
     handleAdd: function(event) {
-        if (!this.caching) {
+        if (!this.caching && this.filter) {
             var features = event.features;
             event.features = [];
             var feature;

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Fixed.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Fixed.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Fixed.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Paging.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Paging.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Paging.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Refresh.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Refresh.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Refresh.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Save.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Save.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Strategy/Save.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Strategy.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Strategy.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Strategy.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
+ */
+
+/**
  * Class: OpenLayers.Strategy
  * Abstract vector layer strategy class.  Not to be instantiated directly.  Use
  *     one of the strategy subclasses instead.

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Style.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Style.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Style.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,10 +1,11 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Util.js
  * @requires OpenLayers/Feature/Vector.js
  */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Style2.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Style2.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Style2.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Rule.js
  * @requires OpenLayers/Symbolizer/Point.js
  * @requires OpenLayers/Symbolizer/Line.js

Modified: sandbox/tschaub/canvas/lib/OpenLayers/StyleMap.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/StyleMap.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/StyleMap.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Style.js
  * @requires OpenLayers/Feature/Vector.js
  */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Line.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Line.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Line.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Point.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Point.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Point.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Polygon.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Polygon.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Polygon.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Raster.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Raster.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Raster.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Text.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Text.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer/Text.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Symbolizer.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
+ */
+
+/**
  * Class: OpenLayers.Symbolizer
  * Base class representing a symbolizer used for feature rendering.
  */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Tile/Image/IFrame.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Tile/Image/IFrame.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Tile/Image/IFrame.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -42,7 +42,7 @@
                 delete iFrame;
             }
         } else {
-            OpenLayers.Tile.Image.prototype.clear.apply(this, arguments)
+            OpenLayers.Tile.Image.prototype.clear.apply(this, arguments);
         }
     },
 
@@ -84,7 +84,7 @@
             if (this.imgDiv == null) {
                 var eventPane = document.createElement("div");
 
-                if(OpenLayers.Util.getBrowserName() == "msie") {
+                if(OpenLayers.BROWSER_NAME == "msie") {
                     // IE cannot handle events on elements without backgroundcolor.
                     // So we use this little hack to make elements transparent
                     eventPane.style.backgroundColor = '#FFFFFF';
@@ -131,7 +131,7 @@
     createIFrame: function() {
         var id = this.id+'_iFrame';
         var iframe;
-        if(OpenLayers.Util.getBrowserName() == "msie") {
+        if(OpenLayers.BROWSER_NAME == "msie") {
             // InternetExplorer does not set the name attribute of an iFrame 
             // properly via DOM manipulation, so we need to do it on our own with
             // this hack.
@@ -221,4 +221,5 @@
 
         return form;
     }
-}
+};
+

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Tile/Image.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Tile/Image.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Tile/Image.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -589,7 +589,7 @@
         // before continuing execution.
         if (OpenLayers.Util.indexOf(this.layer.SUPPORTED_TRANSITIONS, 
                 this.layer.transitionEffect) != -1) {
-            if (navigator.userAgent.toLowerCase().indexOf("gecko") != -1) { 
+            if (OpenLayers.IS_GECKO === true) { 
                 this.frame.scrollLeft = this.frame.scrollLeft; 
             } 
         }
@@ -608,5 +608,5 @@
 );
 
 OpenLayers.Tile.Image.useBlankTile = ( 
-    OpenLayers.Util.getBrowserName() == "safari" || 
-    OpenLayers.Util.getBrowserName() == "opera"); 
+    OpenLayers.BROWSER_NAME == "safari" || 
+    OpenLayers.BROWSER_NAME == "opera"); 

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Tile/WFS.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Tile/WFS.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Tile/WFS.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Tile.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Tile.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Tile.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,12 +1,14 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Util.js
  * @requires OpenLayers/Console.js
+ * @requires OpenLayers/Lang.js
  */
 
 /*

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Tween.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Tween.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Tween.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes/Class.js
  * @requires OpenLayers/Console.js
  */
 

Modified: sandbox/tschaub/canvas/lib/OpenLayers/Util.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers/Util.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers/Util.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,16 +1,23 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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/BaseTypes.js
+ * @requires OpenLayers/BaseTypes/Bounds.js
+ * @requires OpenLayers/BaseTypes/Element.js
+ * @requires OpenLayers/BaseTypes/LonLat.js
+ * @requires OpenLayers/BaseTypes/Pixel.js
+ * @requires OpenLayers/BaseTypes/Size.js
  * @requires OpenLayers/Console.js
+ * @requires OpenLayers/Lang.js
  */
 
 /**
  * Namespace: Util
  */
-OpenLayers.Util = {};
+OpenLayers.Util = OpenLayers.Util || {};
 
 /** 
  * Function: getElement
@@ -53,53 +60,6 @@
     window.$ = OpenLayers.Util.getElement;
 }
 
-/**
- * APIFunction: extend
- * Copy all properties of a source object to a destination object.  Modifies
- *     the passed in destination object.  Any properties on the source object
- *     that are set to undefined will not be (re)set on the destination object.
- *
- * Parameters:
- * destination - {Object} The object that will be modified
- * source - {Object} The object with properties to be set on the destination
- *
- * Returns:
- * {Object} The destination object.
- */
-OpenLayers.Util.extend = function(destination, source) {
-    destination = destination || {};
-    if(source) {
-        for(var property in source) {
-            var value = source[property];
-            if(value !== undefined) {
-                destination[property] = value;
-            }
-        }
-
-        /**
-         * IE doesn't include the toString property when iterating over an object's
-         * properties with the for(property in object) syntax.  Explicitly check if
-         * the source has its own toString property.
-         */
-
-        /*
-         * FF/Windows < 2.0.0.13 reports "Illegal operation on WrappedNative
-         * prototype object" when calling hawOwnProperty if the source object
-         * is an instance of window.Event.
-         */
-
-        var sourceIsEvt = typeof window.Event == "function"
-                          && source instanceof window.Event;
-
-        if(!sourceIsEvt
-           && source.hasOwnProperty && source.hasOwnProperty('toString')) {
-            destination.toString = source.toString;
-        }
-    }
-    return destination;
-};
-
-
 /** 
  * Function: removeItem
  * Remove an object from an array. Iterates through the array
@@ -872,13 +832,11 @@
     if (precision == null) {
         precision = OpenLayers.Util.DEFAULT_PRECISION;
     }
-    var number;
-    if (precision == 0) {
+    if (typeof number !== "number") {
         number = parseFloat(number);
-    } else {
-        number = parseFloat(parseFloat(number).toPrecision(precision));
     }
-    return number;
+    return precision === 0 ? number :
+                             parseFloat(number.toPrecision(precision));
 };
 
 /**
@@ -1080,7 +1038,7 @@
             }
             
             // follow OGC convention of comma delimited values
-            value = value.split(",")
+            value = value.split(",");
 
             //if there's only one value, do not return as array                    
             if (value.length == 1) {
@@ -1336,51 +1294,142 @@
 
 /**
  * Function: pagePositon
- * Calculates the position of an element on the page. 
+ * Calculates the position of an element on the page (see
+ * http://code.google.com/p/doctype/wiki/ArticlePageOffset)
  *
+ * OpenLayers.Util.pagePosition is based on Yahoo's getXY method, which is
+ * Copyright (c) 2006, Yahoo! Inc.
+ * All rights reserved.
+ * 
+ * Redistribution and use of this software in source and binary forms, with or
+ * without modification, are permitted provided that the following conditions
+ * are met:
+ * 
+ * * Redistributions of source code must retain the above copyright notice,
+ *   this list of conditions and the following disclaimer.
+ * 
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ *   this list of conditions and the following disclaimer in the documentation
+ *   and/or other materials provided with the distribution.
+ * 
+ * * Neither the name of Yahoo! Inc. nor the names of its contributors may be
+ *   used to endorse or promote products derived from this software without
+ *   specific prior written permission of Yahoo! Inc.
+ * 
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
  * Parameters:
  * forElement - {DOMElement}
  * 
  * Returns:
- * {Array} two item array, L value then T value.
+ * {Array} two item array, Left value then Top value.
  */
-OpenLayers.Util.pagePosition = function(forElement) {
-    var valueT = 0, valueL = 0;
+OpenLayers.Util.pagePosition =  function(forElement) {
+    // NOTE: If element is hidden (display none or disconnected or any the
+    // ancestors are hidden) we get (0,0) by default but we still do the
+    // accumulation of scroll position.
 
-    var element = forElement;
-    var child = forElement;
-    while(element) {
+    var pos = [0, 0];
+    var viewportElement = OpenLayers.Util.getViewportElement();
+    if (!forElement || forElement == window || forElement == viewportElement) {
+        // viewport is always at 0,0 as that defined the coordinate system for
+        // this function - this avoids special case checks in the code below
+        return pos;
+    }
 
-        if(element == document.body) {
-            if(OpenLayers.Element.getStyle(child, 'position') == 'absolute') {
-                break;
+    // Gecko browsers normally use getBoxObjectFor to calculate the position.
+    // When invoked for an element with an implicit absolute position though it
+    // can be off by one. Therefore the recursive implementation is used in
+    // those (relatively rare) cases.
+    var BUGGY_GECKO_BOX_OBJECT =
+        OpenLayers.IS_GECKO && document.getBoxObjectFor &&
+        OpenLayers.Element.getStyle(forElement, 'position') == 'absolute' &&
+        (forElement.style.top == '' || forElement.style.left == '');
+
+    var parent = null;
+    var box;
+
+    if (forElement.getBoundingClientRect) { // IE
+        box = forElement.getBoundingClientRect();
+        var scrollTop = viewportElement.scrollTop;
+        var scrollLeft = viewportElement.scrollLeft;
+
+        pos[0] = box.left + scrollLeft;
+        pos[1] = box.top + scrollTop;
+
+    } else if (document.getBoxObjectFor && !BUGGY_GECKO_BOX_OBJECT) { // gecko
+        // Gecko ignores the scroll values for ancestors, up to 1.9.  See:
+        // https://bugzilla.mozilla.org/show_bug.cgi?id=328881 and
+        // https://bugzilla.mozilla.org/show_bug.cgi?id=330619
+
+        box = document.getBoxObjectFor(forElement);
+        var vpBox = document.getBoxObjectFor(viewportElement);
+        pos[0] = box.screenX - vpBox.screenX;
+        pos[1] = box.screenY - vpBox.screenY;
+
+    } else { // safari/opera
+        pos[0] = forElement.offsetLeft;
+        pos[1] = forElement.offsetTop;
+        parent = forElement.offsetParent;
+        if (parent != forElement) {
+            while (parent) {
+                pos[0] += parent.offsetLeft;
+                pos[1] += parent.offsetTop;
+                parent = parent.offsetParent;
             }
         }
-        
-        valueT += element.offsetTop  || 0;
-        valueL += element.offsetLeft || 0;
 
-        child = element;
-        try {
-            // wrapping this in a try/catch because IE chokes on the offsetParent
-            element = element.offsetParent;
-        } catch(e) {
-            OpenLayers.Console.error(OpenLayers.i18n(
-                                  "pagePositionFailed",{'elemId':element.id}));
-            break;
+        var browser = OpenLayers.BROWSER_NAME;
+
+        // opera & (safari absolute) incorrectly account for body offsetTop
+        if (browser == "opera" || (browser == "safari" &&
+              OpenLayers.Element.getStyle(forElement, 'position') == 'absolute')) {
+            pos[1] -= document.body.offsetTop;
         }
-    }
 
-    element = forElement;
-    while(element) {
-        valueT -= element.scrollTop  || 0;
-        valueL -= element.scrollLeft || 0;
-        element = element.parentNode;
+        // accumulate the scroll positions for everything but the body element
+        parent = forElement.offsetParent;
+        while (parent && parent != document.body) {
+            pos[0] -= parent.scrollLeft;
+            // see https://bugs.opera.com/show_bug.cgi?id=249965
+            if (browser != "opera" || parent.tagName != 'TR') {
+                pos[1] -= parent.scrollTop;
+            }
+            parent = parent.offsetParent;
+        }
     }
     
-    return [valueL, valueT];
+    return pos;
 };
 
+/**
+ * Function: getViewportElement
+ * Returns die viewport element of the document. The viewport element is
+ * usually document.documentElement, except in IE,where it is either
+ * document.body or document.documentElement, depending on the document's
+ * compatibility mode (see
+ * http://code.google.com/p/doctype/wiki/ArticleClientViewportElement)
+ */
+OpenLayers.Util.getViewportElement = function() {
+    var viewportElement = arguments.callee.viewportElement;
+    if (viewportElement == undefined) {
+        viewportElement = (OpenLayers.BROWSER_NAME == "msie" &&
+            document.compatMode != 'CSS1Compat') ? document.body :
+            document.documentElement;
+        arguments.callee.viewportElement = viewportElement;
+    }
+    return viewportElement;
+};
 
 /** 
  * Function: isEquivalentUrl
@@ -1540,8 +1589,46 @@
     return head;
 };
 
+/**
+ * Constant: IS_GECKO
+ * {Boolean} True if the userAgent reports the browser to use the Gecko engine
+ */
+OpenLayers.IS_GECKO = (function() {
+    var ua = navigator.userAgent.toLowerCase();
+    return ua.indexOf("webkit") == -1 && ua.indexOf("gecko") != -1;
+})();
 
 /**
+ * Constant: BROWSER_NAME
+ * {String}
+ * A substring of the navigator.userAgent property.  Depending on the userAgent
+ *     property, this will be the empty string or one of the following:
+ *     * "opera" -- Opera
+ *     * "msie"  -- Internet Explorer
+ *     * "safari" -- Safari
+ *     * "firefox" -- FireFox
+ *     * "mozilla" -- Mozilla
+ */
+OpenLayers.BROWSER_NAME = (function() {
+    var name = "";
+    var ua = navigator.userAgent.toLowerCase();
+    if (ua.indexOf("opera") != -1) {
+        name = "opera";
+    } else if (ua.indexOf("msie") != -1) {
+        name = "msie";
+    } else if (ua.indexOf("safari") != -1) {
+        name = "safari";
+    } else if (ua.indexOf("mozilla") != -1) {
+        if (ua.indexOf("firefox") != -1) {
+            name = "firefox";
+        } else {
+            name = "mozilla";
+        }
+    }
+    return name;
+})();
+
+/**
  * Function: getBrowserName
  * 
  * Returns:
@@ -1559,29 +1646,9 @@
  *           return an empty string.
  */
 OpenLayers.Util.getBrowserName = function() {
-    var browserName = "";
-    
-    var ua = navigator.userAgent.toLowerCase();
-    if ( ua.indexOf( "opera" ) != -1 ) {
-        browserName = "opera";
-    } else if ( ua.indexOf( "msie" ) != -1 ) {
-        browserName = "msie";
-    } else if ( ua.indexOf( "safari" ) != -1 ) {
-        browserName = "safari";
-    } else if ( ua.indexOf( "mozilla" ) != -1 ) {
-        if ( ua.indexOf( "firefox" ) != -1 ) {
-            browserName = "firefox";
-        } else {
-            browserName = "mozilla";
-        }
-    }
-    
-    return browserName;
+    return OpenLayers.BROWSER_NAME;
 };
 
-
-
-    
 /**
  * Method: getRenderedDimensions
  * Renders the contentHTML offscreen to determine actual dimensions for
@@ -1772,7 +1839,7 @@
     if (!dmsOption) {
         dmsOption = 'dms';    //default to show degree, minutes, seconds
     }
-    var abscoordinate = Math.abs(coordinate)
+    var abscoordinate = Math.abs(coordinate);
     var coordinatedegrees = Math.floor(abscoordinate);
 
     var coordinateminutes = (abscoordinate - coordinatedegrees)/(1/60);
@@ -1782,6 +1849,15 @@
     coordinateseconds =  Math.round(coordinateseconds*10);
     coordinateseconds /= 10;
 
+    if( coordinateseconds >= 60) { 
+        coordinateseconds -= 60; 
+        coordinateminutes += 1; 
+        if( coordinateminutes >= 60) { 
+            coordinateminutes -= 60; 
+            coordinatedegrees += 1; 
+        } 
+    }
+    
     if( coordinatedegrees < 10 ) {
         coordinatedegrees = "0" + coordinatedegrees;
     }

Modified: sandbox/tschaub/canvas/lib/OpenLayers.js
===================================================================
--- sandbox/tschaub/canvas/lib/OpenLayers.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/OpenLayers.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 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. */
@@ -7,7 +7,13 @@
  * @requires OpenLayers/BaseTypes.js
  * @requires OpenLayers/Lang/en.js
  * @requires OpenLayers/Console.js
- */ 
+ */
+ 
+/*
+ * TODO: In 3.0, we will stop supporting build profiles that include
+ * OpenLayers.js. This means we will not need the singleFile and scriptFile
+ * variables, because we don't have to handle the singleFile case any more.
+ */
 
 (function() {
     /**
@@ -23,26 +29,59 @@
      * Relative path of this script.
      */
     var scriptName = (!singleFile) ? "lib/OpenLayers.js" : "OpenLayers.js";
-    
+
+    /*
+     * If window.OpenLayers isn't set when this script (OpenLayers.js) is
+     * evaluated (and if singleFile is false) then this script will load
+     * *all* OpenLayers scripts. If window.OpenLayers is set to an array
+     * then this script will attempt to load scripts for each string of
+     * the array, using the string as the src of the script.
+     *
+     * Example:
+     * (code)
+     *     <script type="text/javascript">
+     *         window.OpenLayers = [
+     *             "OpenLayers/Util.js",
+     *             "OpenLayers/BaseTypes.js"
+     *         ];
+     *     </script>
+     *     <script type="text/javascript" src="../lib/OpenLayers.js"></script>
+     * (end)
+     * In this example OpenLayers.js will load Util.js and BaseTypes.js only.
+     */
+    var jsFiles = window.OpenLayers;
+
     /**
      * Namespace: OpenLayers
      * The OpenLayers object provides a namespace for all things OpenLayers
      */
     window.OpenLayers = {
         /**
-         * Function: _getScriptLocation
-         * Return the path to this script.
+         * Method: _getScriptLocation
+         * Return the path to this script. This is also implemented in
+         * OpenLayers/SingleFile.js
          *
          * Returns:
          * {String} Path to this script
          */
         _getScriptLocation: (function() {
-            var r = new RegExp("(^|(.*?\\/))(" + scriptName + ")(\\?|$)");
-            var s = document.getElementsByTagName('script');
-            var l = s[s.length-1].getAttribute("src").match(r)[1];
+            var r = new RegExp("(^|(.*?\\/))(" + scriptName + ")(\\?|$)"),
+                s = document.getElementsByTagName('script'),
+                src, m, l = "";
+            for(var i=0, len=s.length; i<len; i++) {
+                src = s[i].getAttribute('src');
+                if(src) {
+                    var m = src.match(r);
+                    if(m) {
+                        l = m[1];
+                        break;
+                    }
+                }
+            }
             return (function() { return l; });
         })()
     };
+
     /**
      * OpenLayers.singleFile is a flag indicating this file is being included
      * in a Single File Library build of the OpenLayers Library.
@@ -52,271 +91,269 @@
      * 
      * When we *are* part of a SFL build we do not dynamically include the 
      * OpenLayers library code as it will be appended at the end of this file.
-      */
+     */
     if(!singleFile) {
-        var jsfiles = new Array(
-            "OpenLayers/Util.js",
-            "OpenLayers/BaseTypes.js",
-            "OpenLayers/BaseTypes/Class.js",
-            "OpenLayers/BaseTypes/Bounds.js",
-            "OpenLayers/BaseTypes/Element.js",
-            "OpenLayers/BaseTypes/LonLat.js",
-            "OpenLayers/BaseTypes/Pixel.js",
-            "OpenLayers/BaseTypes/Size.js",
-            "OpenLayers/Console.js",
-            "OpenLayers/Tween.js",
-            "Rico/Corner.js",
-            "Rico/Color.js",
-            "OpenLayers/Ajax.js",
-            "OpenLayers/Events.js",
-            "OpenLayers/Request.js",
-            "OpenLayers/Request/XMLHttpRequest.js",
-            "OpenLayers/Projection.js",
-            "OpenLayers/Map.js",
-            "OpenLayers/Layer.js",
-            "OpenLayers/Icon.js",
-            "OpenLayers/Marker.js",
-            "OpenLayers/Marker/Box.js",
-            "OpenLayers/Popup.js",
-            "OpenLayers/Tile.js",
-            "OpenLayers/Tile/Image.js",
-            "OpenLayers/Tile/Image/IFrame.js",
-            "OpenLayers/Tile/WFS.js",
-            "OpenLayers/Layer/Image.js",
-            "OpenLayers/Layer/SphericalMercator.js",
-            "OpenLayers/Layer/EventPane.js",
-            "OpenLayers/Layer/FixedZoomLevels.js",
-            "OpenLayers/Layer/Google.js",
-            "OpenLayers/Layer/Google/v3.js",
-            "OpenLayers/Layer/VirtualEarth.js",
-            "OpenLayers/Layer/Yahoo.js",
-            "OpenLayers/Layer/HTTPRequest.js",
-            "OpenLayers/Layer/Grid.js",
-            "OpenLayers/Layer/MapGuide.js",
-            "OpenLayers/Layer/MapServer.js",
-            "OpenLayers/Layer/MapServer/Untiled.js",
-            "OpenLayers/Layer/KaMap.js",
-            "OpenLayers/Layer/KaMapCache.js",
-            "OpenLayers/Layer/MultiMap.js",
-            "OpenLayers/Layer/Markers.js",
-            "OpenLayers/Layer/Text.js",
-            "OpenLayers/Layer/WorldWind.js",
-            "OpenLayers/Layer/ArcGIS93Rest.js",
-            "OpenLayers/Layer/WMS.js",
-            "OpenLayers/Layer/WMS/Untiled.js",
-            "OpenLayers/Layer/WMS/Post.js",
-            "OpenLayers/Layer/WMTS.js",
-            "OpenLayers/Layer/ArcIMS.js",
-            "OpenLayers/Layer/GeoRSS.js",
-            "OpenLayers/Layer/Boxes.js",
-            "OpenLayers/Layer/XYZ.js",
-            "OpenLayers/Layer/TMS.js",
-            "OpenLayers/Layer/TileCache.js",
-            "OpenLayers/Layer/Zoomify.js",
-            "OpenLayers/Popup/Anchored.js",
-            "OpenLayers/Popup/AnchoredBubble.js",
-            "OpenLayers/Popup/Framed.js",
-            "OpenLayers/Popup/FramedCloud.js",
-            "OpenLayers/Feature.js",
-            "OpenLayers/Feature/Vector.js",
-            "OpenLayers/Feature/WFS.js",
-            "OpenLayers/Handler.js",
-            "OpenLayers/Handler/Click.js",
-            "OpenLayers/Handler/Hover.js",
-            "OpenLayers/Handler/Point.js",
-            "OpenLayers/Handler/Path.js",
-            "OpenLayers/Handler/Polygon.js",
-            "OpenLayers/Handler/Feature.js",
-            "OpenLayers/Handler/Drag.js",
-            "OpenLayers/Handler/RegularPolygon.js",
-            "OpenLayers/Handler/Box.js",
-            "OpenLayers/Handler/MouseWheel.js",
-            "OpenLayers/Handler/Keyboard.js",
-            "OpenLayers/Control.js",
-            "OpenLayers/Control/Attribution.js",
-            "OpenLayers/Control/Button.js",
-            "OpenLayers/Control/ZoomBox.js",
-            "OpenLayers/Control/ZoomToMaxExtent.js",
-            "OpenLayers/Control/DragPan.js",
-            "OpenLayers/Control/Navigation.js",
-            "OpenLayers/Control/MouseDefaults.js",
-            "OpenLayers/Control/MousePosition.js",
-            "OpenLayers/Control/OverviewMap.js",
-            "OpenLayers/Control/KeyboardDefaults.js",
-            "OpenLayers/Control/PanZoom.js",
-            "OpenLayers/Control/PanZoomBar.js",
-            "OpenLayers/Control/ArgParser.js",
-            "OpenLayers/Control/Permalink.js",
-            "OpenLayers/Control/Scale.js",
-            "OpenLayers/Control/ScaleLine.js",
-            "OpenLayers/Control/Snapping.js",
-            "OpenLayers/Control/Split.js",
-            "OpenLayers/Control/LayerSwitcher.js",
-            "OpenLayers/Control/DrawFeature.js",
-            "OpenLayers/Control/DragFeature.js",
-            "OpenLayers/Control/ModifyFeature.js",
-            "OpenLayers/Control/Panel.js",
-            "OpenLayers/Control/SelectFeature.js",
-            "OpenLayers/Control/NavigationHistory.js",
-            "OpenLayers/Control/Measure.js",
-            "OpenLayers/Control/WMSGetFeatureInfo.js",
-            "OpenLayers/Control/WMTSGetFeatureInfo.js",
-            "OpenLayers/Control/Graticule.js",
-            "OpenLayers/Control/TransformFeature.js",
-            "OpenLayers/Control/SLDSelect.js",
-            "OpenLayers/Geometry.js",
-            "OpenLayers/Geometry/Rectangle.js",
-            "OpenLayers/Geometry/Collection.js",
-            "OpenLayers/Geometry/Point.js",
-            "OpenLayers/Geometry/MultiPoint.js",
-            "OpenLayers/Geometry/Curve.js",
-            "OpenLayers/Geometry/LineString.js",
-            "OpenLayers/Geometry/LinearRing.js",        
-            "OpenLayers/Geometry/Polygon.js",
-            "OpenLayers/Geometry/MultiLineString.js",
-            "OpenLayers/Geometry/MultiPolygon.js",
-            "OpenLayers/Geometry/Surface.js",
-            "OpenLayers/Renderer.js",
-            "OpenLayers/Renderer/Elements.js",
-            "OpenLayers/Renderer/SVG.js",
-            "OpenLayers/Renderer/Canvas.js",
-            "OpenLayers/Renderer/VML.js",
-            "OpenLayers/Layer/Vector.js",
-            "OpenLayers/Layer/Vector/RootContainer.js",
-            "OpenLayers/Strategy.js",
-            "OpenLayers/Strategy/Filter.js",
-            "OpenLayers/Strategy/Fixed.js",
-            "OpenLayers/Strategy/Cluster.js",
-            "OpenLayers/Strategy/Paging.js",
-            "OpenLayers/Strategy/BBOX.js",
-            "OpenLayers/Strategy/Save.js",
-            "OpenLayers/Strategy/Refresh.js",
-            "OpenLayers/Filter.js",
-            "OpenLayers/Filter/FeatureId.js",
-            "OpenLayers/Filter/Logical.js",
-            "OpenLayers/Filter/Comparison.js",
-            "OpenLayers/Filter/Spatial.js",
-            "OpenLayers/Protocol.js",
-            "OpenLayers/Protocol/HTTP.js",
-            "OpenLayers/Protocol/SQL.js",
-            "OpenLayers/Protocol/SQL/Gears.js",
-            "OpenLayers/Protocol/WFS.js",
-            "OpenLayers/Protocol/WFS/v1.js",
-            "OpenLayers/Protocol/WFS/v1_0_0.js",
-            "OpenLayers/Protocol/WFS/v1_1_0.js",
-            "OpenLayers/Protocol/SOS.js",
-            "OpenLayers/Protocol/SOS/v1_0_0.js",
-            "OpenLayers/Layer/PointTrack.js",
-            "OpenLayers/Layer/GML.js",
-            "OpenLayers/Style.js",
-            "OpenLayers/Style2.js",
-            "OpenLayers/StyleMap.js",
-            "OpenLayers/Rule.js",
-            "OpenLayers/Format.js",
-            "OpenLayers/Format/XML.js",
-            "OpenLayers/Format/Context.js",
-            "OpenLayers/Format/ArcXML.js",
-            "OpenLayers/Format/ArcXML/Features.js",
-            "OpenLayers/Format/GML.js",
-            "OpenLayers/Format/GML/Base.js",
-            "OpenLayers/Format/GML/v2.js",
-            "OpenLayers/Format/GML/v3.js",
-            "OpenLayers/Format/Atom.js",
-            "OpenLayers/Format/KML.js",
-            "OpenLayers/Format/GeoRSS.js",
-            "OpenLayers/Format/WFS.js",
-            "OpenLayers/Format/WFSCapabilities.js",
-            "OpenLayers/Format/WFSCapabilities/v1.js",
-            "OpenLayers/Format/WFSCapabilities/v1_0_0.js",
-            "OpenLayers/Format/WFSCapabilities/v1_1_0.js",
-            "OpenLayers/Format/WFSDescribeFeatureType.js",
-            "OpenLayers/Format/WMSDescribeLayer.js",
-            "OpenLayers/Format/WMSDescribeLayer/v1_1.js",
-            "OpenLayers/Format/WKT.js",
-            "OpenLayers/Format/OSM.js",
-            "OpenLayers/Format/GPX.js",
-            "OpenLayers/Format/Filter.js",
-            "OpenLayers/Format/Filter/v1.js",
-            "OpenLayers/Format/Filter/v1_0_0.js",
-            "OpenLayers/Format/Filter/v1_1_0.js",
-            "OpenLayers/Format/SLD.js",
-            "OpenLayers/Format/SLD/v1.js",
-            "OpenLayers/Format/SLD/v1_0_0.js",
-            "OpenLayers/Format/OWSCommon/v1.js",
-            "OpenLayers/Format/OWSCommon/v1_0_0.js",
-            "OpenLayers/Format/OWSCommon/v1_1_0.js",
-            "OpenLayers/Format/CSWGetDomain.js",
-            "OpenLayers/Format/CSWGetDomain/v2_0_2.js",
-            "OpenLayers/Format/CSWGetRecords.js",
-            "OpenLayers/Format/CSWGetRecords/v2_0_2.js",
-            "OpenLayers/Format/WFST.js",
-            "OpenLayers/Format/WFST/v1.js",
-            "OpenLayers/Format/WFST/v1_0_0.js",
-            "OpenLayers/Format/WFST/v1_1_0.js",
-            "OpenLayers/Format/Text.js",
-            "OpenLayers/Format/JSON.js",
-            "OpenLayers/Format/GeoJSON.js",
-            "OpenLayers/Format/WMC.js",
-            "OpenLayers/Format/WMC/v1.js",
-            "OpenLayers/Format/WMC/v1_0_0.js",
-            "OpenLayers/Format/WMC/v1_1_0.js",
-            "OpenLayers/Format/WMSCapabilities.js",
-            "OpenLayers/Format/WMSCapabilities/v1.js",
-            "OpenLayers/Format/WMSCapabilities/v1_1.js",
-            "OpenLayers/Format/WMSCapabilities/v1_1_0.js",
-            "OpenLayers/Format/WMSCapabilities/v1_1_1.js",
-            "OpenLayers/Format/WMSCapabilities/v1_3.js",
-            "OpenLayers/Format/WMSCapabilities/v1_3_0.js",
-            "OpenLayers/Format/WMSGetFeatureInfo.js",
-            "OpenLayers/Format/SOSCapabilities.js",
-            "OpenLayers/Format/SOSCapabilities/v1_0_0.js",
-            "OpenLayers/Format/SOSGetObservation.js",
-            "OpenLayers/Format/SOSGetFeatureOfInterest.js",
-            "OpenLayers/Format/OWSContext.js",
-            "OpenLayers/Format/OWSContext/v0_3_1.js",
-            "OpenLayers/Format/WMTSCapabilities.js",
-            "OpenLayers/Format/WMTSCapabilities/v1_0_0.js",
-            "OpenLayers/Layer/WFS.js",
-            "OpenLayers/Control/GetFeature.js",
-            "OpenLayers/Control/MouseToolbar.js",
-            "OpenLayers/Control/NavToolbar.js",
-            "OpenLayers/Control/PanPanel.js",
-            "OpenLayers/Control/Pan.js",
-            "OpenLayers/Control/ZoomIn.js",
-            "OpenLayers/Control/ZoomOut.js",
-            "OpenLayers/Control/ZoomPanel.js",
-            "OpenLayers/Control/EditingToolbar.js",
-            "OpenLayers/Symbolizer.js",
-            "OpenLayers/Symbolizer/Point.js",
-            "OpenLayers/Symbolizer/Line.js",
-            "OpenLayers/Symbolizer/Polygon.js",
-            "OpenLayers/Symbolizer/Text.js",
-            "OpenLayers/Symbolizer/Raster.js",
-            "OpenLayers/Lang.js",
-            "OpenLayers/Lang/en.js"
-        ); // etc.
+        if (!jsFiles) {
+            jsFiles = [
+                "OpenLayers/BaseTypes/Class.js",
+                "OpenLayers/Util.js",
+                "OpenLayers/BaseTypes.js",
+                "OpenLayers/BaseTypes/Bounds.js",
+                "OpenLayers/BaseTypes/Element.js",
+                "OpenLayers/BaseTypes/LonLat.js",
+                "OpenLayers/BaseTypes/Pixel.js",
+                "OpenLayers/BaseTypes/Size.js",
+                "OpenLayers/Console.js",
+                "OpenLayers/Tween.js",
+                "OpenLayers/Kinetic.js",
+                "Rico/Corner.js",
+                "Rico/Color.js",
+                "OpenLayers/Ajax.js",
+                "OpenLayers/Events.js",
+                "OpenLayers/Request.js",
+                "OpenLayers/Request/XMLHttpRequest.js",
+                "OpenLayers/Projection.js",
+                "OpenLayers/Map.js",
+                "OpenLayers/Layer.js",
+                "OpenLayers/Icon.js",
+                "OpenLayers/Marker.js",
+                "OpenLayers/Marker/Box.js",
+                "OpenLayers/Popup.js",
+                "OpenLayers/Tile.js",
+                "OpenLayers/Tile/Image.js",
+                "OpenLayers/Tile/Image/IFrame.js",
+                "OpenLayers/Tile/WFS.js",
+                "OpenLayers/Layer/Image.js",
+                "OpenLayers/Layer/SphericalMercator.js",
+                "OpenLayers/Layer/EventPane.js",
+                "OpenLayers/Layer/FixedZoomLevels.js",
+                "OpenLayers/Layer/Google.js",
+                "OpenLayers/Layer/Google/v3.js",
+                "OpenLayers/Layer/VirtualEarth.js",
+                "OpenLayers/Layer/Yahoo.js",
+                "OpenLayers/Layer/HTTPRequest.js",
+                "OpenLayers/Layer/Grid.js",
+                "OpenLayers/Layer/MapGuide.js",
+                "OpenLayers/Layer/MapServer.js",
+                "OpenLayers/Layer/MapServer/Untiled.js",
+                "OpenLayers/Layer/KaMap.js",
+                "OpenLayers/Layer/KaMapCache.js",
+                "OpenLayers/Layer/MultiMap.js",
+                "OpenLayers/Layer/Markers.js",
+                "OpenLayers/Layer/Text.js",
+                "OpenLayers/Layer/WorldWind.js",
+                "OpenLayers/Layer/ArcGIS93Rest.js",
+                "OpenLayers/Layer/WMS.js",
+                "OpenLayers/Layer/WMS/Untiled.js",
+                "OpenLayers/Layer/WMS/Post.js",
+                "OpenLayers/Layer/WMTS.js",
+                "OpenLayers/Layer/ArcIMS.js",
+                "OpenLayers/Layer/GeoRSS.js",
+                "OpenLayers/Layer/Boxes.js",
+                "OpenLayers/Layer/XYZ.js",
+                "OpenLayers/Layer/Bing.js",
+                "OpenLayers/Layer/TMS.js",
+                "OpenLayers/Layer/TileCache.js",
+                "OpenLayers/Layer/Zoomify.js",
+                "OpenLayers/Popup/Anchored.js",
+                "OpenLayers/Popup/AnchoredBubble.js",
+                "OpenLayers/Popup/Framed.js",
+                "OpenLayers/Popup/FramedCloud.js",
+                "OpenLayers/Feature.js",
+                "OpenLayers/Feature/Vector.js",
+                "OpenLayers/Feature/WFS.js",
+                "OpenLayers/Handler.js",
+                "OpenLayers/Handler/Click.js",
+                "OpenLayers/Handler/Hover.js",
+                "OpenLayers/Handler/Point.js",
+                "OpenLayers/Handler/Path.js",
+                "OpenLayers/Handler/Polygon.js",
+                "OpenLayers/Handler/Feature.js",
+                "OpenLayers/Handler/Drag.js",
+                "OpenLayers/Handler/Pinch.js",
+                "OpenLayers/Handler/RegularPolygon.js",
+                "OpenLayers/Handler/Box.js",
+                "OpenLayers/Handler/MouseWheel.js",
+                "OpenLayers/Handler/Keyboard.js",
+                "OpenLayers/Control.js",
+                "OpenLayers/Control/Attribution.js",
+                "OpenLayers/Control/Button.js",
+                "OpenLayers/Control/ZoomBox.js",
+                "OpenLayers/Control/ZoomToMaxExtent.js",
+                "OpenLayers/Control/DragPan.js",
+                "OpenLayers/Control/Navigation.js",
+                "OpenLayers/Control/TouchNavigation.js",
+                "OpenLayers/Control/MouseDefaults.js",
+                "OpenLayers/Control/MousePosition.js",
+                "OpenLayers/Control/OverviewMap.js",
+                "OpenLayers/Control/KeyboardDefaults.js",
+                "OpenLayers/Control/PanZoom.js",
+                "OpenLayers/Control/PanZoomBar.js",
+                "OpenLayers/Control/ArgParser.js",
+                "OpenLayers/Control/Permalink.js",
+                "OpenLayers/Control/Scale.js",
+                "OpenLayers/Control/ScaleLine.js",
+                "OpenLayers/Control/Snapping.js",
+                "OpenLayers/Control/Split.js",
+                "OpenLayers/Control/LayerSwitcher.js",
+                "OpenLayers/Control/DrawFeature.js",
+                "OpenLayers/Control/DragFeature.js",
+                "OpenLayers/Control/ModifyFeature.js",
+                "OpenLayers/Control/Panel.js",
+                "OpenLayers/Control/SelectFeature.js",
+                "OpenLayers/Control/NavigationHistory.js",
+                "OpenLayers/Control/Measure.js",
+                "OpenLayers/Control/WMSGetFeatureInfo.js",
+                "OpenLayers/Control/WMTSGetFeatureInfo.js",
+                "OpenLayers/Control/Graticule.js",
+                "OpenLayers/Control/TransformFeature.js",
+                "OpenLayers/Control/SLDSelect.js",
+                "OpenLayers/Geometry.js",
+                "OpenLayers/Geometry/Rectangle.js",
+                "OpenLayers/Geometry/Collection.js",
+                "OpenLayers/Geometry/Point.js",
+                "OpenLayers/Geometry/MultiPoint.js",
+                "OpenLayers/Geometry/Curve.js",
+                "OpenLayers/Geometry/LineString.js",
+                "OpenLayers/Geometry/LinearRing.js",
+                "OpenLayers/Geometry/Polygon.js",
+                "OpenLayers/Geometry/MultiLineString.js",
+                "OpenLayers/Geometry/MultiPolygon.js",
+                "OpenLayers/Geometry/Surface.js",
+                "OpenLayers/Renderer.js",
+                "OpenLayers/Renderer/Elements.js",
+                "OpenLayers/Renderer/SVG.js",
+                "OpenLayers/Renderer/Canvas.js",
+                "OpenLayers/Renderer/VML.js",
+                "OpenLayers/Layer/Vector.js",
+                "OpenLayers/Layer/Vector/RootContainer.js",
+                "OpenLayers/Strategy.js",
+                "OpenLayers/Strategy/Filter.js",
+                "OpenLayers/Strategy/Fixed.js",
+                "OpenLayers/Strategy/Cluster.js",
+                "OpenLayers/Strategy/Paging.js",
+                "OpenLayers/Strategy/BBOX.js",
+                "OpenLayers/Strategy/Save.js",
+                "OpenLayers/Strategy/Refresh.js",
+                "OpenLayers/Filter.js",
+                "OpenLayers/Filter/FeatureId.js",
+                "OpenLayers/Filter/Logical.js",
+                "OpenLayers/Filter/Comparison.js",
+                "OpenLayers/Filter/Spatial.js",
+                "OpenLayers/Protocol.js",
+                "OpenLayers/Protocol/HTTP.js",
+                "OpenLayers/Protocol/SQL.js",
+                "OpenLayers/Protocol/SQL/Gears.js",
+                "OpenLayers/Protocol/WFS.js",
+                "OpenLayers/Protocol/WFS/v1.js",
+                "OpenLayers/Protocol/WFS/v1_0_0.js",
+                "OpenLayers/Protocol/WFS/v1_1_0.js",
+                "OpenLayers/Protocol/SOS.js",
+                "OpenLayers/Protocol/SOS/v1_0_0.js",
+                "OpenLayers/Layer/PointTrack.js",
+                "OpenLayers/Layer/GML.js",
+                "OpenLayers/Style.js",
+                "OpenLayers/Style2.js",
+                "OpenLayers/StyleMap.js",
+                "OpenLayers/Rule.js",
+                "OpenLayers/Format.js",
+                "OpenLayers/Format/XML.js",
+                "OpenLayers/Format/Context.js",
+                "OpenLayers/Format/ArcXML.js",
+                "OpenLayers/Format/ArcXML/Features.js",
+                "OpenLayers/Format/GML.js",
+                "OpenLayers/Format/GML/Base.js",
+                "OpenLayers/Format/GML/v2.js",
+                "OpenLayers/Format/GML/v3.js",
+                "OpenLayers/Format/Atom.js",
+                "OpenLayers/Format/KML.js",
+                "OpenLayers/Format/GeoRSS.js",
+                "OpenLayers/Format/WFS.js",
+                "OpenLayers/Format/WFSCapabilities.js",
+                "OpenLayers/Format/WFSCapabilities/v1.js",
+                "OpenLayers/Format/WFSCapabilities/v1_0_0.js",
+                "OpenLayers/Format/WFSCapabilities/v1_1_0.js",
+                "OpenLayers/Format/WFSDescribeFeatureType.js",
+                "OpenLayers/Format/WMSDescribeLayer.js",
+                "OpenLayers/Format/WMSDescribeLayer/v1_1.js",
+                "OpenLayers/Format/WKT.js",
+                "OpenLayers/Format/CQL.js",
+                "OpenLayers/Format/OSM.js",
+                "OpenLayers/Format/GPX.js",
+                "OpenLayers/Format/Filter.js",
+                "OpenLayers/Format/Filter/v1.js",
+                "OpenLayers/Format/Filter/v1_0_0.js",
+                "OpenLayers/Format/Filter/v1_1_0.js",
+                "OpenLayers/Format/SLD.js",
+                "OpenLayers/Format/SLD/v1.js",
+                "OpenLayers/Format/SLD/v1_0_0.js",
+                "OpenLayers/Format/OWSCommon/v1.js",
+                "OpenLayers/Format/OWSCommon/v1_0_0.js",
+                "OpenLayers/Format/OWSCommon/v1_1_0.js",
+                "OpenLayers/Format/CSWGetDomain.js",
+                "OpenLayers/Format/CSWGetDomain/v2_0_2.js",
+                "OpenLayers/Format/CSWGetRecords.js",
+                "OpenLayers/Format/CSWGetRecords/v2_0_2.js",
+                "OpenLayers/Format/WFST.js",
+                "OpenLayers/Format/WFST/v1.js",
+                "OpenLayers/Format/WFST/v1_0_0.js",
+                "OpenLayers/Format/WFST/v1_1_0.js",
+                "OpenLayers/Format/Text.js",
+                "OpenLayers/Format/JSON.js",
+                "OpenLayers/Format/GeoJSON.js",
+                "OpenLayers/Format/WMC.js",
+                "OpenLayers/Format/WMC/v1.js",
+                "OpenLayers/Format/WMC/v1_0_0.js",
+                "OpenLayers/Format/WMC/v1_1_0.js",
+                "OpenLayers/Format/WMSCapabilities.js",
+                "OpenLayers/Format/WMSCapabilities/v1.js",
+                "OpenLayers/Format/WMSCapabilities/v1_1.js",
+                "OpenLayers/Format/WMSCapabilities/v1_1_0.js",
+                "OpenLayers/Format/WMSCapabilities/v1_1_1.js",
+                "OpenLayers/Format/WMSCapabilities/v1_3.js",
+                "OpenLayers/Format/WMSCapabilities/v1_3_0.js",
+                "OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js",
+                "OpenLayers/Format/WMSGetFeatureInfo.js",
+                "OpenLayers/Format/SOSCapabilities.js",
+                "OpenLayers/Format/SOSCapabilities/v1_0_0.js",
+                "OpenLayers/Format/SOSGetFeatureOfInterest.js",
+                "OpenLayers/Format/SOSGetObservation.js",
+                "OpenLayers/Format/OWSContext.js",
+                "OpenLayers/Format/OWSContext/v0_3_1.js",
+                "OpenLayers/Format/WMTSCapabilities.js",
+                "OpenLayers/Format/WMTSCapabilities/v1_0_0.js",
+                "OpenLayers/Layer/WFS.js",
+                "OpenLayers/Control/GetFeature.js",
+                "OpenLayers/Control/MouseToolbar.js",
+                "OpenLayers/Control/NavToolbar.js",
+                "OpenLayers/Control/PanPanel.js",
+                "OpenLayers/Control/Pan.js",
+                "OpenLayers/Control/ZoomIn.js",
+                "OpenLayers/Control/ZoomOut.js",
+                "OpenLayers/Control/ZoomPanel.js",
+                "OpenLayers/Control/EditingToolbar.js",
+                "OpenLayers/Control/Geolocate.js",
+                "OpenLayers/Symbolizer.js",
+                "OpenLayers/Symbolizer/Point.js",
+                "OpenLayers/Symbolizer/Line.js",
+                "OpenLayers/Symbolizer/Polygon.js",
+                "OpenLayers/Symbolizer/Text.js",
+                "OpenLayers/Symbolizer/Raster.js",
+                "OpenLayers/Lang.js",
+                "OpenLayers/Lang/en.js"
+            ]; // etc.
+        }
 
-        var agent = navigator.userAgent;
-        var docWrite = (agent.match("MSIE") || agent.match("Safari"));
-        if(docWrite) {
-            var allScriptTags = new Array(jsfiles.length);
-        }
-        var host = OpenLayers._getScriptLocation() + "lib/";    
-        for (var i=0, len=jsfiles.length; i<len; i++) {
-            if (docWrite) {
-                allScriptTags[i] = "<script src='" + host + jsfiles[i] +
+        // use "parser-inserted scripts" for guaranteed execution order
+        // http://hsivonen.iki.fi/script-execution/
+        var scriptTags = new Array(jsFiles.length);
+        var host = OpenLayers._getScriptLocation() + "lib/";
+        for (var i=0, len=jsFiles.length; i<len; i++) {
+            scriptTags[i] = "<script src='" + host + jsFiles[i] +
                                    "'></script>"; 
-            } else {
-                var s = document.createElement("script");
-                s.src = host + jsfiles[i];
-                var h = document.getElementsByTagName("head").length ? 
-                           document.getElementsByTagName("head")[0] : 
-                           document.body;
-                h.appendChild(s);
-            }
         }
-        if (docWrite) {
-            document.write(allScriptTags.join(""));
+        if (scriptTags.length > 0) {
+            document.write(scriptTags.join(""));
         }
     }
 })();

Modified: sandbox/tschaub/canvas/lib/Rico/Color.js
===================================================================
--- sandbox/tschaub/canvas/lib/Rico/Color.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/Rico/Color.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,3 +1,8 @@
+/** 
+ * @requires OpenLayers/BaseTypes/Class.js
+ */
+
+
 /*
  * This file has been edited substantially from the Rico-released version by
  * the OpenLayers development team.
@@ -4,6 +9,7 @@
  *
  * This file is licensed under the Apache License, Version 2.0.
  */
+OpenLayers.Rico = OpenLayers.Rico || {};
 OpenLayers.Rico.Color = OpenLayers.Class({
 
    initialize: function(red, green, blue) {

Modified: sandbox/tschaub/canvas/lib/Rico/Corner.js
===================================================================
--- sandbox/tschaub/canvas/lib/Rico/Corner.js	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/lib/Rico/Corner.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,3 +1,8 @@
+/**
+ * @requires Rico/Color.js
+ */
+
+
 /*
  * This file has been edited substantially from the Rico-released
  * version by the OpenLayers development team.
@@ -16,8 +21,8 @@
  * implied. See the License for the specific language governing
  * permissions * and limitations under the License.
  *
- */  
-OpenLayers.Rico = new Object();
+ */
+OpenLayers.Rico = OpenLayers.Rico || {};
 OpenLayers.Rico.Corner = {
 
     round: function(e, options) {

Modified: sandbox/tschaub/canvas/license.txt
===================================================================
--- sandbox/tschaub/canvas/license.txt	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/license.txt	2011-02-24 15:01:55 UTC (rev 11421)
@@ -2,7 +2,7 @@
 'project' directories of the Openlayers code repository at svn.openlayers.org,
 and applies to all release of OpenLayers later than 2.5.
  
-Copyright (c) 2005-2010 OpenLayers Contributors. See authors.txt for
+Copyright (c) 2005-2011 OpenLayers Contributors. See authors.txt for
   full list.
 
 All rights reserved.

Modified: sandbox/tschaub/canvas/readme.txt
===================================================================
--- sandbox/tschaub/canvas/readme.txt	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/readme.txt	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,7 +1,7 @@
 OpenLayers
 -=-=-=-=-=-
 
-Copyright (c) 2005-2010 OpenLayers Contributors. See authors.txt for
+Copyright (c) 2005-2011 OpenLayers Contributors. See authors.txt for
 more details.
 
 OpenLayers is a JavaScript library for building map applications
@@ -31,7 +31,7 @@
 
 As an example, using bash (with the release files in ~/openlayers ):
 $ cd /var/www/html
-$ cp ~/openlayers/build/OpenLayers.js ./
+$ cp ~/openlayers/OpenLayers.js ./
 $ cp -R ~/openlayers/theme ./
 $ cp -R ~/openlayers/img ./
 

Modified: sandbox/tschaub/canvas/tests/Ajax.html
===================================================================
--- sandbox/tschaub/canvas/tests/Ajax.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Ajax.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_Ajax_loadUrl(t) {

Modified: sandbox/tschaub/canvas/tests/BaseTypes/Bounds.html
===================================================================
--- sandbox/tschaub/canvas/tests/BaseTypes/Bounds.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/BaseTypes/Bounds.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var bounds; 
     function test_Bounds_constructor (t) {
@@ -126,7 +126,7 @@
     }
 
     function test_Bounds_fromString(t) {
-       t.plan( 10 );
+       t.plan( 12 );
        bounds = OpenLayers.Bounds.fromString("1,2,3,4");
        t.ok( bounds instanceof OpenLayers.Bounds, "new OpenLayers.Bounds returns Bounds object" );
        t.eq( bounds.left, 1, "bounds.left is set correctly" );
@@ -134,13 +134,18 @@
        t.eq( bounds.right, 3, "bounds.right is set correctly" );
        t.eq( bounds.top, 4, "bounds.top is set correctly" );
 
+       // reverse axis order
+       var reverseBbox = bounds.toBBOX(null, true);
+       t.eq(reverseBbox, "2,1,4,3", "toBBOX with reverseAxisOrder set to true works as expected");
+       var boundsFromReverse = OpenLayers.Bounds.fromString(reverseBbox, true);
+       t.ok(bounds.equals(boundsFromReverse), "Bounds created from string with reverseAxisOrder are correct");
+
        bounds = OpenLayers.Bounds.fromString("1.1,2.2,3.3,4.4");
        t.ok( bounds instanceof OpenLayers.Bounds, "new OpenLayers.Bounds returns Bounds object" );
        t.eq( bounds.left, 1.1, "bounds.left is set correctly" );
        t.eq( bounds.bottom, 2.2, "bounds.bottom is set correctly" );
        t.eq( bounds.right, 3.3, "bounds.right is set correctly" );
        t.eq( bounds.top, 4.4, "bounds.top is set correctly" );
-
     }
 
     function test_Bounds_getSize(t) {
@@ -358,7 +363,7 @@
     }
 
     function test_Bounds_fromArray(t) {
-       t.plan( 5 );
+       t.plan( 7 );
        
        var bbox = [1,2,3,4];
        bounds = OpenLayers.Bounds.fromArray(bbox);
@@ -367,6 +372,12 @@
        t.eq( bounds.bottom, 2, "bounds.bottom is set correctly" );
        t.eq( bounds.right, 3, "bounds.right is set correctly" );
        t.eq( bounds.top, 4, "bounds.top is set correctly" );
+       
+       // reverse axis order
+       var reverseBbox = bounds.toArray(true);
+       t.eq(reverseBbox, [2,1,4,3], "toArray with reverseAxisOrder set to true works as expected");
+       var boundsFromReverse = OpenLayers.Bounds.fromArray(reverseBbox, true);
+       t.ok(bounds.equals(boundsFromReverse), "Bounds created from array with reverseAxisOrder are correct");
     }
 
     function test_Bounds_fromSize(t) {
@@ -595,6 +606,7 @@
         t.ok( bounds.equals(b), "bounds is set correctly");
         
     //null values
+        OpenLayers.Lang.setCode('en');
         var desiredMsg = "You must pass both x and y values to the add function.";
         OpenLayers.Console.error = function(msg) {
             t.eq(msg, desiredMsg, "error correctly reported");

Modified: sandbox/tschaub/canvas/tests/BaseTypes/Class.html
===================================================================
--- sandbox/tschaub/canvas/tests/BaseTypes/Class.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/BaseTypes/Class.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     // remove this next line at 3.0
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);

Modified: sandbox/tschaub/canvas/tests/BaseTypes/Element.html
===================================================================
--- sandbox/tschaub/canvas/tests/BaseTypes/Element.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/BaseTypes/Element.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,7 +1,7 @@
 <html>
   <head>
   
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
 
     <script type="text/javascript">
 
@@ -212,7 +212,7 @@
         style = "chickenHead";
         t.ok(OpenLayers.Element.getStyle(elem, style) == null, "get style on 'auto' style returns null");
 
-        if (OpenLayers.Util.getBrowserName() == "opera") {
+        if (OpenLayers.BROWSER_NAME == "opera") {
             elem.style.top = "15px";
             style = "top";
 

Modified: sandbox/tschaub/canvas/tests/BaseTypes/LonLat.html
===================================================================
--- sandbox/tschaub/canvas/tests/BaseTypes/LonLat.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/BaseTypes/LonLat.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     var lonlat; 
@@ -64,6 +64,7 @@
         t.ok( addpx.equals(ll), "addpx is set correctly");
         
     //null values
+        OpenLayers.Lang.setCode('en');
         var desiredMsg = "You must pass both lon and lat values to the add function.";
         OpenLayers.Console.error = function(msg) {
             t.eq(msg, desiredMsg, "error correctly reported");

Modified: sandbox/tschaub/canvas/tests/BaseTypes/Pixel.html
===================================================================
--- sandbox/tschaub/canvas/tests/BaseTypes/Pixel.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/BaseTypes/Pixel.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var pixel; 
     
@@ -74,6 +74,7 @@
         t.ok( pixel.equals(px), "returned pixel is correct");
 
     //null values
+        OpenLayers.Lang.setCode('en');        
         var desiredMsg = "You must pass both x and y values to the add function.";
         OpenLayers.Console.error = function(msg) {
             t.eq(msg, desiredMsg, "error correctly reported");

Modified: sandbox/tschaub/canvas/tests/BaseTypes/Size.html
===================================================================
--- sandbox/tschaub/canvas/tests/BaseTypes/Size.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/BaseTypes/Size.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var Size; 
     

Modified: sandbox/tschaub/canvas/tests/BaseTypes.html
===================================================================
--- sandbox/tschaub/canvas/tests/BaseTypes.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/BaseTypes.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_String_startsWith(t) {
@@ -298,6 +298,13 @@
         //run again to make sure the arguments are handled correctly
         newFoo(g_Arg3, g_Arg4);
     }
+    
+    function test_Function_Void(t) {
+        
+        t.plan(1);
+        t.eq(OpenLayers.Function.Void(), undefined, "returns undefined");
+        
+    }
 
     function test_Function_bindAsEventListener(t) {
         t.plan(4);

Modified: sandbox/tschaub/canvas/tests/Console.html
===================================================================
--- sandbox/tschaub/canvas/tests/Console.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Console.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
     function test_Console(t) {
         

Copied: sandbox/tschaub/canvas/tests/Control/ArgParser.html (from rev 11416, trunk/openlayers/tests/Control/ArgParser.html)
===================================================================
--- sandbox/tschaub/canvas/tests/Control/ArgParser.html	                        (rev 0)
+++ sandbox/tschaub/canvas/tests/Control/ArgParser.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,26 @@
+<html>
+<head>
+  <script src="../OLLoader.js"></script>
+  <script type="text/javascript">
+      function test_getParameters(t) {
+          t.plan(4);
+
+          var c = new OpenLayers.Control.ArgParser(), p;
+
+          p = c.getParameters('http://example.com?fook=foov&bark=barv');
+          t.eq(p, {fook: 'foov', bark: 'barv'}, 'a) params are correct');
+
+          p = c.getParameters('http://example.com#fook=foov&bark=barv');
+          t.eq(p, {fook: 'foov', bark: 'barv'}, 'b) params are correct');
+
+          p = c.getParameters('http://example.com?a=b&b=c#fook=foov&bark=barv');
+          t.eq(p, {a: 'b', b: 'c', fook: 'foov', bark: 'barv'},
+               'c) params are correct');
+
+          p = c.getParameters('http://example.com?a=b&b=c&fook=a&bark=b#fook=foov&bark=barv');
+          t.eq(p, {a: 'b', b: 'c', fook: 'foov', bark: 'barv'},
+               'd) params are correct');
+        }
+    </script>
+</head>
+</html>

Modified: sandbox/tschaub/canvas/tests/Control/Attribution.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/Attribution.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/Attribution.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map; 
     function test_Control_Attribution_constructor (t) {

Modified: sandbox/tschaub/canvas/tests/Control/Button.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/Button.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/Button.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
       function test_Control_Button_constructor (t) {
           t.plan( 2 );

Modified: sandbox/tschaub/canvas/tests/Control/DragFeature.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/DragFeature.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/DragFeature.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     function test_Control_DragFeature_constructor(t) {
         t.plan(3);
@@ -71,11 +71,14 @@
     }
     
     function test_Control_DragFeature_over(t) {
-        t.plan(3);
+        t.plan(5);
+        var log = [];
         var map = new OpenLayers.Map("map");
         var layer = new OpenLayers.Layer.Vector();
         map.addLayer(layer);
-        var control = new OpenLayers.Control.DragFeature(layer);
+        var control = new OpenLayers.Control.DragFeature(layer, {
+            onEnter: function(f) { log.push({feature: f}); }
+        });
         map.addControl(control);
         
         control.activate();
@@ -94,6 +97,10 @@
              "control gets the proper feature from the feature handler");
         t.ok(control.handlers.drag.active,
              "drag handler activated when over a feature");
+        t.eq(log.length, 1,
+             "onEnter called exactly once");
+        t.eq(log[0].feature.id, feature.id,
+             "onEnter called with expected feature");
     }
 
     function test_Control_DragFeature_down(t) {
@@ -241,11 +248,14 @@
     }
 
     function test_Control_DragFeature_out(t) {
-        t.plan(2);
+        t.plan(4);
+        var log = [];
         var map = new OpenLayers.Map("map");
         var layer = new OpenLayers.Layer.Vector();
         map.addLayer(layer);
-        var control = new OpenLayers.Control.DragFeature(layer);
+        var control = new OpenLayers.Control.DragFeature(layer, {
+            onLeave: function(f) { log.push({feature: f}); }
+        });
         map.addControl(control);
 
         control.activate();
@@ -268,7 +278,10 @@
         map.events.triggerEvent("mousemove", {type: "mousemove"});
         t.ok(control.feature == null,
              "feature is set to null on mouse out");
-        
+        t.eq(log.length, 1,
+             "onLeave called exactly once");
+        t.eq(log[0].feature.id, feature.id,
+             "onLeave called with expected feature");
     }
 
     </script>

Modified: sandbox/tschaub/canvas/tests/Control/DragPan.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/DragPan.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/DragPan.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map, control, layer; 
 

Modified: sandbox/tschaub/canvas/tests/Control/DrawFeature.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/DrawFeature.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/DrawFeature.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_initialize(t) {
@@ -60,7 +60,7 @@
     }
     
     function test_sketch_events(t) {
-        t.plan(6);
+        t.plan(12);
         var map = new OpenLayers.Map("map", {
             resolutions: [1]
         });
@@ -69,37 +69,62 @@
             isBaseLayer: true
         });
         var control = new OpenLayers.Control.DrawFeature(
-            layer, OpenLayers.Handler.Point
+            layer, OpenLayers.Handler.Path, {
+                handlerOptions: {persist: true}
+            }
         );
         map.addLayer(layer);
         map.addControl(control);
         map.zoomToMaxExtent();
-        control.activate();
         
-        var log = {};
+        var log;
         layer.events.on({
             sketchstarted: function(event) {
-                log.event = event;
+                log['sketchstarted'] = event;
             },
             sketchmodified: function(event) {
-                log.event = event;
+                log['sketchmodified'] = event;
             },
             sketchcomplete: function(event) {
-                log.event = event;
+                log['sketchcomplete'] = event;
             }
         });
         
         // mock up draw/modify of a point
+        log = {};
+        control.activate();
+        t.eq(log.sketchstarted.type, "sketchstarted", "[activate] sketchstarted triggered");
+        t.geom_eq(log.sketchstarted.vertex, new OpenLayers.Geometry.Point(-250, 175), "[activate] correct vertex");
+
+        log = {};
+        map.events.triggerEvent("mousemove", {xy: new OpenLayers.Pixel(0, 0)});
+        t.eq(log.sketchmodified.type, "sketchmodified", "[mousemove] sketchmodified triggered");
+        t.geom_eq(log.sketchmodified.vertex, new OpenLayers.Geometry.Point(-200, 125), "[mousemove] correct vertex");
+
         map.events.triggerEvent("mousedown", {xy: new OpenLayers.Pixel(0, 0)});
-        t.eq(log.event.type, "sketchstarted", "[mousedown] sketchstarted triggered");
-        t.geom_eq(log.event.vertex, new OpenLayers.Geometry.Point(-200, 125), "[mousedown] correct vertex");
+
+        log = {};
+        map.events.triggerEvent("mouseup", {xy: new OpenLayers.Pixel(0, 0)});
+        t.eq(log.sketchmodified.type, "sketchmodified", "[mouseup] sketchmodified triggered");
+        t.geom_eq(log.sketchmodified.vertex, new OpenLayers.Geometry.Point(-200, 125), "[mouseup] correct vertex");
+
+        log = {};
         map.events.triggerEvent("mousemove", {xy: new OpenLayers.Pixel(10, 10)});
-        t.eq(log.event.type, "sketchmodified", "[mousemove] sketchmodified triggered");
-        t.geom_eq(log.event.vertex, new OpenLayers.Geometry.Point(-190, 115), "[mousemove] correct vertex");
-        map.events.triggerEvent("mouseup", {xy: new OpenLayers.Pixel(10, 10)});
-        t.eq(log.event.type, "sketchcomplete", "[mouseup] sketchcomplete triggered");
-        t.geom_eq(log.event.feature.geometry, new OpenLayers.Geometry.Point(-190, 115), "[mouseup] correct geometry");
-        
+        t.eq(log.sketchmodified.type, "sketchmodified", "[mousemove] sketchmodified triggered");
+        t.geom_eq(log.sketchmodified.vertex, new OpenLayers.Geometry.Point(-190, 115), "[mousemove] correct vertex");
+
+        log = {};
+        map.events.triggerEvent("dblclick", {xy: new OpenLayers.Pixel(10, 10)});
+        t.eq(log.sketchcomplete.type, "sketchcomplete", "[dblclick] sketchcomplete triggered");
+        t.geom_eq(log.sketchcomplete.feature.geometry,
+                  new OpenLayers.Geometry.LineString([
+                      new OpenLayers.Geometry.Point(-200, 125),
+                      new OpenLayers.Geometry.Point(-190, 115)
+                  ]),
+                  "[dblclick] correct geometry");
+        t.eq(log.sketchstarted.type, "sketchstarted", "[dblclick] sketchstarted triggered");
+        t.geom_eq(log.sketchstarted.vertex, new OpenLayers.Geometry.Point(-250, 175), "[dblclick] correct vertex");
+
         map.destroy();
     }
 

Copied: sandbox/tschaub/canvas/tests/Control/Geolocate.html (from rev 11416, trunk/openlayers/tests/Control/Geolocate.html)
===================================================================
--- sandbox/tschaub/canvas/tests/Control/Geolocate.html	                        (rev 0)
+++ sandbox/tschaub/canvas/tests/Control/Geolocate.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,130 @@
+<html>
+<head>
+  <script src="../../lib/OpenLayers.js"></script>
+  <script type="text/javascript">
+    var map, control, centerLL
+        watch = null,
+        geolocation= {
+            getCurrentPosition: function(f) {
+                f({
+                    coords: { latitude: 10, longitude: 10 }
+                });
+            },
+            watchPosition: function(f) {
+                watch = true;
+            },
+            clearWatch: function() {
+                watch = null;
+            }
+        };
+
+    function test_initialize(t) {
+        t.plan(3);
+        control = new OpenLayers.Control.Geolocate({geolocationOptions: {foo: 'bar'}});
+        t.ok(control instanceof OpenLayers.Control.Geolocate,
+             "new OpenLayers.Control returns object" );
+        t.eq(control.displayClass, "olControlGeolocate", "displayClass is correct" );
+        t.eq(control.geolocationOptions.foo, 'bar',
+             'provided geolocation options are set in the geolocationOptions prop');
+    }
+    function test_bind(t) {
+        t.plan(3);
+        var control = new OpenLayers.Control.Geolocate({
+            geolocation: geolocation
+        });
+        control.events.register('locationupdated', null, function() {
+            t.ok(true, 'locationupdated event is fired when bound');
+        });
+        map.addControl(control);
+        control.activate();
+        var center = map.getCenter();
+        t.eq(center.lon, 10, 'bound control sets the map lon');
+        t.eq(center.lat, 10, 'bound control sets the map lat');
+        control.deactivate();
+        map.removeControl(control);
+        map.setCenter(centerLL);
+    }
+    function test_unbind(t) {
+        t.plan(3);
+        var control = new OpenLayers.Control.Geolocate({
+            geolocation: geolocation,
+            bind: false
+        });
+        control.events.register('locationupdated', null, function() {
+            t.ok(true, 'locationupdated event is fired when unbound');
+        });
+        map.addControl(control);
+        control.activate();
+        var center = map.getCenter();
+        t.eq(center.lon, 0, 'unbound control doesnt sets the map lon');
+        t.eq(center.lat, 0, 'unbound control doesnt sets the map lat');
+        control.deactivate();
+        map.removeControl(control);
+        map.setCenter(centerLL);
+    }
+    function test_getCurrentLocation(t) {
+        t.plan(5);
+        var control = new OpenLayers.Control.Geolocate({
+            geolocation: geolocation
+        });
+        map.addControl(control);
+        t.eq(control.getCurrentLocation(), false, 'getCurrentLocation return false if control hasnt been activated');
+        control.activate();
+        map.setCenter(centerLL);
+        t.eq(control.getCurrentLocation(), true, 'getCurrentLocation return true if control has been activated');
+        var center = map.getCenter();
+        t.eq(center.lon, 10, 'bound control sets the map lon when calling getCurrentLocation');
+        t.eq(center.lat, 10, 'bound control sets the map lat when calling getCurrentLocation');
+        control.deactivate();
+        map.removeControl(control);
+        map.setCenter(centerLL);
+        var control2 = new OpenLayers.Control.Geolocate({
+            geolocation: geolocation
+        });
+        map.addControl(control2);
+        t.eq(control2.getCurrentLocation(), false, 'getCurrentLocation return false if control is in watch mode');
+        control2.deactivate();
+        map.removeControl(control2);
+        map.setCenter(centerLL);
+    }
+    function test_watch(t) {
+        t.plan(2);
+        var control = new OpenLayers.Control.Geolocate({
+            geolocation: geolocation,
+            watch: true
+        });
+        map.addControl(control);
+        control.activate();
+        t.eq(watch, true, 'watch option makes calls to watchPosition');
+        control.deactivate();
+        t.eq(watch, null, 'deactivate control calls the clearwatch');
+        map.removeControl(control);
+        map.setCenter(centerLL);
+    }
+    function test_uncapable(t) {
+        t.plan(1);
+        var control = new OpenLayers.Control.Geolocate({
+            geolocation: null,
+            bind: false
+        });
+        control.events.register('locationuncapable', null, function() {
+            t.ok(true,'uncapable browser fired locationuncapable event');
+        });
+        map.addControl(control);
+        control.activate();
+    }
+    function loader() {
+        map = new OpenLayers.Map('map');
+        var layer = new OpenLayers.Layer.WMS("Test Layer",
+            "http://labs.metacarta.com/wms-c/Basic.py?",
+            {layers: "basic"});
+        map.addLayer(layer);
+        centerLL = new OpenLayers.LonLat(0,0);
+        map.setCenter(centerLL, 5);
+    }
+  </script>
+</head>
+<body onload="loader()">
+    <div id="map" style="width: 256px; height: 256px;"/>
+</body>
+</html>

Modified: sandbox/tschaub/canvas/tests/Control/GetFeature.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/GetFeature.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/GetFeature.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     function test_Control_GetFeature_constructor(t) {
         t.plan(3);

Modified: sandbox/tschaub/canvas/tests/Control/Graticule.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/Graticule.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/Graticule.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script src="http://proj4js.org/lib/proj4js-compressed.js"></script>
     <script type="text/javascript">
 

Modified: sandbox/tschaub/canvas/tests/Control/KeyboardDefaults.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/KeyboardDefaults.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/KeyboardDefaults.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map; 
     function test_Control_KeyboardDefaults_constructor (t) {

Modified: sandbox/tschaub/canvas/tests/Control/LayerSwitcher.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/LayerSwitcher.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/LayerSwitcher.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map; 
 
@@ -71,7 +71,7 @@
 
     function test_Control_LayerSwitcher_redraw (t) {
 
-        t.plan( (OpenLayers.Util.getBrowserName() == "opera" ? 9 : 19 ) );
+        t.plan( (OpenLayers.BROWSER_NAME == "opera" ? 9 : 19 ) );
 
         map = new OpenLayers.Map('map');
         var layer = new OpenLayers.Layer.WMS("WMS", 
@@ -98,7 +98,7 @@
         t.eq(markersInput.value, markers.name, "wms correctly valued");
 
         t.eq(false, control.checkRedraw(), "check redraw is false");
-        if (OpenLayers.Util.getBrowserName() != "opera") { 
+        if (OpenLayers.BROWSER_NAME != "opera") { 
             control = new OpenLayers.Control.LayerSwitcher();
             var myredraw = control.redraw;
             control.redraw = function() { 

Modified: sandbox/tschaub/canvas/tests/Control/Measure.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/Measure.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/Measure.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialze(t) {
@@ -52,6 +52,7 @@
                 xy: new OpenLayers.Pixel(x, y)
             })
         };
+        trigger("mousemove", 0, 0);
         trigger("mousedown", 0, 0);
         trigger("mouseup", 0, 0);
         trigger("mousemove", 10, 10);
@@ -60,9 +61,10 @@
         
         // confirm that the sketch persists
         t.eq(control.handler.layer.features.length, 1, "feature persists");
-        // cancel and see that sketch is gone
+        // cancel and see that sketch is gone (do not forget that
+        // cancel will create the new feature)
         control.cancel();
-        t.eq(control.handler.layer.features.length, 0, "feature is gone after cancel");
+        t.eq(control.handler.layer.features.length, 2, "feature is gone after cancel");
         
         map.destroy();
         
@@ -112,6 +114,7 @@
         var delay = control.partialDelay / 1000;
         
         // establish first point
+        trigger("mousemove", 0, 0);
         trigger("mousedown", 0, 0);
         trigger("mouseup", 0, 0);
 
@@ -128,8 +131,8 @@
             // wait for delay then confirm event was logged
             delay, function() {
                 t.eq(log.length, 1, "a) event logged")
-                t.eq(log[0].type, "measurepartial", "a) event logged");
-                t.eq(log[0].measure, 10, "a) correct measure");
+                t.ok(log[0] && log[0].type == "measurepartial", "a) event logged");
+                t.ok(log[0] && log[0].measure == 10, "a) correct measure");
                 
                 // b) move 10 pixels and click
                 trigger("mousemove", 0, 20);
@@ -142,8 +145,8 @@
             },
             delay, function() {
                 t.eq(log.length, 2, "b) event logged");
-                t.eq(log[1].type, "measurepartial", "b) correct type");
-                t.eq(log[1].measure, 20, "b) correct measure");
+                t.ok(log[1] && log[1].type == "measurepartial", "b) correct type");
+                t.ok(log[1] && log[1].measure == 20, "b) correct measure");
 
                 // c) move 10 pixels and click
                 trigger("mousemove", 0, 30);
@@ -158,8 +161,8 @@
             // wait for rest of delay and confirm event logged
             delay / 2, function() {
                 t.eq(log.length, 3, "c) event logged");
-                t.eq(log[2].type, "measurepartial", "c) correct type");
-                t.eq(log[2].measure, 30, "c) correct measure");
+                t.ok(log[2] && log[2].type == "measurepartial", "c) correct type");
+                t.ok(log[2] && log[2].measure == 30, "c) correct measure");
                 
                 // d) move 10 pixels and click
                 trigger("mousemove", 0, 40);
@@ -173,8 +176,8 @@
                 trigger("dblclick", 0, 40);
 
                 t.eq(log.length, 4, "e) event logged");
-                t.eq(log[3].type, "measure", "e) correct type");
-                t.eq(log[3].measure, 40, "e) correct measure");                
+                t.ok(log[3] && log[3].type == "measure", "e) correct type");
+                t.ok(log[3] && log[3].measure == 40, "e) correct measure");                
             },
             // wait for rest of delay and confirm no measurepartial logged
             delay, function() {
@@ -187,6 +190,7 @@
                 log = [];
                 
                 // f) establish first freehand point
+                trigger("mousemove", 0, 0);
                 trigger("mousedown", 0, 0);
                 t.eq(log.length, 0, "f) no event fired yet")
                 
@@ -194,23 +198,23 @@
                 trigger("mousemove", 10, 0);
 
                 t.eq(log.length, 1, "g) event logged");
-                t.eq(log[0].type, "measurepartial", "g) correct type");
-                t.eq(log[0].measure, 10, "g) correct measure");
+                t.ok(log[0] && log[0].type == "measurepartial", "g) correct type");
+                t.ok(log[0] && log[0].measure == 10, "g) correct measure");
                 
                 // h) move 10 pixels
                 trigger("mousemove", 20, 0);
 
                 t.eq(log.length, 2, "h) event logged");
-                t.eq(log[1].type, "measurepartial", "h) correct type");
-                t.eq(log[1].measure, 20, "h) correct measure");
-                
+                t.ok(log[1] && log[1].type == "measurepartial", "h) correct type");
+                t.ok(log[1] && log[1].measure == 20, "h) correct measure");
+
                 // i) mouse up to finish
                 trigger("mouseup", 20, 0);
 
                 t.eq(log.length, 3, "i) event logged");
-                t.eq(log[2].type, "measure", "i) correct type");
-                t.eq(log[2].measure, 20, "i) correct measure");
-                
+                t.ok(log[2] && log[2].type == "measure", "i) correct type");
+                t.ok(log[2] && log[2].measure == 20, "i) correct measure");
+
                 // j) clean up
                 log = [];
                 map.destroy();
@@ -222,6 +226,146 @@
         );
         
     }
+
+    function test_immediate(t) {
+        t.plan(32);
+        
+        var map = new OpenLayers.Map({
+            div: "map",
+            units: "m",
+            resolutions: [1],
+            layers: [
+                new OpenLayers.Layer(null, {
+                    isBaseLayer: true
+                })
+            ],
+            center: new OpenLayers.LonLat(0, 0)
+        });
+
+        var log = [];
+        var control = new OpenLayers.Control.Measure(
+            OpenLayers.Handler.Path, {
+                persist: true,
+                immediate: true,
+                eventListeners: {
+                    measurepartial: function(evt) {
+                        log.push(evt);
+                    },
+                    measure: function(evt){
+                        log.push(evt);
+                    }
+                }
+            }
+        );
+        map.addControl(control);
+        control.activate();
+
+        // convenience function to trigger mouse events
+        function trigger(type, x, y) {
+            map.events.triggerEvent(type, {
+                xy: new OpenLayers.Pixel(x, y)
+            })
+        };
+
+        // delay in seconds
+        var delay = control.partialDelay / 1000;
+
+        // a) establish first point
+        trigger("mousemove", 0, 0);
+        trigger("mousedown", 0, 0);
+        trigger("mouseup", 0, 0);
+
+        // move 10 pixels
+        trigger("mousemove", 0, 10);
+
+        t.eq(log.length, 0, "a) no event fired yet");
+
+        t.delay_call(
+            delay, function() {
+                // confirm measurepartial is fired
+                t.eq(log.length, 1, "a) event logged");
+                t.ok(log[0] && log[0].type == "measurepartial", "a) correct type");
+                // mousemove within the partialDelay fires no event, so the
+                // measure below is the one of the initial point
+                t.ok(log[0] && log[0].measure == 0, "a) correct measure");
+
+                // b) move 10 pixels
+                trigger("mousemove", 0, 20);
+                // c) move 10 pixels again
+                trigger("mousemove", 0, 30);
+
+                // confirm measurepartial is fired 2 times
+                t.eq(log.length, 3, "b) event logged");
+                t.ok(log[1] && log[1].type == "measurepartial", "b) correct type");
+                t.ok(log[1] && log[1].measure == 20, "b) correct measure");
+                t.ok(log[2] && log[2].type == "measurepartial", "c) correct type");
+                t.ok(log[2] && log[2].measure == 30, "c) correct measure");
+
+                // d) switch immediate measurement off
+                control.setImmediate(false);
+                t.eq(control.immediate, false, "d) immediate is false");
+
+                // e) move 10 pixels and click
+                trigger("mousemove", 0, 40);
+                trigger("mousedown", 0, 40);
+                trigger("mouseup", 0, 40);
+                // confirm measurepartial is not fired before delay
+                t.eq(log.length, 3, "e) no event fired yet")
+            },
+            // wait for delay then confirm event was logged
+            delay, function() {
+                t.eq(log.length, 4, "e) event logged")
+                t.ok(log[3] && log[3].type == "measurepartial", "e) correct type");
+                t.ok(log[3] && log[3].measure == 40, "e) correct measure");
+
+                // f) switch immediate measurement on
+                control.setImmediate(true);
+                t.eq(control.immediate, true, "f) immediate is true");
+
+                // g) move 10 pixels
+                trigger("mousemove", 0, 50);
+            },
+            delay, function() {
+                t.eq(log.length, 5, "g) event logged");
+                t.ok(log[4] && log[4].type == "measurepartial", "g) correct type");
+                t.ok(log[4] && log[4].measure == 50, "g) correct measure");
+
+                // h) move 10 pixels
+                trigger("mousemove", 0, 60);
+
+                t.eq(log.length, 6, "h) event logged");
+                t.ok(log[5] && log[5].type == "measurepartial", "h) correct type");
+                t.ok(log[5] && log[5].measure == 60, "h) correct measure");
+
+                // i) double click to finish
+                trigger("mousedown", 0, 60);
+                t.eq(log.length, 7, "i) event logged");
+                t.eq(log[6] && log[6].type, "measurepartial", "i) correct type");
+                t.eq(log[6] && log[6].measure, 60, "i) correct measure");
+                trigger("mouseup", 0, 60);
+                t.eq(log.length, 7, "i) no event fired yet");
+            },
+            delay, function() {
+                t.eq(log.length, 8, "i) event logged");
+                t.eq(log[7] && log[7].type, "measurepartial", "i) correct type");
+                t.eq(log[7] && log[7].measure, 60, "i) correct measure");
+
+                trigger("dblclick", 0, 60);
+                t.eq(log.length, 9, "i) event logged");
+                t.eq(log[8] && log[8].type, "measure", "i) correct type");
+                t.eq(log[8] && log[8].measure, 60, "i) correct measure");
+                // clear log
+                log = [];
+
+                // j) clean up
+                map.destroy();
+                // wait for delay and confirm event not logged
+            },
+            delay, function() {
+                t.eq(log.length, 0, "j) no event fired after destroy");
+            }
+        );
+    }
     
   </script>
 </head>

Modified: sandbox/tschaub/canvas/tests/Control/ModifyFeature.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/ModifyFeature.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/ModifyFeature.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_initialize(t) {
@@ -74,7 +74,7 @@
     }
     
     function test_handleKeypress(t) {
-        t.plan(11);
+        t.plan(14);
 
         /**
          * There are two things that we want to test here
@@ -108,9 +108,17 @@
                      "vertex deletion: removeComponent called on parent with proper geometry");
             }
         };
-        layer.events.on({"featuremodified": function(event) {
-            t.eq(event.feature.id, poly.id, "vertex deletion: featuremodifed triggered");
-        }});
+        layer.events.on({
+            "featuremodified": function(event) {
+                t.eq(event.feature.id, poly.id, "vertex deletion: featuremodifed triggered");
+            },
+            "vertexremoved": function(evt) {
+                layer.events.unregister("vertexremoved", this, arguments.callee);
+                t.eq(evt.feature.id, poly.id, "vertexremoved triggered with correct feature");
+                t.eq(evt.vertex.id, point.geometry.id, "vertexremoved triggered with correct vertex");
+                t.eq(evt.pixel, "foo", "vertexremoved triggered with correct pixel");
+            }
+        });
         layer.drawFeature = function(feature) {
             t.eq(feature.id, poly.id,
                  "vertex deletion: drawFeature called with the proper feature");
@@ -123,7 +131,7 @@
                  "vertex deletion: onModification called with the proper feature");
         };
         // run the above four tests twice
-        control.handleKeypress({keyCode:delKey});
+        control.handleKeypress({keyCode:delKey, xy: "foo"});
         control.handleKeypress({keyCode:dKey});
         t.eq(control.feature.state, OpenLayers.State.UPDATE, "feature state set to update");
 
@@ -473,9 +481,13 @@
     }
 
     function test_onModificationStart(t) {
-        t.plan(1);
+        t.plan(5);
         var map = new OpenLayers.Map("map");
-        var layer = new OpenLayers.Layer.Vector();
+        var layer = new OpenLayers.Layer.Vector(null, {
+            styleMap: new OpenLayers.StyleMap({
+                "vertex": new OpenLayers.Style({foo: "bar"})
+            }, {extendDefault: false})
+        });
         map.addLayer(layer);
         var control = new OpenLayers.Control.ModifyFeature(layer);
         map.addControl(control);
@@ -483,14 +495,38 @@
         
         // make sure onModificationStart is called on feature selection
         var testFeature = new OpenLayers.Feature.Vector(
-            new OpenLayers.Geometry.Point(Math.random(), Math.random())
+            OpenLayers.Geometry.fromWKT("LINESTRING(3 4,10 50,20 25)")
         );
+        layer.addFeatures([testFeature]);
         control.onModificationStart = function(feature) {
             t.eq(feature.id, testFeature.id,
                  "onModificationStart called with the right feature");
         };
         control.selectFeature(testFeature);
         
+        // make sure styles are set correctly from default style
+        t.eq(control.virtualStyle, OpenLayers.Util.applyDefaults({
+            strokeOpacity: 0.3,
+            fillOpacity: 0.3
+        }, OpenLayers.Feature.Vector.style["default"]), "virtual style set correctly");
+        var vertex = layer.features[layer.features.length-1];
+        t.eq(vertex.renderIntent, null, "vertex style set correctly - uses default style");
+        control.unselectFeature(testFeature);
+        
+        // make sure styles are set correctly with vertexRenderIntent
+        control = new OpenLayers.Control.ModifyFeature(layer, {vertexRenderIntent: "vertex"});
+        map.addControl(control);
+        control.activate();
+        control.selectFeature(testFeature);
+        t.eq(control.virtualStyle, {
+            strokeOpacity: 0.3,
+            fillOpacity: 0.3,
+            foo: "bar"
+        }, "virtual style set correctly");
+        var vertex = layer.features[layer.features.length-1];
+        t.eq(vertex.renderIntent, "vertex", "vertex style set correctly - uses 'vertex' renderIntent");
+        control.unselectFeature(testFeature);
+        
         map.destroy();
     }
     
@@ -612,7 +648,7 @@
     
     function test_standalone(t) {
         
-        t.plan(17);
+        t.plan(18);
         var map = new OpenLayers.Map("map");
         var layer = new OpenLayers.Layer.Vector();
         
@@ -637,6 +673,7 @@
         var log = [];
         layer.events.on({
             beforefeaturemodified: function(evt) {
+                layer.events.unregister("beforefeaturemodified", this, arguments.callee);
                 log.push(evt);
             },
             featuremodified: function(evt) {
@@ -654,7 +691,9 @@
         
         // manually select feature for editing
         control.selectFeature(f1);
+        t.eq(log.length, 1, "[select f1] beforefeaturemodified triggered");
         t.ok(control.feature === f1, "[select f1] control.feature set to f1");
+        log = []
         
         // manually unselect feature for editing
         control.unselectFeature(f1);

Modified: sandbox/tschaub/canvas/tests/Control/MousePosition.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/MousePosition.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/MousePosition.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map, control; 
     function test_initialize (t) {

Modified: sandbox/tschaub/canvas/tests/Control/MouseToolbar.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/MouseToolbar.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/MouseToolbar.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map; 
     function test_Control_MouseToolbar_constructor (t) {

Modified: sandbox/tschaub/canvas/tests/Control/NavToolbar.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/NavToolbar.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/NavToolbar.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map; 
     function test_Control_NavToolbar_constructor (t) {

Modified: sandbox/tschaub/canvas/tests/Control/Navigation.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/Navigation.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/Navigation.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_Control_Navigation_constructor (t) {

Modified: sandbox/tschaub/canvas/tests/Control/NavigationHistory.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/NavigationHistory.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/NavigationHistory.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/canvas/tests/Control/OverviewMap.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/OverviewMap.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/OverviewMap.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map, control;
     function test_initialize(t) {

Modified: sandbox/tschaub/canvas/tests/Control/PanPanel.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/PanPanel.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/PanPanel.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,9 +1,9 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     function test_constructor (t) {
-        t.plan(1);
+        t.plan(2);
         
         // set up
         var control;
@@ -15,9 +15,47 @@
              control.controls[2].slideFactor == 200 &&
              control.controls[3].slideFactor == 200,
              "ctor sets slideFactor in all Pan controls");
+        
+        control.destroy();
+
+        control = new OpenLayers.Control.PanPanel({slideRatio: .5});
+        t.ok(control.controls[0].slideRatio == .5 &&
+             control.controls[1].slideRatio == .5 &&
+             control.controls[2].slideRatio == .5 &&
+             control.controls[3].slideRatio == .5,
+             "ctor sets slideRatio in all Pan controls");
+        
+        control.destroy();
     }
+    
+    function test_slide(t) {
+        t.plan(2);
+        var map = new OpenLayers.Map("map", {
+            panMethod: null,
+            controls: [
+                new OpenLayers.Control.PanPanel(),
+                new OpenLayers.Control.PanPanel({slideRatio: .5})
+            ],
+            layers: [new OpenLayers.Layer(null, {isBaseLayer: true})],
+            center: new OpenLayers.LonLat(0, 0),
+            zoom: 1
+        });
+        
+        map.controls[0].controls[0].trigger();
+        map.controls[0].controls[2].trigger();
+        map.pan(-50, 50);
+        t.eq(map.getCenter().toShortString(), "0, 0", "correct pan distance with slideFactor");
+        
+        map.controls[1].controls[0].trigger();
+        map.controls[1].controls[2].trigger();
+        map.pan(-128, 64);
+        t.eq(map.getCenter().toShortString(), "0, 0", "correct pan distance with slideRatio");        
+
+        map.destroy();
+    }
   </script>
 </head>
 <body>
+    <div id="map" style="width: 256px; height: 128px;"></div>
 </body>
 </html>

Modified: sandbox/tschaub/canvas/tests/Control/PanZoom.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/PanZoom.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/PanZoom.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map; 
     function test_Control_PanZoom_constructor (t) {
@@ -43,7 +43,7 @@
 
     function test_Control_PanZoom_control_events (t) {
 
-        if ( !window.document.createEvent || OpenLayers.Util.getBrowserName() == "opera" || !t.open_window) {
+        if ( !window.document.createEvent || OpenLayers.BROWSER_NAME == "opera" || !t.open_window) {
             //ie can't simulate mouseclicks
             t.plan(0);
             t.debug_print("FIXME: This browser does not support the PanZoom test at this time.");
@@ -72,65 +72,65 @@
                     
                     simulateClick(wnd, wnd.control.buttons[0]);
                     t.delay_call(2, function() {
-                        t.ok( wnd.mapper.getCenter().lat > wnd.centerLL.lat, "Pan up works correctly" );
-                        t.ok(!flag.mousedown, "mousedown does not get to the map");
-                        t.ok(flag.mouseup, "mouseup does get to the map");
-                        t.ok(!flag.click, "click does not get to the map");
-                        t.ok(!flag.dblclick, "dblclick does not get to the map");
+                        t.ok( wnd.mapper.getCenter().lat > wnd.centerLL.lat, "1) Pan up works correctly" );
+                        t.ok(!flag.mousedown, "1) mousedown does not get to the map");
+                        t.ok(!flag.mouseup, "1) mouseup does not get to the map");
+                        t.ok(!flag.click, "1) click does not get to the map");
+                        t.ok(!flag.dblclick, "1) dblclick does not get to the map");
                         resetFlags();
 
                         simulateClick(wnd, wnd.control.buttons[1]);
                     }, 2, function() {    
-                    t.ok( wnd.mapper.getCenter().lon < wnd.centerLL.lon, "Pan left works correctly" );
-                    t.ok(!flag.mousedown, "mousedown does not get to the map");
-                    t.ok(flag.mouseup, "mouseup does get to the map");
-                    t.ok(!flag.click, "click does not get to the map");
-                    t.ok(!flag.dblclick, "dblclick does not get to the map");
+                    t.ok( wnd.mapper.getCenter().lon < wnd.centerLL.lon, "2) Pan left works correctly" );
+                    t.ok(!flag.mousedown, "2) mousedown does not get to the map");
+                    t.ok(!flag.mouseup, "2) mouseup does not get to the map");
+                    t.ok(!flag.click, "2) click does not get to the map");
+                    t.ok(!flag.dblclick, "2) dblclick does not get to the map");
                     resetFlags();
 
                     simulateClick(wnd, wnd.control.buttons[2]);
                     }, 2, function() {
-                    t.ok( wnd.mapper.getCenter().lon == wnd.centerLL.lon, "Pan right works correctly" );
-                    t.ok(!flag.mousedown, "mousedown does not get to the map");
-                    t.ok(flag.mouseup, "mouseup does get to the map");
-                    t.ok(!flag.click, "click does not get to the map");
-                    t.ok(!flag.dblclick, "dblclick does not get to the map");
+                    t.ok( wnd.mapper.getCenter().lon == wnd.centerLL.lon, "3) Pan right works correctly" );
+                    t.ok(!flag.mousedown, "3) mousedown does not get to the map");
+                    t.ok(!flag.mouseup, "3) mouseup does not get to the map");
+                    t.ok(!flag.click, "3) click does not get to the map");
+                    t.ok(!flag.dblclick, "3) dblclick does not get to the map");
                     resetFlags();
 
                     simulateClick(wnd, wnd.control.buttons[3]);
                     }, 2, function() {
-                    t.ok( wnd.mapper.getCenter().lat == wnd.centerLL.lat, "Pan down works correctly" );
-                    t.ok(!flag.mousedown, "mousedown does not get to the map");
-                    t.ok(flag.mouseup, "mouseup does get to the map");
-                    t.ok(!flag.click, "click does not get to the map");
-                    t.ok(!flag.dblclick, "dblclick does not get to the map");
+                    t.ok( wnd.mapper.getCenter().lat == wnd.centerLL.lat, "4) Pan down works correctly" );
+                    t.ok(!flag.mousedown, "4) mousedown does not get to the map");
+                    t.ok(!flag.mouseup, "4) mouseup does not get to the map");
+                    t.ok(!flag.click, "4) click does not get to the map");
+                    t.ok(!flag.dblclick, "4) dblclick does not get to the map");
                     resetFlags();
 
                     simulateClick(wnd, wnd.control.buttons[4]);
                     }, 2, function() {
-                    t.eq( wnd.mapper.getZoom(), 6, "zoomin works correctly" );
-                    t.ok(!flag.mousedown, "mousedown does not get to the map");
-                    t.ok(flag.mouseup, "mouseup does get to the map");
-                    t.ok(!flag.click, "click does not get to the map");
-                    t.ok(!flag.dblclick, "dblclick does not get to the map");
+                    t.eq( wnd.mapper.getZoom(), 6, "5) zoomin works correctly" );
+                    t.ok(!flag.mousedown, "5) mousedown does not get to the map");
+                    t.ok(!flag.mouseup, "5) mouseup does not get to the map");
+                    t.ok(!flag.click, "5) click does not get to the map");
+                    t.ok(!flag.dblclick, "5) dblclick does not get to the map");
                     resetFlags();
 
                     simulateClick(wnd, wnd.control.buttons[6]);
                     }, 2, function() {
-                    t.eq( wnd.mapper.getZoom(), 5, "zoomout works correctly" );
-                    t.ok(!flag.mousedown, "mousedown does not get to the map");
-                    t.ok(flag.mouseup, "mouseup does get to the map");
-                    t.ok(!flag.click, "click does not get to the map");
-                    t.ok(!flag.dblclick, "dblclick does not get to the map");
+                    t.eq( wnd.mapper.getZoom(), 5, "6) zoomout works correctly" );
+                    t.ok(!flag.mousedown, "6) mousedown does not get to the map");
+                    t.ok(!flag.mouseup, "6) mouseup does not get to the map");
+                    t.ok(!flag.click, "6) click does not get to the map");
+                    t.ok(!flag.dblclick, "6) dblclick does not get to the map");
                     resetFlags();
 
                     simulateClick(wnd, wnd.control.buttons[5]);
                     }, 2, function() {
-                    t.eq( wnd.mapper.getZoom(), 2, "zoomworld works correctly" );
-                    t.ok(!flag.mousedown, "mousedown does not get to the map");
-                    t.ok(flag.mouseup, "mouseup does get to the map");
-                    t.ok(!flag.click, "click does not get to the map");
-                    t.ok(!flag.dblclick, "dblclick does not get to the map");
+                    t.eq( wnd.mapper.getZoom(), 2, "7) zoomworld works correctly" );
+                    t.ok(!flag.mousedown, "7) mousedown does not get to the map");
+                    t.ok(!flag.mouseup, "7) mouseup does not get to the map");
+                    t.ok(!flag.click, "7) click does not get to the map");
+                    t.ok(!flag.dblclick, "7) dblclick does not get to the map");
                     resetFlags();
                     });
                 });

Modified: sandbox/tschaub/canvas/tests/Control/PanZoomBar.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/PanZoomBar.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/PanZoomBar.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map;
     function test_Control_PanZoomBar_constructor (t) {
@@ -44,7 +44,7 @@
         control = new OpenLayers.Control.PanZoomBar();
         map.addControl(control);
         control.removeButtons();
-        control._removeZoomBar();
+        map.destroy();
         t.eq(control.div.childNodes.length, 0, "control's div cleared.");
         t.eq(control.zoombarDiv, null, "zoombar div nullified.")
     }
@@ -67,20 +67,104 @@
 
     }
 
-    function test_Control_PanZoomBar_forceFixedZoomLevel_divClick (t) {
+    function test_Control_PanZoomBar_forceFixedZoomLevel_divClick(t){
         t.plan(1);
-        map = new OpenLayers.Map('map', {controls:[], fractionalZoom: true});
-        var layer = new OpenLayers.Layer.WMS("Test Layer",
-            "http://octo.metacarta.com/cgi-bin/mapserv?",
-            {map: "/mapdata/vmap_wms.map", layers: "basic"});
+        map = new OpenLayers.Map('map', {
+            controls: [],
+            fractionalZoom: true
+        });
+        var layer = new OpenLayers.Layer.WMS("Test Layer", "http://octo.metacarta.com/cgi-bin/mapserv?", {
+            map: "/mapdata/vmap_wms.map",
+            layers: "basic"
+        });
         map.addLayer(layer);
-        control = new OpenLayers.Control.PanZoomBar({forceFixedZoomLevel: true});
+        control = new OpenLayers.Control.PanZoomBar({
+            forceFixedZoomLevel: true
+        });
         map.addControl(control);
-
-        control.divClick({'xy': {'x': 0, 'y': 49}, which: 1});
-        t.eq(map.zoom, 11, "forceFixedZoomLevel makes sure only fixed zoom levels are used even if the map has fractionalZoom");
+        
+        control.divClick({
+            'xy': {
+                'x': 0,
+                'y': 49
+            },
+            which: 1
+        });
+        t.eq(map.zoom, 11, "forceFixedZoomLevel makes sure that after a div click only fixed zoom levels are used even if the map has fractionalZoom");
+    }     
+         
+    function test_Control_PanZoomBar_forceFixedZoomLevel_zoomBarUp (t) {     
+        var numRandomDrags = 25;
+        // plan one static recorded test and two for every random drag
+        t.plan(1 + (numRandomDrags * 2));
+        
+        
+        var map = new OpenLayers.Map('map', {
+            controls: [],
+            fractionalZoom: true
+        });
+        var layer = new OpenLayers.Layer.WMS("Test Layer", "http://octo.metacarta.com/cgi-bin/mapserv?", {
+            map: "/mapdata/vmap_wms.map",
+            layers: "basic"
+        });
+        map.addLayer(layer);
+        
+        // zoom to a fractional ZoomLevel initially:
+        map.setCenter(new OpenLayers.LonLat(0, 0), 9.545);
+        
+        control = new OpenLayers.Control.PanZoomBar({
+            forceFixedZoomLevel: true
+        });
+        map.addControl(control);
+        
+        // The y values come from manually recording real values in an example
+        var evt = {
+            'xy': {
+                'x': 0,
+                'y': -10.633
+            },
+            which: 1
+        };
+        control.zoomStart = {
+            'x': 0,
+            'y': 5.366
+        };
+        control.mouseDragStart = {
+            'x': 0,
+            'y': -10.633
+        };
+        control.deltaY = control.zoomStart.y - evt.xy.y
+        control.zoomBarUp(evt);
+        t.eq(map.zoom, 11, "forceFixedZoomLevel makes sure that after dragging of the handle only fixed zoom levels are used even if the map has fractionalZoom");
+        
+        // randomly drag the handle around
+        // we should never get a zoom < 0 or a non-integer zoom, regardless of
+        // captured random values for start and end of the drag.
+        for (var i = 0; i < numRandomDrags; i++) {
+            var randStartY = Math.random() * 10 * ((i % 2 === 0) ? -1 : 1);
+            var randStopY = Math.random() * 160 * ((i % 2 === 1) ? -1 : 1);
+            var evt = {
+                'xy': {
+                    'x': 0,
+                    'y': randStopY
+                },
+                which: 1
+            };
+            control.zoomStart = {
+                'x': 0,
+                'y': randStartY
+            };
+            control.mouseDragStart = {
+                'x': 0,
+                'y': randStopY
+            };
+            control.deltaY = control.zoomStart.y - evt.xy.y
+            control.zoomBarUp(evt);
+            
+            t.eq(Math.floor(map.zoom), Math.ceil(map.zoom), 'Only integer zooms after random handle drag with forceFixedZoomLevel=true and fractionalZoom=true (current zoom was ' + map.zoom + ')');
+            t.ok(map.zoom >= 0, 'map.zoom is never < 0 after random handle drag with forceFixedZoomLevel=true and fractionalZoom=true');
+        }
     }
-
   </script>
 </head>
 <body>

Modified: sandbox/tschaub/canvas/tests/Control/Panel.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/Panel.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/Panel.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     function test_Control_Panel_constructor (t) {
         t.plan( 2 );
@@ -227,8 +227,8 @@
         t.ok(!controlNoDeactive.active, "Tool control autoActivate:true is not active");
         
     }
-    function test_Control_Panel_dectivate (t) {
-        t.plan(3);
+    function test_Control_Panel_deactivate (t) {
+        t.plan(2);
         var map = new OpenLayers.Map('map');
         var control = new OpenLayers.Control();
         var panel = new OpenLayers.Control.Panel();        
@@ -239,12 +239,7 @@
         panel.deactivate();
         t.ok(panel.div.innerHTML == "", 
             "Panel is not displayed after deactivate without any active control");
-        
-        panel.activate();
-        var div = panel.div;
-        panel.destroy();
-        t.eq(panel.div, null, 
-            "Panel is not displayed after destroy without any active control");
+
         map.destroy();
     }
   </script>

Modified: sandbox/tschaub/canvas/tests/Control/Permalink.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/Permalink.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/Permalink.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,14 +1,70 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map; 
     function test_Control_Permalink_constructor (t) {
-        t.plan( 2 );
+        t.plan(42);
     
         control = new OpenLayers.Control.Permalink();
-        t.ok( control instanceof OpenLayers.Control.Permalink, "new OpenLayers.Control returns object" );
-        t.eq( control.displayClass,  "olControlPermalink", "displayClass is correct" );
+        t.ok(control instanceof OpenLayers.Control.Permalink, "new OpenLayers.Control returns object");
+        t.eq(control.displayClass, "olControlPermalink", "displayClass is correct");
+        t.eq(control.base, document.location.href, "base is correct");
+        t.ok(!control.anchor, "anchor is correct");
+
+        control = new OpenLayers.Control.Permalink('permalink', 'test.html');
+        t.ok(control instanceof OpenLayers.Control.Permalink, "new OpenLayers.Control returns object");
+        t.eq(control.displayClass, "olControlPermalink", "displayClass is correct");
+        t.eq(control.base, 'test.html', "base is correct");
+        t.ok(OpenLayers.Util.isElement(control.element), "element is a dom object");
+        t.ok(!control.anchor, "anchor is correct");
+
+        control = new OpenLayers.Control.Permalink('permalink');
+        t.ok(control instanceof OpenLayers.Control.Permalink, "new OpenLayers.Control returns object");
+        t.eq(control.displayClass, "olControlPermalink", "displayClass is correct");
+        t.eq(control.base, document.location.href, "base is correct");
+        t.ok(OpenLayers.Util.isElement(control.element), "element is a dom object");
+        t.ok(!control.anchor, "anchor is correct");
+
+        control = new OpenLayers.Control.Permalink(OpenLayers.Util.getElement('permalink'));
+        t.ok(control instanceof OpenLayers.Control.Permalink, "new OpenLayers.Control returns object");
+        t.eq(control.displayClass, "olControlPermalink", "displayClass is correct");
+        t.eq(control.base, document.location.href, "base is correct");
+        t.ok(OpenLayers.Util.isElement(control.element), "element is a dom object");
+        t.ok(!control.anchor, "anchor is correct");
+
+        control = new OpenLayers.Control.Permalink({anchor: true});
+        t.ok(control instanceof OpenLayers.Control.Permalink, "new OpenLayers.Control returns object");
+        t.eq(control.displayClass, "olControlPermalink", "displayClass is correct");
+        t.eq(control.base, document.location.href, "base is correct");
+        t.ok(control.element == null, "element is null");
+        t.ok(control.anchor, "anchor is correct");
+
+        control = new OpenLayers.Control.Permalink({anchor: false});
+        t.ok(control instanceof OpenLayers.Control.Permalink, "new OpenLayers.Control returns object");
+        t.eq(control.displayClass, "olControlPermalink", "displayClass is correct");
+        t.eq(control.base, document.location.href, "base is correct");
+        t.ok(!control.anchor, "anchor is correct");
+
+        control = new OpenLayers.Control.Permalink({});
+        t.ok(control instanceof OpenLayers.Control.Permalink, "new OpenLayers.Control returns object");
+        t.eq(control.displayClass, "olControlPermalink", "displayClass is correct");
+        t.eq(control.base, document.location.href, "base is correct");
+        t.ok(!control.anchor, "anchor is correct");
+
+        control = new OpenLayers.Control.Permalink({element: 'permalink', base: 'test.html'});
+        t.ok(control instanceof OpenLayers.Control.Permalink, "new OpenLayers.Control returns object");
+        t.eq(control.displayClass, "olControlPermalink", "displayClass is correct");
+        t.eq(control.base, 'test.html', "base is correct");
+        t.ok(OpenLayers.Util.isElement(control.element), "element is a dom object");
+        t.ok(!control.anchor, "anchor is correct");
+
+        control = new OpenLayers.Control.Permalink({element: 'permalink', base: 'test.html', anchor: true});
+        t.ok(control instanceof OpenLayers.Control.Permalink, "new OpenLayers.Control returns object");
+        t.eq(control.displayClass, "olControlPermalink", "displayClass is correct");
+        t.eq(control.base, 'test.html', "base is correct");
+        t.ok(OpenLayers.Util.isElement(control.element), "element is a dom object");
+        t.ok(control.anchor, "anchor is correct");
     }
     function test_Control_Permalink_uncentered (t) {
         t.plan( 1 );
@@ -226,7 +282,45 @@
         OpenLayers.Util.getParameters = old_getParameters;
         OpenLayers.Projection.transform = old_transform;
     }
+    function test_Control_Permalink_Anchor (t) {
+        t.plan(3);
     
+        control = new OpenLayers.Control.Permalink({anchor: true});
+        t.ok( control instanceof OpenLayers.Control.Permalink, "new OpenLayers.Control returns object" );
+        map = new OpenLayers.Map('map');
+        layer = new OpenLayers.Layer.WMS('Test Layer', "http://octo.metacarta.com/cgi-bin/mapserv", {map: '/mapdata/vmap_wms.map', layers: 'basic', format: 'image/jpeg'});
+        map.addLayer(layer);
+        layer = new OpenLayers.Layer.WMS('Test Layer', "http://octo.metacarta.com/cgi-bin/mapserv", {map: '/mapdata/vmap_wms.map', layers: 'basic', format: 'image/jpeg'}, {'isBaseLayer': false});
+        map.addLayer(layer);
+        layer.setVisibility(true);
+        if (!map.getCenter())  map.zoomToMaxExtent();
+        map.addControl(control);
+        map.pan(5, 0, {animate:false});
+        t.ok(OpenLayers.Util.isEquivalentUrl(OpenLayers.Util.getParameterString(control.createParams()), "zoom=2&lat=0&lon=1.75781&layers=BT"), 'pan sets permalink');
+        
+        map.layers[1].setVisibility(false);
+        t.ok(OpenLayers.Util.isEquivalentUrl(OpenLayers.Util.getParameterString(control.createParams()), "zoom=2&lat=0&lon=1.75781&layers=BF"), 'setVisibility sets permalink');
+    }
+    
+    function test_Control_Permalink_AnchorBaseElement (t) {
+        t.plan(3);
+    
+        control = new OpenLayers.Control.Permalink('permalink', document.location.href, {anchor: true});
+        t.ok( control instanceof OpenLayers.Control.Permalink, "new OpenLayers.Control returns object" );
+        map = new OpenLayers.Map('map');
+        layer = new OpenLayers.Layer.WMS('Test Layer', "http://octo.metacarta.com/cgi-bin/mapserv", {map: '/mapdata/vmap_wms.map', layers: 'basic', format: 'image/jpeg'});
+        map.addLayer(layer);
+        layer = new OpenLayers.Layer.WMS('Test Layer', "http://octo.metacarta.com/cgi-bin/mapserv", {map: '/mapdata/vmap_wms.map', layers: 'basic', format: 'image/jpeg'}, {'isBaseLayer': false});
+        map.addLayer(layer);
+        layer.setVisibility(true);
+        if (!map.getCenter())  map.zoomToMaxExtent();
+        map.addControl(control);
+        map.pan(5, 0, {animate:false});
+        t.ok(OpenLayers.Util.isEquivalentUrl(OpenLayers.Util.getElement('permalink').href, location+"#zoom=2&lat=0&lon=1.75781&layers=BT"), 'pan sets permalink');
+        
+        map.layers[1].setVisibility(false);
+        t.ok(OpenLayers.Util.isEquivalentUrl(OpenLayers.Util.getElement('permalink').href, location+"#zoom=2&lat=0&lon=1.75781&layers=BF"), 'setVisibility sets permalink');
+    }
   </script>
 </head>
 <body>

Modified: sandbox/tschaub/canvas/tests/Control/SLDSelect.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/SLDSelect.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/SLDSelect.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {
@@ -31,7 +31,7 @@
     }
 
     function test_select(t) {
-        t.plan(8);
+        t.plan(9);
         var parser = new OpenLayers.Format.WFSDescribeFeatureType();
         var map = new OpenLayers.Map('map');
         var layer = new OpenLayers.Layer.WMS('Foo', 'http://foo', {LAYERS: 'AAA64'});
@@ -80,7 +80,8 @@
         control.select(geometry);
         control.events.unregister("selected", this, testEvent);
         t.eq(map.layers.length, 2, "Selection layer has been created and added to the map");
-        t.eq(map.layers[1] instanceof OpenLayers.Layer.WMS.Post, true, "A WMS Post layer has been created as the selection layer");
+        t.eq(map.layers[1] instanceof OpenLayers.Layer.WMS, true, "A WMS layer has been created as the selection layer");
+        t.eq(map.layers[1].tileOptions.maxGetUrlLength, 2048, "Selection layer will automatically switch to HTTP Post if content gets longer than 2048");
         var expected_sld = '<sld:StyledLayerDescriptor xmlns:sld="http://www.opengis.net/sld" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"><sld:NamedLayer><sld:Name>AAA64</sld:Name><sld:UserStyle><sld:Name>default</sld:Name><sld:FeatureTypeStyle><sld:Rule><ogc:Filter xmlns:ogc="http://www.opengis.net/ogc"><ogc:BBOX><ogc:PropertyName>geometry</ogc:PropertyName><gml:Box xmlns:gml="http://www.opengis.net/gml"><gml:coordinates decimal="." cs="," ts=" ">-3.5355339059327,-3.5355339059327 3.5355339059327,3.5355339059327</gml:coordinates></gml:Box></ogc:BBOX></ogc:Filter><sld:LineSymbolizer><sld:Stroke><sld:CssParameter name="stroke">#FF0000</sld:CssParameter><sld:CssParameter name="stroke-width">2</sld:CssParameter></sld:Stroke></sld:LineSymbolizer></sld:Rule></sld:Featur
 eTypeStyle></sld:UserStyle></sld:NamedLayer></sld:StyledLayerDescriptor>';
 
         t.xml_eq(map.layers[1].params.SLD_BODY, expected_sld, "SLD generated correctly");

Modified: sandbox/tschaub/canvas/tests/Control/Scale.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/Scale.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/Scale.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,7 +1,8 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
+    OpenLayers.Lang.setCode('en');
     var map; 
     function test_Control_Scale_constructor (t) {
         t.plan( 2 );

Modified: sandbox/tschaub/canvas/tests/Control/ScaleLine.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/ScaleLine.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/ScaleLine.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -3,7 +3,7 @@
     <script type="text/javascript">var oldAlert = window.alert, gMess; window.alert = function(message) {gMess = message; return true;};</script>
     <!-- this gmaps key generated for http://openlayers.org/dev/ -->
     <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA9XNhd8q0UdwNC7YSO4YZghSPUCi5aRYVveCcVYxzezM4iaj_gxQ9t-UajFL70jfcpquH5l1IJ-Zyyw'></script>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
   var validkey = (window.location.protocol == "file:") ||
                  (window.location.host == "localhost") ||

Modified: sandbox/tschaub/canvas/tests/Control/SelectFeature.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/SelectFeature.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/SelectFeature.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     function test_Control_SelectFeature_constructor(t) {
         t.plan(5);

Modified: sandbox/tschaub/canvas/tests/Control/Snapping.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/Snapping.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/Snapping.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {
@@ -173,6 +173,70 @@
         control.destroy();
     }
     
+    function test_resolution_limits(t) {
+        t.plan(7);
+
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1],
+            maxExtent: new OpenLayers.Bounds(0, 0, 100, 100)
+        });
+
+        var layer = new OpenLayers.Layer.Vector(null, {
+            isBaseLayer: true
+        });
+        layer.addFeatures([
+            new OpenLayers.Feature.Vector(OpenLayers.Geometry.fromWKT(
+                "POINT(50 50)"
+            ))
+        ]);
+
+        map.addLayer(layer);
+        map.zoomToMaxExtent();        
+        
+        var control = new OpenLayers.Control.Snapping({layer: layer});
+        
+        var result;
+        var loc = new OpenLayers.Geometry.Point(49, 49);
+
+        // 1) test a target with no constraints
+        control.setTargets([{layer: layer}]);
+        result = control.testTarget(control.targets[0], loc);
+        t.ok(result !== null, "1) target is eligible");
+        
+        // 2) test a target with minResolution < map.resolution
+        control.setTargets([{layer: layer, minResolution: 0.5}]);
+        result = control.testTarget(control.targets[0], loc);
+        t.ok(result !== null, "2) target is eligible");
+
+        // 3) test a target with minResolution === map.resolution
+        control.setTargets([{layer: layer, minResolution: 1}]);
+        result = control.testTarget(control.targets[0], loc);
+        t.ok(result !== null, "3) target is eligible");
+
+        // 4) test a target with minResolution > map.resolution
+        control.setTargets([{layer: layer, minResolution: 1.5}]);
+        result = control.testTarget(control.targets[0], loc);
+        t.ok(result === null, "4) target is not eligible");
+
+        // 5) test a target with maxResolution < map.resolution
+        control.setTargets([{layer: layer, maxResolution: 0.5}]);
+        result = control.testTarget(control.targets[0], loc);
+        t.ok(result === null, "5) target is not eligible");
+        
+        // 6) test a target with maxResolution === map.resolution
+        control.setTargets([{layer: layer, maxResolution: 1}]);
+        result = control.testTarget(control.targets[0], loc);
+        t.ok(result === null, "6) target is not eligible");
+        
+        // 7) test a target with maxResolution > map.resolution
+        control.setTargets([{layer: layer, maxResolution: 1.5}]);
+        result = control.testTarget(control.targets[0], loc);
+        t.ok(result !== null, "7) target is eligible");
+        
+        map.destroy();
+    
+    }
+    
     function test_snapping(t) {
         
         t.plan(46);

Modified: sandbox/tschaub/canvas/tests/Control/Split.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/Split.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/Split.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {
@@ -35,13 +35,20 @@
     function test_setSource(t) {
         t.plan(5);
         
-        var layer1 = new OpenLayers.Layer.Vector();
-        var layer2 = new OpenLayers.Layer.Vector();
+        var layer1 = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        var layer2 = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
         
         var control = new OpenLayers.Control.Split({layer: layer1});
 
         var map = new OpenLayers.Map("map");
         map.addLayers([layer1, layer2]);
+        map.zoomToMaxExtent();
         map.addControl(control);
         control.activate();
         
@@ -64,12 +71,16 @@
     function test_activate(t) {
         t.plan(8);
         
-        var layer = new OpenLayers.Layer.Vector();
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
         var control = new OpenLayers.Control.Split({layer: layer});
         var map = new OpenLayers.Map("map");
         map.addLayer(layer);
+        map.zoomToMaxExtent();
         map.addControl(control);
-        
+
         // test activation with no source layer
         control.activate();
         t.eq(control.active, true, "control is active");
@@ -93,12 +104,16 @@
         
         t.plan(7);
         
-        var layer = new OpenLayers.Layer.Vector();
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
         var control = new OpenLayers.Control.Split({layer: layer});
         var map = new OpenLayers.Map("map");
         map.addLayer(layer);
+        map.zoomToMaxExtent();
         map.addControl(control);
-        
+
         // activate and check sketch handler
         control.activate();
         t.ok(control.handler, "sketch handler present");

Copied: sandbox/tschaub/canvas/tests/Control/TouchNavigation.html (from rev 11416, trunk/openlayers/tests/Control/TouchNavigation.html)
===================================================================
--- sandbox/tschaub/canvas/tests/Control/TouchNavigation.html	                        (rev 0)
+++ sandbox/tschaub/canvas/tests/Control/TouchNavigation.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,131 @@
+<html>
+<head>
+  <script src="../OLLoader.js"></script>
+  <script type="text/javascript">
+
+    function test_Control_TouchNavigation_constructor (t) {
+        t.plan( 2 );
+        var options = {bar: "foo"};
+        var temp = OpenLayers.Control.prototype.initialize;
+        OpenLayers.Control.prototype.initialize = function(opt) {
+            t.eq(opt, options,
+                 "constructor calls parent with the correct options");
+        };
+
+        var control = new OpenLayers.Control.TouchNavigation(options);
+        t.ok(control instanceof OpenLayers.Control.TouchNavigation,
+            "new OpenLayers.Control returns object");
+
+        OpenLayers.Control.prototype.initialize = temp;
+    }
+
+    function test_Control_TouchNavigation_destroy(t) {
+        t.plan(6);
+
+        var control = {
+            events: {
+                destroy: function() {
+                    t.ok(true, "events destroyed");
+                }
+            },
+            deactivate: function() {
+                t.ok(true, "navigation control deactivated before being destroyed");
+            },
+            dragPan: {
+                destroy: function() {
+                    t.ok(true, "dragPan destroyed");
+                }
+            },
+            handlers: {
+                click: {
+                    destroy: function() {
+                        t.ok(true, "clickHandler destroyed");
+                    }
+                }
+            }
+        };
+
+        //this will also trigger one test by calling OpenLayers.Control's destroy
+        // and three more for the destruction of dragPan, zoomBox, and wheelHandler
+        OpenLayers.Control.TouchNavigation.prototype.destroy.apply(control, []);
+
+        t.eq(control.dragPan, null, "'dragPan' set to null");
+        t.eq(control.handlers, null, "handlers set to null");
+    }
+
+    function test_documentDrag(t) {
+
+        t.plan(2);
+
+        /**
+         * These tests confirm that the documentDrag property is false by
+         * default and is passed on to the DragPan control.  Tests of panning
+         * while dragging outside the viewport should go in the DragPan tests.
+         * Tests of the document events and appropriate callbacks from the
+         * handler should go in the Drag handler tests.
+         */
+
+         var nav = new OpenLayers.Control.TouchNavigation();
+         t.eq(nav.documentDrag, false, "documentDrag false by default");
+
+         var map = new OpenLayers.Map({
+             div: document.body,
+             controls: [new OpenLayers.Control.TouchNavigation({documentDrag: true})]
+         });
+         nav = map.controls[0];
+
+         t.eq(nav.dragPan.documentDrag, true, "documentDrag set on the DragPan control");
+         map.destroy();
+
+    }
+
+    function test_dragPanOptions(t) {
+
+        t.plan(2);
+
+         var nav = new OpenLayers.Control.TouchNavigation();
+         t.eq(nav.dragPanOptions, null, "dragPanOptions null by default");
+
+         var map = new OpenLayers.Map({
+             div: document.body,
+             controls: [
+                 new OpenLayers.Control.TouchNavigation({
+                     dragPanOptions: {foo: 'bar'}
+                 })
+             ]
+         });
+         nav = map.controls[0];
+
+         t.eq(nav.dragPan.foo, 'bar',
+            "foo property is set on the DragPan control");
+         map.destroy();
+
+    }
+
+    function test_zoomOut(t) {
+        t.plan(1);
+
+        var map = new OpenLayers.Map(document.body);
+        var layer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
+                    "http://labs.metacarta.com/wms/vmap0",
+                    {layers: 'basic'} );
+        map.addLayer(layer);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 5);
+        var control = new OpenLayers.Control.TouchNavigation();
+        map.addControl(control);
+        var handler = control.handlers.click;
+        handler.touchstart({xy: {x: 1, y: 1}, touches: ["foo", "bar"]});
+        handler.touchend({});
+        t.delay_call(1, function() {
+            t.eq(map.getZoom(), 4, "Did we zoom out?");
+            // tear down
+            map.destroy();
+        });
+
+    }
+
+  </script>
+</head>
+<body>
+</body>
+</html>

Modified: sandbox/tschaub/canvas/tests/Control/TransformFeature.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/TransformFeature.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/TransformFeature.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/canvas/tests/Control/WMSGetFeatureInfo.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/WMSGetFeatureInfo.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/WMSGetFeatureInfo.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_initialize(t) {
@@ -233,7 +233,7 @@
     // Verify that things work all right when we combine different types for the STYLES and LAYERS
     // params in the WMS Layers involved
     function test_mixedParams(t) {
-        t.plan(3);
+        t.plan(5);
         var map = new OpenLayers.Map("map", {
             getExtent: function() {return(new OpenLayers.Bounds(-180,-90,180,90));}
             }
@@ -271,10 +271,22 @@
             log.options = options;
         };
         click.activate();
-        click.getInfoForClick({xy: {x: 50, y: 50}});
+        click.getInfoForClick({xy: {x: 50.2, y: 50.1}});
         OpenLayers.Request.GET = _request;
 
         t.eq(
+            log.options && log.options.params.X,
+            50,
+            "X should be an integer"
+        );
+
+        t.eq(
+            log.options && log.options.params.Y,
+            50,
+            "Y should be an integer" 
+        );
+
+        t.eq(
             log.options && log.options.url,
             "http://localhost/wms",
             "url from first layer used"
@@ -451,7 +463,38 @@
         t.eq(count, 2, "We expect 2 requests to go off");
         map.destroy();
     }
+    
+    function test_GetFeatureInfo_buildWMSOptions(t) {
+        t.plan(3);
+        
+        var map = new OpenLayers.Map("map", {
+            getExtent: function() {return(new OpenLayers.Bounds(-180,-90,180,90));},
+            projection: "EPSG:900913"
+        });
+        var a = new OpenLayers.Layer.WMS("dummy", "http://localhost/wms", {
+            layers: "a"
+        }, {projection: "EPSG:3857"});
+        var b = new OpenLayers.Layer.WMS("dummy", "http://localhost/wms", {
+            layers: "b"
+        });
+        var c = new OpenLayers.Layer.WMS("dummy", "http://localhost/wms", {
+            layers: "c"
+        }, {projection: "EPSG:4326"});
+        map.addLayers([a, b, c]);
+        var gfi = new OpenLayers.Control.WMSGetFeatureInfo();
+        map.addControl(gfi);
+        gfi.activate();
 
+        var options = gfi.buildWMSOptions("http://localhost/wms", [a], {xy: {x: 50, y: 50}}, "text/html");
+        t.eq(options.params.SRS, "EPSG:3857", "layer projection used if provided and equal map projection");
+
+        options = gfi.buildWMSOptions("http://localhost/wms", [b], {xy: {x: 50, y: 50}}, "text/html");
+        t.eq(options.params.SRS, "EPSG:900913", "map projection used if layer has no projection configured");
+
+        options = gfi.buildWMSOptions("http://localhost/wms", [b], {xy: {x: 50, y: 50}}, "text/html");
+        t.eq(options.params.SRS, "EPSG:900913", "map projection used if layer configured with an incompatible projection");
+    }
+
     function test_GetFeatureInfo_WMS13(t) {
         t.plan(4);
         var map = new OpenLayers.Map("map", {
@@ -475,7 +518,7 @@
             log.options = options;
         };
         click.activate();
-        click.getInfoForClick({xy: {x: 50, y: 60}});
+        click.getInfoForClick({xy: {x: 50.1, y: 60.2}});
         OpenLayers.Request.GET = _request;
         t.eq(
             log.options && log.options.params.CRS,

Modified: sandbox/tschaub/canvas/tests/Control/WMTSGetFeatureInfo.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control/WMTSGetFeatureInfo.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control/WMTSGetFeatureInfo.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/canvas/tests/Control.html
===================================================================
--- sandbox/tschaub/canvas/tests/Control.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Control.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
     function test_Control_constructor(t) {
         t.plan(4);

Modified: sandbox/tschaub/canvas/tests/Events.html
===================================================================
--- sandbox/tschaub/canvas/tests/Events.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Events.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var map; 
@@ -305,9 +305,23 @@
         events.unregister("something", instance, listener1);
         events.unregister("something", instance, listener2);
         events.unregister("something", instance, listener3);
-        
     }
 
+    function test_Events_handleBrowserEvent(t) {
+        t.plan(2);
+        var events = new OpenLayers.Events({}, null, ['sometouchevent']);
+        events.on({'sometouchevent': function() {}});
+
+        // this test verifies that when handling a touch event we correctly
+        // set clientX and clientY in the event object 
+        var evt = {type: 'sometouchevent',
+                   touches: [{clientX: 1, clientY: 1}, {clientX: 2, clientY: 2}]
+                  };
+        events.handleBrowserEvent(evt);
+        t.eq(evt.clientX, 1, "evt.clientX value is correct");
+        t.eq(evt.clientY, 1, "evt.clientY value is correct");
+    }
+
     function test_Events_destroy (t) {
         t.plan(2);
 

Modified: sandbox/tschaub/canvas/tests/Extras.html
===================================================================
--- sandbox/tschaub/canvas/tests/Extras.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Extras.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     var map;

Modified: sandbox/tschaub/canvas/tests/Feature/Vector.html
===================================================================
--- sandbox/tschaub/canvas/tests/Feature/Vector.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Feature/Vector.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map; 
     var feature; 

Modified: sandbox/tschaub/canvas/tests/Feature.html
===================================================================
--- sandbox/tschaub/canvas/tests/Feature.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Feature.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var map; 
@@ -43,7 +43,7 @@
         feature = new OpenLayers.Feature(layer, lonlat, data);
         popup = feature.createPopup(); 
         //Safari 3 separates style overflow into overflow-x and overflow-y
-        var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
+        var prop = (OpenLayers.BROWSER_NAME == 'safari') ? 'overflowX' : 'overflow';
         t.eq(popup.contentDiv.style[prop], "auto", 'overflow on popup is correct');
     }    
     function test_Feature_createMarker (t) {

Modified: sandbox/tschaub/canvas/tests/Filter/Comparison.html
===================================================================
--- sandbox/tschaub/canvas/tests/Filter/Comparison.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Filter/Comparison.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_initialize(t) { 

Modified: sandbox/tschaub/canvas/tests/Filter/FeatureId.html
===================================================================
--- sandbox/tschaub/canvas/tests/Filter/FeatureId.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Filter/FeatureId.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_initialize(t) { 

Modified: sandbox/tschaub/canvas/tests/Filter/Logical.html
===================================================================
--- sandbox/tschaub/canvas/tests/Filter/Logical.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Filter/Logical.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_initialize(t) { 

Modified: sandbox/tschaub/canvas/tests/Filter/Spatial.html
===================================================================
--- sandbox/tschaub/canvas/tests/Filter/Spatial.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Filter/Spatial.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

Modified: sandbox/tschaub/canvas/tests/Filter.html
===================================================================
--- sandbox/tschaub/canvas/tests/Filter.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Filter.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../lib/OpenLayers.js"></script> 
+    <script src="OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_initialize(t) { 

Modified: sandbox/tschaub/canvas/tests/Format/ArcXML/Features.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/ArcXML/Features.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/ArcXML/Features.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     
     var axl_feature_response = '<?xml version="1.0" encoding="Cp1252"?><ARCXML version="1.1"><RESPONSE><FEATURES><FEATURE><FIELDS><FIELD name="UNIQUE_ID" value="514504b5-0458-461d-b540-8e18a454f619" /><FIELD name="LABEL" value="LIBRARY" /><FIELD name="Y_COORD" value="39.57" /><FIELD name="X_COORD" value="-104.24" /><FIELD name="#SHAPE#" value="[Geometry]" /><FIELD name="OBJECTID" value="1" /><FIELD name="shape.area" value="0" /><FIELD name="shape.len" value="0" /></FIELDS></FEATURE><FEATURE><FIELDS><FIELD name="UNIQUE_ID" value="514504b5-0458-461d-b540-8e81a454f619" /><FIELD name="LABEL" value="LIBRARY2" /><FIELD name="Y_COORD" value="39.75" /><FIELD name="X_COORD" value="-104.42" /><FIELD name="#SHAPE#" value="[Geometry]" /><FIELD name="OBJECTID" value="2" /><FIELD name="shape.area" value="0" /><FIELD name="shape.len" value="0" /></FIELDS></FEATURE><FEATURECOUNT count="2" hasmore="false" /><ENVELOPE minx="-678853.220047791" miny="1810.22081371862" maxx="-678853.220047791" m
 axy="1810.22081371862"/></FEATURES></RESPONSE></ARCXML>';

Modified: sandbox/tschaub/canvas/tests/Format/ArcXML.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/ArcXML.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/ArcXML.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
 
     var axl_image_response = '<?xml version="1.0" encoding="UTF-8"?><ARCXML version="1.1"><RESPONSE><IMAGE><ENVELOPE minx="-2471.42857142857" miny="0" maxx="105671.428571429" maxy="75700" /><OUTPUT url="http://localhost/output/364826560.png" /></IMAGE></RESPONSE></ARCXML>';

Modified: sandbox/tschaub/canvas/tests/Format/Atom.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/Atom.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/Atom.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

Copied: sandbox/tschaub/canvas/tests/Format/CQL.html (from rev 11416, trunk/openlayers/tests/Format/CQL.html)
===================================================================
--- sandbox/tschaub/canvas/tests/Format/CQL.html	                        (rev 0)
+++ sandbox/tschaub/canvas/tests/Format/CQL.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,287 @@
+<html>
+    <head>
+        <script src="../OLLoader.js"></script>
+
+        <script type="text/javascript">
+
+function test_CQL_Constructor(t) {
+    t.plan(5);
+    var options = {'foo': 'bar'};
+    var format  = new OpenLayers.Format.CQL(options);
+    t.ok(format instanceof OpenLayers.Format.CQL,
+         "new OpenLayers.Format.CQL object");
+    t.eq(format.foo, "bar", "constructor sets options correctly")
+    t.eq(typeof format.read, 'function', 'format has a read function');
+    t.eq(typeof format.write, 'function', 'format has a write function');
+    t.eq(format.options, options, "format.options correctly set");
+}
+
+function test_Comparison_string(t) {
+    t.plan(5);
+    var test_cql, format, filter;
+    test_cql = "X >= 'B'";
+    format = new OpenLayers.Format.CQL();
+    filter = format.read(test_cql);
+    t.ok(filter instanceof OpenLayers.Filter.Comparison,
+         "Parsing a simple >= filter produces a Filter.Comparison");
+    t.eq(filter.type, OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO,
+         ">= parsed as Filter.Comparison.GREATER_THAN_OR_EQUAL_TO");
+    t.eq(filter.property, 'X',
+         "Property extracted from CQL text");
+    t.eq(filter.value, 'B',
+         "Value extracted from CQL text");
+         
+         
+    t.eq(format.write(filter), test_cql, "write returned test cql");
+}
+
+function test_Comparison_number(t) {
+    t.plan(5);
+    var test_cql, format, filter;
+    test_cql = "X >= 10";
+    format = new OpenLayers.Format.CQL();
+    filter = format.read(test_cql);
+    t.ok(filter instanceof OpenLayers.Filter.Comparison,
+         "Parsing a simple >= filter produces a Filter.Comparison");
+    t.eq(filter.type, OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO,
+         ">= parsed as Filter.Comparison.GREATER_THAN_OR_EQUAL_TO");
+    t.eq(filter.property, 'X',
+         "Property extracted from CQL text");
+    t.eq(filter.value, 10,
+         "Value extracted from CQL text");
+         
+         
+    t.eq(format.write(filter), test_cql, "write returned test cql");
+}
+
+function test_Logical(t) {
+    t.plan(7);
+    var test_cql, format, filter;
+    test_cql = "X >= 'B' AND X < 'M'";
+    format = new OpenLayers.Format.CQL();
+    filter = format.read(test_cql);
+    t.ok(filter instanceof OpenLayers.Filter.Logical,
+         "Parsing ANDed filters produces a Filter.Logical");
+    t.eq(filter.type, OpenLayers.Filter.Logical.AND,
+         "AND parsed as Filter.Logical.AND");
+    t.eq(filter.filters.length, 2,
+         "AND Filter contains two subfilters");
+    t.ok(filter.filters[0] instanceof OpenLayers.Filter.Comparison,
+         "First sub-filter is a Filter.Comparison");
+    t.eq(filter.filters[0].type, OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO,
+         "First sub-filter is the first filter in the CQL text");
+    t.ok(filter.filters[1] instanceof OpenLayers.Filter.Comparison,
+         "Second sub-filter is a Filter.Comparison");
+    t.eq(filter.filters[1].type, OpenLayers.Filter.Comparison.LESS_THAN,
+         "Second sub-filter is the second filter in the CQL text");
+
+}
+
+function test_Logical_write(t) {
+    t.plan(1);
+    var cql = "(X >= 'B') AND (X < 'M')";
+    var format = new OpenLayers.Format.CQL();
+    var filter = format.read(cql);
+    t.eq(format.write(filter), cql, "write returned test cql");
+}
+
+function test_Logical_spatial(t) {
+    t.plan(9);
+    var test_cql, format, filter;
+    test_cql = "INTERSECTS(the_geom, POLYGON((-111 41,-115 41,-115 45,-110 45,-111 41))) AND CONTAINS(the_geom, POINT(-111 41))";
+    format = new OpenLayers.Format.CQL();
+    filter = format.read(test_cql);
+    t.ok(filter instanceof OpenLayers.Filter.Logical,
+         "Parsing ANDed filters produces a Filter.Logical");
+    t.eq(filter.type, OpenLayers.Filter.Logical.AND,
+         "AND parsed as Filter.Logical.AND");
+    t.eq(filter.filters.length, 2,
+         "AND Filter contains two subfilters");
+    t.ok(filter.filters[0] instanceof OpenLayers.Filter.Spatial,
+         "First sub-filter is a Filter.Spatial");
+    t.eq(filter.filters[0].type, OpenLayers.Filter.Spatial.INTERSECTS,
+         "First sub-filter is the first filter in the CQL text");
+    t.geom_eq(filter.filters[0].value, OpenLayers.Geometry.fromWKT("POLYGON((-111 41,-115 41,-115 45,-110 45,-111 41))"),
+         "First sub-filter is has correct geometry");
+    t.ok(filter.filters[1] instanceof OpenLayers.Filter.Spatial,
+         "Second sub-filter is a Filter.Comparison");
+    t.eq(filter.filters[1].type, OpenLayers.Filter.Spatial.CONTAINS,
+         "Second sub-filter is the second filter in the CQL text");
+    t.geom_eq(filter.filters[1].value, OpenLayers.Geometry.fromWKT("POINT(-111 41)"),
+         "Second sub-filter is has correct geometry");
+}
+
+function test_Logical_spatial_write(t) {
+    // TODO: remove this if extra parentheses are avoided by checking logical operator precedence
+    t.plan(1);
+    var cql = "(INTERSECTS(the_geom, POLYGON((-111 41,-115 41,-115 45,-110 45,-111 41)))) AND (CONTAINS(the_geom, POINT(-111 41)))";
+    var format = new OpenLayers.Format.CQL();
+    var filter = format.read(cql);
+    t.eq(format.write(filter), cql, "write returned test cql");
+}
+
+function test_Parentheticals(t) {
+    t.plan(2);
+    var format, cqlA, filterA, cqlB, filterB;
+    format = new OpenLayers.Format.CQL();
+    cqlA = "A = '1' AND B = '2' OR C = '3'";
+    cqlB = "A = '1' AND (B = '2' OR C = '3')";
+    filterA = format.read(cqlA);
+    filterB = format.read(cqlB);
+
+    t.ok(filterA instanceof OpenLayers.Filter.Logical &&
+         filterA.filters[0] instanceof OpenLayers.Filter.Logical &&
+         filterA.filters[1] instanceof OpenLayers.Filter.Comparison,
+         "Unparenthesized expression groups left to right");
+    t.ok(filterB instanceof OpenLayers.Filter.Logical &&
+         filterB.filters[0] instanceof OpenLayers.Filter.Comparison &&
+         filterB.filters[1] instanceof OpenLayers.Filter.Logical,
+         "Parenthesized expression groups as specified by parentheses");
+}
+
+function test_Parentheticals_write(t) {
+    // TODO: remove this if extra parentheses are avoided by checking logical operator precedence
+    t.plan(1);
+    var format = new OpenLayers.Format.CQL();
+    var cql = "(A = '1') AND ((B = '2') OR (C = '3'))";
+    var filter = format.read(cql);
+    t.eq(format.write(filter), cql, "write returned test cql");
+}
+
+function test_BBOX(t) {
+    t.plan(5);
+    var format = new OpenLayers.Format.CQL(),
+        cql = "BBOX(the_geom,1,2,3,4)",
+        filter = format.read(cql);
+    t.ok(filter instanceof OpenLayers.Filter.Spatial,
+         "Parsing BBOX expression produces Filter.Spatial");
+    t.eq(filter.type, OpenLayers.Filter.Spatial.BBOX,
+         "Spatial filter is a bbox filter");
+    t.eq(filter.property, "the_geom",
+         "Property name is as specified in CQL");
+    t.eq(filter.value.toBBOX(), "1,2,3,4",
+         "Value is as specified in CQL");
+
+    t.eq(format.write(filter), cql, "write returned test cql");
+
+}
+
+function test_INTERSECTS(t) {
+    t.plan(5);
+    var format = new OpenLayers.Format.CQL(),
+        cql = "INTERSECTS(the_geom, POINT(1 2))",
+        filter = format.read(cql);
+    t.ok(filter instanceof OpenLayers.Filter.Spatial,
+         "Parsing BBOX expression produces Filter.Spatial");
+    t.eq(filter.type, OpenLayers.Filter.Spatial.INTERSECTS,
+         "Spatial filter is an intersects filter");
+    t.eq(filter.property, "the_geom",
+         "Property name is as specified in CQL");
+    t.ok(filter.value instanceof OpenLayers.Geometry,
+         "Value is a geometry");
+    
+    t.eq(format.write(filter), cql, "write returned test cql");
+
+}
+
+function test_WITHIN(t) {
+    t.plan(5);
+    var format = new OpenLayers.Format.CQL(),
+        cql = "WITHIN(the_geom, POLYGON((1 2,3 4,5 6,3 8,1 6,1 2)))",
+        filter = format.read(cql);
+    t.ok(filter instanceof OpenLayers.Filter.Spatial,
+         "Parsing BBOX expression produces Filter.Spatial");
+    t.eq(filter.type, OpenLayers.Filter.Spatial.WITHIN,
+         "Spatial filter is a within filter");
+    t.eq(filter.property, "the_geom",
+         "Property name is as specified in CQL");
+    t.ok(filter.value instanceof OpenLayers.Geometry,
+         "Value is a geometry");
+
+    t.eq(format.write(filter), cql, "write returned test cql");
+
+}
+
+function test_DWITHIN(t) {
+    t.plan(6);
+    var format = new OpenLayers.Format.CQL(),
+        cql = "DWITHIN(the_geom, POINT(1 2), 6)",
+        filter = format.read(cql);
+    t.ok(filter instanceof OpenLayers.Filter.Spatial,
+         "Parsing DWITHIN expression produces Filter.Spatial");
+    t.eq(filter.type, OpenLayers.Filter.Spatial.DWITHIN,
+         "Spatial filter is a DWITHIN filter");
+    t.eq(filter.property, "the_geom",
+         "Property name is as specified in CQL");
+    t.ok(filter.value instanceof OpenLayers.Geometry,
+         "Value is a geometry");
+    t.eq(filter.distance, 6,
+         "Distance is as specified in CQL");
+
+    t.eq(format.write(filter), cql, "write returned test cql");
+
+}
+
+function test_CONTAINS(t) {
+    t.plan(5);
+    var format = new OpenLayers.Format.CQL(),
+        cql = "CONTAINS(the_geom, POINT(1 2))",
+        filter = format.read(cql);
+    t.ok(filter instanceof OpenLayers.Filter.Spatial,
+         "Parsing BBOX expression produces Filter.Spatial");
+    t.eq(filter.type, OpenLayers.Filter.Spatial.CONTAINS,
+         "Spatial filter is a within filter");
+    t.eq(filter.property, "the_geom",
+         "Property name is as specified in CQL");
+    t.ok(filter.value instanceof OpenLayers.Geometry,
+         "Value is a geometry");
+
+    t.eq(format.write(filter), cql, "write returned test cql");
+
+}
+
+function test_NOT(t) {
+    t.plan(4);
+    var format = new OpenLayers.Format.CQL(),
+        cql = "NOT X < 12",
+        filter = format.read(cql);
+    t.ok(filter instanceof OpenLayers.Filter.Logical,
+         "Parsing NOT expression produces Logical.Not");
+    t.eq(filter.type, OpenLayers.Filter.Logical.NOT,
+         "Logical filter is a NOT filter");
+    t.eq(filter.filters[0].property, "X",
+         "Property name is as specified in CQL");
+    t.eq(filter.filters[0].value, 12, "Value is as specified in CQL");
+}
+
+function test_NOT_write(t) {
+    // TODO: remove this if extra parentheses are avoided by checking logical operator precedence
+    t.plan(1);
+    var format = new OpenLayers.Format.CQL(),
+        cql = "NOT (X < 12)",
+        filter = format.read(cql);
+    t.eq(format.write(filter), cql, "write returned test cql");
+}
+
+function test_BETWEEN(t) {
+    t.plan(6);
+    var format = new OpenLayers.Format.CQL(),
+        cql = "A BETWEEN 0 AND 5",
+        filter = format.read(cql);
+    t.ok(filter instanceof OpenLayers.Filter.Comparison,
+         "Parsing BETWEEN expression produces Filter.Comparison");
+    t.eq(filter.type, OpenLayers.Filter.Comparison.BETWEEN,
+         "Comparison filter is a between filter");
+    t.eq(filter.property, "A",
+         "Property name is as specified in CQL");
+    t.eq(filter.lowerBoundary, 0, 'Lower boundary is as specified in CQL');
+    t.eq(filter.upperBoundary, 5, 'Upper bondary is as specified in CQL');
+
+    t.eq(format.write(filter), cql, "write returned test cql");
+
+}
+
+        </script>
+    </head>
+    <body></body>
+</html>

Modified: sandbox/tschaub/canvas/tests/Format/CSWGetDomain/v2_0_2.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/CSWGetDomain/v2_0_2.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/CSWGetDomain/v2_0_2.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script src="v2_0_2.js"></script>
     <script type="text/javascript">
 

Modified: sandbox/tschaub/canvas/tests/Format/CSWGetDomain.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/CSWGetDomain.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/CSWGetDomain.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/canvas/tests/Format/CSWGetRecords/v2_0_2.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/CSWGetRecords/v2_0_2.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/CSWGetRecords/v2_0_2.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script src="v2_0_2.js"></script>
     <script type="text/javascript">
 

Modified: sandbox/tschaub/canvas/tests/Format/CSWGetRecords.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/CSWGetRecords.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/CSWGetRecords.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/canvas/tests/Format/Filter/v1.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/Filter/v1.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/Filter/v1.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_PropertyIsBetween(t) {

Modified: sandbox/tschaub/canvas/tests/Format/Filter/v1_0_0.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/Filter/v1_0_0.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/Filter/v1_0_0.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     
     var test_xml =

Modified: sandbox/tschaub/canvas/tests/Format/Filter/v1_1_0.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/Filter/v1_1_0.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/Filter/v1_1_0.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     
     var test_xml =

Modified: sandbox/tschaub/canvas/tests/Format/Filter.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/Filter.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/Filter.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_initialize(t) { 

Modified: sandbox/tschaub/canvas/tests/Format/GML/v2.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/GML/v2.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/GML/v2.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <html xmlns="http://www.w3.org/1999/xhtml"> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script src="cases.js"></script>
     <script type="text/javascript">
 

Modified: sandbox/tschaub/canvas/tests/Format/GML/v3.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/GML/v3.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/GML/v3.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script src="cases.js"></script>
     <script type="text/javascript">
 

Modified: sandbox/tschaub/canvas/tests/Format/GML.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/GML.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/GML.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_Format_GML_constructor(t) { 
@@ -411,7 +411,7 @@
  ];
    
     var shell_start = '<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs"><gml:featureMember xmlns:gml="http://www.opengis.net/gml"><feature:features xmlns:feature="http://mapserver.gis.umn.edu/mapserver" fid="221"><feature:geometry>'; 
-    if (OpenLayers.Util.getBrowserName() == "opera") {
+    if (OpenLayers.BROWSER_NAME == "opera") {
         shell_start = '<wfs:FeatureCollection xmlns:wfs="http://www.opengis.net/wfs"><gml:featureMember xmlns:gml="http://www.opengis.net/gml"><feature:features fid="221" xmlns:feature="http://mapserver.gis.umn.edu/mapserver"><feature:geometry>'; 
     }    
     var shell_end = '</feature:geometry></feature:features></gml:featureMember></wfs:FeatureCollection>';

Modified: sandbox/tschaub/canvas/tests/Format/GPX.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/GPX.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/GPX.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     
     var gpx_data = '<?xml version="1.0" encoding="ISO-8859-1"?><gpx version="1.1" creator="Memory-Map 5.1.3.715 http://www.memory-map.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.topografix.com/GPX/1/1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd"><wpt lat="51.3697845627" lon="-0.1853562259"><name>Mark</name><sym><![CDATA[Flag]]></sym><type><![CDATA[Marks]]></type></wpt><rte><name><![CDATA[Route8]]></name><type><![CDATA[Route]]></type><rtept lat="51.3761803674" lon="-0.1829991904"><name><![CDATA[WP0801]]></name><sym><![CDATA[Dot]]></sym><type><![CDATA[Waypoints]]></type></rtept><rtept lat="51.3697894659" lon="-0.1758887005"><name><![CDATA[WP0802]]></name><sym><![CDATA[Dot]]></sym><type><![CDATA[Waypoints]]></type></rtept><rtept lat="51.3639790884" lon="-0.1833202965"><name><![CDATA[WP0803]]></name><sym><![CDATA[Dot]]></sym><type><![CDATA[Waypoints]]></type></rtept><rtept lat="51.3567607069" l
 on="-0.1751119509"><name><![CDATA[WP0804]]></name><sym><![CDATA[Dot]]></sym><type><![CDATA[Waypoints]]></type></rtept></rte><trk><name><![CDATA[Track]]></name><type><![CDATA[Track]]></type><trkseg><trkpt lat="51.3768216433" lon="-0.1721292044"></trkpt><trkpt lat="51.3708337670" lon="-0.1649230916"></trkpt><trkpt lat="51.3644368725" lon="-0.1736741378"></trkpt><trkpt lat="51.3576354272" lon="-0.1662595250"></trkpt></trkseg></trk></gpx>';

Modified: sandbox/tschaub/canvas/tests/Format/GeoJSON.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/GeoJSON.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/GeoJSON.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     var poly_content = '{"type": "FeatureCollection", "features": [{"geometry": {"type": "Polygon", "coordinates": [[[-131.484375, -5.9765625], [-112.5, -58.0078125], [-32.34375, -50.2734375], [-114.609375, 52.3828125], [-167.34375, -35.5078125], [-146.953125, -57.3046875], [-139.921875, -34.1015625], [-131.484375, -5.9765625]]]}, "type": "Feature", "id": 562, "properties": {"strokeColor": "red", "title": "Feature 2", "author": "Your Name Here"}}]}'; 

Modified: sandbox/tschaub/canvas/tests/Format/GeoRSS.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/GeoRSS.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/GeoRSS.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_Format_GeoRSS_constructor(t) { 

Modified: sandbox/tschaub/canvas/tests/Format/JSON.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/JSON.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/JSON.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_Format_JSON_constructor(t) { 

Modified: sandbox/tschaub/canvas/tests/Format/KML.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/KML.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/KML.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     var test_content = '<kml xmlns="http://earth.google.com/kml/2.0"><Folder><name>OpenLayers export</name><description>Vector geometries from OpenLayers</description><Placemark id="KML.Polygon"><name>OpenLayers.Feature.Vector_344</name><description>A KLM Polygon</description><Polygon><outerBoundaryIs><LinearRing><coordinates>5.001370157823406,49.26855713824488 8.214706453896161,49.630662409673505 8.397385910100951,48.45172350357396 5.001370157823406,49.26855713824488</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark><Placemark id="KML.LineString"><name>OpenLayers.Feature.Vector_402</name><description>A KML LineString</description><LineString><coordinates>5.838523393080493,49.74814616928052 5.787079558782349,48.410795432216574 8.91427702008381,49.28932499608202</coordinates></LineString></Placemark><Placemark id="KML.Point"><name>OpenLayers.Feature.Vector_451</name><description>A KML Point</description><Point><coordinates>6.985073041685488,49.8682250149058</c
 oordinates></Point></Placemark><Placemark id="KML.MultiGeometry"><name>SF Marina Harbor Master</name><description>KML MultiGeometry</description><MultiGeometry><LineString><coordinates>-122.4425587930444,37.80666418607323 -122.4428379594768,37.80663578323093</coordinates></LineString><LineString><coordinates>-122.4425509770566,37.80662588061205 -122.4428340530617,37.8065999493009</coordinates></LineString></MultiGeometry></Placemark></Folder></kml>';

Modified: sandbox/tschaub/canvas/tests/Format/OSM.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/OSM.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/OSM.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script src="../data/osm.js"></script> 
     <script type="text/javascript">
     

Modified: sandbox/tschaub/canvas/tests/Format/OWSContext/v0_3_1.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/OWSContext/v0_3_1.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/OWSContext/v0_3_1.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_read_wmswfs(t) {

Modified: sandbox/tschaub/canvas/tests/Format/SLD/v1_0_0.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/SLD/v1_0_0.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/SLD/v1_0_0.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
 
     var xml = new OpenLayers.Format.XML(); 

Modified: sandbox/tschaub/canvas/tests/Format/SLD.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/SLD.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/SLD.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     var test_content = '<sld:StyledLayerDescriptor xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"><sld:NamedLayer><sld:Name>TestLayer</sld:Name><sld:UserStyle><sld:Name>foo</sld:Name><sld:FeatureTypeStyle><sld:Rule><sld:Name>bar</sld:Name><ogc:Filter></ogc:Filter><sld:PolygonSymbolizer><sld:Fill><sld:CssParameter name="fill"><ogc:Literal>blue</ogc:Literal></sld:CssParameter></sld:Fill></sld:PolygonSymbolizer></sld:Rule></sld:FeatureTypeStyle></sld:UserStyle></sld:NamedLayer></sld:StyledLayerDescriptor>';

Modified: sandbox/tschaub/canvas/tests/Format/SOSCapabilities/v1_0_0.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/SOSCapabilities/v1_0_0.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/SOSCapabilities/v1_0_0.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script src="v1_0_0.js"></script>
     <script type="text/javascript">
 

Modified: sandbox/tschaub/canvas/tests/Format/SOSGetFeatureOfInterest.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/SOSGetFeatureOfInterest.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/SOSGetFeatureOfInterest.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_read_SOSGetFeatureOfInterest_single(t) {

Modified: sandbox/tschaub/canvas/tests/Format/SOSGetObservation.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/SOSGetObservation.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/SOSGetObservation.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,10 +1,10 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_read_SOSGetObservation(t) {
-        t.plan(7);
+        t.plan(13);
 
         var parser = new OpenLayers.Format.SOSGetObservation();
         var text =
@@ -49,16 +49,131 @@
         t.eq(measurement.result.uom, "Cel", "Units of measurement correctly parsed");
         t.eq(measurement.result.value, "4.9", "Value correctly parsed");
         t.eq(measurement.samplingTime.timeInstant.timePosition, "2009-12-02T10:35:00.000+01:00", "Sampling time correctly parsed");
+
+        var response = [];
+        response.push('<?xml version="1.0" encoding="UTF-8"?>',
+'<om:ObservationCollection gml:id="oc_0" xsi:schemaLocation="http://www.opengis.net/om/1.0 http://schemas.opengis.net/om/1.0.0/om.xsd http://www.opengis.net/sampling/1.0 http://schemas.opengis.net/sampling/1.0.0/sampling.xsd" xmlns:om="http://www.opengis.net/om/1.0" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:swe="http://www.opengis.net/swe/1.0.1" xmlns:sa="http://www.opengis.net/sampling/1.0">',
+'  <gml:boundedBy>',
+'    <gml:Envelope srsName="urn:ogc:def:crs:EPSG:4326">',
+'      <gml:lowerCorner>46.611644 7.6103</gml:lowerCorner>',
+'      <gml:upperCorner>51.9412 13.883498</gml:upperCorner>',
+'    </gml:Envelope>',
+'  </gml:boundedBy>',
+'  <om:member>',
+'    <om:Observation gml:id="ot_583227">',
+'      <om:samplingTime>',
+'        <gml:TimePeriod xsi:type="gml:TimePeriodType">',
+'          <gml:beginPosition>2009-09-28T13:45:00.000+02:00</gml:beginPosition>',
+'          <gml:endPosition>2009-09-28T13:45:00.000+02:00</gml:endPosition>',
+'        </gml:TimePeriod>',
+'      </om:samplingTime>',
+'      <om:procedure xlink:href="urn:ogc:object:feature:OSIRIS-HWS:efeb807b-bd24-4128-a920-f6729bcdd111"/>',
+'      <om:observedProperty>',
+'        <swe:CompositePhenomenon gml:id="cpid0" dimension="1">',
+'          <gml:name>resultComponents</gml:name>',
+'          <swe:component xlink:href="urn:ogc:data:time:iso8601"/>',
+'          <swe:component xlink:href="urn:ogc:def:property:OGC::Precipitation1Hour"/>',
+'        </swe:CompositePhenomenon>',
+'      </om:observedProperty>',
+'      <om:featureOfInterest>',
+'        <gml:FeatureCollection>',
+'          <gml:featureMember>',
+'            <sa:SamplingPoint gml:id="urn:ogc:object:feature:OSIRIS-HWS:efeb807b-bd24-4128-a920-f6729bcdd111" xsi:schemaLocation=" http://www.opengis.net/sampling/1.0 http://schemas.opengis.net/sampling/1.0.0/sampling.xsd">',
+'              <gml:name>waether @ roof of the FH Kaernten, Villach, Austria</gml:name>',
+'              <sa:sampledFeature xlink:href="urn:ogc:def:nil:OGC:unknown"/>',
+'              <sa:position>',
+'                <gml:Point>',
+'                  <gml:pos srsName="urn:ogc:def:crs:EPSG:4326">46.611644 13.883498</gml:pos>',
+'                </gml:Point>',
+'              </sa:position>',
+'            </sa:SamplingPoint>',
+'          </gml:featureMember>',
+'        </gml:FeatureCollection>',
+'      </om:featureOfInterest>',
+'      <om:result>',
+'        <swe:DataArray>',
+'          <swe:elementCount>',
+'            <swe:Count>',
+'              <swe:value>1</swe:value>',
+'            </swe:Count>',
+'          </swe:elementCount>',
+'          <swe:elementType name="Components">',
+'            <swe:DataRecord>',
+'              <swe:field name="Time">',
+'                <swe:Time definition="urn:ogc:data:time:iso8601"/>',
+'              </swe:field>',
+'              <swe:field name="feature">',
+'                <swe:Text definition="urn:ogc:data:feature"/>',
+'              </swe:field>',
+'              <swe:field name="urn:ogc:def:property:OGC::Precipitation1Hour">',
+'                <swe:Quantity definition="urn:ogc:def:property:OGC::Precipitation1Hour">',
+'                  <swe:uom code="mm"/>',
+'                </swe:Quantity>',
+'              </swe:field>',
+'            </swe:DataRecord>',
+'          </swe:elementType>',
+'          <swe:encoding>',
+'            <swe:TextBlock decimalSeparator="." tokenSeparator="," blockSeparator=";"/>',
+'          </swe:encoding>',
+'          <swe:values>2009-09-28T13:45:00.000+02:00,urn:ogc:object:feature:OSIRIS-HWS:efeb807b-bd24-4128-a920-f6729bcdd111,0.0;</swe:values>',
+'        </swe:DataArray>',
+'      </om:result>',
+'    </om:Observation>',
+'  </om:member>',
+'</om:ObservationCollection>');
+        text = response.join("");
+        var res = parser.read(text);
+        t.eq(res.observations.length, 1, "1 observation parsed");
+        var observation = res.observations[0];
+        t.eq(observation.procedure, "urn:ogc:object:feature:OSIRIS-HWS:efeb807b-bd24-4128-a920-f6729bcdd111", "procedure parsed correctly");
+        t.eq(observation.fois.length, 1, "One foi parsed for the observation");
+        var foi = observation.fois[0];
+        var feature = foi.features[0];
+        t.eq(feature.attributes.id, "urn:ogc:object:feature:OSIRIS-HWS:efeb807b-bd24-4128-a920-f6729bcdd111", "Foi id correctly parsed");
+        t.eq(feature.attributes.name, "waether @ roof of the FH Kaernten, Villach, Austria", "Foi name correctly parsed");
+        t.ok(feature.geometry instanceof OpenLayers.Geometry.Point, "Geometry correctly parsed");
     }
 
     function test_write_SOSGetObservation(t) {
-        t.plan(1);
+        t.plan(2);
         var expect = '<GetObservation xmlns="http://www.opengis.net/sos/1.0" version="1.0.0" service="SOS" xsi:schemaLocation="http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosGetObservation.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><offering>TEMPERATURE</offering><eventTime><ogc:TM_Equals xmlns:ogc="http://www.opengis.net/ogc"><ogc:PropertyName>urn:ogc:data:time:iso8601</ogc:PropertyName><gml:TimeInstant xmlns:gml="http://www.opengis.net/gml"><gml:timePosition>latest</gml:timePosition></gml:TimeInstant></ogc:TM_Equals></eventTime><procedure>urn:ogc:object:feature:OSIRIS-HWS:4fc335bc-06d7-4d5e-a72a-1ac73b9f3b56</procedure><observedProperty>urn:x-ogc:def:property:OGC::Temperature</observedProperty><responseFormat>text/xml;subtype="om/1.0.0"</responseFormat><resultModel>Measurement</resultModel><responseMode>inline</responseMode></GetObservation>';
         var format = new OpenLayers.Format.SOSGetObservation();
         var output = format.write({eventTime: 'latest', resultModel: 'Measurement', responseMode: 'inline',
-            procedure: 'urn:ogc:object:feature:OSIRIS-HWS:4fc335bc-06d7-4d5e-a72a-1ac73b9f3b56', responseFormat: 'text/xml;subtype="om/1.0.0"',
-            offering: 'TEMPERATURE', observedProperty: 'urn:x-ogc:def:property:OGC::Temperature'});
+            procedures: ['urn:ogc:object:feature:OSIRIS-HWS:4fc335bc-06d7-4d5e-a72a-1ac73b9f3b56'], responseFormat: 'text/xml;subtype="om/1.0.0"',
+            offering: 'TEMPERATURE', observedProperties: ['urn:x-ogc:def:property:OGC::Temperature']});
         t.xml_eq(output, expect, "Request XML is written out correctly");
+
+        var expected = [];
+
+        expected.push('<?xml version="1.0" encoding="UTF-8"?>',
+'<GetObservation xmlns="http://www.opengis.net/sos/1.0"',
+'  xmlns:gml="http://www.opengis.net/gml"',
+'  xmlns:om="http://www.opengis.net/om/1.0"',
+'  xmlns:ogc="http://www.opengis.net/ogc"',
+'  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"',
+'  xsi:schemaLocation="http://www.opengis.net/sos/1.0 http://schemas.opengis.net/sos/1.0.0/sosGetObservation.xsd"',
+'  service="SOS" version="1.0.0">',
+'  <offering>RAIN_GAUGE</offering>',
+'  <eventTime>',
+'    <ogc:TM_Equals>',
+'      <ogc:PropertyName>urn:ogc:data:time:iso8601</ogc:PropertyName>',
+'      <gml:TimeInstant>',
+'        <gml:timePosition>latest</gml:timePosition>',
+'      </gml:TimeInstant>',
+'    </ogc:TM_Equals>',
+'  </eventTime>',
+'  <observedProperty>urn:ogc:def:property:OGC::Precipitation1Hour</observedProperty>',
+'  <featureOfInterest>',
+'    <ObjectID>urn:ogc:object:feature:OSIRIS-HWS:3d3b239f-7696-4864-9d07-15447eae2b93</ObjectID>',
+'  </featureOfInterest>',
+'  <responseFormat>text/xml;subtype="om/1.0.0"</responseFormat>',
+'</GetObservation>');
+        expect = expected.join("");
+        var output = format.write({eventTime: 'latest', offering: 'RAIN_GAUGE',
+            observedProperties: ['urn:ogc:def:property:OGC::Precipitation1Hour'],
+            responseFormat: 'text/xml;subtype="om/1.0.0"',
+            foi: {objectId: 'urn:ogc:object:feature:OSIRIS-HWS:3d3b239f-7696-4864-9d07-15447eae2b93'}});
+        t.xml_eq(output, expect, "Request XML is written out correctly");
     }
 
     </script>

Modified: sandbox/tschaub/canvas/tests/Format/Text.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/Text.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/Text.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
     function test_basic(t) {
         t.plan(5);
@@ -8,7 +8,7 @@
         var features = format.read(OpenLayers.Util.getElement("content").value);
         t.eq(features[0].style.externalGraphic, format.defaultStyle.externalGraphic, "style is set to defaults if no style props set in text file");
         var features = format.read(OpenLayers.Util.getElement("contentMarker").value);
-        t.eq(features[0].style.externalGraphic, "../../img/marker.png", "marker set correctly by default.");
+        t.eq(features[0].style.externalGraphic, OpenLayers.Util.getImagesLocation() + "marker.png", "marker set correctly by default.");
         
         var features = format.read(OpenLayers.Util.getElement("content2").value);
         t.eq(features.length, 2, "two features read");

Modified: sandbox/tschaub/canvas/tests/Format/WFS.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WFS.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WFS.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script>  
     function test_wfs_update_node(t) {
         t.plan(2);

Modified: sandbox/tschaub/canvas/tests/Format/WFSCapabilities/v1.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WFSCapabilities/v1.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WFSCapabilities/v1.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_read(t) {

Modified: sandbox/tschaub/canvas/tests/Format/WFSCapabilities.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WFSCapabilities.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WFSCapabilities.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_read(t) {

Modified: sandbox/tschaub/canvas/tests/Format/WFSDescribeFeatureType.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WFSDescribeFeatureType.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WFSDescribeFeatureType.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_read_WFSDescribeFeatureType(t) {

Modified: sandbox/tschaub/canvas/tests/Format/WFST/v1.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WFST/v1.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WFST/v1.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../../lib/OpenLayers.js"></script>
+  <script src="../../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_read(t) {
@@ -89,6 +89,32 @@
         }
     }
 
+    function test_update_null_geometry(t) {
+        var format = new OpenLayers.Format.WFST({
+            featureNS: "http://www.openplans.org/topp",
+            featureType: "states",
+            featurePrefix: "topp",
+            geometryName: "the_geom"
+        });
+
+        var feature = new OpenLayers.Feature.Vector(null, {foo: "bar"});
+        feature.state = OpenLayers.State.UPDATE;
+        feature.fid = "fid.36";
+
+        t.plan(1);
+        var snippets = {
+            "UpdateNullGeometry": feature
+        };
+
+        var arg;
+        for (var snippet in snippets) {
+            arg = snippets[snippet]
+            var expected = readXML(snippet);
+            var got = format.writers["wfs"]["Update"].apply(format, [arg]);
+            t.xml_eq(got, expected, snippet + " request with null geometry created correctly");
+        }
+    }
+
     function test_write_multiple(t) {
 
         var format = new OpenLayers.Format.WFST({
@@ -232,5 +258,19 @@
     </ogc:Filter>
 </wfs:Update>
 --></div>
+<div id="UpdateNullGeometry"><!--
+<wfs:Update xmlns:wfs="http://www.opengis.net/wfs" typeName="topp:states" xmlns:topp="http://www.openplans.org/topp">
+    <wfs:Property>
+        <wfs:Name>the_geom</wfs:Name>
+    </wfs:Property>
+    <wfs:Property>
+        <wfs:Name>foo</wfs:Name>
+        <wfs:Value>bar</wfs:Value>
+    </wfs:Property>
+    <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
+        <ogc:FeatureId fid="fid.36"/>
+    </ogc:Filter>
+</wfs:Update>
+--></div>
 </body>
 </html>

Modified: sandbox/tschaub/canvas/tests/Format/WFST/v1_0_0.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WFST/v1_0_0.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WFST/v1_0_0.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../../lib/OpenLayers.js"></script>
+  <script src="../../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/canvas/tests/Format/WFST/v1_1_0.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WFST/v1_1_0.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WFST/v1_1_0.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../../lib/OpenLayers.js"></script>
+  <script src="../../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {
@@ -34,12 +34,28 @@
         t.eq(result.numberOfFeatures, 625, "numberOfFeatures of FeatureCollection correctly read");
     }
 
+    function test_read_boundedBy(t) {
+        t.plan(4);
+        var data = readXML("boundedBy");
+        var format = new OpenLayers.Format.WFST.v1_1_0({
+            featureNS: "http://mapserver.gis.umn.edu/mapserver",
+            featureType: "AAA212"
+        });
+        var result = format.read(data, {output: "object"});
+        var bounds = result.bounds;
+        t.eq(bounds.left.toFixed(3), '3197.880', "Left bounds of the feature collection correctly parsed");
+        t.eq(bounds.bottom.toFixed(3), '306457.313', "Bottom bounds of the feature collection correctly parsed");
+        t.eq(bounds.right.toFixed(3), '280339.156', "Right bounds of the feature collection correctly parsed");
+        t.eq(bounds.top.toFixed(3), '613850.438', "Top bounds of the feature collection corectly parsed");
+    }
+
     function test_write(t) {
 
         var format = new OpenLayers.Format.WFST.v1_1_0({
             featureNS: "http://www.openplans.org/topp",
             featureType: "states",
             featurePrefix: "topp",
+            srsName: "urn:ogc:def:crs:EPSG::4326",
             geometryName: "the_geom"
         });
 
@@ -109,11 +125,11 @@
 </wfs:TransactionResponse>
 --></div>
 <div id="query0"><!--
-<wfs:Query xmlns:wfs="http://www.opengis.net/wfs" typeName="topp:states" xmlns:topp="http://www.openplans.org/topp">
+<wfs:Query xmlns:wfs="http://www.opengis.net/wfs" typeName="topp:states" srsName="urn:ogc:def:crs:EPSG::4326" xmlns:topp="http://www.openplans.org/topp">
     <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
         <ogc:BBOX>
             <ogc:PropertyName>the_geom</ogc:PropertyName>
-            <gml:Envelope xmlns:gml="http://www.opengis.net/gml">
+            <gml:Envelope xmlns:gml="http://www.opengis.net/gml" srsName="urn:ogc:def:crs:EPSG::4326">
                 <gml:lowerCorner>1 2</gml:lowerCorner>
                 <gml:upperCorner>3 4</gml:upperCorner>
             </gml:Envelope>
@@ -127,12 +143,62 @@
                 xmlns:ogc="http://www.opengis.net/ogc"
                 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                 xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
-    <wfs:Query xmlns:wfs="http://www.opengis.net/wfs" typeName="topp:states" xmlns:topp="http://www.openplans.org/topp">
+    <wfs:Query xmlns:wfs="http://www.opengis.net/wfs" typeName="topp:states" srsName="urn:ogc:def:crs:EPSG::4326" xmlns:topp="http://www.openplans.org/topp">
         <wfs:PropertyName>STATE_NAME</wfs:PropertyName>
         <wfs:PropertyName>STATE_FIPS</wfs:PropertyName>
         <wfs:PropertyName>STATE_ABBR</wfs:PropertyName>
     </wfs:Query>
 </wfs:GetFeature>
 --></div>
+<div id="boundedBy"><!--
+<?xml version='1.0' encoding="ISO-8859-1" ?>
+<wfs:FeatureCollection
+   xmlns:rws="http://mapserver.gis.umn.edu/mapserver"
+   xmlns:gml="http://www.opengis.net/gml"
+   xmlns:wfs="http://www.opengis.net/wfs"
+   xmlns:ogc="http://www.opengis.net/ogc"
+   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+   xsi:schemaLocation="http://mapserver.gis.umn.edu/mapserver http://ontwikkel.intranet.rijkswaterstaat.nl/services/geoservices/ov_zonering?SERVICE=WFS&amp;VERSION=1.1.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=AAA212&amp;OUTPUTFORMAT=text/xml; subtype=gml/3.1.1  http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd">
+      <gml:boundedBy>
+      	<gml:Envelope srsName="EPSG:28992">
+      		<gml:lowerCorner>3197.880000 306457.313000</gml:lowerCorner>
+      		<gml:upperCorner>280339.156000 613850.438000</gml:upperCorner>
+      	</gml:Envelope>
+      </gml:boundedBy>
+    <gml:featureMember>
+
+      <rws:AAA212 gml:id="AAA212.791">
+        <gml:boundedBy>
+        	<gml:Envelope srsName="EPSG:28992">
+        		<gml:lowerCorner>196507.469000 502347.938000</gml:lowerCorner>
+        		<gml:upperCorner>202430.844000 510383.719000</gml:upperCorner>
+        	</gml:Envelope>
+        </gml:boundedBy>
+        <rws:geometry>
+
+          <gml:MultiSurface srsName="EPSG:28992">
+            <gml:surfaceMembers>
+              <gml:Polygon>
+                <gml:exterior>
+                  <gml:LinearRing>
+                    <gml:posList srsDimension="2">200448.047000 510383.719000 198475.031000 509253.875000 198477.422000 507339.688000 196507.469000 505841.969000 196507.625000 504980.281000 196621.359000 505029.969000 196825.328000 505114.000000 197310.031000 505183.469000 197636.609000 505148.750000 197837.594000 505061.563000 197941.031000 504953.688000 198003.094000 504817.719000 198023.781000 504721.688000 198016.391000 504597.531000 197907.234000 504363.219000 197716.734000 504013.969000 197700.156000 503567.563000 197775.531000 503373.969000 197930.688000 503153.781000 198034.234000 503045.594000 198170.078000 502932.125000 198504.047000 502725.250000 198858.719000 502550.875000 199138.000000 502460.719000 199336.000000 502347.938000 199044.125000 504910.969000 199549.359000 507065.781000 200280.594000 506878.938000 202430.844000 507474.625000 202430.844000 508850.906000 200448.047000 510383.719000 </gml:posList>
+                  </gml:LinearRing>
+                </gml:exterior>
+
+              </gml:Polygon>
+            </gml:surfaceMembers>
+          </gml:MultiSurface>
+        </rws:geometry>
+        <rws:OBJECTID>791</rws:OBJECTID>
+        <rws:HECTARES>1800.89</rws:HECTARES>
+        <rws:ZONENR>4620</rws:ZONENR>
+
+        <rws:NULZONES> </rws:NULZONES>
+        <rws:AREA>0</rws:AREA>
+        <rws:PERIMETER>24305.1</rws:PERIMETER>
+      </rws:AAA212>
+    </gml:featureMember>
+</wfs:FeatureCollection>
+--></div>
 </body>
 </html>

Modified: sandbox/tschaub/canvas/tests/Format/WFST.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WFST.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WFST.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/canvas/tests/Format/WKT.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WKT.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WKT.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
      
     var points = []; 
@@ -80,8 +80,15 @@
             polygons[1].geometry 
         ])
     ); 
+
+    var collection = new OpenLayers.Feature.Vector(
+        new OpenLayers.Geometry.Collection([ 
+            points[0].geometry,
+            linestrings[0].geometry
+        ])
+    ); 
      
-    var collection = [points[0], linestrings[0]]; 
+    var geom_array = [points[0], linestrings[0]]; 
      
     function test_Format_WKT_constructor(t) { 
         t.plan(4); 
@@ -96,7 +103,7 @@
     }
 
     function test_Format_WKT_write(t) { 
-        t.plan(7); 
+        t.plan(8); 
 
         var format = new OpenLayers.Format.WKT(); 
 
@@ -161,19 +168,27 @@
                                  points[11].geometry.x + " " + points[11].geometry.y + "," + 
                                  points[9].geometry.x + " " + points[9].geometry.y + ")))", 
              "format correctly writes MultiPolygon WKT"); 
-         
-        // test a geometrycollection 
+
+        // test geometrycollection
         t.eq(format.write(collection), 
              "GEOMETRYCOLLECTION(POINT(" + points[0].geometry.x + " " + points[0].geometry.y + ")," + 
                                 "LINESTRING(" + points[0].geometry.x + " " + points[0].geometry.y + "," + 
                                                 points[1].geometry.x + " " + points[1].geometry.y + "," + 
                                                 points[2].geometry.x + " " + points[2].geometry.y + "))", 
              "format correctly writes GeometryCollection WKT"); 
+         
+        // test writing an array of geometries 
+        t.eq(format.write(geom_array), 
+             "GEOMETRYCOLLECTION(POINT(" + points[0].geometry.x + " " + points[0].geometry.y + ")," + 
+                                "LINESTRING(" + points[0].geometry.x + " " + points[0].geometry.y + "," + 
+                                                points[1].geometry.x + " " + points[1].geometry.y + "," + 
+                                                points[2].geometry.x + " " + points[2].geometry.y + "))", 
+             "format correctly writes WKT for an array of Geometries"); 
  
     }
 
     function test_Format_WKT_read(t) { 
-        t.plan(7); 
+        t.plan(12); 
 
         var format = new OpenLayers.Format.WKT(); 
          
@@ -205,14 +220,16 @@
         // test a multipolygon 
         t.ok(multipolygon.geometry.equals(format.read(format.write(multipolygon)).geometry), 
              "format correctly reads MultiPolygon WKT"); 
-         
-        // test a geometrycollection 
-        t.eq(format.write(collection), 
-             "GEOMETRYCOLLECTION(POINT(" + points[0].geometry.x + " " + points[0].geometry.y + ")," + 
-                                "LINESTRING(" + points[0].geometry.x + " " + points[0].geometry.y + "," + 
-                                                points[1].geometry.x + " " + points[1].geometry.y + "," + 
-                                                points[2].geometry.x + " " + points[2].geometry.y + "))", 
-             "format correctly writes GeometryCollection WKT"); 
+             
+        // test a collection
+        var wkt = format.write(collection);
+        var got = format.read(wkt);
+        t.ok(got instanceof Array, "by default, reading a collection returns an array");
+        t.eq(got.length, 2, "read two items");
+        t.ok(got[0] instanceof OpenLayers.Feature.Vector, "first item is a feature");
+        t.geom_eq(got[0].geometry, points[0].geometry, "first feature's geometry is the correct point");
+        t.ok(got[1] instanceof OpenLayers.Feature.Vector, "second item is a feature");
+        t.geom_eq(got[1].geometry, linestrings[0].geometry, "second feature's geometry is the correct linestring");
  
     }
 

Modified: sandbox/tschaub/canvas/tests/Format/WMC/v1.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WMC/v1.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WMC/v1.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_write_wmc_StyleList(t) {

Modified: sandbox/tschaub/canvas/tests/Format/WMC/v1_1_0.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WMC/v1_1_0.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WMC/v1_1_0.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,10 +1,10 @@
 <html>
 <head>
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_write_wmc_Layer(t) {
-        if (OpenLayers.Util.getBrowserName() == "safari") {
+        if (OpenLayers.BROWSER_NAME == "safari") {
             t.plan(0);
             t.debug_print("Safari has wierd behavior with getElementsByTagNameNS: the result is that we can't run these tests there. Patches welcome.");
             return;

Modified: sandbox/tschaub/canvas/tests/Format/WMC.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WMC.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WMC.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     var v1_0_0 = '<ViewContext xmlns="http://www.opengis.net/context" version="1.0.0" id="OpenLayers_Context_233" xsi:schemaLocation="http://www.opengis.net/context http://schemas.opengis.net/context/1.0.0/context.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><General><Window width="512" height="256"/><BoundingBox minx="-109.9709708" miny="27.01451459" maxx="-80.02902918" maxy="41.98548541" SRS="EPSG:4326"/><Title/><Extension><ol:maxExtent xmlns:ol="http://openlayers.org/context" minx="-130.0000000" miny="14.00000000" maxx="-60.00000000" maxy="55.00000000"/></Extension></General><LayerList><Layer queryable="1" hidden="0"><Server service="OGC:WMS" version="1.1.1"><OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://t1.hypercube.telascience.org/cgi-bin/landsat7"/></Server><Name>landsat7</Name><Title>NASA Global Mosaic</Title><FormatList><Format current="1">image/jpeg</Format></FormatList><StyleList><Style current="1"><N
 ame/><Title>Default</Title></Style></StyleList><Extension><ol:maxExtent xmlns:ol="http://openlayers.org/context" minx="-130.0000000" miny="14.00000000" maxx="-60.00000000" maxy="55.00000000"/><ol:numZoomLevels xmlns:ol="http://openlayers.org/context">4</ol:numZoomLevels><ol:units xmlns:ol="http://openlayers.org/context">degrees</ol:units><ol:isBaseLayer xmlns:ol="http://openlayers.org/context">true</ol:isBaseLayer><ol:displayInLayerSwitcher xmlns:ol="http://openlayers.org/context">true</ol:displayInLayerSwitcher><ol:singleTile xmlns:ol="http://openlayers.org/context">false</ol:singleTile><ol:tileSize xmlns:ol="http://openlayers.org/context" width="512" height="1024"/></Extension></Layer><Layer queryable="1" hidden="1"><Server service="OGC:WMS" version="1.1.1"><OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://labs.metacarta.com/wms/vmap0"/></Server><Name>basic</Name><Title>OpenLayers WMS</Title><FormatList><Format current="1">im
 age/jpeg</Format></FormatList><StyleList><Style current="1"><Name/><Title>Default</Title></Style></StyleList><Extension><ol:maxExtent xmlns:ol="http://openlayers.org/context" minx="-130.0000000" miny="14.00000000" maxx="-60.00000000" maxy="55.00000000"/><ol:numZoomLevels xmlns:ol="http://openlayers.org/context">4</ol:numZoomLevels><ol:units xmlns:ol="http://openlayers.org/context">degrees</ol:units><ol:isBaseLayer xmlns:ol="http://openlayers.org/context">true</ol:isBaseLayer><ol:displayInLayerSwitcher xmlns:ol="http://openlayers.org/context">true</ol:displayInLayerSwitcher><ol:singleTile xmlns:ol="http://openlayers.org/context">false</ol:singleTile></Extension></Layer><Layer queryable="1" hidden="0"><Server service="OGC:WMS" version="1.1.1"><OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://lioapp.lrc.gov.on.ca/cubeserv/cubeserv.pl"/></Server><Name>na_road:CCRS</Name><Title>Transportation Network</Title><FormatList><Format curre
 nt="1">image/png</Format></FormatList><StyleList><Style current="1"><Name/><Title>Default</Title></Style></StyleList><Extension><ol:maxExtent xmlns:ol="http://openlayers.org/context" minx="-166.5320000" miny="4.050460000" maxx="-0.2068180000" maxy="70.28700000"/><ol:transparent xmlns:ol="http://openlayers.org/context">TRUE</ol:transparent><ol:numZoomLevels xmlns:ol="http://openlayers.org/context">4</ol:numZoomLevels><ol:units xmlns:ol="http://openlayers.org/context">degrees</ol:units><ol:isBaseLayer xmlns:ol="http://openlayers.org/context">false</ol:isBaseLayer><ol:opacity xmlns:ol="http://openlayers.org/context">0.6</ol:opacity><ol:displayInLayerSwitcher xmlns:ol="http://openlayers.org/context">false</ol:displayInLayerSwitcher><ol:singleTile xmlns:ol="http://openlayers.org/context">false</ol:singleTile></Extension></Layer><Layer queryable="1" hidden="0"><Server service="OGC:WMS" version="1.1.1"><OnlineResource xlink:type="simple" xmlns:xlink="http://www.w3.org/1999/xlink" x
 link:href="http://columbo.nrlssc.navy.mil/ogcwms/servlet/WMSServlet/AccuWeather_Maps.wms"/></Server><Name>3:1</Name><Title>Radar 3:1</Title><FormatList><Format current="1">image/png</Format></FormatList><StyleList><Style current="1"><Name/><Title>Default</Title></Style></StyleList><Extension><ol:maxExtent xmlns:ol="http://openlayers.org/context" minx="-131.0294952" miny="14.56289673" maxx="-61.02950287" maxy="54.56289673"/><ol:transparent xmlns:ol="http://openlayers.org/context">TRUE</ol:transparent><ol:numZoomLevels xmlns:ol="http://openlayers.org/context">4</ol:numZoomLevels><ol:units xmlns:ol="http://openlayers.org/context">degrees</ol:units><ol:isBaseLayer xmlns:ol="http://openlayers.org/context">false</ol:isBaseLayer><ol:opacity xmlns:ol="http://openlayers.org/context">0.8</ol:opacity><ol:displayInLayerSwitcher xmlns:ol="http://openlayers.org/context">false</ol:displayInLayerSwitcher><ol:singleTile xmlns:ol="http://openlayers.org/context">true</ol:singleTile></Extension
 ></Layer></LayerList></ViewContext>';
@@ -130,7 +130,7 @@
          */
 
         // test v1.1.0
-        if(OpenLayers.Util.getBrowserName()== "opera") {
+        if(OpenLayers.BROWSER_NAME== "opera") {
             t.plan(0);
             t.debug_print("WMC writing works but is not tested in Opera");
         } else {

Modified: sandbox/tschaub/canvas/tests/Format/WMSCapabilities/v1_1_1.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WMSCapabilities/v1_1_1.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WMSCapabilities/v1_1_1.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_read(t) {

Copied: sandbox/tschaub/canvas/tests/Format/WMSCapabilities/v1_1_1_WMSC.html (from rev 11416, trunk/openlayers/tests/Format/WMSCapabilities/v1_1_1_WMSC.html)
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WMSCapabilities/v1_1_1_WMSC.html	                        (rev 0)
+++ sandbox/tschaub/canvas/tests/Format/WMSCapabilities/v1_1_1_WMSC.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,212 @@
+<html> 
+<head> 
+    <script src="../../OLLoader.js"></script>
+    <script type="text/javascript">
+    
+    function test_read(t) {
+        
+        t.plan(9);
+
+        var xml = document.getElementById("wmsc").firstChild.nodeValue;
+        var doc = new OpenLayers.Format.XML().read(xml);
+        var format = new OpenLayers.Format.WMSCapabilities({profile: "WMSC"});
+        var obj = format.read(doc);
+        var tilesets = obj.capability.vendorSpecific.tileSets;
+        t.eq(tilesets.length, 2, "We expect 2 tilesets to be parsed");
+        var tileset = tilesets[0];
+        t.eq(tileset.bbox["EPSG:900913"].bbox, [-13697515.466796875, 5165920.118906248, -13619243.94984375, 5244191.635859374], "BBOX correctly parsed");
+        t.eq(tileset.format, "image/png", "Format correctly parsed");
+        t.eq(tileset.height, 256, "Height correctly parsed");
+        t.eq(tileset.width, 256, "Width correctly parsed");
+        t.eq(tileset.layers, "medford:hydro", "Layers correctly parsed");
+        t.eq(tileset.srs["EPSG:900913"], true, "SRS correctly parsed");
+        t.eq(tileset.resolutions, [156543.03390625, 78271.516953125, 39135.7584765625, 19567.87923828125, 9783.939619140625, 4891.9698095703125, 2445.9849047851562, 1222.9924523925781, 611.4962261962891, 305.74811309814453, 152.87405654907226, 76.43702827453613, 38.218514137268066, 19.109257068634033, 9.554628534317017, 4.777314267158508, 2.388657133579254, 1.194328566789627, 0.5971642833948135, 0.29858214169740677, 0.14929107084870338, 0.07464553542435169, 0.037322767712175846, 0.018661383856087923, 0.009330691928043961, 0.004665345964021981], "Resolutions correctly parsed");
+        t.eq(tileset.styles, "", "Styles correctly parsed");
+    }
+
+    </script> 
+</head> 
+<body>
+
+<div id="wmsc"><!--
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE WMT_MS_Capabilities SYSTEM "http://schemas.opengis.net/wms/1.1.1/capabilities_1_1_1.dtd"[
+<!ELEMENT VendorSpecificCapabilities (TileSet*) >
+<!ELEMENT TileSet (SRS, BoundingBox?, Resolutions, Width, Height, Format, Layers*, Styles*) >
+<!ELEMENT Resolutions (#PCDATA) >
+<!ELEMENT Width (#PCDATA) >
+<!ELEMENT Height (#PCDATA) >
+<!ELEMENT Layers (#PCDATA) >
+<!ELEMENT Styles (#PCDATA) >
+]>
+<WMT_MS_Capabilities version="1.1.1" updateSequence="57">
+  <Service>
+    <Name>OGC:WMS</Name>
+    <Title>GeoServer Web Map Service</Title>
+    <Abstract>A compliant implementation of WMS 1.1.1 plus most of the SLD 1.0 extension (dynamic styling). Can also generate PDF, SVG, KML, GeoRSS</Abstract>
+    <KeywordList>
+      <Keyword>WFS</Keyword>
+      <Keyword>WMS</Keyword>
+      <Keyword>GEOSERVER</Keyword>
+    </KeywordList>
+    <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost:8080/geoserver-suite/wms"/>
+    <ContactInformation>
+      <ContactPersonPrimary>
+        <ContactPerson>OpenGeo</ContactPerson>
+        <ContactOrganization>OpenGeo</ContactOrganization>
+      </ContactPersonPrimary>
+      <ContactPosition>Outreach</ContactPosition>
+      <ContactAddress>
+        <AddressType>Work</AddressType>
+        <Address/>
+        <City>New York</City>
+        <StateOrProvince/>
+        <PostCode/>
+        <Country>USA</Country>
+      </ContactAddress>
+      <ContactVoiceTelephone/>
+      <ContactFacsimileTelephone/>
+      <ContactElectronicMailAddress>inquiry at opengeo.org</ContactElectronicMailAddress>
+    </ContactInformation>
+    <Fees>NONE</Fees>
+    <AccessConstraints>NONE</AccessConstraints>
+  </Service>
+  <Capability>
+    <Request>
+      <GetCapabilities>
+        <Format>application/vnd.ogc.wms_xml</Format>
+        <DCPType>
+          <HTTP>
+            <Get>
+              <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost:8080/geoserver-suite/wms?SERVICE=WMS&amp;"/>
+            </Get>
+            <Post>
+              <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost:8080/geoserver-suite/wms?SERVICE=WMS&amp;"/>
+            </Post>
+          </HTTP>
+        </DCPType>
+      </GetCapabilities>
+      <GetMap>
+        <Format>image/png</Format>
+        <Format>application/atom xml</Format>
+        <Format>application/atom+xml</Format>
+        <Format>application/openlayers</Format>
+        <Format>application/pdf</Format>
+        <Format>application/rss xml</Format>
+        <Format>application/rss+xml</Format>
+        <Format>application/vnd.google-earth.kml</Format>
+        <Format>application/vnd.google-earth.kml xml</Format>
+        <Format>application/vnd.google-earth.kml+xml</Format>
+        <Format>application/vnd.google-earth.kmz</Format>
+        <Format>application/vnd.google-earth.kmz xml</Format>
+        <Format>application/vnd.google-earth.kmz+xml</Format>
+        <Format>atom</Format>
+        <Format>image/geotiff</Format>
+        <Format>image/geotiff8</Format>
+        <Format>image/gif</Format>
+        <Format>image/jpeg</Format>
+        <Format>image/png8</Format>
+        <Format>image/svg</Format>
+        <Format>image/svg xml</Format>
+        <Format>image/svg+xml</Format>
+        <Format>image/tiff</Format>
+        <Format>image/tiff8</Format>
+        <Format>kml</Format>
+        <Format>kmz</Format>
+        <Format>openlayers</Format>
+        <Format>rss</Format>
+        <DCPType>
+          <HTTP>
+            <Get>
+              <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost:8080/geoserver-suite/wms?SERVICE=WMS&amp;"/>
+            </Get>
+          </HTTP>
+        </DCPType>
+      </GetMap>
+      <GetFeatureInfo>
+        <Format>text/plain</Format>
+        <Format>application/vnd.ogc.gml</Format>
+        <Format>text/html</Format>
+        <DCPType>
+          <HTTP>
+            <Get>
+              <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost:8080/geoserver-suite/wms?SERVICE=WMS&amp;"/>
+            </Get>
+            <Post>
+              <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost:8080/geoserver-suite/wms?SERVICE=WMS&amp;"/>
+            </Post>
+          </HTTP>
+        </DCPType>
+      </GetFeatureInfo>
+      <DescribeLayer>
+        <Format>application/vnd.ogc.wms_xml</Format>
+        <DCPType>
+          <HTTP>
+            <Get>
+              <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost:8080/geoserver-suite/wms?SERVICE=WMS&amp;"/>
+            </Get>
+          </HTTP>
+        </DCPType>
+      </DescribeLayer>
+      <GetLegendGraphic>
+        <Format>image/png</Format>
+        <Format>image/jpeg</Format>
+        <Format>image/gif</Format>
+        <DCPType>
+          <HTTP>
+            <Get>
+              <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost:8080/geoserver-suite/wms?SERVICE=WMS&amp;"/>
+            </Get>
+          </HTTP>
+        </DCPType>
+      </GetLegendGraphic>
+      <GetStyles>
+        <Format>application/vnd.ogc.sld+xml</Format>
+        <DCPType>
+          <HTTP>
+            <Get>
+              <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost:8080/geoserver-suite/wms?SERVICE=WMS&amp;"/>
+            </Get>
+          </HTTP>
+        </DCPType>
+      </GetStyles>
+    </Request>
+    <Exception>
+      <Format>application/vnd.ogc.se_xml</Format>
+      <Format>application/vnd.ogc.se_inimage</Format>
+    </Exception>
+    <VendorSpecificCapabilities>
+      <TileSet>
+        <SRS>EPSG:900913</SRS>
+        <BoundingBox SRS="EPSG:900913" minx="-1.3697515466796875E7" miny="5165920.118906248" maxx="-1.361924394984375E7" maxy="5244191.635859374"/>
+        <Resolutions>156543.03390625 78271.516953125 39135.7584765625 19567.87923828125 9783.939619140625 4891.9698095703125 2445.9849047851562 1222.9924523925781 611.4962261962891 305.74811309814453 152.87405654907226 76.43702827453613 38.218514137268066 19.109257068634033 9.554628534317017 4.777314267158508 2.388657133579254 1.194328566789627 0.5971642833948135 0.29858214169740677 0.14929107084870338 0.07464553542435169 0.037322767712175846 0.018661383856087923 0.009330691928043961 0.004665345964021981 </Resolutions>
+        <Width>256</Width>
+        <Height>256</Height>
+        <Format>image/png</Format>
+        <Layers>medford:hydro</Layers>
+        <Styles/>
+      </TileSet>
+      <TileSet>
+        <SRS>EPSG:4326</SRS>
+        <BoundingBox SRS="EPSG:4326" minx="-123.046875" miny="42.1875" maxx="-122.6953125" maxy="42.5390625"/>
+        <Resolutions>0.703125 0.3515625 0.17578125 0.087890625 0.0439453125 0.02197265625 0.010986328125 0.0054931640625 0.00274658203125 0.001373291015625 6.866455078125E-4 3.4332275390625E-4 1.71661376953125E-4 8.58306884765625E-5 4.291534423828125E-5 2.1457672119140625E-5 1.0728836059570312E-5 5.364418029785156E-6 2.682209014892578E-6 1.341104507446289E-6 6.705522537231445E-7 3.3527612686157227E-7 1.6763806343078613E-7 8.381903171539307E-8 4.190951585769653E-8 2.0954757928848267E-8 </Resolutions>
+        <Width>256</Width>
+        <Height>256</Height>
+        <Format>image/gif</Format>
+        <Layers>medford</Layers>
+        <Styles/>
+      </TileSet>
+    </VendorSpecificCapabilities>
+    <UserDefinedSymbolization SupportSLD="1" UserLayer="1" UserStyle="1" RemoteWFS="1"/>
+    <Layer queryable="0" opaque="0" noSubsets="0">
+      <Title>GeoServer Web Map Service</Title>
+      <Abstract>A compliant implementation of WMS 1.1.1 plus most of the SLD 1.0 extension (dynamic styling). Can also generate PDF, SVG, KML, GeoRSS</Abstract>
+      <SRS>EPSG:4326</SRS>
+      <SRS>EPSG:900913</SRS>
+      <LatLonBoundingBox minx="-180.0" miny="-90.0" maxx="180.0" maxy="83.624"/>
+    </Layer>
+  </Capability>
+</WMT_MS_Capabilities>
+--></div>
+</body> 
+</html> 

Modified: sandbox/tschaub/canvas/tests/Format/WMSCapabilities/v1_3_0.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WMSCapabilities/v1_3_0.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WMSCapabilities/v1_3_0.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_layers(t) {

Modified: sandbox/tschaub/canvas/tests/Format/WMSCapabilities.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WMSCapabilities.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WMSCapabilities.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_initialize(t) {

Modified: sandbox/tschaub/canvas/tests/Format/WMSDescribeLayer.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WMSDescribeLayer.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WMSDescribeLayer.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_read_WMSDescribeLayer(t) {

Modified: sandbox/tschaub/canvas/tests/Format/WMSGetFeatureInfo.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WMSGetFeatureInfo.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WMSGetFeatureInfo.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_read_FeatureInfoResponse(t) {

Modified: sandbox/tschaub/canvas/tests/Format/WMTSCapabilities/v1_0_0.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WMTSCapabilities/v1_0_0.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WMTSCapabilities/v1_0_0.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
 
         function test_ows(t) {
@@ -36,7 +36,7 @@
         }
     
         function test_layers(t) {
-            t.plan(21);
+            t.plan(25);
             var xml = document.getElementById("ogcsample").firstChild.nodeValue;
             var doc = new OpenLayers.Format.XML().read(xml);
     
@@ -75,7 +75,14 @@
             t.eq(wgs84Bbox.right, 180.0, "wgs84BoudingBox right is correct");
             t.eq(wgs84Bbox.bottom, -90.0, "wgs84BoudingBox bottom is correct");
             t.eq(wgs84Bbox.top, 90.0, "wgs84BoudingBox top is correct");
-            
+
+            t.eq(layer.resourceUrl.tile.format, "image/png", "resourceUrl.tile.format is correct");
+            t.eq(layer.resourceUrl.tile.template, "http://www.example.com/wmts/coastlines/{TileMatrix}/{TileRow}/{TileCol}.png", 
+                 "resourceUrl.tile.template is correct");
+
+            t.eq(layer.resourceUrl.FeatureInfo.format, "application/gml+xml; version=3.1", "resourceUrl.FeatureInfo.format is correct");
+            t.eq(layer.resourceUrl.FeatureInfo.template, "http://www.example.com/wmts/coastlines/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}.xml", 
+                 "resourceUrl.FeatureInfo.template is correct");
         }
 
         function test_tileMatrixSets(t) {
@@ -110,7 +117,7 @@
         }
         
         function test_createLayer(t) {
-            t.plan(6);
+            t.plan(7);
             
             var format = new OpenLayers.Format.WMTSCapabilities();
 
@@ -153,7 +160,7 @@
             
             t.eq(layer.matrixIds.length, 2, "correct matrixIds length");
             t.eq(layer.name, "Coastlines", "correct layer title");
-            
+            t.eq(layer.style, "DarkBlue", "correct style identifier");
         }
         
     </script>
@@ -240,6 +247,10 @@
                 <ows:UpperCorner>180 90</ows:UpperCorner>
             </ows:WGS84BoundingBox>
             <ows:Identifier>coastlines</ows:Identifier>
+            <ResourceURL format="image/png" resourceType="tile"
+                         template="http://www.example.com/wmts/coastlines/{TileMatrix}/{TileRow}/{TileCol}.png" />
+            <ResourceURL format="application/gml+xml; version=3.1" resourceType="FeatureInfo"
+                         template="http://www.example.com/wmts/coastlines/{TileMatrixSet}/{TileMatrix}/{TileRow}/{TileCol}/{J}/{I}.xml" />
             <Style isDefault="true">
                 <ows:Title>Dark Blue</ows:Title>
                 <ows:Identifier>DarkBlue</ows:Identifier>

Modified: sandbox/tschaub/canvas/tests/Format/WMTSCapabilities.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/WMTSCapabilities.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/WMTSCapabilities.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_initialize(t) {

Modified: sandbox/tschaub/canvas/tests/Format/XML.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format/XML.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format/XML.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     var text =

Modified: sandbox/tschaub/canvas/tests/Format.html
===================================================================
--- sandbox/tschaub/canvas/tests/Format.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Format.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_Format_constructor(t) {

Modified: sandbox/tschaub/canvas/tests/Geometry/Collection.html
===================================================================
--- sandbox/tschaub/canvas/tests/Geometry/Collection.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Geometry/Collection.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var coll;
         
@@ -392,6 +392,23 @@
         coll.destroy();
     }
 
+    function test_avoid_infinite_recursion(t) {
+        t.plan(1);
+
+        var g = new OpenLayers.Geometry.Polygon([
+            new OpenLayers.Geometry.LinearRing(),
+            new OpenLayers.Geometry.LinearRing()
+        ]);
+        var bounds;
+        try {
+            bounds = g.getBounds();
+            t.eq(bounds, null, "Polygon with empty linear ring has null bounds");
+        } catch (err) {
+            t.fail("Failed to get bounds of polygon with empty linear ring: " + err.message);
+        }
+
+    }
+
     
     function test_Collection_destroy(t) {
         t.plan( 3 );

Modified: sandbox/tschaub/canvas/tests/Geometry/Curve.html
===================================================================
--- sandbox/tschaub/canvas/tests/Geometry/Curve.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Geometry/Curve.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var curve;
     var components = [new OpenLayers.Geometry.Point(10,10), 

Modified: sandbox/tschaub/canvas/tests/Geometry/LineString.html
===================================================================
--- sandbox/tschaub/canvas/tests/Geometry/LineString.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Geometry/LineString.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var line;
     var components = [new OpenLayers.Geometry.Point(10,15), 
@@ -374,7 +374,67 @@
             t.eq(Math.round(got), Math.round(cases[i].exp), "[case " + i + "] length calculated");
         }
         
-    }   
+    }
+    
+    function test_LineString_simplify(t){
+        t.plan(8);
+        var ls1 = new OpenLayers.Geometry.LineString([
+            new OpenLayers.Geometry.Point(0,0),
+            new OpenLayers.Geometry.Point(1,2.1),
+            new OpenLayers.Geometry.Point(1.8,3.8),
+            new OpenLayers.Geometry.Point(2,4),
+            new OpenLayers.Geometry.Point(3,4),
+            new OpenLayers.Geometry.Point(4,4.5),
+            new OpenLayers.Geometry.Point(5,5)
+            
+        ]);
+        var ls2 = new OpenLayers.Geometry.LineString([
+            new OpenLayers.Geometry.Point(0,0),
+            new OpenLayers.Geometry.Point(1,2.1),
+            new OpenLayers.Geometry.Point(1.8,3.8),
+            new OpenLayers.Geometry.Point(2,4),
+            new OpenLayers.Geometry.Point(3,4),
+            new OpenLayers.Geometry.Point(4,4.5),
+            new OpenLayers.Geometry.Point(5,5),
+            new OpenLayers.Geometry.Point(0,0)
+            
+        ]);
+        var ls3 = new OpenLayers.Geometry.LineString([
+            new OpenLayers.Geometry.Point(0,0),
+            new OpenLayers.Geometry.Point(1,1)
+        ]);
+        var ls5 = new OpenLayers.Geometry.LineString([
+            new OpenLayers.Geometry.Point(0,0),
+            new OpenLayers.Geometry.Point(1,1),
+            new OpenLayers.Geometry.Point(2,2),
+            new OpenLayers.Geometry.Point(3,3),
+            new OpenLayers.Geometry.Point(4,4),
+            new OpenLayers.Geometry.Point(5,5)
+            
+        ]);
+        var ls6 = new OpenLayers.Geometry.LineString([
+            new OpenLayers.Geometry.Point(0,0),
+            new OpenLayers.Geometry.Point(1,1),
+            new OpenLayers.Geometry.Point(1,1),
+            new OpenLayers.Geometry.Point(3,2)
+        ]);
+        
+        t.ok(ls1 instanceof OpenLayers.Geometry.LineString, 'LineString is instance of OpenLayers.Geometry.LineString');
+        var simplified1 = ls1.simplify(0.5);
+        t.ok(simplified1 instanceof OpenLayers.Geometry.LineString, 'Simplified LineString is instance of OpenLayers.Geometry.LineString');
+        t.ok(simplified1.getVertices().length <= ls1.getVertices().length, 'Simplified LineString has less or equal number of vertices');
+        // The simplified version is derived from PostGIS function ST_SIMPLIFY()
+        t.ok(simplified1.toString() === 'LINESTRING(0 0,1.8 3.8,5 5)', 'LineString 1 was simplified correctly');
+        var simplified2 = ls2.simplify(0.5);
+        // The simplified version is derived from PostGIS function ST_SIMPLIFY()
+        t.ok(simplified2.toString() === 'LINESTRING(0 0,1.8 3.8,5 5,0 0)', 'LineString 2 was simplified correctly');
+        var simplified3 = ls3.simplify(0.5);
+        t.ok(simplified3.toString() === ls3.toString(), 'LineString with 2 vertices is left untouched');
+        var simplified5 = ls5.simplify(0.0);
+        t.ok(simplified5.toString() === 'LINESTRING(0 0,5 5)', 'A tolerance of 0 returns the optimized version needless vertices');
+        var simplified6 = ls6.simplify(0.0);
+        t.ok(simplified6.toString() === 'LINESTRING(0 0,1 1,3 2)', 'A tolerance of 0 returns the optimized version without doubled vertices');
+    }
 
   </script>
 </head>

Modified: sandbox/tschaub/canvas/tests/Geometry/LinearRing.html
===================================================================
--- sandbox/tschaub/canvas/tests/Geometry/LinearRing.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Geometry/LinearRing.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var line;
     var components = [new OpenLayers.Geometry.Point(10,10), 

Modified: sandbox/tschaub/canvas/tests/Geometry/MultiLineString.html
===================================================================
--- sandbox/tschaub/canvas/tests/Geometry/MultiLineString.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Geometry/MultiLineString.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var line;
         

Modified: sandbox/tschaub/canvas/tests/Geometry/MultiPoint.html
===================================================================
--- sandbox/tschaub/canvas/tests/Geometry/MultiPoint.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Geometry/MultiPoint.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var point = new OpenLayers.Geometry.Point(10, 15);
      

Modified: sandbox/tschaub/canvas/tests/Geometry/MultiPolygon.html
===================================================================
--- sandbox/tschaub/canvas/tests/Geometry/MultiPolygon.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Geometry/MultiPolygon.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var polygon;
     var components = [new OpenLayers.Geometry.Point(10,10), new OpenLayers.Geometry.Point(0,0)];

Modified: sandbox/tschaub/canvas/tests/Geometry/Point.html
===================================================================
--- sandbox/tschaub/canvas/tests/Geometry/Point.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Geometry/Point.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var point; 
         

Modified: sandbox/tschaub/canvas/tests/Geometry/Polygon.html
===================================================================
--- sandbox/tschaub/canvas/tests/Geometry/Polygon.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Geometry/Polygon.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var polygon;
     var components = [new OpenLayers.Geometry.Point(10,14), new OpenLayers.Geometry.Point(5,3)];

Modified: sandbox/tschaub/canvas/tests/Geometry/Rectangle.html
===================================================================
--- sandbox/tschaub/canvas/tests/Geometry/Rectangle.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Geometry/Rectangle.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_Rectangle_constructor (t) {

Modified: sandbox/tschaub/canvas/tests/Geometry/Surface.html
===================================================================
--- sandbox/tschaub/canvas/tests/Geometry/Surface.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Geometry/Surface.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_Surface_constructor (t) {

Modified: sandbox/tschaub/canvas/tests/Geometry.html
===================================================================
--- sandbox/tschaub/canvas/tests/Geometry.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Geometry.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script src="data/geos_wkt_intersects.js"></script>
   <script type="text/javascript">
     var map; 

Copied: sandbox/tschaub/canvas/tests/Handler/Box.html (from rev 11416, trunk/openlayers/tests/Handler/Box.html)
===================================================================
--- sandbox/tschaub/canvas/tests/Handler/Box.html	                        (rev 0)
+++ sandbox/tschaub/canvas/tests/Handler/Box.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,26 @@
+<html>
+<head>
+  <script src="../OLLoader.js"></script>
+  <script type="text/javascript">
+    function test_Handler_Box_destroy(t) {
+        t.plan(1);
+        var map = new OpenLayers.Map('map');
+        var control = new OpenLayers.Control();
+        map.addControl(control);
+        var handler = new OpenLayers.Handler.Box(control);
+        handler.activate();
+        try {
+            handler.destroy();
+            t.ok(true, "destroying the box handler should not raise any error");
+        } catch(err) {
+            t.fail("destroying the box handler causes trouble: " + err);
+        }
+        map.destroy();
+    }
+
+  </script>
+</head>
+<body>
+    <div id="map" style="width: 300px; height: 150px;"/>
+</body>
+</html>

Modified: sandbox/tschaub/canvas/tests/Handler/Click.html
===================================================================
--- sandbox/tschaub/canvas/tests/Handler/Click.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Handler/Click.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     function test_Handler_Click_constructor(t) {
         t.plan(3);
@@ -43,14 +43,15 @@
     }
     
     function test_Handler_Click_events(t) {
-        t.plan(50);
+        t.plan(80);
         
         var map = new OpenLayers.Map('map');
         var control = {
             map: map
         };
         map.events.registerPriority = function(type, obj, func) {
-            var r = func();
+            var f = OpenLayers.Function.bind(func, obj)
+            var r = f({xy:null});
             if(typeof r == "string") {
                 // this is one of the mock handler methods
                 t.eq(OpenLayers.Util.indexOf(nonevents, type), -1,
@@ -72,7 +73,7 @@
 
         // list below events that should be handled (events) and those
         // that should not be handled (nonevents) by the handler
-        var events = ["click", "dblclick", "mousedown", "mouseup", "rightclick"];
+        var events = ["click", "dblclick", "mousedown", "mouseup", "rightclick", "touchstart", "touchmove", "touchend"];
         var nonevents = ["mousemove", "resize", "focus", "blur"];
         var handler = new OpenLayers.Handler.Click(control);
         // set browser event like properties on the handler
@@ -82,7 +83,7 @@
         handler.activate();
 
         // different listeners registered for pixelTolerance option
-        var events = ["click", "dblclick", "mousedown", "mouseup", "rightclick"];
+        var events = ["click", "dblclick", "mousedown", "mouseup", "rightclick", "touchstart", "touchmove", "touchend"];
         var nonevents = ["mousemove", "resize", "focus", "blur"];
         var handler = new OpenLayers.Handler.Click(control, {}, {
             pixelTolerance: 2
@@ -290,7 +291,127 @@
         OpenLayers.Event.isRightClick = temp;
     }
 
+    function test_touch_click(t) {
+        t.plan(4);
 
+        // set up
+
+        var log;
+
+        var map = new OpenLayers.Map('map');
+        var control = {map: map};
+
+        var callbacks = {
+            'click': function(e) {
+                log = {x: e.xy.x, y: e.xy.y,
+                       lastTouches: e.lastTouches};
+            }
+        };
+
+        var handler = new OpenLayers.Handler.Click(
+                control, callbacks,
+                {'single': true, pixelTolerance: null});
+
+        // test
+
+        log = null;
+        handler.touchstart({xy: {x: 1, y: 1}, touches: ["foo"]});
+        handler.touchend({});
+
+        t.delay_call(1, function() {
+            t.ok(log != null, "click callback called");
+            if(log != null) {
+                t.eq(log.x, 1, "evt.xy.x as expected");
+                t.eq(log.y, 1, "evt.xy.y as expected");
+                t.eq(log.lastTouches, ["foo"], "evt.lastTouches as expected");
+            }
+            // tear down
+            map.destroy();
+        });
+    }
+
+    function test_touch_ignoresimulatedclick(t) {
+        t.plan(2);
+
+        // set up
+
+        var log;
+
+        var map = new OpenLayers.Map('map');
+        var control = {map: map};
+
+        var callbacks = {
+            'dblclick': function(e) {
+                log.dblclick = {x: e.xy.x, y: e.xy.y,
+                   lastTouches: e.lastTouches};
+            }
+        };
+
+        var handler = new OpenLayers.Handler.Click(
+                control, callbacks,
+                {'double': true, pixelTolerance: null});
+
+        // test
+
+        log = {};
+        handler.touchstart({xy: {x: 1, y: 1}, touches: ["foo"]});
+        handler.touchend({});
+        handler.touchstart({xy: {x: 1, y: 1}, touches: ["foo"]});
+        handler.touchend({type: "click"});
+
+        t.eq(handler.touch, true, "Touch property should be true");
+        
+        t.ok(log.dblclick == undefined, "dblclick callback not called with simulated click");
+
+        // tear down
+        map.destroy();
+    }
+
+    function test_touch_dblclick(t) {
+        t.plan(5);
+
+        // set up
+
+        var log;
+
+        var map = new OpenLayers.Map('map');
+        var control = {map: map};
+
+        var callbacks = {
+            'click': function(e) {
+                log.click = {x: e.xy.x, y: e.xy.y,
+                   lastTouches: e.lastTouches};
+            },
+            'dblclick': function(e) {
+                log.dblclick = {x: e.xy.x, y: e.xy.y,
+                   lastTouches: e.lastTouches};
+            }
+        };
+
+        var handler = new OpenLayers.Handler.Click(
+                control, callbacks,
+                {'double': true, pixelTolerance: null});
+
+        // test
+
+        log = {};
+        handler.touchstart({xy: {x: 1, y: 1}, touches: ["foo"]});
+        handler.touchend({});
+        handler.touchstart({xy: {x: 1, y: 1}, touches: ["foo"]});
+        handler.touchend({});
+
+        t.eq(log.click, undefined, "click callback not called");
+        t.ok(log.dblclick != undefined, "dblclick callback called");
+        if(log.dblclick != undefined) {
+            t.eq(log.dblclick.x, 1, "evt.xy.x as expected");
+            t.eq(log.dblclick.y, 1, "evt.xy.y as expected");
+            t.eq(log.dblclick.lastTouches, ["foo"], "evt.lastTouches as expected");
+        }
+
+        // tear down
+        map.destroy();
+    }
+
   </script>
 </head>
 <body>

Modified: sandbox/tschaub/canvas/tests/Handler/Drag.html
===================================================================
--- sandbox/tschaub/canvas/tests/Handler/Drag.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Handler/Drag.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     function test_Handler_Drag_constructor(t) {
         t.plan(3);
@@ -45,7 +45,7 @@
     }
     
     function test_Handler_Drag_events(t) {
-        t.plan(25);
+        t.plan(40);
         
         var map = new OpenLayers.Map('map');
         var control = new OpenLayers.Control();
@@ -54,7 +54,8 @@
 
         // list below events that should be handled (events) and those
         // that should not be handled (nonevents) by the handler
-        var events = ["mousedown", "mouseup", "mousemove", "mouseout", "click"];
+        var events = ["mousedown", "mouseup", "mousemove", "mouseout", "click",
+                      "touchstart", "touchmove", "touchend"];
         var nonevents = ["dblclick", "resize", "focus", "blur"];
         map.events.registerPriority = function(type, obj, func) {
             var r = func();
@@ -251,7 +252,7 @@
             t.ok(evt.xy.x == testEvents.done.xy.x &&
                  evt.xy.y == testEvents.done.xy.y,
                  "mouseout calls Util.mouseLeft with the correct event");
-            t.eq(element.id, map.div.id,
+            t.eq(element.id, map.viewPortDiv.id,
                  "mouseout calls Util.mouseLeft with the correct element");
             return true;
         }
@@ -288,6 +289,64 @@
         
     }
 
+    function test_Handler_Drag_touch(t) {
+        // In this test we verify that "touchstart", "touchmove", and
+        // "touchend" events set expected states in the drag handler.
+        // We also verify that we stop event bubbling as appropriate.
+
+        t.plan(14);
+
+        // set up
+
+        var m = new OpenLayers.Map('map', {controls: []});
+        var c = new OpenLayers.Control();
+        m.addControl(c);
+        var h = new OpenLayers.Handler.Drag(c, {
+            done: function(px) { 
+                log.push(px); 
+            }
+        });
+        h.activate();
+
+        var _stop = OpenLayers.Event.stop;
+        OpenLayers.Event.stop = function(e) {
+            log.push(e);
+        };
+
+        var Px = OpenLayers.Pixel, e;
+        var log = [];
+
+        // test
+        e = {touches: [{}], xy: new Px(0, 0)};
+        m.events.triggerEvent('touchstart', e);
+        t.eq(h.started, true, '[touchstart] started is set');
+        t.eq(h.start.x, 0, '[touchstart] start.x is correct');
+        t.eq(h.start.y, 0, '[touchstart] start.y is correct');
+        t.eq(log.length, 1, '[touchstart] one item in log');
+        t.ok(log[0] === e, "touchstart", '[touchstart] event is stopped');
+
+        e = {xy: new Px(1, 1)};
+        m.events.triggerEvent('touchmove', e);
+        t.eq(h.dragging, true, '[touchmove] dragging is set');
+        t.eq(h.last.x, 1, '[touchmove] last.x is correct');
+        t.eq(h.last.y, 1, '[touchmove] last.y is correct');
+        t.eq(log.length, 1, '[touchmove] one item in log (event is not stopped)');
+
+        e = {xy: new Px(2, 2)};
+        m.events.triggerEvent('touchend', e);
+        t.eq(h.started, false, '[touchend] started is reset');
+        t.eq(h.started, false, '[touchend] started is reset');
+        // the "done" callback gets the position of the last touchmove
+        t.eq(log.length, 2, '[touchend] two items in log');
+        t.ok(log[1] instanceof Px, '[touchend] got');
+        t.ok(log[1].equals(e.xy), '[touchend] done callback got correct position');
+
+        // tear down
+
+        OpenLayers.Event.stop = _stop;
+        m.destroy();
+    }
+
     function test_Handler_Drag_submethods(t) {
         t.plan(8);
         

Modified: sandbox/tschaub/canvas/tests/Handler/Feature.html
===================================================================
--- sandbox/tschaub/canvas/tests/Handler/Feature.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Handler/Feature.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     function test_initialize(t) {
         t.plan(4);

Modified: sandbox/tschaub/canvas/tests/Handler/Hover.html
===================================================================
--- sandbox/tschaub/canvas/tests/Handler/Hover.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Handler/Hover.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     function test_Handler_Hover_events(t) {
         t.plan(10);

Modified: sandbox/tschaub/canvas/tests/Handler/Keyboard.html
===================================================================
--- sandbox/tschaub/canvas/tests/Handler/Keyboard.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Handler/Keyboard.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     function test_Handler_Keyboard_initialize(t) {
         t.plan(3);

Modified: sandbox/tschaub/canvas/tests/Handler/MouseWheel.html
===================================================================
--- sandbox/tschaub/canvas/tests/Handler/MouseWheel.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Handler/MouseWheel.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     function test_Handler_MouseWheel_constructor(t) {
         t.plan(3);

Modified: sandbox/tschaub/canvas/tests/Handler/Path.html
===================================================================
--- sandbox/tschaub/canvas/tests/Handler/Path.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Handler/Path.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     function test_Handler_Path_constructor(t) {
         t.plan(3);
@@ -25,12 +25,27 @@
     }
 
     function test_Handler_Path_activation(t) {
-        t.plan(3);
-        var map = new OpenLayers.Map('map');
+        t.plan(12);
+        var log = [];
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
         var control = new OpenLayers.Control();
+        var handler = new OpenLayers.Handler.Path(control, {
+            "create": function(g, f) {
+                log.push({geometry: g, feature: f});
+            }
+        });
+        control.handler = handler;
         map.addControl(control);
-        var handler = new OpenLayers.Handler.Path(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
         handler.active = true;
+
         var activated = handler.activate();
         t.ok(!activated,
              "activate returns false if the handler was already active");
@@ -38,39 +53,72 @@
         activated = handler.activate();
         t.ok(activated,
              "activate returns true if the handler was not already active");
+        t.ok(handler.layer instanceof OpenLayers.Layer.Vector,
+             "activate creates a vector layer");
+        t.ok(handler.layer.map == map,
+             "activate adds the vector layer to the map");
+        t.ok(handler.point instanceof OpenLayers.Feature.Vector,
+             "activate creates a point feature");
+        t.ok(handler.point.layer == handler.layer,
+             "activate adds the point feature to the layer");
+        t.ok(handler.line instanceof OpenLayers.Feature.Vector,
+             "acttivates creates a line feature");
+        t.ok(handler.line.layer == handler.layer,
+             "activate adds the line feature to the layer");
+        t.eq(log.length, 1,
+             "activate calls \"create\" once");
+        t.geom_eq(log[0].geometry, handler.point.geometry,
+                  "\"create\" called with expected geometry");
+        t.ok(log[0].feature == handler.line,
+             "\"create\" called with expected feature");
         activated = handler.deactivate();
         t.ok(activated,
              "deactivate returns true if the handler was active already");
-        map.destroy();     
+
+        map.destroy();
     }
 
-    function test_Handler_Path_bounds(t) {
+    function test_bounds(t) {
         t.plan(2);
+        var geometry;
         var map = new OpenLayers.Map('map');
         map.addLayer(new OpenLayers.Layer.WMS("", "", {}));
         map.zoomToMaxExtent();
         var control = new OpenLayers.Control();
         map.addControl(control);
-        var handler = new OpenLayers.Handler.Path(control, {});
+        var handler = new OpenLayers.Handler.Path(control, {},
+            {stopDown: true, stopUp: true});
         var activated = handler.activate();
+        // click on (150, 75)
         var evt = {xy: new OpenLayers.Pixel(150, 75), which: 1};
+        handler.mousemove(evt);
         handler.mousedown(evt);
         handler.mouseup(evt);
-        var evt = {xy: new OpenLayers.Pixel(175, 100), which: 1};
+        // click on (175, 100)
+        evt = {xy: new OpenLayers.Pixel(175, 100), which: 1};
         handler.mousemove(evt);
         handler.mousedown(evt);
         handler.mouseup(evt);
-        t.ok(handler.line.geometry.getBounds().equals(new OpenLayers.Bounds(0,-35.15625,35.15625,0)), "Correct bounds"); 
-        var evt = {xy: new OpenLayers.Pixel(175, 100), which: 1};
+        t.ok(handler.line.geometry.getBounds().equals(
+                    new OpenLayers.Bounds(0,-35.15625,35.15625,0)),
+             "Correct bounds");
+        // mousedown on (175, 100)
+        evt = {xy: new OpenLayers.Pixel(175, 100), which: 1};
         handler.mousedown(evt);
-        var evt = {xy: new OpenLayers.Pixel(125, 100), which: 1};
+        // mousemove to (125, 100)
+        evt = {xy: new OpenLayers.Pixel(125, 100), which: 1};
         handler.mousemove(evt);
-        t.ok(!handler.line.geometry.getBounds().equals(new OpenLayers.Bounds(0,-35.15625,35.15625,0)), "Correct bounds after dragging without letting go. (Came out as "+handler.line.geometry.getBounds().toBBOX() + ".)"); 
+        // test that the bounds have changed
+        t.ok(!handler.line.geometry.getBounds().equals(
+                 new OpenLayers.Bounds(0,-35.15625,35.15625,0)),
+             "Correct bounds after dragging without letting go. " +
+             "(Came out as " + handler.line.geometry.getBounds().toBBOX() +
+             ".)");
         map.destroy();     
     }     
 
     function test_callbacks(t) {
-        t.plan(15);
+        t.plan(45);
         var map = new OpenLayers.Map("map", {
             resolutions: [1]
         });
@@ -79,74 +127,347 @@
             isBaseLayer: true
         });
         map.addLayer(layer);
-        var control = new OpenLayers.Control({
-        });
-        var log = {};
+        var control = new OpenLayers.Control({});
+        var logs = [], log;
         var handler = new OpenLayers.Handler.Path(control, {
             create: function() {
-                log.type = "create",
-                log.args = arguments
+                logs.push({type: "create", args: arguments});
             },
+            point: function() {
+                logs.push({type: "point", args: arguments});
+            },
             modify: function() {
-                log.type = "modify",
-                log.args = arguments
+                logs.push({type: "modify", args: arguments});
             },
             done: function() {
-                log.type = "done",
-                log.args = arguments
+                logs.push({type: "done", args: arguments});
             },
             cancel: function() {
-                log.type = "cancel",
-                log.args = arguments
+                logs.push({type: "cancel", args: arguments});
             }
         });
         control.handler = handler;
         map.addControl(control);
         map.setCenter(new OpenLayers.LonLat(0, 0), 0);
         
-        // mock up feature drawing
+        // create line
         handler.activate();
-        handler.mousedown({type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
-        t.eq(log.type, "create", "[mousedown] create called");
-        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-150, 75), "[mousedown] correct vertex");
-        t.ok(log.args[1] === handler.line, "[mousedown] correct sketch feature");
+        t.eq(logs.length, 1, "[activate] called back");
+        log = logs.shift();
+        t.eq(log.type, "create", "[activate] create called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-200, 125),
+                  "[activate] correct point");
+        t.ok(log.args[1] == handler.line,
+             "[activate] correct feature");
+        // mouse move
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        t.eq(logs.length, 1, "[mousemove] called back");
+        log = logs.shift();
+        t.eq(log.type, "modify", "[mousemove] modify called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-150, 75),
+                  "[mousemove] correct point");
+        t.ok(log.args[1] === handler.line,
+             "[mousemove] correct feature");
+        // mouse down
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
+        t.eq(logs.length, 1, "[mousedown] called back");
+        log = logs.shift();
+        t.eq(log.type, "modify", "[mousedown] modify called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-150, 75),
+                  "[mousedown] correct point");
+        t.ok(log.args[1] === handler.line,
+             "[mousedown] correct feature");
+        // mouse up
         handler.mouseup({type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
+        t.eq(logs.length, 2, "[mouseup] called back twice");
+        log = logs.shift();
+        t.eq(log.type, "point", "[mouseup] point called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-150, 75),
+                  "[mouseup] correct point");
+        t.geom_eq(log.args[1],
+                  new OpenLayers.Geometry.LineString([
+                      new OpenLayers.Geometry.Point(-150, 75),
+                      new OpenLayers.Geometry.Point(-150, 75)
+                  ]), "[mouseup] correct line");
+        log = logs.shift();
         t.eq(log.type, "modify", "[mouseup] modify called");
-        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-150, 75), "[mouseup] correct vertex");
-        t.ok(log.args[1] === handler.line, "[mouseup] correct sketch feature");
-        handler.mousemove({type: "mousemove", xy: new OpenLayers.Pixel(1, 1)});
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-150, 75),
+                  "[mouseup] correct point");
+        t.ok(log.args[1] == handler.line,
+             "[mouseup] correct feature");
+        // mouse move
+        handler.mousemove({type: "mousemove",
+                           xy: new OpenLayers.Pixel(1, 1)});
+        t.eq(logs.length, 1, "[mousemove] called back");
+        log = logs.shift();
         t.eq(log.type, "modify", "[mousemove] modify called");
-        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-149, 74), "[mousemove] correct vertex");
-        t.ok(log.args[1] === handler.line, "[mousemove] correct sketch feature");
-        handler.mousemove({type: "mousemove", xy: new OpenLayers.Pixel(10, 10)});
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-149, 74),
+                  "[mousemove] correct point");
+        t.ok(log.args[1] === handler.line,
+             "[mousemove] correct feature");
+        // mouse move
+        handler.mousemove({type: "mousemove",
+                           xy: new OpenLayers.Pixel(10, 10)});
+        t.eq(logs.length, 1, "[mousemove] called back");
+        log = logs.shift();
         t.eq(log.type, "modify", "[mousemove] modify called");
-        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-140, 65), "[mousemove] correct vertex");
-        t.ok(log.args[1] === handler.line, "[mousemove] correct sketch feature");
-        handler.mousedown({type: "mousedown", xy: new OpenLayers.Pixel(10, 10)});
-        handler.mouseup({type: "mouseup", xy: new OpenLayers.Pixel(10, 10)});
-        handler.mousedown({type: "mousedown", xy: new OpenLayers.Pixel(10, 10)});
-        handler.mouseup({type: "mouseup", xy: new OpenLayers.Pixel(10, 10)});
-        handler.dblclick({type: "dblclick", xy: new OpenLayers.Pixel(10, 10)});
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-140, 65),
+                  "[mousemove] correct point");
+        t.ok(log.args[1] === handler.line,
+             "[mousemove] correct feature");
+        // mouse down
+        handler.mousedown({type: "mousedown",
+                           xy: new OpenLayers.Pixel(10, 10)});
+        t.eq(logs.length, 1, "[mousedown] called back");
+        log = logs.shift();
+        t.eq(log.type, "modify", "[mousedown] modify called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-140, 65),
+                  "[mousedown] correct point");
+        t.ok(log.args[1] === handler.line,
+             "[mousedown] correct feature");
+        // mouse up ("point", "modify")
+        handler.mouseup({type: "mouseup",
+                         xy: new OpenLayers.Pixel(10, 10)});
+        t.eq(logs.length, 2, "[mouseup] called back twice");
+        log = logs.shift();
+        log = logs.shift();
+        // mouse down
+        handler.mousedown({type: "mousedown",
+                           xy: new OpenLayers.Pixel(10, 10)});
+        t.eq(logs.length, 0, "[mousedown] called back");
+        // mouse up
+        handler.mouseup({type: "mouseup",
+                         xy: new OpenLayers.Pixel(10, 10)});
+        t.eq(logs.length, 0, "[mouseup] not called back");
+        // double click
+        handler.dblclick({type: "dblclick",
+                          xy: new OpenLayers.Pixel(10, 10)});
+        t.eq(logs.length, 2, "[dblclick] called back twice");
+        log = logs.shift();
         t.eq(log.type, "done", "[dblclick] done called");
-        t.geom_eq(
-            log.args[0],
+        t.geom_eq(log.args[0],
             new OpenLayers.Geometry.LineString([
                 new OpenLayers.Geometry.Point(-150, 75),
                 new OpenLayers.Geometry.Point(-140, 65)
             ]),
             "[dblclick] correct linestring"
         );
-        
-        // mock up sketch cancel
-        handler.mousedown({type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
-        handler.mouseup({type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
-        handler.mousemove({type: "mousemove", xy: new OpenLayers.Pixel(1, 1)});
-        handler.deactivate();
-        t.eq(log.type, "cancel", "[deactivate while drawing] cancel called");
-        
+        log = logs.shift();
+        t.eq(log.type, "create", "[dblclick] create called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-200, 125),
+                  "[dblclick] correct point");
+        t.ok(log.args[1] == handler.line,
+             "[dblclick] correct feature");
+        // cancel
+        handler.cancel();
+        t.eq(logs.length, 2, "[cancel] called back");
+        log = logs.shift();
+        t.eq(log.type, "cancel", "[cancel] canced called");
+        t.geom_eq(log.args[0],
+            new OpenLayers.Geometry.LineString([
+                new OpenLayers.Geometry.Point(-200, 125)
+            ]),
+            "[cancel] correct linestring"
+        );
+        log = logs.shift();
+        t.eq(log.type, "create", "[cancel] create called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-200, 125),
+                  "[cancel] correct point");
+ 
         map.destroy();
-    }        
+    }
 
+    function test_toggle_freehand(t) {
+        t.plan(2);
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
+        var control = new OpenLayers.Control({});
+        var handler = new OpenLayers.Handler.Path(control, {
+            done: function(g) {
+                log++;
+            }
+        }, {persist: true});
+        control.handler = handler;
+        map.addControl(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+
+        handler.activate();
+
+        log = 0;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(2, 2), shiftKey: true});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0), shiftKey: true});
+        t.eq(log, 1, "feature drawn when shift pressed on mousedown");
+
+        log = 0;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0), shiftKey: false});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(2, 2), shiftKey: true});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0), shiftKey: true});
+        t.eq(log, 0, "feature not drawn when shift not pressed on mousedown");
+    }
+
+    function test_persist(t) {
+        t.plan(4);
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
+        var control = new OpenLayers.Control({});
+        var handler = new OpenLayers.Handler.Path(control, {});
+        control.handler = handler;
+        map.addControl(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+
+        handler.activate();
+
+        handler.persist = false;
+        var feature1 = handler.line;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1)});
+        handler.dblclick(
+            {type: "dblclick", xy: new OpenLayers.Pixel(1, 1)});
+        t.ok(feature1.layer == null, "a) feature1 destroyed");
+
+        handler.persist = true;
+        var feature2 = handler.line;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1)});
+        handler.dblclick(
+            {type: "dblclick", xy: new OpenLayers.Pixel(1, 1)});
+        t.ok(feature2.layer != null, "b) feature2 not destroyed");
+
+        var feature3 = handler.line;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1)});
+        handler.dblclick(
+            {type: "dblclick", xy: new OpenLayers.Pixel(1, 1)});
+        t.ok(feature3.layer != null, "c) feature3 not destroyed");
+        t.ok(feature2.layer == null, "c) feature2 destroyed");
+
+        map.destroy();
+    }
+
+    function test_persist_freehand(t) {
+        t.plan(6);
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
+        var control = new OpenLayers.Control({});
+        var handler = new OpenLayers.Handler.Path(control, {});
+        control.handler = handler;
+        map.addControl(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+
+        handler.activate();
+
+        handler.persist = false;
+        var feature1 = handler.line;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(2, 2), shiftKey: true});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0), shiftKey: true});
+        t.ok(feature1.layer == null, "a) feature1 destroyed");
+
+        handler.persist = true;
+        feature2 = handler.line;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(2, 2), shiftKey: true});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0), shiftKey: true});
+        t.ok(feature2.layer != null, "b) feature2 not destroyed");
+
+        feature3 = handler.line;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(2, 2), shiftKey: true});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0), shiftKey: true});
+        t.ok(feature3.layer != null, "c) feature3 not destroyed");
+        t.ok(feature2.layer == null, "c) feature2 destroyed");
+
+        feature4 = handler.line;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0), shiftKey: false});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(2, 2), shiftKey: true});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0), shiftKey: true});
+        t.ok(feature4.layer != null, "d) feature4 not destroyed");
+        t.ok(feature3.layer == null, "c) feature3 destroyed");
+
+        map.destroy();
+    }
+
     function test_Handler_Path_destroy(t) {
         t.plan(6);
         var map = new OpenLayers.Map('map');
@@ -175,9 +496,251 @@
              "handler.line is null after destroy");
         map.destroy();     
     }
-    
 
+    //
+    // Sequence tests
+    // 
+    // Sequence tests basically involve executing a sequence of events
+    // and testing the resulting geometry.
+    //
+    // Below are tests for various drawing sequences. Tests can be
+    // added here each a non-working sequence is found.
+    //
 
+    // stopDown:true, stopUp:true
+    // a) click on (0, 0)
+    // b) mousedown on (0.5, 0.5)
+    // c) mouseup on (1, 1)
+    // d) dblclick on (10, 10)
+    function test_sequence1(t) {
+        t.plan(1);
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
+        var control = new OpenLayers.Control({});
+        var handler = new OpenLayers.Handler.Path(control,
+            {done: function(g) { log.geometry = g; }},
+            {stopDown: true, stopUp: true}
+        );
+        control.handler = handler;
+        map.addControl(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+
+        handler.activate();
+        log = {};
+
+        // a) click on (0, 0)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
+        // b) mousedown on (0.5, 0.5)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0.5, 0.5)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0.5, 0.5)});
+        // c) mouseup on (1, 1)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(1, 1)});
+        // d) dblclick on (10, 10)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(10, 10)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(10, 10)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(10, 10)});
+        handler.dblclick(
+            {type: "dblclick", xy: new OpenLayers.Pixel(10, 10)});
+        t.geom_eq(log.geometry,
+            new OpenLayers.Geometry.LineString([
+                new OpenLayers.Geometry.Point(-150, 75), // (0, 0)
+                new OpenLayers.Geometry.Point(-140, 65)  // (10, 10)
+            ]), "geometry is correct");
+    }
+
+    // stopDown:false, stopUp:false
+    // a) click on (0, 0)
+    // b) mousedown on (0.5, 0.5)
+    // c) mouseup on (1, 1)
+    // d) dblclick on (10, 10)
+    function test_sequence2(t) {
+        t.plan(1);
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
+        var control = new OpenLayers.Control({});
+        var handler = new OpenLayers.Handler.Path(control,
+            {done: function(g) { log.geometry = g; }},
+            {stopDown: false, stopUp: false}
+        );
+        control.handler = handler;
+        map.addControl(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+
+        handler.activate();
+        log = {};
+
+        // a) click on (0, 0)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
+        // b) mousedown on (0.5, 0.5)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0.5, 0.5)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0.5, 0.5)});
+        // c) mouseup on (1, 1)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(1, 1)});
+        // d) dblclick on (10, 10)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(10, 10)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(10, 10)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(10, 10)});
+        handler.dblclick(
+            {type: "dblclick", xy: new OpenLayers.Pixel(10, 10)});
+        t.geom_eq(log.geometry,
+            new OpenLayers.Geometry.LineString([
+                new OpenLayers.Geometry.Point(-150, 75), // (0, 0)
+                new OpenLayers.Geometry.Point(-140, 65)  // (10, 10)
+            ]), "geometry is correct");
+    }
+
+    // a) click
+    // b) dblclick
+    // c) mousedown holding shift key
+    // d) mousemove holding shift key
+    function test_sequence3(t) {
+        t.plan(1);
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
+        var control = new OpenLayers.Control({});
+        var handler = new OpenLayers.Handler.Path(control, {});
+        control.handler = handler;
+        map.addControl(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+
+        handler.activate();
+
+        // a) click on (0, 0)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
+        // b) click on (1, 1)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(1, 1)});
+        // c) click on (1, 1)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(1, 1)});
+        // d) mousemove to (10, 10)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(10, 10), shiftKey: true});
+        t.geom_eq(handler.line.geometry,
+            new OpenLayers.Geometry.LineString([
+                new OpenLayers.Geometry.Point(-150, 75), // (0, 0)
+                new OpenLayers.Geometry.Point(-149, 74), // (1, 1)
+                new OpenLayers.Geometry.Point(-140, 65)  // (10, 10)
+            ]), "geometry is correct after mousemove");
+    }
+
+    // a) click
+    // b) dblclick
+    // c) mousedown holding shift key
+    // d) mousemove holding shift key
+    function test_sequence4(t) {
+        t.plan(2);
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
+        var control = new OpenLayers.Control({});
+        var handler = new OpenLayers.Handler.Path(control,
+            {done: function(g) { log.geometry = g; }},
+            {stopDown: false, stopUp: false}
+        );
+        control.handler = handler;
+        map.addControl(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+
+        handler.activate();
+        log = {};
+
+        // a) click on (0, 0)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
+        // b) dblclick on (1, 1)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(1, 1)});
+        handler.dblclick(
+            {type: "dblclick", xy: new OpenLayers.Pixel(1, 1)});
+        t.geom_eq(log.geometry,
+            new OpenLayers.Geometry.LineString([
+                new OpenLayers.Geometry.Point(-150, 75), // (0, 0)
+                new OpenLayers.Geometry.Point(-149, 74)  // (1, 1)
+            ]), "geometry is correct after dblclick");
+        // c) mousedown holding shift key on (1, 1)
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(1, 1), shiftKey: true});
+        // d) mousemove holding shift key to (10, 10)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(10, 10), shiftKey: true});
+        t.geom_eq(handler.line.geometry,
+            new OpenLayers.Geometry.LineString([
+                new OpenLayers.Geometry.Point(-149, 74),  // (1, 1)
+                new OpenLayers.Geometry.Point(-140, 65)   // (10, 10)
+            ]), "geometry is correct after mousemove");
+    }
+
   </script>
 </head>
 <body>

Copied: sandbox/tschaub/canvas/tests/Handler/Pinch.html (from rev 11416, trunk/openlayers/tests/Handler/Pinch.html)
===================================================================
--- sandbox/tschaub/canvas/tests/Handler/Pinch.html	                        (rev 0)
+++ sandbox/tschaub/canvas/tests/Handler/Pinch.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,264 @@
+<html>
+<head>
+  <script src="../OLLoader.js"></script>
+  <script type="text/javascript">
+    function test_constructor(t) {
+        t.plan(3);
+        var control = new OpenLayers.Control();
+        control.id = Math.random();
+        var callbacks = {foo: "bar"};
+        var options = {bar: "foo"};
+
+        var oldInit = OpenLayers.Handler.prototype.initialize;
+
+        OpenLayers.Handler.prototype.initialize = function(con, call, opt) {
+            t.eq(con.id, control.id,
+                 "constructor calls parent with the correct control");
+            t.eq(call, callbacks,
+                 "constructor calls parent with the correct callbacks");
+            t.eq(opt, options,
+                 "constructor calls parent with the correct options");
+        };
+        var handler = new OpenLayers.Handler.Pinch(control, callbacks, options);
+
+        OpenLayers.Handler.prototype.initialize = oldInit;
+    }
+
+    function test_activate(t) {
+        t.plan(3);
+        var map = new OpenLayers.Map('map');
+        var control = new OpenLayers.Control();
+        map.addControl(control);
+        var handler = new OpenLayers.Handler.Pinch(control);
+        handler.active = true;
+        var activated = handler.activate();
+        t.ok(!activated,
+             "activate returns false if the handler was already active");
+        handler.active = false;
+        handler.pinching = true;
+        activated = handler.activate();
+        t.ok(activated,
+             "activate returns true if the handler was not already active");
+        t.ok(!handler.pinching,
+             "activate sets pinching to false");
+
+    }
+
+    function test_events(t) {
+        // each handled event should be activated twice when handler is
+        // activated, so:
+        // 27 = 4tests * 2*3events + 1tests * 3events
+        t.plan(27);
+
+        var map = new OpenLayers.Map('map');
+        var control = new OpenLayers.Control();
+        map.addControl(control);
+        var handler = new OpenLayers.Handler.Pinch(control);
+
+        // list below events that should be handled (events) and those
+        // that should not be handled (nonevents) by the handler
+        var events = ["touchend", "touchmove", "touchstart"];
+        var nonevents = ["mousedown", "mouseup", "mousemove", "mouseout",
+        "click", "dblclick", "resize", "focus", "blur"];
+        map.events.registerPriority = function(type, obj, func) {
+                // this is one of the mock handler methods
+                t.eq(OpenLayers.Util.indexOf(nonevents, type), -1,
+                     "registered method is not one of the events " +
+                     "that should not be handled: " + type);
+                t.ok(OpenLayers.Util.indexOf(events, type) > -1,
+                     "activate calls registerPriority with browser event: " + type);
+                t.eq(typeof func, "function",
+                     "activate calls registerPriority with a function");
+                t.eq(obj["CLASS_NAME"], "OpenLayers.Handler.Pinch",
+                     "activate calls registerPriority with the handler");
+        };
+        handler.activate();
+        handler.deactivate();
+
+        // set browser event like properties on the handler
+        for(var i=0; i<events.length; ++i) {
+            setMethod(events[i]);
+        }
+        function setMethod(key) {
+            handler[key] = function() {return key;};
+        }
+
+        map.events.registerPriority = function(type, obj, func) {
+            var r = func();
+            if(typeof r == "string") {
+                t.eq(r, type,
+                     "activate calls registerPriority with the correct method");
+            }
+        }
+        handler.activate();
+
+    }
+
+    function test_callbacks(t) {
+        t.plan(23);
+
+        var map = new OpenLayers.Map('map', {controls: []});
+
+        var control = new OpenLayers.Control();
+        map.addControl(control);
+
+        // set fake values for touches
+        var testEvents = {
+            start: {
+                type: 'start',
+                touches: [{
+                    clientX: 100,
+                    clientY: 0
+                }, {
+                    clientX: 0,
+                    clientY: 0
+                }]
+            },
+            move: {
+                type: 'move',
+                touches: [{
+                    clientX: 100,
+                    clientY: 0
+                }, {
+                    clientX: 20,
+                    clientY: 0
+                }]
+            },
+            done: {
+                type: 'done',
+                touches: []
+            }
+        };
+        
+        // set callback methods
+        var customCb = OpenLayers.Function.False;
+        var cb = function(evt) {
+            var tch = testEvents[evt.type].touches;
+            t.ok(evt.touches[0].clientX == tch[0].clientX &&
+                evt.touches[0].clientY == tch[0].clientY,
+                "touchstart sets first touch position correctly in evt");
+            t.ok(evt.touches[1].clientX == tch[1].clientX &&
+                evt.touches[1].clientY == tch[1].clientY,
+                "touchstart sets second touch position correctly in evt");
+            t.eq(handler.start.distance, 100, "start distance is " +
+                "always the same");
+            customCb.apply(this, arguments);
+        }
+        var callbacks = {
+            start: cb,
+            move: cb,
+            done: customCb
+        };
+
+        var handler = new OpenLayers.Handler.Pinch(control, callbacks);
+        handler.activate();
+
+        var old_isMultiTouch = OpenLayers.Event.isMultiTouch;
+        var old_stop = OpenLayers.Event.stop;
+        
+        // test single touch
+        OpenLayers.Event.isMultiTouch = function() {
+            return false;
+        }
+        handler.started = true;
+        handler.start = {
+            distance: 100,
+            delta: 0,
+            scale: 1
+        };
+        handler.last = {
+            distance: 150,
+            delta: 10,
+            scale: 1.5
+        };
+        map.events.triggerEvent("touchstart", testEvents.start);
+        t.ok(!handler.started, "1) touchstart (singletouch) sets started to false");
+        t.eq(handler.start, null, "1) touchstart (singletouch) sets start to null");
+        t.eq(handler.last, null, "1) touchstart (singletouch) sets last to null");
+
+        OpenLayers.Event.stop = function(evt, allowDefault) {
+            if(allowDefault) {
+                t.fail(
+                    "touchstart is prevented from falling to other elements");
+            }
+        }
+        OpenLayers.Event.isMultiTouch = function(evt) {
+            var res = old_isMultiTouch(evt);
+            t.ok(res, "fake event is a mutitouch touch event");
+            return res;
+        }
+        customCb = function(evt, pinchdata) {
+            t.eq(pinchdata.distance, 100, "2) calculated distance is correct");
+            t.eq(pinchdata.delta, 0, "2) calculated delta is correct");
+            t.eq(pinchdata.scale, 1, "2) calculated scale is correct");
+        }
+        map.events.triggerEvent("touchstart", testEvents.start);
+        t.ok(handler.started, "2) touchstart sets the started flag to true");
+        t.ok(!handler.pinching, "2) touchstart sets the pinching flag to false");
+
+        customCb = function(evt, pinchdata) {
+            t.eq(pinchdata.distance, 80, "3) calculated distance is correct");
+            t.eq(pinchdata.delta, 20, "3) calculated delta is correct");
+            t.eq(pinchdata.scale, 0.8, "3) calculated scale is correct");
+        }
+        map.events.triggerEvent("touchmove", testEvents.move);
+        t.ok(handler.started, "3) started flag still set to true");
+        t.ok(handler.pinching, "3) touchmove sets the pinching flag to true");
+
+
+        customCb = function(evt, first, last) {
+            t.eq(first.distance, 100, "4) calculated distance is correct");
+            t.eq(first.delta, 0, "4) calculated delta is correct");
+            t.eq(first.scale, 1, "4) calculated scale is correct");
+            t.eq(last.distance, 80, "4) calculated distance is correct");
+            t.eq(last.delta, 20, "4) calculated delta is correct");
+            t.eq(last.scale, 0.8, "4) calculated scale is correct");
+        }
+        map.events.triggerEvent("touchend", testEvents.done);
+        t.ok(!handler.started, "4) started flag is set to false");
+        t.ok(!handler.pinching, "4) touchdone sets the pinching flag to false");
+
+        OpenLayers.Event.stop = old_stop;
+        OpenLayers.Event.isMultiTouch = old_isMultiTouch;
+
+        // test move or done before start
+        customCb = function(evt) {
+            t.fail("should not pass here")
+        }
+        map.events.triggerEvent("touchmove", testEvents.move);
+        map.events.triggerEvent("touchend", testEvents.end);
+
+    }
+
+    function test_deactivate(t) {
+        t.plan(6);
+        var map = new OpenLayers.Map('map');
+        var control = new OpenLayers.Control();
+        map.addControl(control);
+        var handler = new OpenLayers.Handler.Pinch(control);
+        handler.active = false;
+        var deactivated = handler.deactivate();
+        t.ok(!deactivated,
+             "deactivate returns false if the handler was not already active");
+        handler.active = true;
+        handler.pinching = true;
+        deactivated = handler.deactivate();
+        t.ok(deactivated,
+             "deactivate returns true if the handler was active already");
+        t.ok(!handler.started,
+             "deactivate sets started to false");
+        t.ok(!handler.pinching,
+             "deactivate sets pinching to false");
+        t.ok(handler.start == null,
+             "deactivate sets start to null");
+        t.ok(handler.last == null,
+             "deactivate sets start to null");
+    }
+
+
+  </script>
+</head>
+<body>
+    <div id="map" style="width: 300px; height: 150px;"/>
+</body>
+</html>

Modified: sandbox/tschaub/canvas/tests/Handler/Point.html
===================================================================
--- sandbox/tschaub/canvas/tests/Handler/Point.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Handler/Point.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     function test_Handler_Point_constructor(t) {
         t.plan(3);
@@ -25,11 +25,26 @@
     }
 
     function test_Handler_Point_activation(t) {
-        t.plan(3);
-        var map = new OpenLayers.Map('map');
+        t.plan(10);
+        var log = [];
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
         var control = new OpenLayers.Control();
+        var handler = new OpenLayers.Handler.Point(control, {
+            "create": function(g, f) {
+                log.push({geometry: g, feature: f});
+            }
+        });
+        control.handler = handler;
         map.addControl(control);
-        var handler = new OpenLayers.Handler.Point(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+
         handler.active = true;
         var activated = handler.activate();
         t.ok(!activated,
@@ -38,24 +53,52 @@
         activated = handler.activate();
         t.ok(activated,
              "activate returns true if the handler was not already active");
+        t.ok(handler.layer instanceof OpenLayers.Layer.Vector,
+             "activate creates a vector layer");
+        t.ok(handler.layer.map == map,
+             "activate adds the vector layer to the map");
+        t.ok(handler.point instanceof OpenLayers.Feature.Vector,
+             "activate creates a feature");
+        t.ok(handler.point.layer == handler.layer,
+             "activate adds the feature to the layer");
+        t.eq(log.length, 1,
+             "activate calls \"create\" once");
+        t.geom_eq(log[0].geometry, handler.point.geometry,
+                  "\"create\" called with expected geometry");
+        t.ok(log[0].feature == handler.point,
+             "\"create\" called with expected feature");
         activated = handler.deactivate();
         t.ok(activated,
              "deactivate returns true if the handler was active already");
+
+        map.destroy();
     }
 
     function test_Handler_Point_events(t) {
-        t.plan(29);
-        
-        var map = new OpenLayers.Map('map');
-        var control = {
-            map: map
-        };
-        var handler = new OpenLayers.Handler.Point(control);
+        t.plan(34);
+        var log = [];
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
+        var control = new OpenLayers.Control();
+        var handler = new OpenLayers.Handler.Point(control, {
+            "create": function(g, f) {
+                log.push({geometry: g, feature: f});
+            }
+        });
+        control.handler = handler;
+        map.addControl(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
 
         // list below events that should be handled (events) and those
         // that should not be handled (nonevents) by the handler
-        var events = ["click", "dblclick", "mousedown", "mouseup", "mousemove"];
-        var nonevents = ["mouseout", "resize", "focus", "blur"];
+        var events = ["click", "dblclick", "mousedown", "mouseup", "mousemove", "mouseout"];
+        var nonevents = ["resize", "focus", "blur"];
         map.events.registerPriority = function(type, obj, func) {
             var r = func();
             if(typeof r == "string") {
@@ -99,7 +142,7 @@
     }
     
     function test_callbacks(t) {
-        t.plan(10);
+        t.plan(28);
         var map = new OpenLayers.Map("map", {
             resolutions: [1]
         });
@@ -108,68 +151,189 @@
             isBaseLayer: true
         });
         map.addLayer(layer);
-        var control = new OpenLayers.Control({
-        });
-        var log = {};
+        var control = new OpenLayers.Control({});
+        var logs = [], log;
         var handler = new OpenLayers.Handler.Point(control, {
             create: function() {
-                log.type = "create",
-                log.args = arguments
+                logs.push({type: "create", args: arguments});
             },
             modify: function() {
-                log.type = "modify",
-                log.args = arguments
+                logs.push({type: "modify", args: arguments});
             },
             done: function() {
-                log.type = "done",
-                log.args = arguments
+                logs.push({type: "done", args: arguments});
             },
             cancel: function() {
-                log.type = "cancel",
-                log.args = arguments
+                logs.push({type: "cancel", args: arguments});
             }
         });
         control.handler = handler;
         map.addControl(control);
         map.setCenter(new OpenLayers.LonLat(0, 0), 0);
         
-        // mock up feature drawing
+        // create point
         handler.activate();
-        handler.mousedown({type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
-        t.eq(log.type, "create", "[mousedown] create called");
-        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-150, 75), "[mousedown] correct point");
-        t.geom_eq(log.args[1].geometry, new OpenLayers.Geometry.Point(-150, 75), "[mousedown] correct sketch feature");
-        handler.mousemove({type: "mousemove", xy: new OpenLayers.Pixel(1, 0)});
+        t.eq(logs.length, 1, "[activate] called back");
+        log = logs.shift();
+        t.eq(log.type, "create", "[activate] create called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-200, 125),
+                  "[activate] correct point");
+        // mouse down
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
+        t.eq(logs.length, 1, "[mousedown] called back");
+        log = logs.shift();
+        t.eq(log.type, "modify", "[mousedown] modify called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-150, 75),
+                  "[mousedown] correct point");
+        t.geom_eq(log.args[1].geometry,
+                  new OpenLayers.Geometry.Point(-150, 75),
+                  "[mousedown] correct feature");
+        // mouse move
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 0)});
+        t.eq(logs.length, 0, "[mousemove] not called back");
+        // mouse up (no finalize - we moved)
+        handler.mouseup({type: "mouseup", xy: new OpenLayers.Pixel(1, 0)});
+        t.eq(logs.length, 0, "[mouseup] not called back");
+        // mouse move
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(2, 0)});
+        t.eq(logs.length, 1, "[mousemove] called back");
+        log = logs.shift();
         t.eq(log.type, "modify", "[mousemove] modify called");
-        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-149, 75), "[mousemove] correct point");
-        t.geom_eq(log.args[1].geometry, new OpenLayers.Geometry.Point(-149, 75), "[mousemove] correct sketch feature");
-        handler.mouseup({type: "mouseup", xy: new OpenLayers.Pixel(1, 0)});
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-148, 75),
+                  "[mousemove] correct point");
+        t.geom_eq(log.args[1].geometry,
+                  new OpenLayers.Geometry.Point(-148, 75),
+                  "[mousemove] correct feature");
+        // mouse down
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(2, 0)});
+        t.eq(logs.length, 1, "[mousedown] called back");
+        log = logs.shift();
+        t.eq(log.type, "modify", "[mousedown] modify called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-148, 75),
+                  "[mousedown] correct point");
+        t.geom_eq(log.args[1].geometry,
+                  new OpenLayers.Geometry.Point(-148, 75),
+                  "[mousedown] correct feature");
+        // mouse up
+        handler.mouseup({type: "mouseup", xy: new OpenLayers.Pixel(2, 0)});
+        t.eq(logs.length, 2, "[mouseup] called back twice");
+        log = logs.shift();
         t.eq(log.type, "done", "[mouseup] done called");
-        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-149, 75), "[mouseup] correct point");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-148, 75),
+                  "[mouseup] correct point");
+        log = logs.shift();
+        t.eq(log.type, "create", "[mouseup] create called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-200, 125),
+                  "[activate] correct point");
+        // mouse up on same pixel
+        handler.mouseup({type: "mouseup", xy: new OpenLayers.Pixel(2, 0)});
+        t.eq(logs.length, 0, "[mouseup] not called back");
+        // cancel
+        handler.cancel();
+        t.eq(logs.length, 2, "[cancel] called back");
+        log = logs.shift();
+        t.eq(log.type, "cancel", "[cancel] canced called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-200, 125),
+                  "[cancel] correct point");
+        log = logs.shift();
+        t.eq(log.type, "create", "[cancel] create called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-200, 125),
+                  "[cancel] correct point");
 
-        // mock up feature drawing with a cancel
-        handler.mousedown({type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
-        handler.deactivate();
-        t.eq(log.type, "cancel", "[deactivate while drawing] cancel called");
-        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-150, 75), "[deactivate while drawing] correct point");
+        map.destroy();
+    }
+
+    function test_persist(t) {
+        t.plan(3);
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
+        var control = new OpenLayers.Control({});
+        var handler = new OpenLayers.Handler.Point(control, {});
+        control.handler = handler;
+        map.addControl(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
         
+        handler.activate();
+
+        handler.persist = false;
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
+        t.eq(handler.layer.features.length, 1,
+             "feature destroyed on mouseup when persist is false");
+
+        handler.persist = true;
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(1, 0)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(1, 0)});
+        t.eq(handler.layer.features.length, 2,
+             "feature not destroyed on mouseup when persist is true");
+        var feature = handler.layer.features[0];
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(2, 0)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(2, 0)});
+        t.ok(handler.layer.features[0] !== feature,
+             "persisted feature destroyed on next mouseup");
+
         map.destroy();
     }
 
 
     function test_Handler_Point_deactivation(t) {
-        t.plan(1);
-        var map = new OpenLayers.Map('map');
+        t.plan(5);
+        var log = [];
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
         var control = new OpenLayers.Control();
+        var handler = new OpenLayers.Handler.Point(control, {
+            "cancel": function(g) {
+                log.push({geometry: g});
+            }
+        });
+        control.handler = handler;
         map.addControl(control);
-             
-        var handler = new OpenLayers.Handler.Point(control, {foo: 'bar'});
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+
         handler.activate();
+        var _layer = handler.layer;
+        var _geometry = handler.point.geometry;
+        handler.deactivate();
+        t.eq(_layer.map, null,
+             "deactivates removes the layer from the map");
+        t.eq(handler.layer, null,
+             "deactivates sets its \"layer\" property to null");
+        t.eq(log.length, 1,
+             "deactivates calls \"cancel\" once");
+        t.ok(log[0].geometry.equals(_geometry),
+             "\"cancel\" called with expected geometry");
+
+        handler.activate();
         handler.layer.destroy();
         handler.deactivate();
         t.eq(handler.layer, null,
              "deactivate doesn't throw an error if layer was" +
              " previously destroyed");
+
+        map.destroy();
     }
 
     function test_Handler_Point_bounds(t) {
@@ -183,7 +347,7 @@
         var activated = handler.activate();
         var px = new OpenLayers.Pixel(150, 75);
         var evt = {xy: px, which: 1};
-        handler.mousedown(evt);
+        handler.mousemove(evt);
         var lonlat = map.getLonLatFromPixel(px);
         t.eq(handler.point.geometry.x, lonlat.lon, "X is correct"); 
         t.eq(handler.point.geometry.y, lonlat.lat, "Y is correct"); 
@@ -203,8 +367,6 @@
         var handler = new OpenLayers.Handler.Point(control, {foo: 'bar'});
 
         handler.activate();
-        var evt = {xy: new OpenLayers.Pixel(150, 75), which: 1};
-        handler.mousedown(evt);
 
         t.ok(handler.layer,
              "handler has a layer prior to destroy");

Modified: sandbox/tschaub/canvas/tests/Handler/Polygon.html
===================================================================
--- sandbox/tschaub/canvas/tests/Handler/Polygon.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Handler/Polygon.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     function test_Handler_Polygon_constructor(t) {
         t.plan(3);
@@ -25,12 +25,27 @@
     }
 
     function test_Handler_Polygon_activation(t) {
-        t.plan(3);
-        var map = new OpenLayers.Map('map');
+        t.plan(13);
+        var log = [];
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
         var control = new OpenLayers.Control();
+        var handler = new OpenLayers.Handler.Polygon(control, {
+            "create": function(g, f) {
+                log.push({geometry: g, feature: f});
+            }
+        });
+        control.handler = handler;
         map.addControl(control);
-        var handler = new OpenLayers.Handler.Polygon(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
         handler.active = true;
+
         var activated = handler.activate();
         t.ok(!activated,
              "activate returns false if the handler was already active");
@@ -38,41 +53,68 @@
         activated = handler.activate();
         t.ok(activated,
              "activate returns true if the handler was not already active");
+        t.ok(handler.layer instanceof OpenLayers.Layer.Vector,
+             "activate creates a vector layer");
+        t.ok(handler.layer.map == map,
+             "activate adds the vector layer to the map");
+        t.ok(handler.point instanceof OpenLayers.Feature.Vector,
+             "activate creates a point feature");
+        t.ok(handler.point.layer == handler.layer,
+             "activate adds the point feature to the layer");
+        t.ok(handler.line instanceof OpenLayers.Feature.Vector,
+             "activates creates a line feature");
+        t.ok(handler.polygon instanceof OpenLayers.Feature.Vector,
+             "acttivates creates a polygon feature");
+        t.ok(handler.polygon.layer == handler.layer,
+             "activate adds the polygin feature to the layer");
+        t.eq(log.length, 1,
+             "activate calls \"create\" once");
+        t.geom_eq(log[0].geometry, handler.point.geometry,
+                  "\"create\" called with expected geometry");
+        t.ok(log[0].feature == handler.polygon,
+             "\"create\" called with expected feature");
         activated = handler.deactivate();
         t.ok(activated,
              "deactivate returns true if the handler was active already");
-        map.destroy();     
+
+        map.destroy();
     }
 
-    function test_Handler_Polygon_bounds(t) {
+    function test_bounds_stopDown_true(t) {
         t.plan(2);
         var map = new OpenLayers.Map('map');
         map.addLayer(new OpenLayers.Layer.WMS("", "", {}));
         map.zoomToMaxExtent();
         var control = new OpenLayers.Control();
         map.addControl(control);
-        var handler = new OpenLayers.Handler.Polygon(control, {});
+        var handler = new OpenLayers.Handler.Polygon(control, {},
+                {stopDown: true, stopUp: true});
         var activated = handler.activate();
-
+        // click on (150, 75)
         var evt = {xy: new OpenLayers.Pixel(150, 75), which: 1};
+        handler.mousemove(evt);
         handler.mousedown(evt);
         handler.mouseup(evt);
-        var evt = {xy: new OpenLayers.Pixel(175, 100), which: 1};
+        // click on (175, 100)
+        evt = {xy: new OpenLayers.Pixel(175, 100), which: 1};
         handler.mousemove(evt);
         handler.mousedown(evt);
         handler.mouseup(evt);
         t.ok(handler.line.geometry.getBounds().equals(new OpenLayers.Bounds(0,-35.15625,35.15625,0)), "Correct bounds");
-        var evt = {xy: new OpenLayers.Pixel(175, 100), which: 1};
+        // mousedown on (175, 100)
+        evt = {xy: new OpenLayers.Pixel(175, 100), which: 1};
         handler.mousedown(evt);
-        var evt = {xy: new OpenLayers.Pixel(125, 100), which: 1};
+        // mousemove to (125, 100)
+        evt = {xy: new OpenLayers.Pixel(125, 100), which: 1};
         handler.mousemove(evt);
+        // test that the bounds have changed
         t.ok(!handler.polygon.geometry.getBounds().equals(new OpenLayers.Bounds(0,-35.15625,35.15625,0)),
              "Correct bounds after dragging without letting go. (Came out as "+handler.line.geometry.getBounds().toBBOX() + ".)");
         map.destroy();     
     }
 
     function test_callbacks(t) {
-        t.plan(15);
+        t.plan(45);
         var map = new OpenLayers.Map("map", {
             resolutions: [1]
         });
@@ -83,57 +125,141 @@
         map.addLayer(layer);
         var control = new OpenLayers.Control({
         });
-        var log = {};
+        var logs = [], log;
         var handler = new OpenLayers.Handler.Polygon(control, {
             create: function() {
-                log.type = "create",
-                log.args = arguments
+                logs.push({type: "create", args: arguments});
             },
+            point: function() {
+                logs.push({type: "point", args: arguments});
+            },
             modify: function() {
-                log.type = "modify",
-                log.args = arguments
+                logs.push({type: "modify", args: arguments});
             },
             done: function() {
-                log.type = "done",
-                log.args = arguments
+                logs.push({type: "done", args: arguments});
             },
             cancel: function() {
-                log.type = "cancel",
-                log.args = arguments
+                logs.push({type: "cancel", args: arguments});
             }
         });
         control.handler = handler;
         map.addControl(control);
         map.setCenter(new OpenLayers.LonLat(0, 0), 0);
         
-        // mock up feature drawing
+        // create polygon
         handler.activate();
-        // click at 0, 0
-        handler.mousedown({type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
-        t.eq(log.type, "create", "[mousedown] create called");
-        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-150, 75), "[mousedown] correct vertex");
-        t.ok(log.args[1] === handler.polygon, "[mousedown] correct sketch feature");
-        handler.mouseup({type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
+        handler.activate();
+        t.eq(logs.length, 1, "[activate] called back");
+        log = logs.shift();
+        t.eq(log.type, "create", "[activate] create called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-200, 125),
+                  "[activate] correct point");
+        t.ok(log.args[1] == handler.polygon,
+             "[activate] correct feature");
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        t.eq(logs.length, 1, "[mousemove] called back");
+        log = logs.shift();
+        t.eq(log.type, "modify", "[mousemove] modify called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-150, 75),
+                  "[mousemove] correct point");
+        t.ok(log.args[1] === handler.polygon,
+             "[mousemove] correct feature");
+        // mouse down
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
+        t.eq(logs.length, 1, "[mousedown] called back");
+        log = logs.shift();
+        t.eq(log.type, "modify", "[mousedown] modify called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-150, 75),
+                  "[mousedown] correct point");
+        t.ok(log.args[1] === handler.polygon,
+             "[mousedown] correct feature");
+        // mouse up
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
+        t.eq(logs.length, 2, "[mouseup] called back twice");
+        log = logs.shift();
+        t.eq(log.type, "point", "[mouseup] point called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-150, 75),
+                  "[mouseup] correct point");
+        var geom = new OpenLayers.Geometry.Polygon([
+            new OpenLayers.Geometry.LinearRing([
+                new OpenLayers.Geometry.Point(-150, 75)
+            ])
+        ]);
+        geom.components[0].addComponent(
+            new OpenLayers.Geometry.Point(-150, 75),
+            geom.components[0].components.length
+        );
+        t.geom_eq(log.args[1], geom, "[mouseup] correct polygon");
+        log = logs.shift();
         t.eq(log.type, "modify", "[mouseup] modify called");
-        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-150, 75), "[mouseup] correct vertex");
-        t.ok(log.args[1] === handler.polygon, "[mouseup] correct sketch feature");
-        // move to 10, 10 and click
-        handler.mousemove({type: "mousemove", xy: new OpenLayers.Pixel(10, 10)});
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-150, 75),
+                  "[mouseup] correct point");
+        t.ok(log.args[1] == handler.polygon,
+             "[mouseup] correct feature");
+        // mouse move
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(10, 10)});
+        t.eq(logs.length, 1, "[mousemove] called back");
+        log = logs.shift();
         t.eq(log.type, "modify", "[mousemove] modify called");
-        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-140, 65), "[mousemove] correct vertex");
-        t.ok(log.args[1] === handler.polygon, "[mouseup] correct sketch feature");
-        handler.mousedown({type: "mousedown", xy: new OpenLayers.Pixel(10, 10)});
-        handler.mouseup({type: "mouseup", xy: new OpenLayers.Pixel(10, 10)});
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-140, 65),
+                  "[mousemove] correct point");
+        t.ok(log.args[1] === handler.polygon,
+             "[mousemove] correct feature");
+        // mouse down
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(10, 10)});
+        t.eq(logs.length, 1, "[mousedown] called back");
+        log = logs.shift();
+        t.eq(log.type, "modify", "[mousedown] modify called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-140, 65),
+                  "[mousedown] correct point");
+        t.ok(log.args[1] === handler.polygon,
+             "[mousedown] correct feature");
+        // mouse up
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(10, 10)});
+        log = logs.shift();
+        log = logs.shift();
         // move to 0, 10 and double click
-        handler.mousemove({type: "mousemove", xy: new OpenLayers.Pixel(0, 10)});
+        // mouse move
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 10)});
+        t.eq(logs.length, 1, "[mousemove] called back");
+        log = logs.shift();
         t.eq(log.type, "modify", "[mousemove] modify called");
-        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-150, 65), "[mousemove] correct vertex");
-        t.ok(log.args[1] === handler.polygon, "[mouseup] correct sketch feature");
-        handler.mousedown({type: "mousedown", xy: new OpenLayers.Pixel(0, 10)});
-        handler.mouseup({type: "mouseup", xy: new OpenLayers.Pixel(0, 10)});
-        handler.mousedown({type: "mousedown", xy: new OpenLayers.Pixel(0, 10)});
-        handler.mouseup({type: "mouseup", xy: new OpenLayers.Pixel(0, 10)});
-        handler.dblclick({type: "dblclick", xy: new OpenLayers.Pixel(0, 10)});
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-150, 65),
+                  "[mousemove] correct point");
+        t.ok(log.args[1] === handler.polygon,
+             "[mousemove] correct feature");
+        // mouse down
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 10)});
+        t.eq(logs.length, 1, "[mousedown] not called back");
+        log = logs.shift();
+        // mouse up
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 10)});
+        t.eq(logs.length, 2, "[mouseup] called back");
+        log = logs.shift();
+        log = logs.shift();
+        // mouse down
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 10)});
+        t.eq(logs.length, 0, "[mousedown] not called back");
+        // mouse up
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 10)});
+        t.eq(logs.length, 0, "[mouseup] not called back");
+        // dblclick
+        handler.dblclick(
+            {type: "dblclick", xy: new OpenLayers.Pixel(0, 10)});
+        t.eq(logs.length, 2, "[dblclick] called back twice");
+        log = logs.shift();
         t.eq(log.type, "done", "[dblclick] done called");
         t.geom_eq(
             log.args[0],
@@ -147,14 +273,413 @@
             ]),
             "[dblclick] correct polygon"
         );
+        log = logs.shift();
+        t.eq(log.type, "create", "[dblclick] create called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-200, 125),
+                  "[dblclick] correct point");
+        t.ok(log.args[1] == handler.polygon,
+             "[dblclick] correct feature");
+        // cancel
+        handler.cancel();
+        t.eq(logs.length, 2, "[cancel] called back");
+        log = logs.shift();
+        t.eq(log.type, "cancel", "[cancel] canced called");
+        log = logs.shift();
+        t.eq(log.type, "create", "[cancel] create called");
+        t.geom_eq(log.args[0], new OpenLayers.Geometry.Point(-200, 125),
+                  "[cancel] correct point");
+
+        map.destroy();
+    }        
+
+    function test_toggle_freehand(t) {
+        t.plan(2);
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
+        var control = new OpenLayers.Control({});
+        var handler = new OpenLayers.Handler.Polygon(control, {
+            done: function(g) {
+                log++;
+            }
+        }, {persist: true});
+        control.handler = handler;
+        map.addControl(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+
+        handler.activate();
+
+        log = 0;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(2, 2), shiftKey: true});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0), shiftKey: true});
+        t.eq(log, 1, "feature drawn when shift pressed on mousedown");
+
+        log = 0;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0), shiftKey: false});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(2, 2), shiftKey: true});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0), shiftKey: true});
+        t.eq(log, 0, "feature not drawn when shift not pressed on mousedown");
+    }
+
+    function test_persist(t) {
+        t.plan(4);
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
+        var control = new OpenLayers.Control({});
+        var handler = new OpenLayers.Handler.Polygon(control, {});
+        control.handler = handler;
+        map.addControl(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+
+        handler.activate();
+
+        handler.persist = false;
+        var feature1 = handler.polygon;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(2, 2)});
+        handler.dblclick(
+            {type: "dblclick", xy: new OpenLayers.Pixel(2, 2)});
+        t.ok(feature1.layer == null, "a) feature1 destroyed");
+
+        handler.persist = true;
+        var feature2 = handler.polygon;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(2, 2)});
+        handler.dblclick(
+            {type: "dblclick", xy: new OpenLayers.Pixel(2, 2)});
+        t.ok(feature2.layer != null, "b) feature2 not destroyed");
+
+        var feature3 = handler.polygon;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(2, 2)});
+        handler.dblclick(
+            {type: "dblclick", xy: new OpenLayers.Pixel(2, 2)});
+        t.ok(feature3.layer != null, "c) feature3 not destroyed");
+        t.ok(feature2.layer == null, "c) feature2 destroyed");
+
+        map.destroy();
+    }
+
+    function test_persist_freehand(t) {
+        t.plan(6);
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
+        var control = new OpenLayers.Control({});
+        var handler = new OpenLayers.Handler.Polygon(control, {});
+        control.handler = handler;
+        map.addControl(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+
+        handler.activate();
+
+        handler.persist = false;
+        var feature1 = handler.polygon;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(2, 2), shiftKey: true});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(2, 2), shiftKey: true});
+        t.ok(feature1.layer == null, "a) feature1 destroyed");
+
+        handler.persist = true;
+        var feature2 = handler.polygon;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(2, 2), shiftKey: true});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(2, 2), shiftKey: true});
+        t.ok(feature2.layer != null, "b) feature2 not destroyed");
+
+        var feature3 = handler.polygon;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(2, 2), shiftKey: true});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(2, 2), shiftKey: true});
+        t.ok(feature3.layer != null, "c) feature3 not destroyed");
+        t.ok(feature2.layer == null, "c) feature2 destroyed");
+
+        feature4 = handler.polygon;
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0), shiftKey: false});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1), shiftKey: true});
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(2, 2), shiftKey: true});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0), shiftKey: true});
+        t.ok(feature4.layer != null, "d) feature4 not destroyed");
+        t.ok(feature3.layer == null, "c) feature3 destroyed");
+
+        map.destroy();
+    }
+
+    function test_rings(t) {
+        t.plan(12);
+
+        var log = [];
+        var map = new OpenLayers.Map({
+            div: "map",
+            resolutions: [1],
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            layers: [
+                new OpenLayers.Layer.Vector(null, {
+                    isBaseLayer: true,
+                    eventListeners: {
+                        featureadded: function(event) {
+                            log.push(event);
+                        },
+                        sketchmodified: function(event) {
+                            log.push(event);
+                        },
+                        sketchcomplete: function(event) {
+                            log.push(event);
+                        }
+                    }
+                })
+            ],
+            center: new OpenLayers.LonLat(0, 0),
+            zoom: 0
+        });
         
-        // mock up sketch cancel
-        handler.mousedown({type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
-        handler.mouseup({type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
-        handler.mousemove({type: "mousemove", xy: new OpenLayers.Pixel(1, 1)});
-        handler.deactivate();
-        t.eq(log.type, "cancel", "[deactivate while drawing] cancel called");
+        // create control for drawing polygons with holes
+        var draw = new OpenLayers.Control.DrawFeature(
+            map.layers[0],
+            OpenLayers.Handler.Polygon,
+            {handlerOptions: {holeModifier: "altKey"}}
+        );
+        map.addControl(draw);
+        draw.activate();
         
+        var event;
+        function trigger(type, event) {
+            map.events.triggerEvent(type, OpenLayers.Util.extend({}, event));
+        }
+        
+        // a) draw a polygon
+        log = [];
+        // start at -9, 9
+        event = {xy: new OpenLayers.Pixel(-9, 9)};
+        trigger("mousemove", event);
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        // draw to -1, 9
+        event = {xy: new OpenLayers.Pixel(-1, 9)};
+        trigger("mousemove", event);
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        // draw to -1, 1
+        event = {xy: new OpenLayers.Pixel(-1, 1)};
+        trigger("mousemove", event);
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        // draw to -9, 1
+        event = {xy: new OpenLayers.Pixel(-9, 1)};
+        trigger("mousemove", event);
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        // finish
+        event = {xy: new OpenLayers.Pixel(-9, 1)};
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        trigger("dblclick", event);
+        
+        // make assertions
+        t.eq(log.length, 14, "a) correct number of events");
+        t.eq(log[log.length-1].type, "featureadded", "a) featureadded event last");
+        t.eq(log[log.length-1].feature.geometry.getArea(), 64, "a) correct polygon area");
+
+        // b) draw a hole
+        log = [];
+        // start at -6, 6
+        event = {xy: new OpenLayers.Pixel(-6, 6), altKey: true};
+        trigger("mousemove", event);
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        // draw to -3, 6
+        event = {xy: new OpenLayers.Pixel(-3, 6), altKey: true};
+        trigger("mousemove", event);
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        // draw to -3, 3
+        event = {xy: new OpenLayers.Pixel(-3, 3), altKey: true};
+        trigger("mousemove", event);
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        // draw to -6, 3
+        event = {xy: new OpenLayers.Pixel(-6, 3), altKey: true};
+        trigger("mousemove", event);
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        // finish
+        event = {xy: new OpenLayers.Pixel(-6, 3), altKey: true};
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        trigger("dblclick", event);
+        
+        // make assertions
+        t.eq(log.length, 13, "b) correct number of events");
+        t.eq(log[log.length-1].type, "sketchcomplete", "b) sketchcomplete event last");
+        t.eq(log[log.length-1].feature.geometry.getArea(), 55, "b) correct polygon area");
+        
+
+        // c) draw a polygon that overlaps the first
+        log = [];
+        // start at -2, 2
+        event = {xy: new OpenLayers.Pixel(-2, 2)};
+        trigger("mousemove", event);
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        // draw to 2, 2
+        event = {xy: new OpenLayers.Pixel(2, 2)};
+        trigger("mousemove", event);
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        // draw to 2, -2
+        event = {xy: new OpenLayers.Pixel(2, -2)};
+        trigger("mousemove", event);
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        // draw to -2, -2
+        event = {xy: new OpenLayers.Pixel(-2, -2)};
+        trigger("mousemove", event);
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        // finish
+        event = {xy: new OpenLayers.Pixel(-2, -2)};
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        trigger("dblclick", event);
+        
+        // make assertions
+        t.eq(log.length, 14, "c) correct number of events");
+        t.eq(log[log.length-1].type, "featureadded", "c) featureadded event last");
+        t.eq(log[log.length-1].feature.geometry.getArea(), 16, "c) correct polygon area");
+
+        // d) draw a hole that tries to go outside the exterior ring
+        log = [];
+        // start at -1, 1
+        event = {xy: new OpenLayers.Pixel(-1, 1), altKey: true};
+        trigger("mousemove", event);
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        // draw to 1, 1
+        event = {xy: new OpenLayers.Pixel(1, 1), altKey: true};
+        trigger("mousemove", event);
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        // try to draw to -8, 8 (ouside active polygon)
+        event = {xy: new OpenLayers.Pixel(-8, 8), altKey: true};
+        trigger("mousemove", event);
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        // draw to 1, -1
+        event = {xy: new OpenLayers.Pixel(1, -1), altKey: true};
+        trigger("mousemove", event);
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        // draw to -1, -1
+        event = {xy: new OpenLayers.Pixel(-1, -1), altKey: true};
+        trigger("mousemove", event);
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        // finish
+        event = {xy: new OpenLayers.Pixel(-1, 1), altKey: true};
+        trigger("mousedown", event);
+        trigger("mouseup", event);
+        trigger("dblclick", event);
+        
+        // make assertions
+        t.eq(log.length, 18, "d) correct number of events");
+        t.eq(log[log.length-1].type, "sketchcomplete", "d) sketchcomplete event last");
+        t.eq(log[log.length-1].feature.geometry.getArea(), 12, "d) correct polygon area");
+        
+        
         map.destroy();
     }        
 
@@ -191,8 +716,158 @@
         map.destroy();     
     }
 
+    //
+    // Sequence tests
+    // 
+    // Sequence tests basically involve executing a sequence of events
+    // and testing the resulting geometry.
+    //
+    // Below are tests for various drawing sequences. Tests can be
+    // added here each a non-working sequence is found.
+    //
 
+    // stopDown:true, stopUp:true
+    // a) click on (0, 0)
+    // b) mousedown on (0.5, 0.5)
+    // c) mouseup on (1, 1)
+    // d) click on (0, 10)
+    // e) dblclick on (10, 10)
+    function test_sequence1(t) {
+        t.plan(1);
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
+        var control = new OpenLayers.Control({});
+        var handler = new OpenLayers.Handler.Polygon(control,
+            {done: function(g) { log.geometry = g; }},
+            {stopDown: true, stopUp: true}
+        );
+        control.handler = handler;
+        map.addControl(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
 
+        handler.activate();
+        log = {};
+
+        // a) click on (0, 0)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
+        // b) mousedown on (0.5, 0.5)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0.5, 0.5)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0.5, 0.5)});
+        // c) mouseup on (1, 1)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(1, 1)});
+        // d) click on (0, 10)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 10)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 10)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 10)});
+        // e) dblclick on (10, 10)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(10, 10)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(10, 10)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(10, 10)});
+        handler.dblclick(
+            {type: "dblclick", xy: new OpenLayers.Pixel(10, 10)});
+        t.geom_eq(log.geometry,
+            new OpenLayers.Geometry.Polygon([
+                new OpenLayers.Geometry.LinearRing([
+                    new OpenLayers.Geometry.Point(-150, 75), // (0, 0)
+                    new OpenLayers.Geometry.Point(-150, 65), // (0, 10)
+                    new OpenLayers.Geometry.Point(-140, 65)  // (10, 10)
+                ])
+            ]), "geometry is correct");
+    }
+
+    // stopDown:false, stopUp:false
+    // a) click on (0, 0)
+    // b) mousedown on (0.5, 0.5)
+    // c) mouseup on (1, 1)
+    // d) click on (0, 10)
+    // e) dblclick on (10, 10)
+    function test_sequence2(t) {
+        t.plan(1);
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
+        var control = new OpenLayers.Control({});
+        var handler = new OpenLayers.Handler.Polygon(control,
+            {done: function(g) { log.geometry = g; }},
+            {stopDown: false, stopUp: false}
+        );
+        control.handler = handler;
+        map.addControl(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+
+        handler.activate();
+        log = {};
+
+        // a) click on (0, 0)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 0)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 0)});
+        // b) mousedown on (0.5, 0.5)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0.5, 0.5)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0.5, 0.5)});
+        // c) mouseup on (1, 1)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(1, 1)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(1, 1)});
+        // d) click on (0, 10)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(0, 10)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(0, 10)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(0, 10)});
+        // e) dblclick on (10, 10)
+        handler.mousemove(
+            {type: "mousemove", xy: new OpenLayers.Pixel(10, 10)});
+        handler.mousedown(
+            {type: "mousedown", xy: new OpenLayers.Pixel(10, 10)});
+        handler.mouseup(
+            {type: "mouseup", xy: new OpenLayers.Pixel(10, 10)});
+        handler.dblclick(
+            {type: "dblclick", xy: new OpenLayers.Pixel(10, 10)});
+        t.geom_eq(log.geometry,
+            new OpenLayers.Geometry.Polygon([
+                new OpenLayers.Geometry.LinearRing([
+                    new OpenLayers.Geometry.Point(-150, 75), // (0, 0)
+                    new OpenLayers.Geometry.Point(-150, 65), // (0, 10)
+                    new OpenLayers.Geometry.Point(-140, 65)  // (10, 10)
+                ])
+            ]), "geometry is correct");
+    }
+
   </script>
 </head>
 <body>

Modified: sandbox/tschaub/canvas/tests/Handler/RegularPolygon.html
===================================================================
--- sandbox/tschaub/canvas/tests/Handler/RegularPolygon.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Handler/RegularPolygon.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     function test_Handler_RegularPolygon_constructor(t) {
         t.plan(3);

Modified: sandbox/tschaub/canvas/tests/Handler.html
===================================================================
--- sandbox/tschaub/canvas/tests/Handler.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Handler.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
     function test_Handler_constructor(t) {
         t.plan(4);

Modified: sandbox/tschaub/canvas/tests/Icon.html
===================================================================
--- sandbox/tschaub/canvas/tests/Icon.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Icon.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
     var icon; 
     

Copied: sandbox/tschaub/canvas/tests/Kinetic.html (from rev 11416, trunk/openlayers/tests/Kinetic.html)
===================================================================
--- sandbox/tschaub/canvas/tests/Kinetic.html	                        (rev 0)
+++ sandbox/tschaub/canvas/tests/Kinetic.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,130 @@
+<html>
+<head>
+  <script src="OLLoader.js"></script>
+  <script type="text/javascript">
+
+    function test_Kinetic (t) {
+        t.plan(17);
+        var finish = false;
+        var results = {
+            110: {x: -2.7, y: -3.6, end: false},
+            120: {x: -2.1, y: -2.8, end: false},
+            130: {x: -1.5, y: -2.0, end: false},
+            140: {x: -0.9, y: -1.2, end: false},
+            150: {x: -0.3, y: -0.4, end: true}
+        };
+
+        var originalGetTime = Date.prototype.getTime;
+        Date.prototype.getTime = function() { return 0 };
+
+        var originalSetInterval = window.setInterval;
+        window.setInterval = function(callback, interval) {
+            while (!finish) {
+                var time = new Date().getTime();
+                Date.prototype.getTime = function() { return time+interval };
+                callback();
+            }
+        };
+
+        var kinetic = new OpenLayers.Kinetic({
+            deceleration: 0.01
+        });
+        kinetic.begin();
+        kinetic.update({x:0, y:0});
+        
+        Date.prototype.getTime = function() { return 100 };
+        var measure = kinetic.end({x:30, y:40});
+
+        t.eq(measure.speed, 0.5, "correct speed");
+        t.eq(measure.theta, Math.PI - Math.atan(40/30), "correct angle");
+
+        // fake timer id    
+        kinetic.timerId = 0;
+        kinetic.move(measure, function(x, y, end) {
+            var result = results[new Date().getTime()];
+            t.eq(Math.round(x * 1000) / 1000, result.x, "correct x");
+            t.eq(Math.round(y * 1000) / 1000, result.y, "correct y");
+            t.eq(end, result.end, "correct end");
+            finish = end;
+        });
+        
+        Date.prototype.getTime = originalGetTime;
+        window.setInterval = originalSetInterval;
+    }
+
+    function test_Angle (t) {
+        t.plan(8);
+        var results = [
+            {speed: 0.5, theta: Math.round((Math.PI - Math.atan(40/30)) * 1000000) / 1000000},
+            {speed: 0.5, theta: Math.round((Math.PI + Math.atan(40/30)) * 1000000) / 1000000},
+            {speed: 0.5, theta: Math.round((- Math.atan(40/30)) * 1000000) / 1000000},
+            {speed: 0.5, theta: Math.round((Math.atan(40/30)) * 1000000) / 1000000}
+        ];
+
+        var originalGetTime = Date.prototype.getTime;
+        Date.prototype.getTime = function() { return 0 };
+
+        var kinetic = new OpenLayers.Kinetic();
+        kinetic.begin();
+        kinetic.update({x:0, y:0});
+        
+        Date.prototype.getTime = function() { return 100 };
+        var measure = kinetic.end({x:30, y:40});
+
+        t.eq(measure.speed, results[0].speed, "correct speed");
+        t.eq(Math.round(measure.theta * 1000000) / 1000000,
+                results[0].theta, "correct angle");
+
+
+        var originalGetTime = Date.prototype.getTime;
+        Date.prototype.getTime = function() { return 0 };
+
+        var kinetic = new OpenLayers.Kinetic();
+        kinetic.begin();
+        kinetic.update({x:0, y:0});
+        
+        Date.prototype.getTime = function() { return 100 };
+        var measure = kinetic.end({x:30, y:-40});
+
+        t.eq(measure.speed, results[1].speed, "correct speed");
+        t.eq(Math.round(measure.theta * 1000000) / 1000000,
+                results[1].theta, "correct angle");
+
+
+        var originalGetTime = Date.prototype.getTime;
+        Date.prototype.getTime = function() { return 0 };
+
+        var kinetic = new OpenLayers.Kinetic();
+        kinetic.begin();
+        kinetic.update({x:0, y:0});
+        
+        Date.prototype.getTime = function() { return 100 };
+        var measure = kinetic.end({x:-30, y:-40});
+
+        t.eq(measure.speed, results[2].speed, "correct speed");
+        t.eq(Math.round(measure.theta * 1000000) / 1000000,
+                results[2].theta, "correct angle");
+
+        var originalGetTime = Date.prototype.getTime;
+        Date.prototype.getTime = function() { return 0 };
+
+        var kinetic = new OpenLayers.Kinetic();
+        kinetic.begin();
+        kinetic.update({x:0, y:0});
+        
+        Date.prototype.getTime = function() { return 100 };
+        var measure = kinetic.end({x:-30, y:40});
+
+        t.eq(measure.speed, results[3].speed, "correct speed");
+        t.eq(Math.round(measure.theta * 1000000) / 1000000,
+                results[3].theta, "correct angle");
+
+        Date.prototype.getTime = originalGetTime;
+    }
+  </script>
+</head>
+<body>
+    <div id="map" style="width: 600px; height: 300px;"/>
+    <div style="display: none;"><div id="invisimap"></div></div>
+</body>
+</html>

Modified: sandbox/tschaub/canvas/tests/Lang.html
===================================================================
--- sandbox/tschaub/canvas/tests/Lang.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Lang.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../lib/OpenLayers.js"></script>
+    <script src="OLLoader.js"></script>
     <script src="../lib/OpenLayers/Lang/en-CA.js" type="text/javascript"></script>
     <script src="../lib/OpenLayers/Lang/fr.js" type="text/javascript"></script>
     <script type="text/javascript">

Modified: sandbox/tschaub/canvas/tests/Layer/ArcGIS93Rest.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/ArcGIS93Rest.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/ArcGIS93Rest.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -2,7 +2,7 @@
 <head>
     <script type="text/javascript">var oldAlert = window.alert, gMess; window.alert = function(message) {gMess = message; return true;};</script>
     <script type="text/javascript">window.alert = oldAlert;</script>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var layer; 

Modified: sandbox/tschaub/canvas/tests/Layer/ArcIMS.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/ArcIMS.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/ArcIMS.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
   <head>
-    <script type="text/javascript" src="../../lib/OpenLayers.js"></script>
+    <script type="text/javascript" src="../OLLoader.js"></script>
     <script type="text/javascript">
     
       // use an arcims map service against Avencia Inc.'s global sample map services

Copied: sandbox/tschaub/canvas/tests/Layer/Bing.html (from rev 11416, trunk/openlayers/tests/Layer/Bing.html)
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/Bing.html	                        (rev 0)
+++ sandbox/tschaub/canvas/tests/Layer/Bing.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,115 @@
+<html>
+<head>
+  <script src="../OLLoader.js"></script>
+  <script type="text/javascript">
+    var map, layer; 
+
+    var layerType = 'Aerial';
+    var key = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf";
+    
+    var options = {
+        type: layerType,
+        key: key
+    };
+
+    function test_constructor(t) {
+        t.plan(3);
+                       
+        var origProcessMetadata = OpenLayers.Layer.Bing.processMetadata;
+        var log = [];
+        OpenLayers.Layer.Bing.processMetadata = function(metadata) {
+            var script = document.getElementById(this._callbackId);
+            log.push(script.src);
+            origProcessMetadata.apply(this, arguments);
+        };
+        layer = new OpenLayers.Layer.Bing({metadataParams: {foo: "bar"}});
+        t.ok(layer instanceof OpenLayers.Layer.Bing, "returns OpenLayers.Layer.Bing object" );
+        t.delay_call(5, function() {
+            t.eq(log.length, 1, "processMetadata called");
+            t.eq(OpenLayers.Util.getParameters(log[0]).foo, "bar", "metadataParams passed to url correctly.");
+            OpenLayers.Layer.Bing.processMetadata = origProcessMetadata;
+            layer.destroy();
+        });
+    }
+    
+    function test_initLayer(t) {
+        t.plan(2);
+
+        var meta = [];
+        var origProcessMetadata = OpenLayers.Layer.Bing.processMetadata;
+        OpenLayers.Layer.Bing.processMetadata = function(metadata) {
+            meta.push(metadata);
+        }
+        map = new OpenLayers.Map("map");
+        layer = new OpenLayers.Layer.Bing(options);
+        var extent;
+        map.addLayers([layer, new OpenLayers.Layer(null, {
+            moveTo: function(bounds, changed) {
+                extent = bounds;
+            }
+        })]);
+        map.zoomToMaxExtent();
+        
+        var map2 = new OpenLayers.Map("map");
+        var layer2 = new OpenLayers.Layer.Bing(OpenLayers.Util.extend({
+            initLayer: function() {
+                // pretend we have a zoomMin of 2
+                this.metadata.resourceSets[0].resources[0].zoomMin = 2;
+                OpenLayers.Layer.Bing.prototype.initLayer.apply(this, arguments);
+            }
+        }, options));
+        var extent2;
+        map2.addLayers([layer2, new OpenLayers.Layer(null, {
+            moveTo: function(bounds, changed) {
+                extent2 = bounds;
+            }
+        })]);
+        map2.zoomToMaxExtent();
+        
+        t.delay_call(5, function() {
+            origProcessMetadata.call(layer, meta[0]);
+            t.eq(extent.toBBOX(), map.getExtent().toBBOX(), "layer extent correct for base layer with zoomMin == 1.");
+            map.destroy();
+        });
+
+        t.delay_call(6, function() {
+            origProcessMetadata.call(layer2, meta[1]);
+            t.eq(extent2.toBBOX(), map2.getExtent().toBBOX(), "layer extent correct for base layer with zoomMin == 2.");
+            map2.destroy();
+            OpenLayers.Layer.Bing.processMetadata = origProcessMetadata;
+        });
+    }
+    
+    function test_attribution(t) {
+        t.plan(3);
+        
+        var log = [];
+        var map = new OpenLayers.Map("map");
+        layer = new OpenLayers.Layer.Bing(options);
+        map.addLayer(layer);
+        map.zoomToMaxExtent();
+        
+        t.delay_call(2, function() {
+            t.ok(layer.attribution.indexOf('olBingAttribution aerial') !== -1, "Attribution has the correct css class");
+            t.ok(layer.attribution.indexOf('<img src="">') == -1, "Attribution contains a logo");
+            t.ok(layer.attribution.indexOf('</img></div></a><a style=') == -1 , "Attribution contains a copyright");
+            map.destroy();
+        });
+    }
+
+    function test_clone(t) {
+        t.plan(1);
+        
+        var clone;
+        
+        layer = new OpenLayers.Layer.Bing(options);
+        clone = layer.clone();
+        t.ok(clone instanceof OpenLayers.Layer.Bing, "clone is a Layer.Bing instance");
+    }
+
+  </script>
+</head>
+<body>
+<div id="map" style="width:500px;height:550px"></div>
+</body>
+</html>

Modified: sandbox/tschaub/canvas/tests/Layer/EventPane.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/EventPane.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/EventPane.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var isOpera = (navigator.userAgent.indexOf("Opera") != -1);
@@ -57,12 +57,12 @@
 // MOUSEMOVE test does not seem to work... 
 //         t.plan( 2 );    
 
-        if (OpenLayers.Util.getBrowserName() != "firefox" && OpenLayers.Util.getBrowserName() != "mozilla") {
-          t.plan(4);
+        if (OpenLayers.BROWSER_NAME != "firefox" && OpenLayers.BROWSER_NAME != "mozilla") {
+            t.plan(4);
         } else {
-          t.plan(0);
-          t.debug_print("Firefox gives different results for different browsers on setMap on EventPane, so just don't run it for now.") 
-          return;
+            t.plan(0);
+            t.debug_print("Firefox gives different results for different browsers on setMap on EventPane, so just don't run it for now.") 
+            return;
         }
         var map = new OpenLayers.Map('map');
         
@@ -84,19 +84,23 @@
         layer2.getWarningHTML = function() { this.warning = true; return ""; }
 
         map.addLayer(layer2);
-        t.ok( !layer2.warning, "warning not registered on mapObject load" );
+        t.ok(!layer2.warning, "warning not registered on mapObject load");
 
-        map.events.register("mousemove", map, function () {
-            t.ok(true, "got mouse move");
+        var log = [];
+        map.events.register("mousemove", map, function(event) {
+            log.push(event);
         });
         
-        if( document.createEvent ) { // Mozilla
-          var evObj = document.createEvent('MouseEvents');
-          evObj.initEvent( 'mousemove', true, false );
-          layer.pane.dispatchEvent(evObj);
-        } else if( document.createEventObject ) { // IE
-          layer.pane.fireEvent('onmousemove');
+        if (document.createEvent) { // Mozilla
+            var evObj = document.createEvent('MouseEvents');
+            evObj.initEvent('mousemove', true, false);
+            map.eventsDiv.dispatchEvent(evObj);
+        } else if(document.createEventObject) { // IE
+            map.eventsDiv.fireEvent('onmousemove');
         }
+        
+        t.eq(log.length, 1, "got one event");
+        
     }
 
     function test_Layer_EventPane_setVisibility (t) {

Modified: sandbox/tschaub/canvas/tests/Layer/FixedZoomLevels.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/FixedZoomLevels.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/FixedZoomLevels.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var layer; 
 

Modified: sandbox/tschaub/canvas/tests/Layer/GML.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/GML.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/GML.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     var name = "GML Layer";

Modified: sandbox/tschaub/canvas/tests/Layer/GeoRSS.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/GeoRSS.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/GeoRSS.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var isMSIE    = (navigator.userAgent.indexOf("MSIE") > -1);
@@ -172,7 +172,7 @@
         });
     }
     function test_Layer_GeoRSS_loadend_Event(t) {
-        var browserCode = OpenLayers.Util.getBrowserName();
+        var browserCode = OpenLayers.BROWSER_NAME;
         if (browserCode == "msie") {
             t.plan(1);
             t.ok(true, "IE fails the GeoRSS test. This could probably be fixed by someone with enough energy to fix it.");

Modified: sandbox/tschaub/canvas/tests/Layer/Google/v3.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/Google/v3.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/Google/v3.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,8 +1,9 @@
 <html>
 <head>
     <script src="http://maps.google.com/maps/api/js?sensor=false"></script>
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
+
     var layer; 
                    
     function test_Layer_Google_constructor (t) {
@@ -265,6 +266,12 @@
 
          t.plan(8);
 
+         var origPrecision = OpenLayers.Util.DEFAULT_PRECISION;
+         // GMaps v3 seems to use a default precision of 13, which is lower
+         // than what we use in OpenLayers.
+         // See http://trac.osgeo.org/openlayers/ticket/3059
+         OpenLayers.Util.DEFAULT_PRECISION = 13;
+
          var map = new OpenLayers.Map('map', {allOverlays: true});
 
          var gmap = new OpenLayers.Layer.Google("Google Streets");
@@ -275,16 +282,18 @@
          map.setCenter(origin, 4);
          var resolution = map.getResolution();
          
-         var dx, dy, center, expectedX, expectedY;
+         var dx, dy, center, expected;
 
          // confirm that panning works with Google visible
          dx = 100, dy = -100;
          map.pan(dx, dy, {animate: false});
          center = map.getCenter();
-         expectedX = origin.lon + (resolution * dx);
-         expectedY = origin.lat - (resolution * dy);
-         t.eq(center.lon, expectedX, "x panning with Google visible " + dx + ", " + dy);
-         t.eq(center.lat, expectedY, "y panning with Google visible " + dx + ", " + dy);
+         expected = new OpenLayers.LonLat(
+             origin.lon + (resolution * dx),
+             origin.lat - (resolution * dy)
+         );
+         t.eq(center.lon, expected.lon, "x panning with Google visible " + dx + ", " + dy);
+         t.eq(center.lat, expected.lat, "y panning with Google visible " + dx + ", " + dy);
          map.pan(-dx, -dy, {animate: false});
          center = map.getCenter();
          t.eq(center.lon, origin.lon, "x panning with Google visible " + (-dx) + ", " + (-dy));
@@ -295,22 +304,30 @@
          dx = 100, dy = -100;
          map.pan(dx, dy, {animate: false});
          center = map.getCenter();
-         expectedX = origin.lon + (resolution * dx);
-         expectedY = origin.lat - (resolution * dy);
-         t.eq(center.lon, expectedX, "x panning with Google invisible " + dx + ", " + dy);
-         t.eq(center.lat, expectedY, "y panning with Google invisible " + dx + ", " + dy);
+         expected = new OpenLayers.LonLat(
+             origin.lon + (resolution * dx),
+             origin.lat - (resolution * dy)
+         );
+         t.eq(center.lon, expected.lon, "x panning with Google invisible " + dx + ", " + dy);
+         t.eq(center.lat, expected.lat, "y panning with Google invisible " + dx + ", " + dy);
          map.pan(-dx, -dy, {animate: false});
          center = map.getCenter();
          t.eq(center.lon, origin.lon, "x panning with Google invisible " + (-dx) + ", " + (-dy));
          t.eq(center.lat, origin.lat, "y panning with Google invisible " + (-dx) + ", " + (-dy));
-         
+
          map.destroy();
-
+         OpenLayers.Util.DEFAULT_PRECISION = origPrecision;
      }
      
      function test_wrapDateLine(t) {
          t.plan(2);
 
+         var origPrecision = OpenLayers.Util.DEFAULT_PRECISION;
+         // GMaps v3 seems to use a default precision of 13, which is lower
+         // than what we use in OpenLayers.
+         // See http://trac.osgeo.org/openlayers/ticket/3059
+         OpenLayers.Util.DEFAULT_PRECISION = 13;
+
          var map = new OpenLayers.Map("map");
 
          var gmap = new OpenLayers.Layer.Google("Google Streets");
@@ -322,14 +339,15 @@
          // pan to the edge of the world
          map.pan(256, 0, {animate: false});
          center = map.getCenter();
-         t.eq(center.lon, 20037508.3392, "edge of the world");
+         t.eq(center.lon, 20037508.34, "edge of the world");
          // pan off the edge of the world
          map.pan(100, 0, {animate: false});
          center = map.getCenter();
-         t.eq(center.lon, -12210356.6442, "magically back in the western hemisphere");
+         var expect = OpenLayers.Util.toFloat(100 * map.getResolution() - 20037508.34);
+         t.eq(center.lon, expect, "magically back in the western hemisphere");
          
          map.destroy();
-         
+         OpenLayers.Util.DEFAULT_PRECISION = origPrecision;         
      }
 
      function test_respectDateLine(t) {
@@ -346,16 +364,16 @@
          // pan to the edge of the world
          map.pan(256, 0, {animate: false});
          center = map.getCenter();
-         t.eq(center.lon, 20037508.3392, "edge of the world");
+         t.eq(center.lon, 20037508.34, "edge of the world");
          // pan off the edge of the world
          map.pan(100, 0, {animate: false});
          center = map.getCenter();
-         t.eq(center.lon, 20037508.3392, "whew, still on the edge");
+         t.eq(center.lon, 20037508.34, "whew, still on the edge");
          
          map.destroy();
          
      }
-
+     
   </script>
 </head>
 <body>

Modified: sandbox/tschaub/canvas/tests/Layer/Google.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/Google.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/Google.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -4,7 +4,7 @@
     <!-- this gmaps key generated for http://openlayers.org/dev/ -->
     <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA9XNhd8q0UdwNC7YSO4YZghSPUCi5aRYVveCcVYxzezM4iaj_gxQ9t-UajFL70jfcpquH5l1IJ-Zyyw'></script>
     <script type="text/javascript">window.alert = oldAlert;</script>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     var layer; 
     var validkey = (window.location.protocol == "file:") ||

Modified: sandbox/tschaub/canvas/tests/Layer/Grid.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/Grid.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/Grid.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var layer; 
@@ -169,7 +169,7 @@
     
     function test_Layer_Grid_moveTo(t) {
 
-    t.plan(13);
+    t.plan(14);
 
         var map = new OpenLayers.Map('map');
         layer = new OpenLayers.Layer.WMS(name, url, params);
@@ -193,9 +193,9 @@
             g_WhichFunc = "InitGridded";
             g_Bounds = bounds;
         };
-        layer.moveGriddedTiles = function(bounds) {
+        layer._moveGriddedTiles = function() {
             g_WhichFunc = "MoveGridded";
-            g_Bounds = bounds;
+            g_Bounds = layer.map.getExtent();
         };
         var clearTestBounds = function() {
             g_WhichFunc = null;
@@ -243,14 +243,8 @@
         clearTestBounds();
         layer.singleTile = true;
         layer.moveTo(null, zoomChanged);
-        t.ok(g_Bounds.equals(b), "if layer has grid but zoomChanged is called, initSingleTile called");
-
-
-        layer.getTilesBounds = function() {
-            return tilesBounds;
-        }
+        t.ok(g_Bounds.equals(b), "if layer has grid but zoomChanged is called, initSingleTile called");        
         
-        
 
 //NO FORCE
         zoomChanged = false;
@@ -305,9 +299,13 @@
         //regular move 
         clearTestBounds();
         tilesBounds = new OpenLayers.Bounds(10,10,120,120);
+        g_WhichFunc = null;
         layer.moveTo(null, zoomChanged);
-        t.ok(g_WhichFunc == "MoveGridded", "if tiles not drastically out of bounds, we call moveGriddedTile()");
-        t.ok(g_Bounds.equals(b), "if tiles not drastically out of bounds, we call moveGriddedTile() with correct bounds");
+        t.eq(g_WhichFunc, null, "moveGriddedTiles is delayed - not called yet");
+        t.delay_call(0.2, function() {
+            t.ok(g_WhichFunc == "MoveGridded", "if tiles not drastically out of bounds, we call moveGriddedTile()");
+            t.ok(g_Bounds.equals(b), "if tiles not drastically out of bounds, we call moveGriddedTile() with correct bounds");
+        });
     }
 
     /** THIS WOULD BE WHERE THE TESTS WOULD GO FOR 

Modified: sandbox/tschaub/canvas/tests/Layer/HTTPRequest.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/HTTPRequest.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/HTTPRequest.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var layer; 
 

Modified: sandbox/tschaub/canvas/tests/Layer/Image.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/Image.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/Image.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var layer; 
 

Modified: sandbox/tschaub/canvas/tests/Layer/KaMap.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/KaMap.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/KaMap.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var layer; 

Modified: sandbox/tschaub/canvas/tests/Layer/MapGuide.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/MapGuide.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/MapGuide.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -3,7 +3,7 @@
     <script type="text/javascript">var oldAlert = window.alert, gMess; window.alert = function(message) {gMess = message; return true;};</script>
     <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
     <script type="text/javascript">window.alert = oldAlert;</script>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var layer; 

Modified: sandbox/tschaub/canvas/tests/Layer/MapServer.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/MapServer.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/MapServer.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -5,7 +5,7 @@
     <script type="text/javascript">window.alert = oldAlert;</script>
     
 
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var layer; 
@@ -226,7 +226,7 @@
                        (window.location.host == "localhost") ||
                        (window.location.host == "openlayers.org");
         
-        if (OpenLayers.Util.getBrowserName() == "opera" || OpenLayers.Util.getBrowserName() == "safari") {
+        if (OpenLayers.BROWSER_NAME == "opera" || OpenLayers.BROWSER_NAME == "safari") {
             t.plan(1);
             t.debug_print("Can't test google reprojection in Opera or Safari.");
         } else if(validkey) {

Modified: sandbox/tschaub/canvas/tests/Layer/Markers.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/Markers.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/Markers.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var layer; 
 

Modified: sandbox/tschaub/canvas/tests/Layer/MultiMap.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/MultiMap.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/MultiMap.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -2,7 +2,7 @@
 <head>
   <!-- multimap api key for http://(www.)openlayers.org -->
   <script type="text/javascript" src="http://developer.multimap.com/API/maps/1.2/OA10072915821139765"></script>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var doTest = true;
     function test_Layer_MultiMap_constructor (t) {

Modified: sandbox/tschaub/canvas/tests/Layer/PointTrack.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/PointTrack.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/PointTrack.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
   <script type="text/javascript">
   
     var name = "PointTrack Layer";

Modified: sandbox/tschaub/canvas/tests/Layer/SphericalMercator.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/SphericalMercator.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/SphericalMercator.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     function test_SphericalMercator_forwardMercator(t) {
         t.plan(12);
@@ -69,7 +69,7 @@
          
         t.eq(strToFixed(point.toString()), 
              strToFixed("POINT(10.000000828446318 20.000000618997227)"), 
-             "point transforms from EPSG:4326 to Spherical Mercator"); 
+             "point transforms from Spherical Mercator to EPSG:4326"); 
     }
     
     function test_SphericalMercator_addTransform(t) {
@@ -88,6 +88,48 @@
              "from EPSG:900913 to EPSG:4326 correctly defined");
     }
     
+    function test_equivalence(t) {
+
+        // list of equivalent codes for web mercator
+        var codes = ["EPSG:900913", "EPSG:3857", "EPSG:102113", "EPSG:102100"];
+        var len = codes.length;
+        
+        t.plan(len + (len * len));
+
+        var ggPoint = new OpenLayers.Geometry.Point(10, 20);
+        var smPoint = new OpenLayers.Geometry.Point(1113195, 2273031);
+        
+        var gg = new OpenLayers.Projection("EPSG:4326");
+        
+        var i, proj, forward, inverse, other, j, equiv;
+        for (i=0, len=codes.length; i<len; ++i) {
+            proj = new OpenLayers.Projection(codes[i]);
+            
+            // confirm that forward/inverse work
+            forward = ggPoint.clone().transform(gg, proj);
+            t.eq(
+                strToFixed(forward.toString()), 
+                strToFixed("POINT(1113194.9077777779 2273030.9266712805)"), 
+                "transforms from EPSG:4326 to " + proj
+            );
+            inverse = smPoint.clone().transform(proj, gg);
+            t.eq(
+                strToFixed(inverse.toString()), 
+                strToFixed("POINT(10.000000828446318 20.000000618997227)"), 
+                "transforms from " + proj + " to EPSG:4326"
+            ); 
+            
+            // confirm that null transform works
+            for (j=i+1; j<len; ++j) {
+                other = new OpenLayers.Projection(codes[j]);
+                equiv = ggPoint.clone().transform(proj, other);
+                t.ok(proj.equals(other),  proj + " and " + other + " are equivalent");
+                t.ok(ggPoint.equals(equiv), "transform from " + proj + " to " + other + " preserves geometry");                
+            }
+        }
+
+    }
+    
   </script> 
 </head>
 <body>

Modified: sandbox/tschaub/canvas/tests/Layer/TMS.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/TMS.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/TMS.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var layer; 

Modified: sandbox/tschaub/canvas/tests/Layer/Text.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/Text.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/Text.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var isMSIE = (navigator.userAgent.indexOf("MSIE") > -1);
@@ -132,7 +132,7 @@
           layer.markers[1].events.triggerEvent('click', event);
           t.eq(map.popups.length, 1, "1st popup gone, 2nd Popup opened correctly");
           //Safari 3 separates style overflow into overflow-x and overflow-y
-          var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
+          var prop = (OpenLayers.BROWSER_NAME == 'safari') ? 'overflowX' : 'overflow';
           t.eq(map.popups[0].contentDiv.style[prop],"auto", "default Popup overflow correct");
         });
     }
@@ -151,12 +151,12 @@
           layer.markers[0].events.triggerEvent('click', event);
           t.eq(map.popups.length, 1, "Popup opened correctly");
           //Safari 3 separates style overflow into overflow-x and overflow-y
-          var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
+          var prop = (OpenLayers.BROWSER_NAME == 'safari') ? 'overflowX' : 'overflow';
           t.eq(map.popups[0].contentDiv.style[prop],"auto", "Popup overflow read from file");
           layer.markers[1].events.triggerEvent('click', event);
           t.eq(map.popups.length, 1, "1st popup gone, 2nd Popup opened correctly");
           //Safari 3 separates style overflow into overflow-x and overflow-y
-          var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
+          var prop = (OpenLayers.BROWSER_NAME == 'safari') ? 'overflowX' : 'overflow';
           t.eq(map.popups[0].contentDiv.style[prop],"hidden", "Popup overflow read from file");
         });
     }

Modified: sandbox/tschaub/canvas/tests/Layer/TileCache.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/TileCache.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/TileCache.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
 

Modified: sandbox/tschaub/canvas/tests/Layer/Vector/RootContainer.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/Vector/RootContainer.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/Vector/RootContainer.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../../lib/OpenLayers.js"></script>
+  <script src="../../OLLoader.js"></script>
   <script type="text/javascript">
     var layer, map; 
 

Modified: sandbox/tschaub/canvas/tests/Layer/Vector.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/Vector.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/Vector.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     var name = "Vector Layer";
@@ -194,6 +194,83 @@
         t.ok(layer.getFeatureBy('fid', 'some_fid_that_does_not_exist') == null,
              "OpenLayers.Layer.Vector.getFeatureBy('fid', ...) works like getFeatureByFid on non-existing feature fid");
     }
+    
+    function test_Layer_Vector_getFeaturesByAttribute(t) {
+        t.plan( 9 );
+        // setup layer
+        var layer = new OpenLayers.Layer.Vector(name);
+        
+        // feature_1
+        var geometry_1 = new OpenLayers.Geometry.Point(-28.63, 153.64);
+        var attributes_1 = {
+            humpty: 'dumpty',
+            clazz: 1
+        };
+        var feature_1 = new OpenLayers.Feature.Vector(geometry_1, attributes_1);
+        feature_1.fid = 'f_01'; // to identify later
+        
+        // feature_2
+        var geometry_2 = new OpenLayers.Geometry.Point(-27.48, 153.05);
+        var attributes_2 = {
+            // this feature has attribute humpty === undefined
+            clazz: '1'
+        };
+        var feature_2 = new OpenLayers.Feature.Vector(geometry_2, attributes_2);
+        feature_2.fid = 'f_02'; // to identify later
+        
+        // feature_3
+        var geometry_3 = new OpenLayers.Geometry.Point(-33.74, 150.3);
+        var attributes_3 = {
+            humpty: 'foobar',
+            clazz: 1
+        };
+        var feature_3 = new OpenLayers.Feature.Vector(geometry_3, attributes_3);
+        feature_3.fid = 'f_03'; // to identify later
+        
+        // Tests
+        
+        // don't find anything... no features added
+        // 1 test
+        t.ok(layer.getFeaturesByAttribute('humpty', 'dumpty').length === 0,
+             "OpenLayers.Layer.Vector.getFeaturesByAttribute returns an empty array while the layer is empty");
+        
+        layer.addFeatures([feature_1, feature_2, feature_3]);
+        
+        // simple use case: find 1 feature with an attribute and matching value
+        // 2 tests
+        var dumptyResults = layer.getFeaturesByAttribute('humpty', 'dumpty');
+        t.ok(dumptyResults.length === 1,
+             "OpenLayers.Layer.Vector.getFeaturesByAttribute returns an array with one feature for attribute 'humpty' with value 'dumpty'");
+        t.ok(dumptyResults[0].fid === 'f_01',
+             "OpenLayers.Layer.Vector.getFeaturesByAttribute returns the correct feature with attribute 'humpty' set to 'dumpty'");
+        
+        // simple use case: find 1 feature with an attribute and matching value
+        //                  and respect data types
+        // 2 tests
+        var strOneResults = layer.getFeaturesByAttribute('clazz', '1');
+        t.ok(strOneResults.length === 1,
+             "OpenLayers.Layer.Vector.getFeaturesByAttribute returns an array with one feature for attribute 'clazz' with value '1' (a string)");
+        t.ok(strOneResults[0].fid === 'f_02',
+             "OpenLayers.Layer.Vector.getFeaturesByAttribute returns the correct feature with attribute 'clazz' set to the string '1'");
+        
+        // simple use case: find 2 features with an attribute and matching value
+        //                  and respect data types
+        // 2 tests    
+        var numOneResults = layer.getFeaturesByAttribute('clazz', 1);
+        t.ok(numOneResults.length === 2,
+             "OpenLayers.Layer.Vector.getFeaturesByAttribute returns an array with two features for attribute 'clazz' with value 1 (a number)");
+        var bothFound = !!((numOneResults[0].fid === 'f_01' && numOneResults[1].fid === 'f_03') || (numOneResults[0].fid === 'f_03' && numOneResults[1].fid === 'f_01')); 
+        t.ok(bothFound,
+             "OpenLayers.Layer.Vector.getFeaturesByAttribute returns the correct features with attribute 'clazz' set to the number 1");
+        
+        // advanced use case: find the 1 feature, that has an attribute not set
+        var undefined;
+        var humptyNotSet = layer.getFeaturesByAttribute('humpty', undefined);
+        t.ok(humptyNotSet.length === 1,
+             "OpenLayers.Layer.Vector.getFeaturesByAttribute can be used to find features that have certain attributes not set");
+        t.ok(humptyNotSet[0].fid === 'f_02',
+             "OpenLayers.Layer.Vector.getFeaturesByAttribute found the correct featuren that has a certain attribute not set");
+    }
 
     function test_Layer_Vector_getDataExtent(t) {
         t.plan(1);
@@ -610,7 +687,7 @@
                 feature.style = customStyle5;
                 layer.drawFeature(feature);
                 t.eq(root.firstChild.getAttributeNS(null, 'style'),
-                             'opacity: '+customStyle5.graphicOpacity.toString()+((OpenLayers.Util.getBrowserName() == "opera" || OpenLayers.Util.getBrowserName() == "safari") ? "" : ';'),
+                             'opacity: '+customStyle5.graphicOpacity.toString()+((OpenLayers.BROWSER_NAME == "opera" || OpenLayers.BROWSER_NAME == "safari") ? "" : ';'),
                              "graphicOpacity correctly set");
                 feature.style = customStyle6;
                 layer.drawFeature(feature);

Modified: sandbox/tschaub/canvas/tests/Layer/WFS.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/WFS.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/WFS.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     var name = "Vector Layer";

Modified: sandbox/tschaub/canvas/tests/Layer/WMS/Post.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/WMS/Post.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/WMS/Post.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var isOpera   = (navigator.userAgent.indexOf("Opera") != -1);
@@ -16,8 +16,8 @@
         t.plan( 2 );
 
         var url = "http://octo.metacarta.com/cgi-bin/mapserv";
-        var options = { unsupportedBrowsers: []};
-        layer = new OpenLayers.Layer.WMS.Post(name, url, params);
+        var options = {unsupportedBrowsers: []};
+        layer = new OpenLayers.Layer.WMS.Post(name, url, params, options);
 
         t.eq(
             layer.usePost, true,
@@ -25,7 +25,7 @@
 
         layer.destroy();
 
-        var options = { unsupportedBrowsers: [OpenLayers.Util.getBrowserName()]};
+        var options = { unsupportedBrowsers: [OpenLayers.BROWSER_NAME]};
         layer = new OpenLayers.Layer.WMS.Post(name, url, params, options);
         t.eq(
             layer.usePost, false,
@@ -55,11 +55,10 @@
         }
         map.destroy();
 
-        var browserName = OpenLayers.Util.getBrowserName();
-        var options = { unsupportedBrowsers: [browserName]};
-
         // test the unsupported browser
-        layer = new OpenLayers.Layer.WMS.Post(name, url, params, options);
+        layer = new OpenLayers.Layer.WMS.Post(name, url, params, {
+            unsupportedBrowsers: [OpenLayers.BROWSER_NAME]
+        });
         map   = new OpenLayers.Map('map');
         map.addLayer(layer);
         tile  = layer.addTile(bounds, pixel);
@@ -69,8 +68,9 @@
         layer.destroy();
 
         // test a supported browser
-        OpenLayers.Util.getBrowserName = function () { return 'not_' + browserName };
-        layer = new OpenLayers.Layer.WMS.Post(name, url, params, options);
+        layer = new OpenLayers.Layer.WMS.Post(name, url, params, {
+            unsupportedBrowsers: []
+        });
         map.addLayer(layer);
         var tile2 = layer.addTile(bounds, pixel);
         t.ok(

Modified: sandbox/tschaub/canvas/tests/Layer/WMS.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/WMS.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/WMS.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -3,7 +3,7 @@
     <script type="text/javascript">var oldAlert = window.alert, gMess; window.alert = function(message) {gMess = message; return true;};</script>
     <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAjpkAC9ePGem0lIq5XcMiuhR_wWLPFku8Ix9i2SXYRVK3e45q1BQUd_beF8dtzKET_EteAjPdGDwqpQ'></script>
     <script type="text/javascript">window.alert = oldAlert;</script>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var layer;
@@ -154,7 +154,6 @@
         map.destroy();
     }
 
-
     function test_Layer_WMS_clone (t) {
         t.plan(4);
 
@@ -230,15 +229,15 @@
     function test_Layer_WMS_getFullRequestString (t) {
 
 
-        t.plan( 2 );
+        t.plan( 3 );
         var map = new OpenLayers.Map('map');
         map.projection = "xx";
-        tUrl = "http://octo.metacarta.com/cgi-bin/mapserv";
-        tParams = { layers: 'basic',
+        var tUrl = "http://octo.metacarta.com/cgi-bin/mapserv";
+        var tParams = { layers: 'basic',
                    format: 'image/png'};
         var tLayer = new OpenLayers.Layer.WMS(name, tUrl, tParams);
         map.addLayer(tLayer);
-        str = tLayer.getFullRequestString();
+        var str = tLayer.getFullRequestString();
         var tParams = {
             LAYERS: "basic", FORMAT: "image/png", SERVICE: "WMS",
             VERSION: "1.1.1", REQUEST: "GetMap", STYLES: "",
@@ -257,6 +256,20 @@
              tUrl + "?" + OpenLayers.Util.getParameterString(tParams),
              "getFullRequestString() by default does *not* add SRS value if projection is 'none'");
         map.destroy();
+        
+        map = new OpenLayers.Map("map", {projection: "EPSG:4326"});
+        var layerProj = new OpenLayers.Projection("FOO", {
+            equals: function() {return true},
+            getCode: function() {return "FOO"}
+        });
+        tLayer = new OpenLayers.Layer.WMS(name, tUrl, tParams, {projection: layerProj});
+        map.addLayer(tLayer);
+        str = tLayer.getFullRequestString();
+        tParams.SRS = "FOO";
+        t.eq(str,
+             tUrl + "?" + OpenLayers.Util.getParameterString(tParams),
+             "getFullRequestString() uses the layer projection if it equals the map projection");
+        map.destroy();
 
     }
 
@@ -289,7 +302,7 @@
         var validkey = (window.location.protocol == "file:") ||
                        (window.location.host == "localhost") ||
                        (window.location.host == "openlayers.org");
-        if (OpenLayers.Util.getBrowserName() == "opera" || OpenLayers.Util.getBrowserName() == "safari") {
+        if (OpenLayers.BROWSER_NAME == "opera" || OpenLayers.BROWSER_NAME == "safari") {
             t.plan(1);
             t.debug_print("Can't test google reprojection in Opera or Safari.");
         } else if(validkey) {
@@ -367,6 +380,39 @@
 
     }
 
+    function test_tileOrigin(t) {
+        t.plan(4);
+        
+        var dummy = new OpenLayers.Layer(null, {isBaseLayer: true});
+        var unconstrained = new OpenLayers.Layer.WMS(
+            null, "http://example.com/wms", 
+            {layers: "unconstrained"}, 
+            {isBaseLayer: false, buffer: 0}
+        );
+        var constrained = new OpenLayers.Layer.WMS(
+            null, "http://example.com/wms-c", 
+            {layers: "constrained"}, 
+            {buffer: 0, isBaseLayer: false, tileOrigin: new OpenLayers.LonLat(-180, -90)}
+        );
+        var map = new OpenLayers.Map({
+            div: "map",
+            maxExtent: new OpenLayers.Bounds(-185, -95, 185, 95),
+            layers: [dummy, unconstrained, constrained],
+            center: new OpenLayers.LonLat(0, 0),
+            zoom: 1
+        });
+        
+        t.eq(unconstrained.grid[1][0].bounds.bottom, -95, "unconstrained bottom correct");
+        t.eq(unconstrained.grid[1][0].bounds.left, -185, "unconstrained left correct");
+        t.eq(constrained.grid[1][0].bounds.bottom, -90, "constrained bottom correct");
+        t.eq(constrained.grid[1][0].bounds.left, -180, "constrained left correct");
+        
+        map.destroy();
+        
+    }
+
+
+
     // DEPRECATED -- REMOVE IN 3.0
     function test_Layer_Untiled_WMS(t) {
         t.plan(1);

Modified: sandbox/tschaub/canvas/tests/Layer/WMTS.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/WMTS.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/WMTS.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
     <head>
-        <script src="../../lib/OpenLayers.js"></script>
+        <script src="../OLLoader.js"></script>
         <script type="text/javascript">    
 
             function test_constructor(t) {

Modified: sandbox/tschaub/canvas/tests/Layer/WrapDateLine.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/WrapDateLine.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/WrapDateLine.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var layer; 

Modified: sandbox/tschaub/canvas/tests/Layer/XYZ.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/XYZ.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/XYZ.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var layer; 
 
@@ -148,6 +148,31 @@
         map.destroy();
     }
 
+    function test_Layer_XYZ_serverResolutions(t) {
+        t.plan(2);
+
+        var map = new OpenLayers.Map('map', {
+            resolutions: [13,11]
+        });
+
+        var layer = new OpenLayers.Layer.XYZ(name, url, options);
+        map.addLayer(layer);
+        map.setCenter(new OpenLayers.LonLat(0,0), 1);
+
+        var tileurl = layer.getURL(new OpenLayers.Bounds(0,0,0,0));
+        var level = parseInt(tileurl.split('/')[7]);
+        t.eq(map.getZoom(), level, "Tile zoom level is correct without serverResolutions");
+
+        layer.serverResolutions = [14,13,12,11,10];
+        tileurl = layer.getURL(new OpenLayers.Bounds(0,0,0,0));
+        level = parseInt(tileurl.split('/')[7]);
+        var res = map.getResolution();
+        var gotLevel = OpenLayers.Util.indexOf(layer.serverResolutions, res);
+        t.eq(gotLevel, level, "Tile zoom level is correct with serverResolutions");
+
+        map.destroy();
+    }
+
     function test_zoomOffset(t) {
 
         t.plan(2);

Modified: sandbox/tschaub/canvas/tests/Layer/Yahoo.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer/Yahoo.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer/Yahoo.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,7 +1,7 @@
 <html>
 <head>
   <script src="http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=euzuro-openlayers"></script>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var layer; 
 

Modified: sandbox/tschaub/canvas/tests/Layer.html
===================================================================
--- sandbox/tschaub/canvas/tests/Layer.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Layer.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
     var layer; 
 
@@ -556,7 +556,7 @@
 
     function test_Layer_getZoomForResolution(t) {
 
-        t.plan(12);
+        t.plan(13);
 
         var layer = new OpenLayers.Layer('Test Layer');
         layer.map = {};
@@ -584,6 +584,9 @@
              "(fractionalZoom) doesn't return zoom below zero");
         t.eq(layer.getZoomForResolution(1).toPrecision(6), (layer.resolutions.length - 1).toPrecision(6),
              "(fractionalZoom) doesn't return zoom above highest index");
+        
+        layer.restrictedMinZoom = 1;
+        t.eq(layer.getZoomForResolution(200), 1, "zoom all the way out, but we have a restrictedMinZoom of 1");
 
     }
     
@@ -751,16 +754,27 @@
     
     function test_afterAdd(t) {
         
-        t.plan(1);
+        t.plan(4);
         
+        var log = [];
         var map = new OpenLayers.Map("map");
-        var layer = new OpenLayers.Layer(null, {isBaseLayer: true});
+        var layer = new OpenLayers.Layer(null, {
+            isBaseLayer: true,
+            eventListeners: {
+                "added": function(evt) {
+                    log.push(evt);
+                }
+            }
+        });
         var hasBase = false;
         layer.afterAdd = function() {
             hasBase = !!(layer.map && layer.map.baseLayer);
         }
         map.addLayer(layer);
         t.eq(hasBase, true, "when afterAdd is called, map has a base layer");
+        t.eq(log.length, 1, "added event triggered");
+        t.eq(log[0].map.id, map.id, "added listener argument with correct map");
+        t.eq(log[0].layer.id, layer.id, "added listener argument with correct layer");
         
     }
     
@@ -806,11 +820,18 @@
 
 
     function test_Layer_destroy (t) {
-        t.plan( 5 );    
+        t.plan( 8 );    
 
+        var log = [];
         var map = new OpenLayers.Map('map');
         
-        layer = new OpenLayers.Layer('Test Layer');
+        layer = new OpenLayers.Layer('Test Layer', {
+            eventListeners: {
+                "removed": function(evt) {
+                    log.push(evt);
+                }
+            }
+        });
 
         map.addLayer(layer);
 
@@ -822,6 +843,9 @@
         t.eq( layer.options, null, "layer.options is null after destroy" );
 
         t.eq(map.layers.length, 0, "layer removed from map");
+        t.eq(log.length, 1, "removed event triggered");
+        t.eq(log[0].map.id, map.id, "removed listener argument with correct map");
+        t.eq(log[0].layer.id, layer.id, "removed listener argument with correct layer");
         
         map.destroy();
 

Modified: sandbox/tschaub/canvas/tests/Map.html
===================================================================
--- sandbox/tschaub/canvas/tests/Map.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Map.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
@@ -326,6 +326,34 @@
     }
  */
 
+    function test_Map_isValidZoomLevel(t) {
+        t.plan(6);
+        var map = new OpenLayers.Map("map");
+        map.addLayer(new OpenLayers.Layer(null, {
+            isBaseLayer: true, numZoomLevels: 19
+        }))
+        var valid;
+
+        valid = OpenLayers.Map.prototype.isValidZoomLevel.apply(map, [0]);
+        t.eq(valid, true, "0 is a valid zoomLevel when baseLayer has no restrictedMinZoom");
+
+        valid = OpenLayers.Map.prototype.isValidZoomLevel.apply(map, [18]);
+        t.eq(valid, true, "18 is a valid zoomLevel");
+
+        valid = OpenLayers.Map.prototype.isValidZoomLevel.apply(map, [19]);
+        t.eq(valid, false, "19 is not a valid zoomLevel");
+        
+        map.baseLayer.restrictedMinZoom = 1;
+        valid = OpenLayers.Map.prototype.isValidZoomLevel.apply(map, [0]);
+        t.eq(valid, false, "0 is not a valid zoomLevel when baseLayer has restrictedMinZoom of 1");
+
+        valid = OpenLayers.Map.prototype.isValidZoomLevel.apply(map, [1]);
+        t.eq(valid, true, "1 is a valid zoomLevel");
+
+        valid = OpenLayers.Map.prototype.isValidZoomLevel.apply(map, [19]);
+        t.eq(valid, false, "19 is not a valid zoomLevel when baseLayer has restrictedMinZoom of 1");
+    }
+    
     function test_Map_isValidLonLat(t) {
         t.plan( 3 );    
 
@@ -699,11 +727,12 @@
     function test_Map_removeLayer(t) {
         t.plan(1);
         var f = function() {};
+        var events = {triggerEvent: f};
         var layers = [
-            {name: "fee", removeMap: f},
-            {name: "fi", removeMap: f},
-            {name: "fo", removeMap: f},
-            {name: "fum", removeMap: f}
+            {name: "fee", removeMap: f, events: events},
+            {name: "fi", removeMap: f, events: events},
+            {name: "fo", removeMap: f, events: events},
+            {name: "fum", removeMap: f, events: events}
         ];
         var map = {
             layers: layers,
@@ -1233,6 +1262,27 @@
         t.ok(maxExtent == map.baseLayer.maxExtent, "null options, valid baseLayer returns map.baseLayer.maxExtent");     
     }
 
+    function test_Map_getRestrictedMinZoom(t){
+        t.plan(3);
+
+        var map = {};
+
+      //no baseLayer
+        var minZoom = OpenLayers.Map.prototype.getRestrictedMinZoom.apply(map);
+        t.eq(minZoom, null, "no baseLayer returns null");
+        
+        map.baseLayer = new OpenLayers.Layer(null, {isBaseLayer: true});
+
+      //baseLayer
+        minZoom = OpenLayers.Map.prototype.getRestrictedMinZoom.apply(map);
+        t.eq(minZoom, 0, "default baseLayer.restrictedMinZoom returns 0");     
+
+      //custom minZoomLevel on baseLayer
+        map.baseLayer.restrictedMinZoom = 1;
+        minZoom = OpenLayers.Map.prototype.getRestrictedMinZoom.apply(map);
+        t.eq(minZoom, map.baseLayer.restrictedMinZoom, "custom baseLayer.restrictedMinZoom returns map.baseLayer.restrictedMinZoom");     
+    }
+    
     function test_Map_zoomToMaxExtent(t){
         t.plan(4)
 
@@ -1617,7 +1667,26 @@
         map.destroy();
         
     }
+    function test_pixel_lonlat(t) {
+        
+        t.plan(4);
 
+        var map = new OpenLayers.Map({
+            div: "map",
+            layers: [
+                new OpenLayers.Layer("name", {isBaseLayer:true})
+            ]
+        });
+        map.zoomToMaxExtent();
+        var px = map.getPixelFromLonLat(map.getLonLatFromPixel(new OpenLayers.Pixel(100, 100)));
+        t.eq(px.x, 100, "x is the same in and ot");
+        t.eq(px.y, 100, "y is the same in and out");
+        var ll = map.getLonLatFromPixel(map.getPixelFromLonLat(new OpenLayers.LonLat(100, 100)));
+        t.ok((ll.lon > (100 -map.getResolution()) && (ll.lon < (100 + map.getResolution()))), "lon is the same in and ot");
+        t.ok((ll.lat > (100 -map.getResolution()) && (ll.lat < (100 + map.getResolution()))), "lat is the same in and ot");
+        map.destroy();
+    }    
+
   </script>
 </head>
 <body>

Modified: sandbox/tschaub/canvas/tests/Marker/Box.html
===================================================================
--- sandbox/tschaub/canvas/tests/Marker/Box.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Marker/Box.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var box; 
     
@@ -26,7 +26,7 @@
         t.ok( box.bounds.equals(bounds), "bounds object correctly set");
         t.ok( box.div != null, "div created");
         //Safari 3 separates style overflow into overflow-x and overflow-y
-        var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
+        var prop = (OpenLayers.BROWSER_NAME == 'safari') ? 'overflowX' : 'overflow';
         t.eq( box.div.style[prop], "hidden", "div style overflow hidden");
         t.ok( box.events != null, "events object created");
         t.eq( g_Color, borderColor, "setBorder called with correct border color");        

Modified: sandbox/tschaub/canvas/tests/Marker.html
===================================================================
--- sandbox/tschaub/canvas/tests/Marker.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Marker.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     var marker;

Copied: sandbox/tschaub/canvas/tests/OLLoader.js (from rev 11416, trunk/openlayers/tests/OLLoader.js)
===================================================================
--- sandbox/tschaub/canvas/tests/OLLoader.js	                        (rev 0)
+++ sandbox/tschaub/canvas/tests/OLLoader.js	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,26 @@
+// Adding a mode parameter with "build" as value in the run-tests.html will 
+// make usage of the build version of the library.
+// get the OLLoader.js script location
+(function() {
+    var r = new RegExp("(^|(.*?\\/))(" + "OLLoader.js" + ")(\\?|$)"),
+        s = document.getElementsByTagName('script'),
+        src, m, l = "";
+    for(var i=0, len=s.length; i<len; i++) {
+        src = s[i].getAttribute('src');
+        if(src) {
+            var m = src.match(r);
+            if(m) {
+                l = m[1];
+                break;
+            }
+        }
+    }
+
+    var regex = new RegExp( "[\\?&]mode=([^&#]*)" );
+    var href = window.parent.location.href;
+    var results = regex.exec( href );
+    l += (results && results[1] == 'build') ? 
+        "../build/OpenLayers.js" : "../lib/OpenLayers.js"; 
+    scriptTag = "<script src='" + l + "'></script>"; 
+    document.write(scriptTag);
+})();

Modified: sandbox/tschaub/canvas/tests/OpenLayers1.html
===================================================================
--- sandbox/tschaub/canvas/tests/OpenLayers1.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/OpenLayers1.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -14,19 +14,3 @@
 <body>
 </body>
 </html>
-<html>
-<head>
-    <script src="../lib/OpenLayers.js"></script>
-    <script type="text/javascript">
-        function test_OpenLayers(t) {
-            t.plan(1);
-
-            var script = document.getElementById("script");
-
-            t.eq(OpenLayers._getScriptLocation(), "../", "Script location correctly detected.");
-        }
-    </script>
-</head>
-<body>
-</body>
-</html>

Modified: sandbox/tschaub/canvas/tests/OpenLayers2.html
===================================================================
--- sandbox/tschaub/canvas/tests/OpenLayers2.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/OpenLayers2.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -17,22 +17,3 @@
 <body>
 </body>
 </html>
-<html>
-<head>
-    <script src="bogus/1/OpenLayers.js-foo"></script>
-    <script src="bogus/2/foo-OpenLayers.js"></script>
-    <script src="../lib/OpenLayers.js?foo"></script>
-    <script src="bogus/3/after-OpenLayers.js"></script>
-    <script type="text/javascript">
-        function test_OpenLayers(t) {
-            t.plan(1);
-
-            var script = document.getElementById("script");
-
-            t.eq(OpenLayers._getScriptLocation(), "../", "Script location with search string correctly detected, and not fooled by other scripts.");
-        }
-    </script>
-</head>
-<body>
-</body>
-</html>

Modified: sandbox/tschaub/canvas/tests/OpenLayers3.html
===================================================================
--- sandbox/tschaub/canvas/tests/OpenLayers3.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/OpenLayers3.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -17,22 +17,3 @@
 <body>
 </body>
 </html>
-<html>
-<head>
-    <script>
-    var OpenLayers = {singleFile: true};
-    </script>
-    <script src="../lib/OpenLayers.js"></script>
-    <script type="text/javascript">
-        function test_OpenLayers(t) {
-            t.plan(1);
-
-            var script = document.getElementById("script");
-
-            t.eq(OpenLayers._getScriptLocation(), "../lib/", "Script location for single file build correctly detected.");
-        }
-    </script>
-</head>
-<body>
-</body>
-</html>

Copied: sandbox/tschaub/canvas/tests/OpenLayers4.html (from rev 11416, trunk/openlayers/tests/OpenLayers4.html)
===================================================================
--- sandbox/tschaub/canvas/tests/OpenLayers4.html	                        (rev 0)
+++ sandbox/tschaub/canvas/tests/OpenLayers4.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,18 @@
+<html>
+<head>
+    <script type="text/javascript">
+        OpenLayers = {singleFile: true}; // just to make the test run faster
+        document.write('<scr'+'ipt src="../lib/OpenLayers.js"></scr'+'ipt>');
+        document.write('<scr'+'ipt src="bogus/foo-/OpenLayers.js"></scr'+'ipt>');
+    </script>
+    <script type="text/javascript">
+        function test_OpenLayers(t) {
+            t.plan(1);
+            t.eq(OpenLayers._getScriptLocation(), "../lib/",
+                 "Script location correctly detected, and not fooled by other scripts.");
+        }
+    </script>
+</head>
+<body>
+</body>
+</html>

Copied: sandbox/tschaub/canvas/tests/OpenLayersJsFiles.html (from rev 11416, trunk/openlayers/tests/OpenLayersJsFiles.html)
===================================================================
--- sandbox/tschaub/canvas/tests/OpenLayersJsFiles.html	                        (rev 0)
+++ sandbox/tschaub/canvas/tests/OpenLayersJsFiles.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,27 @@
+<html>
+<head>
+    <script type="text/javascript">
+        window.OpenLayers = new Array(
+            "OpenLayers/Util.js",
+            "OpenLayers/BaseTypes.js"
+        );
+    </script>
+    <script src="../lib/OpenLayers.js"></script>
+    <script type="text/javascript">
+        function test_OpenLayers(t) {
+            t.plan(1);
+            var s = document.getElementsByTagName("script");
+            var src, count = 0;
+            for(var i=0, len=s.length; i<len; i++) {
+                src = s[i].getAttribute('src');
+                if(src) {
+                    count++;
+                }
+            }
+            t.eq(count, 3, "Three OpenLayers scripts loaded.");
+        }
+    </script>
+</head>
+<body>
+</body>
+</html>

Modified: sandbox/tschaub/canvas/tests/Popup/Anchored.html
===================================================================
--- sandbox/tschaub/canvas/tests/Popup/Anchored.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Popup/Anchored.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     var popup;
@@ -11,7 +11,7 @@
         popup = new OpenLayers.Popup.Anchored();
 
         t.ok( popup instanceof OpenLayers.Popup.Anchored, "new OpenLayers.Popup.Anchored returns Popup.Anchored object" );
-        t.ok(popup.id.startsWith("OpenLayers.Popup.Anchored"), "valid default popupid");
+        t.ok(OpenLayers.String.startsWith(popup.id, "OpenLayers.Popup.Anchored"), "valid default popupid");
         var firstID = popup.id;
         t.eq(popup.contentHTML, null, "good default popup.contentHTML");
 

Modified: sandbox/tschaub/canvas/tests/Popup/AnchoredBubble.html
===================================================================
--- sandbox/tschaub/canvas/tests/Popup/AnchoredBubble.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Popup/AnchoredBubble.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
    function test_Popup_Anchored_setOpacity(t) { 

Modified: sandbox/tschaub/canvas/tests/Popup/FramedCloud.html
===================================================================
--- sandbox/tschaub/canvas/tests/Popup/FramedCloud.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Popup/FramedCloud.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
    function test_Popup_FramedCloud_setHTML(t) { 

Modified: sandbox/tschaub/canvas/tests/Popup.html
===================================================================
--- sandbox/tschaub/canvas/tests/Popup.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Popup.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     var popup;
@@ -88,8 +88,8 @@
     }
     function test_Popup_keepInMap(t) {
         
-        var gb = OpenLayers.Util.getBrowserName;
-        OpenLayers.Util.getBrowserName = function() { return "mock"; }
+        var bn = OpenLayers.BROWSER_NAME;
+        OpenLayers.BROWSER_NAME = "mock";
         t.plan(3);
         var map = new OpenLayers.Map("map");
         map.addLayer(new OpenLayers.Layer("", {isBaseLayer: true}));
@@ -120,7 +120,7 @@
         t.ok(safeSizePan.equals(safeSizePanKeep), "Panning means that all sizes are equal");
         t.ok(safeSize.w < safeSizePan.w, "Width of non-panning is less");    
         t.ok(safeSize.h < safeSizePan.h, "Height of non-panning is less");    
-        OpenLayers.Util.getBrowserName = gb; 
+        OpenLayers.BROWSER_NAME = bn;
     }    
     function test_Popup_draw(t) {
         t.plan( 15 );
@@ -155,7 +155,7 @@
         t.eq(contentDiv.id, "chicken_contentDiv", "correct content div id");
         t.eq(contentDiv.style.position, "relative", "correct content div position");
         //Safari 3 separates style overflow into overflow-x and overflow-y
-        var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
+        var prop = (OpenLayers.BROWSER_NAME == 'safari') ? 'overflowX' : 'overflow';
         t.eq(contentDiv.style[prop], "", "correct content div overflow");
         t.eq(contentDiv.innerHTML, content, "correct content div content");
 
@@ -169,7 +169,7 @@
             t.eq(popup.div.style.filter, "alpha(opacity=" + opacity*100 + ")", "good default popup.opacity");
         }
         //Safari 3 separates the border style into separate entities when reading it
-        if (OpenLayers.Util.getBrowserName() == 'safari') {
+        if (OpenLayers.BROWSER_NAME == 'safari') {
           var s = border.split(' ');
           t.ok(popup.div.style.borderTopWidth == s[0] && popup.div.style.borderTopStyle == s[1], "good default popup.border")
         } else {

Modified: sandbox/tschaub/canvas/tests/Projection.html
===================================================================
--- sandbox/tschaub/canvas/tests/Projection.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Projection.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
   <head> 
-    <script src="../lib/OpenLayers.js"></script> 
+    <script src="OLLoader.js"></script> 
     <script type="text/javascript"> 
      function test_Projection_constructor(t) { 
          t.plan(9); 
@@ -21,7 +21,47 @@
 
          t.eq(projection.equals(null), false, "equals on null projection returns false");
          t.eq(projection.equals({}), false, "equals on null projection object returns false (doesn't call getCode)");
-     } 
+     }
+     
+     function test_Projection_equals(t) {
+         t.plan(8);
+         var origTransforms = OpenLayers.Util.extend({}, OpenLayers.Projection.transforms);
+         OpenLayers.Projection.addTransform("EPSG:4326", "FOO", OpenLayers.Projection.nullTransform);
+         OpenLayers.Projection.addTransform("FOO", "EPSG:4326", OpenLayers.Projection.nullTransform);
+         var projection = new OpenLayers.Projection("FOO");
+         t.eq(projection.equals(new OpenLayers.Projection("EPSG:4326")), true, "EPSG:4326 and FOO are equal without proj4js");
+         t.eq(projection.equals(new OpenLayers.Projection("EPSG:900913")), false, "EPSG:900913 and FOO are not equal without proj4js");
+         t.eq(new OpenLayers.Projection("EPSG:4326").equals(new OpenLayers.Projection("EPSG:4326")), true, "EPSG:4326 and EPSG:4326 are equal without proj4js");
+         t.eq(new OpenLayers.Projection("BAR").equals(new OpenLayers.Projection("EPSG:4326")), false, "Projection.equals() returns false for unknown projections withoug proj4js");
+         OpenLayers.Projection.transforms = origTransforms;
+         
+         var proj1 = new OpenLayers.Projection("EPSG:4326");
+         var proj2 = new OpenLayers.Projection("FOO");
+         var proj3 = new OpenLayers.Projection("EPSG:900913");
+         var proj4 = new OpenLayers.Projection("EPSG:4326");
+         var proj5 = new OpenLayers.Projection("BAR");
+
+         // conditionally mock up proj4js
+         var hasProj = !!window.Proj4js;
+         if (!hasProj) {
+             window.Proj4js = true;
+         }
+         proj1.proj = {defData: "+title= WGS84 +foo=bar +x=0"};
+         proj2.proj = {defData: "+title=FOO +foo=bar +x=0", srsCode: "FOO"};
+         proj3.proj = {defData: "+title=Web Mercator +foo=bar +x=0 +I=am-different"};
+         proj4.proj = proj1.proj;
+         proj5.proj = {srsCode: "BAR"};
+
+         t.eq(proj2.equals(proj1), true, "EPSG:4326 and FOO are equal with proj4js");
+         t.eq(proj2.equals(proj3), false, "EPSG:900913 and FOO are not equal with proj4js");
+         t.eq(proj1.equals(proj4), true, "EPSG:4326 and EPSG:4326 are equal with proj4js");
+         t.eq(proj2.equals(proj5), false, "Projection.equals() returns false for unknown projections with proj4js");
+         
+         if (!hasProj) {
+             delete window.Proj4js
+         }
+         
+     }
        
     </script> 
   </head> 

Modified: sandbox/tschaub/canvas/tests/Protocol/HTTP.html
===================================================================
--- sandbox/tschaub/canvas/tests/Protocol/HTTP.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Protocol/HTTP.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_constructor(t) {
@@ -199,29 +199,43 @@
     }
 
     function test_read_bbox(t) {
-        t.plan(1);
-        var protocol = new OpenLayers.Protocol.HTTP();
+        t.plan(6);
 
-        // fake XHR request object
-        var request = {'status': 200};
-
         var _get = OpenLayers.Request.GET;
 
         var bounds = new OpenLayers.Bounds(1, 2, 3, 4);
         var filter = new OpenLayers.Filter.Spatial({
             type: OpenLayers.Filter.Spatial.BBOX,
             value: bounds,
-            projection: "foo"
+            projection: new OpenLayers.Projection("foo")
         });
         
+        // log requests
+        var log, exp;
         OpenLayers.Request.GET = function(options) {
-            t.eq(options.params['bbox'].toString(), bounds.toArray().toString(),
-                'GET called with bbox filter in params');
-            return request;
+            log.push(options.params.bbox);
+            return {status: 200};
         };
 
-        var resp = protocol.read({filter: filter});
+        // 1) issue request with default protocol
+        log = [];
+        new OpenLayers.Protocol.HTTP().read({filter: filter});
 
+        t.eq(log.length, 1, "1) GET called once");
+        t.ok(log[0] instanceof Array, "1) bbox param is array");
+        exp = bounds.toArray();
+        t.eq(log[0], exp, "1) bbox param doesn't include SRS id by default");
+        
+        // 2) issue request with default protocol
+        log = [];
+        new OpenLayers.Protocol.HTTP({srsInBBOX: true}).read({filter: filter});
+
+        t.eq(log.length, 1, "2) GET called once");
+        t.ok(log[0] instanceof Array, "2) bbox param is array");
+        exp = bounds.toArray();
+        exp.push("foo");
+        t.eq(log[0], exp, "2) bbox param includes SRS id if srsInBBOX is true");
+
         OpenLayers.Request.GET = _get;        
     }
 

Modified: sandbox/tschaub/canvas/tests/Protocol/SOS.html
===================================================================
--- sandbox/tschaub/canvas/tests/Protocol/SOS.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Protocol/SOS.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_constructor(t) {

Modified: sandbox/tschaub/canvas/tests/Protocol/SQL/Gears.html
===================================================================
--- sandbox/tschaub/canvas/tests/Protocol/SQL/Gears.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Protocol/SQL/Gears.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../../lib/OpenLayers.js"></script>
+  <script src="../../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/canvas/tests/Protocol/SQL.html
===================================================================
--- sandbox/tschaub/canvas/tests/Protocol/SQL.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Protocol/SQL.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/canvas/tests/Protocol/WFS.html
===================================================================
--- sandbox/tschaub/canvas/tests/Protocol/WFS.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Protocol/WFS.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {
@@ -25,14 +25,15 @@
     }
 
     function test_read(t) {
-        t.plan(6);
+        t.plan(7);
 
         var protocol = new OpenLayers.Protocol.WFS({
             url: "http://some.url.org",
             featureNS: "http://namespace.org",
             featureType: "type",
-            parseResponse: function(request) {
+            parseResponse: function(request, options) {
                 t.eq(request.responseText, "foo", "parseResponse called properly");
+                t.eq(options, {foo: "bar"}, "parseResponse receives readOptions");
                 return "foo";
             }
         });
@@ -44,14 +45,13 @@
             t.xml_eq(new OpenLayers.Format.XML().read(obj.data).documentElement, expected, "GetFeature request is correct");
             obj.status = status;
             obj.responseText = "foo";
-            obj.options = {};
             t.delay_call(0.1, function() {obj.callback.call(this)});
             return obj;
         };
 
         expected = readXML("GetFeature_1");
         status = 200;
-        var response = protocol.read({callback: function(response) {
+        var response = protocol.read({readOptions: {foo: "bar"}, callback: function(response) {
             t.eq(response.features, "foo", "user callback properly called with features");
             t.eq(response.code, OpenLayers.Protocol.Response.SUCCESS, "success reported properly");
         }});
@@ -95,7 +95,6 @@
         OpenLayers.Request.POST = function(obj) {
             t.xml_eq(new OpenLayers.Format.XML().read(obj.data).documentElement, expected, "Transaction XML with Insert, Update and Delete created correctly");
             obj.responseText = "foo";
-            obj.options = {};
             t.delay_call(0.1, function() {obj.callback.call(this)});
             return obj;
         };
@@ -229,6 +228,30 @@
         t.eq(features.length, 1, "the right format is used to read the request (GeoJSON)");
  	}
 
+    function test_outputFormat(t) {
+        t.plan(2);
+
+        var protocol = new OpenLayers.Protocol.WFS({
+            version: "1.1.0",
+            url: "http://some.url.org",
+            featureNS: "http://namespace.org",
+            featureType: "type",
+            outputFormat: 'json'
+        });
+
+        t.ok(protocol.readFormat instanceof OpenLayers.Format.GeoJSON, "the correct readFormat is used for outputFormat JSON");
+
+        protocol = new OpenLayers.Protocol.WFS({
+            version: "1.1.0",
+            url: "http://some.url.org",
+            featureNS: "http://namespace.org",
+            featureType: "type",
+            outputFormat: 'GML2'
+        });
+
+        t.ok(protocol.readFormat instanceof OpenLayers.Format.GML.v2, "the correct readFormat is used for outputFormat GML2");
+ 	}
+
     function test_readOptions(t) {
         t.plan(1);
 
@@ -248,7 +271,6 @@
         OpenLayers.Request.POST = function(obj) {
             obj.status = 200;
             obj.responseText = "foo";
-            obj.options = {};
             t.delay_call(0.1, function() {obj.callback.call(this)});
             return obj;
         };

Modified: sandbox/tschaub/canvas/tests/Protocol.html
===================================================================
--- sandbox/tschaub/canvas/tests/Protocol.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Protocol.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/canvas/tests/Renderer/Canvas.html
===================================================================
--- sandbox/tschaub/canvas/tests/Renderer/Canvas.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Renderer/Canvas.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var supported = OpenLayers.Renderer.Canvas.prototype.supported();
     function test_Renderer_Canvas_constructor(t) {
@@ -23,7 +23,7 @@
         
         var extent = new OpenLayers.Bounds(1,2,3,4);
         r.resolution = 1;
-        r.setExtent(extent);
+        r.setExtent(extent, true);
         t.ok(r.extent.equals(extent), "extent is correctly set");
         t.eq(r.resolution, null, "resolution nullified");
     }

Modified: sandbox/tschaub/canvas/tests/Renderer/Elements.html
===================================================================
--- sandbox/tschaub/canvas/tests/Renderer/Elements.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Renderer/Elements.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function setUp() {
@@ -561,8 +561,63 @@
         tearDown();        
     }
 
+    function test_Elements_drawGeometry_3(t) {
+        t.plan(2);
 
+        setUp();
 
+        var r = create_renderer();
+        
+        var element = document.createElement("div");
+        r.vectorRoot = element;
+
+        r.nodeFactory = function(id, type) {
+            return document.createElement("div");
+        };
+        var g_Node = null;
+        var b_Node = null;
+        r.drawGeometryNode = function(node, geometry, style) {
+            g_Node = node;
+            return {node: node, complete: true};
+        };
+        r.redrawBackgroundNode = function(id, geometry, style, featureId) {
+            b_Node = r.nodeFactory();
+            b_Node.id = "foo_background";
+            element.appendChild(b_Node);
+        };
+
+        r.getNodeType = function(geometry, style) {
+            return "div";
+        };
+        var geometry = {
+            id: 'foo',
+            CLASS_NAME: 'bar',
+            getBounds: function() {return {bottom: 0}}
+        };
+        var style = {'backgroundGraphic': 'foo'};
+        var featureId = 'dude';
+        r.drawGeometry(geometry, style, featureId);
+        t.ok(b_Node.parentNode == element, "redrawBackgroundNode appended background node");
+
+        var returnNode = function(id) {
+        	return id == "foo_background" ? b_Node : g_Node;
+        }
+       	
+        var _getElement = document.getElementById;
+        document.getElementById = returnNode;
+        OpenLayers.Util.getElement = returnNode;
+
+        style = {};
+        r.drawGeometry(geometry, style, featureId);
+        t.ok(b_Node.parentNode != element, "background node correctly removed")
+            
+        document.getElementById = _getElement;
+
+        tearDown();
+    }
+
+
+
   </script>
 </head>
 <body>

Modified: sandbox/tschaub/canvas/tests/Renderer/SVG.html
===================================================================
--- sandbox/tschaub/canvas/tests/Renderer/SVG.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Renderer/SVG.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     var geometry = null, node = null;
@@ -378,23 +378,7 @@
         var string = r.getShortString(point);
         t.eq(string, "2,-4", "returned string is correct");
     }
-    
-    function test_svg_getnodetype(t) {
-        if (!OpenLayers.Renderer.SVG.prototype.supported()) {
-            t.plan(0);
-            return;
-        }
-
-        t.plan(1);
         
-        var r = new OpenLayers.Renderer.SVG(document.body);
-
-        var g = {CLASS_NAME: "OpenLayers.Geometry.Point"}
-        var s = {graphicName: "square"};
-        
-        t.eq(r.getNodeType(g, s), r.supportUse ? "use" : "svg", "Correct node type for well known symbols");
-    }
-        
     function test_svg_importsymbol(t) {
         if (!OpenLayers.Renderer.SVG.prototype.supported()) {
             t.plan(0);

Modified: sandbox/tschaub/canvas/tests/Renderer/VML.html
===================================================================
--- sandbox/tschaub/canvas/tests/Renderer/VML.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Renderer/VML.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     var geometry = null, node = null;
@@ -305,7 +305,7 @@
             return;
         }
         
-        t.plan(2);
+        t.plan(3);
         
         var r = new OpenLayers.Renderer.VML(document.body);
         r.offset = {x: 0, y: 0};
@@ -318,30 +318,16 @@
         
         var node = document.createElement('div');
         
-        var linearRing = {
-            components: [{
-                x: 1,
-                y: 2
-            },{
-                x: 3,
-                y: 4
-            }]
-        };
-        var linearRing2 = {
-            components: [{
-                x: 5,
-                y: 6
-            },{
-                x: 7,
-                y: 8
-            }]
-        };
-        var geometry = {
-            components: [linearRing, linearRing2]
-        };
+        var geometry = OpenLayers.Geometry.fromWKT(
+            "POLYGON((1 2, 3 4), (5 6, 7 8))"
+        );
         r.drawPolygon(node, geometry, true);
         t.ok(g_SetNodeDimension, "setNodeDimension is called");
-        t.eq(node.path, "m 2,4 l 6,8 x m 10,12 l 14,16 x e", "path attribute is correct");
+        t.eq(node.path, "m 2,4 l 6,8 2,4 x m 10,12 l 14,16 10,12 e", "path attribute is correct - inner ring has no area and is not closed");
+
+        geometry.components[1].addComponent(new OpenLayers.Geometry.Point(8, 7));
+        r.drawPolygon(node, geometry, true);
+        t.eq(node.path, "m 2,4 l 6,8 2,4 x m 10,12 l 14,16 16,14 10,12 x e", "path attribute is correct - inner ring has an area and is closed");        
     }
     
     function test_VML_drawrectangle(t) {

Modified: sandbox/tschaub/canvas/tests/Renderer.html
===================================================================
--- sandbox/tschaub/canvas/tests/Renderer.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Renderer.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<script src="../lib/OpenLayers.js"></script>
+<script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_Renderer_constructor(t) {

Modified: sandbox/tschaub/canvas/tests/Request/XMLHttpRequest.html
===================================================================
--- sandbox/tschaub/canvas/tests/Request/XMLHttpRequest.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Request/XMLHttpRequest.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,12 +1,57 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
         function test_constructor(t) {
             t.plan(1);
             t.ok(new OpenLayers.Request.XMLHttpRequest(),
                  "constructor didn't fail and we trust the code is well tested in OpenLayers.Request methods");
         }
+        function test_readyState(t) {
+        // Verify compliance of the standard (a part) See: http://www.w3.org/TR/XMLHttpRequest/
+        t.plan(9);
+        // Case 1: Request-A: open & abort
+            var requestA = new OpenLayers.Request.XMLHttpRequest();
+            //requestA.onreadystatechange = function() {};
+            t.eq(requestA.readyState, 0, "Request-A: readyState after new is 0-UNSENT");
+            requestA.open("GET", ".", true);
+            t.eq(requestA.readyState, 1, "Request-A: readyState after open is 1-OPENED");
+            requestA.abort();
+            t.eq(requestA.readyState, 0, "Request-A: readyState after abort is 0-UNSENT");
+
+        // Case 2: Request-B: open & send
+            var requestB = new OpenLayers.Request.XMLHttpRequest();
+            requestB.onreadystatechange = function() {
+                if (requestB.readyState == 4) {
+                    t.ok(true, "Request-B: triggered the event onreadystatechange when 4-DONE");
+                }
+            };
+            t.eq(requestB.readyState, 0, "Request-B: readyState after new is 0-UNSENT");
+            requestB.open("GET", ".", true);
+            t.eq(requestB.readyState, 1, "Request-B: readyState after open is 1-OPENED");
+            requestB.send();
+
+        // Case 3: Request-C: open, send & abort
+            var requestC = new OpenLayers.Request.XMLHttpRequest();
+            requestC.onreadystatechange = function() {
+                if (requestC.readyState == 4) {
+                    t.fail("Request-C: triggered the event onreadystatechange when 4-DONE after abort");
+                }
+            };
+            t.eq(requestC.readyState, 0, "Request-C: readyState after new is 0-UNSENT");
+            requestC.open("GET", ".", true);
+            t.eq(requestC.readyState, 1, "Request-C: readyState after open is 1-OPENED");
+            requestC.send();
+            requestC.abort();
+            t.eq(requestC.readyState, 0, "Request-C: readyState after abort is 0-UNSENT");
+
+        // delay destroy
+            t.delay_call( 
+                2, function() {
+                    // to await the end of requestB and requestC
+                }
+            );
+        }
     </script>
 </head>
 <body>

Modified: sandbox/tschaub/canvas/tests/Request.html
===================================================================
--- sandbox/tschaub/canvas/tests/Request.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Request.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../lib/OpenLayers.js"></script>
+    <script src="OLLoader.js"></script>
     <script type="text/javascript">
     function setup() {
         window._xhr = OpenLayers.Request.XMLHttpRequest;
@@ -20,7 +20,7 @@
     function test_issue(t) {
         setup();
 
-        t.plan(21);
+        t.plan(22);
         var request, config;
         var proto = OpenLayers.Request.XMLHttpRequest.prototype;
         var issue = OpenLayers.Function.bind(OpenLayers.Request.issue,
@@ -81,7 +81,18 @@
             t.eq(url, config.url + "&foo=bar", "existing query string gets extended with &");
         }
         request = issue(config);
-
+        
+        // test that query string doesn't get ? followed by &
+        config = {
+            method: "GET",
+            url: "http://example.com/service?",
+            params: {"foo": "bar"}
+        };
+        proto.open = function(method, url, async, user, password) {
+            t.eq(url, config.url + "foo=bar", "existing query string ending with ? gets extended without &");
+        }
+        request = issue(config);
+        
         // reset open method
         proto.open = _open;
         
@@ -319,7 +330,7 @@
     }
 
     function test_ProxyHost(t) {
-        t.plan(4);
+        t.plan(5);
 
         /*
          * Setup
@@ -334,6 +345,7 @@
         var proto = OpenLayers.Request.XMLHttpRequest.prototype;
         var _open = proto.open;
         var log = [];
+        var port;
         proto.open = function(method, url, async, user, password) {
             log.push(url);
         };
@@ -349,9 +361,17 @@
         OpenLayers.Request.GET({url: "http://bar?k1=v1&k2=v2"});
         t.eq(log.length, 1, "[1] XHR.open called once");
         t.eq(log[0], expectedURL, "[1] the URL used for XHR is correct (" + log[0] + ")");
-
+        
+        // 1 test
+        log = [];
+        OpenLayers.ProxyHost = "http://fooproxy/?url=";
+        port = window.location.port ? ':'+window.location.port : '';
+        expectedURL = window.location.protocol+"//"+window.location.hostname+port+"/service";
+        OpenLayers.Request.GET({url: expectedURL});
+        t.eq(log[0], expectedURL, "[2] proxy is not used when requesting the same server");
+        
         // 2 tests
-        log = []
+        log = [];
         OpenLayers.ProxyHost = function(url) {
             var p = OpenLayers.Util.getParameters(url);
             var p = OpenLayers.Util.getParameterString(p);
@@ -359,8 +379,8 @@
         };
         expectedURL = "http://barproxy/?k1=v1&k2=v2";
         OpenLayers.Request.GET({url: "http://bar?k1=v1&k2=v2"});
-        t.eq(log.length, 1, "[2] XHR.open called once");
-        t.eq(log[0], expectedURL, "[2] the URL used for XHR is correct (" + log[0] + ")");
+        t.eq(log.length, 1, "[3] XHR.open called once");
+        t.eq(log[0], expectedURL, "[3] the URL used for XHR is correct (" + log[0] + ")");
 
         /*
          * Teardown
@@ -372,7 +392,45 @@
     }
 
     function test_abort(t) {
+
         t.plan(0);
+
+        var sendCalled;
+
+        // set up
+
+        var _open = OpenLayers.Request.XMLHttpRequest.prototype.open;
+        OpenLayers.Request.XMLHttpRequest.prototype.open = function() {
+            this.readyState = OpenLayers.Request.XMLHttpRequest.OPENED;
+        };
+
+        var _setRequestHeader = OpenLayers.Request.XMLHttpRequest.prototype.setRequestHeader;
+        OpenLayers.Request.XMLHttpRequest.prototype.setRequestHeader = function() {};
+
+        var _send = OpenLayers.Request.XMLHttpRequest.prototype.send;
+        OpenLayers.Request.XMLHttpRequest.prototype.send = function() {
+            sendCalled = true;
+        };
+
+        // test
+
+        sendCalled = false;
+        OpenLayers.Request.issue().abort();
+
+        t.delay_call(0.5, function() {
+            if (sendCalled) {
+                t.fail("Send should not be called because request is aborted");
+            }
+
+            // tear down
+            OpenLayers.Request.XMLHttpRequest.prototype.open = _open;
+            OpenLayers.Request.XMLHttpRequest.prototype.setRequestHeader = _setRequestHeader;
+            OpenLayers.Request.XMLHttpRequest.prototype.send = _send;
+        });
+    }
+
+    function test_abort2(t) {
+        t.plan(0);
         var fail = false;
         OpenLayers.Request.XMLHttpRequest.onsend = function(args) {
             fail = true;
@@ -383,10 +441,9 @@
             }
             OpenLayers.Request.XMLHttpRequest.onsend = null;
         });
-        var protocol = new OpenLayers.Protocol.HTTP();
-        protocol.abort(protocol.read());
+        var req = OpenLayers.Request.GET();
+        req.abort();
     }
-
     </script>
 </head>
 <body>

Modified: sandbox/tschaub/canvas/tests/Rule.html
===================================================================
--- sandbox/tschaub/canvas/tests/Rule.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Rule.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../lib/OpenLayers.js"></script> 
+    <script src="OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_Rule_constructor(t) { 

Modified: sandbox/tschaub/canvas/tests/Strategy/BBOX.html
===================================================================
--- sandbox/tschaub/canvas/tests/Strategy/BBOX.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Strategy/BBOX.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/canvas/tests/Strategy/Cluster.html
===================================================================
--- sandbox/tschaub/canvas/tests/Strategy/Cluster.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Strategy/Cluster.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_activate(t) {

Modified: sandbox/tschaub/canvas/tests/Strategy/Filter.html
===================================================================
--- sandbox/tschaub/canvas/tests/Strategy/Filter.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Strategy/Filter.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
 <script>
 
 var features = [];
@@ -21,7 +21,7 @@
 
 function test_initialize(t) {
     
-    t.plan(3);
+    t.plan(4);
     
     var strategy = new OpenLayers.Strategy.Filter({filter: filter});
 
@@ -31,6 +31,14 @@
     t.ok(strategy.filter === filter, "has filter");
     
     strategy.destroy();
+    
+    try {
+        strategy = new OpenLayers.Strategy.Filter();
+        t.ok(true, "strategy without filter works");
+    } catch (err) {
+        t.fail("strategy without filter should not throw");
+    }
+    
 
 }
 

Modified: sandbox/tschaub/canvas/tests/Strategy/Fixed.html
===================================================================
--- sandbox/tschaub/canvas/tests/Strategy/Fixed.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Strategy/Fixed.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_activate(t) {

Modified: sandbox/tschaub/canvas/tests/Strategy/Paging.html
===================================================================
--- sandbox/tschaub/canvas/tests/Strategy/Paging.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Strategy/Paging.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_activate(t) {

Modified: sandbox/tschaub/canvas/tests/Strategy/Refresh.html
===================================================================
--- sandbox/tschaub/canvas/tests/Strategy/Refresh.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Strategy/Refresh.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     var interval = 5000;

Modified: sandbox/tschaub/canvas/tests/Strategy/Save.html
===================================================================
--- sandbox/tschaub/canvas/tests/Strategy/Save.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Strategy/Save.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
   
     function test_initialize(t) {

Modified: sandbox/tschaub/canvas/tests/Strategy.html
===================================================================
--- sandbox/tschaub/canvas/tests/Strategy.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Strategy.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/canvas/tests/Style.html
===================================================================
--- sandbox/tschaub/canvas/tests/Style.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Style.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../lib/OpenLayers.js"></script> 
+    <script src="OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_Style_constructor(t) { 

Modified: sandbox/tschaub/canvas/tests/Style2.html
===================================================================
--- sandbox/tschaub/canvas/tests/Style2.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Style2.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../lib/OpenLayers.js"></script> 
+    <script src="OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

Modified: sandbox/tschaub/canvas/tests/StyleMap.html
===================================================================
--- sandbox/tschaub/canvas/tests/StyleMap.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/StyleMap.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../lib/OpenLayers.js"></script> 
+    <script src="OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_StyleMap_constructor(t) { 

Modified: sandbox/tschaub/canvas/tests/Symbolizer/Line.html
===================================================================
--- sandbox/tschaub/canvas/tests/Symbolizer/Line.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Symbolizer/Line.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

Modified: sandbox/tschaub/canvas/tests/Symbolizer/Point.html
===================================================================
--- sandbox/tschaub/canvas/tests/Symbolizer/Point.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Symbolizer/Point.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

Modified: sandbox/tschaub/canvas/tests/Symbolizer/Polygon.html
===================================================================
--- sandbox/tschaub/canvas/tests/Symbolizer/Polygon.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Symbolizer/Polygon.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

Modified: sandbox/tschaub/canvas/tests/Symbolizer/Raster.html
===================================================================
--- sandbox/tschaub/canvas/tests/Symbolizer/Raster.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Symbolizer/Raster.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

Modified: sandbox/tschaub/canvas/tests/Symbolizer/Text.html
===================================================================
--- sandbox/tschaub/canvas/tests/Symbolizer/Text.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Symbolizer/Text.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

Modified: sandbox/tschaub/canvas/tests/Symbolizer.html
===================================================================
--- sandbox/tschaub/canvas/tests/Symbolizer.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Symbolizer.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../lib/OpenLayers.js"></script> 
+    <script src="OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

Modified: sandbox/tschaub/canvas/tests/Tile/Image/IFrame.html
===================================================================
--- sandbox/tschaub/canvas/tests/Tile/Image/IFrame.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Tile/Image/IFrame.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var isOpera   = (navigator.userAgent.indexOf("Opera") != -1);

Modified: sandbox/tschaub/canvas/tests/Tile/Image.html
===================================================================
--- sandbox/tschaub/canvas/tests/Tile/Image.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Tile/Image.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var tile; 

Modified: sandbox/tschaub/canvas/tests/Tile/WFS.html
===================================================================
--- sandbox/tschaub/canvas/tests/Tile/WFS.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Tile/WFS.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var tile; 
     

Modified: sandbox/tschaub/canvas/tests/Tile.html
===================================================================
--- sandbox/tschaub/canvas/tests/Tile.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Tile.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
     var tile; 
     

Modified: sandbox/tschaub/canvas/tests/Tween.html
===================================================================
--- sandbox/tschaub/canvas/tests/Tween.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Tween.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../lib/OpenLayers.js"></script> 
+    <script src="OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_Tween_constructor(t) { 

Modified: sandbox/tschaub/canvas/tests/Util.html
===================================================================
--- sandbox/tschaub/canvas/tests/Util.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/Util.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -5,7 +5,20 @@
     var custom$ = function() {};
     window.$ = custom$;
   </script>
-  <script src="../lib/OpenLayers.js"></script>
+  <script>
+    var OpenLayers = [
+        "OpenLayers/BaseTypes/Class.js",
+        "OpenLayers/Util.js",
+        "OpenLayers/BaseTypes.js",
+        "OpenLayers/BaseTypes/Element.js",
+        "OpenLayers/BaseTypes/LonLat.js",
+        "OpenLayers/BaseTypes/Pixel.js",
+        "OpenLayers/BaseTypes/Size.js",
+        "OpenLayers/Lang.js",
+        "OpenLayers/Console.js"
+    ];
+  </script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var map; 
@@ -97,7 +110,7 @@
 
         t.eq( div.style.position, position, "div.style.positionset correctly");    
         //Safari 3 separates the border style into separate entities when reading it
-        if (OpenLayers.Util.getBrowserName() == 'safari') {
+        if (OpenLayers.BROWSER_NAME == 'safari') {
           var s = border.split(' ');
           t.ok(div.style.borderTopWidth == s[0] && div.style.borderTopStyle == s[1], "good default popup.border")
         } else {
@@ -105,11 +118,11 @@
         }
             
         //Safari 3 separates style overflow into overflow-x and overflow-y
-        var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
+        var prop = (OpenLayers.BROWSER_NAME == 'safari') ? 'overflowX' : 'overflow';
         t.eq( div.style[prop], overflow, "div.style.overflow set correctly");    
         t.eq( parseFloat(div.style.opacity), opacity, "element.style.opacity set correctly");    
         //Safari 3 returns null for this value, which is okay
-        var filterString = (OpenLayers.Util.getBrowserName() == 'safari') ? null : 'alpha(opacity=' + (opacity * 100) + ')';
+        var filterString = (OpenLayers.BROWSER_NAME == 'safari') ? null : 'alpha(opacity=' + (opacity * 100) + ')';
         t.eq( div.style.filter, filterString, "element.style.filter set correctly");
 
         //test defaults
@@ -130,13 +143,13 @@
 
         t.eq( div.style.position, "absolute", "div.style.positionset correctly");    
         //Safari 3 separates the border style into separate entities when reading it
-        if (OpenLayers.Util.getBrowserName() == 'safari') {
+        if (OpenLayers.BROWSER_NAME == 'safari') {
           t.ok(div.style.borderTopWidth == '' && div.style.borderTopStyle == '', "good default popup.border")
         } else {
           t.eq( div.style.border, "", "div.style.border set correctly");    
         }
         //Safari 3 separates style overflow into overflow-x and overflow-y
-        var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
+        var prop = (OpenLayers.BROWSER_NAME == 'safari') ? 'overflowX' : 'overflow';
         t.eq(div.style[prop], "", "div.style.overflow set correctly");    
         t.ok( !div.style.opacity, "element.style.opacity set correctly");    
         t.ok( !div.style.filter, "element.style.filter set correctly");
@@ -168,7 +181,7 @@
         t.eq( image.style.height, sz.h + "px", "image.style.height set correctly");    
 
         //Safari 3 separates the border style into separate entities when reading it
-        if (OpenLayers.Util.getBrowserName() == 'safari') {
+        if (OpenLayers.BROWSER_NAME == 'safari') {
           var s = border.split(' ');
           t.ok(image.style.borderTopWidth == s[0] && image.style.borderTopStyle == s[1], "good default popup.border")
         } else {
@@ -178,7 +191,7 @@
         t.eq( image.style.position, position, "image.style.position set correctly");    
         t.eq( parseFloat(image.style.opacity), opacity, "image.style.opacity set correctly");    
         //Safari 3 returns null for this value, which is okay
-        var filterString = (OpenLayers.Util.getBrowserName() == 'safari') ? null : 'alpha(opacity=' + (opacity * 100) + ')';
+        var filterString = (OpenLayers.BROWSER_NAME == 'safari') ? null : 'alpha(opacity=' + (opacity * 100) + ')';
         t.eq( image.style.filter, filterString, "element.style.filter set correctly");
 
         //test defaults
@@ -369,7 +382,7 @@
             filterString = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='http://www.openlayers.org/images/OpenLayers.trac.png', sizingMethod='crop') alpha(opacity=50)";
         } else {
             //Safari 3 returns null for this value, which is okay
-            var filterString = (OpenLayers.Util.getBrowserName() == 'safari') ? null : 'alpha(opacity=' + (opacity * 100) + ')';
+            var filterString = (OpenLayers.BROWSER_NAME == 'safari') ? null : 'alpha(opacity=' + (opacity * 100) + ')';
         }        
         t.eq( imageDiv.style.filter, filterString, "element.style.filter set correctly");
 
@@ -385,7 +398,7 @@
         t.eq( image.style.height, sz.h + "px", "image.style.height set correctly");    
 
         //Safari 3 separates the border style into separate entities when reading it
-        if (OpenLayers.Util.getBrowserName() == 'safari') {
+        if (OpenLayers.BROWSER_NAME == 'safari') {
           var s = border.split(' ');
           t.ok(image.style.borderTopWidth == s[0] && image.style.borderTopStyle == s[1], "good default popup.border")
         } else {
@@ -437,7 +450,7 @@
         t.eq(parseFloat(element.style.opacity), opacity, 
              "element.style.opacity set correctly when opacity = " + opacity);
         //Safari 3 returns null for this value, which is okay
-        var filterString = (OpenLayers.Util.getBrowserName() == 'safari') ? null : 'alpha(opacity=' + (opacity * 100) + ')';
+        var filterString = (OpenLayers.BROWSER_NAME == 'safari') ? null : 'alpha(opacity=' + (opacity * 100) + ')';
         t.eq(element.style.filter, filterString, 
              "element.style.filter set correctly when opacity = " + opacity);
 
@@ -447,7 +460,7 @@
         t.eq(parseFloat(element.style.opacity), opacity, 
              "element.style.opacity not changed if the value is incorrect");
         //Safari 3 returns null for this value, which is okay
-        var filterString = (OpenLayers.Util.getBrowserName() == 'safari') ? null : 'alpha(opacity=' + (opacity * 100) + ')';
+        var filterString = (OpenLayers.BROWSER_NAME == 'safari') ? null : 'alpha(opacity=' + (opacity * 100) + ')';
         t.eq(element.style.filter, filterString, 
              "element.style.filter not changed if the value is incorrect");
 
@@ -457,7 +470,7 @@
         t.eq(parseFloat(element.style.opacity), opacity, 
              "element.style.opacity not changed if the value is incorrect");
         //Safari 3 returns null for this value, which is okay
-        var filterString = (OpenLayers.Util.getBrowserName() == 'safari') ? null : 'alpha(opacity=' + (opacity * 100) + ')';
+        var filterString = (OpenLayers.BROWSER_NAME == 'safari') ? null : 'alpha(opacity=' + (opacity * 100) + ')';
         t.eq(element.style.filter, filterString, 
              "element.style.filter not changed if the value is incorrect");
 
@@ -468,7 +481,7 @@
         t.eq(element.style.opacity, '', 
              "element.style.opacity is removed when opacity = " + opacity);
         //Safari 3 returns null for this value, which is okay
-        var filterString = (OpenLayers.Util.getBrowserName() == 'safari') ? null : '';
+        var filterString = (OpenLayers.BROWSER_NAME == 'safari') ? null : '';
         t.eq(element.style.filter, filterString, 
              "element.style.filter is removed when opacity = " + opacity);
     }
@@ -498,18 +511,18 @@
 
         t.eq( element.style.position, position, "element.style.position set correctly");    
         //Safari 3 separates the border style into separate entities when reading it
-        if (OpenLayers.Util.getBrowserName() == 'safari') {
+        if (OpenLayers.BROWSER_NAME == 'safari') {
           var s = border.split(' ');
           t.ok(element.style.borderTopWidth == s[0] && element.style.borderTopStyle == s[1], "good default popup.border")
         } else {
           t.ok( (element.style.border.indexOf(border) != -1), "element.style.border set correctly");
         }
         //Safari 3 separates style overflow into overflow-x and overflow-y
-        var prop = (OpenLayers.Util.getBrowserName() == 'safari') ? 'overflowX' : 'overflow';
+        var prop = (OpenLayers.BROWSER_NAME == 'safari') ? 'overflowX' : 'overflow';
         t.eq( element.style[prop], overflow, "element.style.overflow set correctly");    
         t.eq( parseFloat(element.style.opacity), opacity, "element.style.opacity set correctly");    
         //Safari 3 returns null for this value, which is okay
-        var filterString = (OpenLayers.Util.getBrowserName() == 'safari') ? null : 'alpha(opacity=' + (opacity * 100) + ')';
+        var filterString = (OpenLayers.BROWSER_NAME == 'safari') ? null : 'alpha(opacity=' + (opacity * 100) + ')';
         t.eq( element.style.filter, filterString, "element.style.filter set correctly");
     }
 
@@ -553,7 +566,7 @@
             t.ok( true, "skipping element test outside of Mozilla");
         } else {
             //Safari 3 returns null for this value, which is okay
-            var filterString = (OpenLayers.Util.getBrowserName() == 'safari') ? null : 'alpha(opacity=' + (opacity * 100) + ')';
+            var filterString = (OpenLayers.BROWSER_NAME == 'safari') ? null : 'alpha(opacity=' + (opacity * 100) + ')';
             t.ok( image.nodeName == "IMG", "createImage creates a valid HTMLImageElement" );
         }
         t.eq( imageDiv.style.filter, filterString, "element.style.filter set correctly");
@@ -563,7 +576,7 @@
         t.eq( image.style.height, sz.h + "px", "image.style.height set correctly");    
 
         //Safari 3 separates the border style into separate entities when reading it
-        if (OpenLayers.Util.getBrowserName() == 'safari') {
+        if (OpenLayers.BROWSER_NAME == 'safari') {
           var s = border.split(' ');
           t.ok(image.style.borderTopWidth == s[0] && image.style.borderTopStyle == s[1], "good default popup.border")
         } else {
@@ -1088,6 +1101,12 @@
         t.eq(OpenLayers.Util.toFloat(b1), OpenLayers.Util.toFloat(b2),
             "toFloat rounds large floats correctly #2");
     }
+    function test_getFormattedLonLat(t) {
+        t.plan(1);
+        var z = 2 + (4/60) - 0.000002 ;
+        t.eq(OpenLayers.Util.getFormattedLonLat(z,"lon"), "02°04'00\"E",
+            "LonLat does not show 60 seconds.");
+    }
   </script>
 </head>
 <body>

Modified: sandbox/tschaub/canvas/tests/list-tests.html
===================================================================
--- sandbox/tschaub/canvas/tests/list-tests.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/list-tests.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -10,10 +10,12 @@
     <li>Console.html</li>
     <li>Control.html</li>
     <li>Control/Attribution.html</li>
+    <li>Control/ArgParser.html</li>
     <li>Control/Button.html</li>
     <li>Control/DragFeature.html</li>
     <li>Control/DragPan.html</li>
     <li>Control/DrawFeature.html</li>
+    <li>Control/Geolocate.html</li>
     <li>Control/GetFeature.html</li>
     <li>Control/Graticule.html</li>
     <li>Control/KeyboardDefaults.html</li>
@@ -35,6 +37,7 @@
     <li>Control/SelectFeature.html</li>
     <li>Control/Snapping.html</li>
     <li>Control/Split.html</li>
+    <li>Control/TouchNavigation.html</li>
     <li>Control/TransformFeature.html</li>
     <li>Control/WMSGetFeatureInfo.html</li>
     <li>Control/WMTSGetFeatureInfo.html</li>
@@ -53,6 +56,7 @@
     <li>Format/Atom.html</li>
     <li>Format/ArcXML.html</li>
     <li>Format/ArcXML/Features.html</li>
+    <li>Format/CQL.html</li>
     <li>Format/GeoJSON.html</li>
     <li>Format/GeoRSS.html</li>
     <li>Format/GML.html</li>
@@ -83,6 +87,7 @@
     <li>Format/WMC/v1.html</li>
     <li>Format/WMSCapabilities.html</li>
     <li>Format/WMSCapabilities/v1_1_1.html</li>
+    <li>Format/WMSCapabilities/v1_1_1_WMSC.html</li>
     <li>Format/WMSCapabilities/v1_3_0.html</li>
     <li>Format/WMSDescribeLayer.html</li>
     <li>Format/WMSGetFeatureInfo.html</li>
@@ -110,8 +115,10 @@
     <li>Geometry/Rectangle.html</li>
     <li>Geometry/Surface.html</li>
     <li>Handler.html</li>
+    <li>Handler/Box.html</li>
     <li>Handler/Click.html</li>
     <li>Handler/Drag.html</li>
+    <li>Handler/Pinch.html</li>
     <li>Handler/Feature.html</li>
     <li>Handler/Hover.html</li>
     <li>Handler/Keyboard.html</li>
@@ -125,6 +132,7 @@
     <li>Layer.html</li>
     <li>Layer/ArcIMS.html</li> 
     <li>Layer/ArcGIS93Rest.html</li>
+    <li>Layer/Bing.html</li>
     <li>Layer/EventPane.html</li>
     <li>Layer/FixedZoomLevels.html</li>
     <li>Layer/GeoRSS.html</li>
@@ -159,6 +167,8 @@
     <li>OpenLayers1.html</li>
     <li>OpenLayers2.html</li>
     <li>OpenLayers3.html</li>
+    <li>OpenLayers4.html</li>
+    <li>OpenLayersJsFiles.html</li>
     <li>Popup.html</li>
     <li>Popup/Anchored.html</li>
     <li>Popup/AnchoredBubble.html</li>
@@ -200,5 +210,6 @@
     <li>Tile/Image/IFrame.html</li>
     <li>Tile/WFS.html</li>
     <li>Tween.html</li>
+    <li>Kinetic.html</li>
     <li>Util.html</li>
 </ul>

Copied: sandbox/tschaub/canvas/tests/manual/google-v3-resize.html (from rev 11416, trunk/openlayers/tests/manual/google-v3-resize.html)
===================================================================
--- sandbox/tschaub/canvas/tests/manual/google-v3-resize.html	                        (rev 0)
+++ sandbox/tschaub/canvas/tests/manual/google-v3-resize.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,54 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>Google v3 Resize Test</title>
+    <link rel="stylesheet" href="../../theme/default/style.css" type="text/css" />
+    <link rel="stylesheet" href="../../examples/style.css" type="text/css" />
+    <script src="http://maps.google.com/maps/api/js?sensor=false"></script>
+    <script src="../../lib/OpenLayers.js"></script>
+    <script type="text/javascript">
+        var map;
+
+        function init() {
+            var mapOptions = {
+                projection: "EPSG:900913",
+                displayProjection: new OpenLayers.Projection("EPSG:4326"), //Pour afficher les coord lat long
+                units: "m",
+                maxResolution: 156543.0339,
+                maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34, 20037508.34, 20037508.34),
+                controls: [new OpenLayers.Control.Navigation(), new OpenLayers.Control.LayerSwitcher()],
+                numZoomLevels: 20
+            };
+            map = new OpenLayers.Map('map', mapOptions);
+
+            var dummy = new OpenLayers.Layer(
+                "Dummy",
+                {isBaseLayer: true}
+            );
+            var gmap = new OpenLayers.Layer.Google(
+                "Google Streets", {sphericalMercator: true}
+            );
+
+            map.addLayers([dummy, gmap]);
+
+            map.setCenter(new OpenLayers.LonLat(-7712190.388467473, 6567469.498697457), 6);
+        }
+    </script>
+  </head>
+  <body onload="init()">
+    <h1 id="title">Google Layer Resize Issue</h1>
+
+    <div id="tags"></div>
+
+    <p id="shortdesc">
+        <ol>
+            <li>Click
+                <button onclick="var m = document.getElementById('map').style; m.height = '400px'; m.width = '800px';map.updateSize(); return false;">Resize</button></li>
+            <li>Open the LayerSwitcher and switch to Google Streets</li>
+            <li>Confirm that the whole map area is populated with tiles</li>
+        </ol>
+    </p>
+
+    <div id="map" style="width: 350px; height: 200px"></div>
+
+  </body>
+</html>

Copied: sandbox/tschaub/canvas/tests/manual/page-position.html (from rev 11416, trunk/openlayers/tests/manual/page-position.html)
===================================================================
--- sandbox/tschaub/canvas/tests/manual/page-position.html	                        (rev 0)
+++ sandbox/tschaub/canvas/tests/manual/page-position.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -0,0 +1,103 @@
+<!DOCTYPE HTML>
+<html>
+    <head>
+        <title>Page Position Test</title>
+        
+        <link rel="stylesheet" href="../../theme/default/style.css" type="text/css" />
+        <link rel="stylesheet" href="../../examples/style.css" type="text/css" />
+        <style type="text/css">
+            #mapwrap {
+                border: 10px solid red;
+                width: 532px;
+                height: 276px;
+            }
+            #map {
+                position: absolute;
+                border: 10px solid #ccc;
+                width: 512px;
+                height: 256px;
+            }
+            #controlToggle li {
+                list-style: none;
+            }
+            p {
+                width: 512px;
+            }
+            #scrollspace {
+                height: 500px;
+            }
+        </style>
+        <script src="../../lib/OpenLayers.js"></script>
+        <script type="text/javascript">
+            var map, drawControls;
+            function init(){
+                map = new OpenLayers.Map('map');
+
+                var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS",
+                    "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'});
+
+                var lineLayer = new OpenLayers.Layer.Vector("Line Layer");
+
+                map.addLayers([wmsLayer, lineLayer]);
+                map.addControl(new OpenLayers.Control.LayerSwitcher());
+                map.addControl(new OpenLayers.Control.MousePosition());
+
+                drawControl = new OpenLayers.Control.DrawFeature(lineLayer,
+                                OpenLayers.Handler.Path);
+
+                map.addControl(drawControl);
+
+                map.setCenter(new OpenLayers.LonLat(0, 0), 3);
+
+                document.getElementById('noneToggle').checked = true;
+            }
+
+            function toggleControl(element) {
+                var control = drawControl;
+                if(element.value == "draw" && element.checked) {
+                    control.activate();
+                } else {
+                    control.deactivate();
+                }
+            }
+        </script>
+    </head>
+    <body onload="init()">
+        <h1 id="title">OpenLayers Page Position Test</h1>
+
+        <p id="shortdesc">
+            Test if borders and scroll position cause unwanted offsets on the
+            mouse positions reported by map events.
+        </p>
+        <div id="mapwrap">
+            <div id="map"></div>
+        </div>
+
+        <ul id="controlToggle">
+            <li>
+                <input type="radio" name="type" value="none" id="noneToggle"
+                       onclick="toggleControl(this);" checked="checked" />
+                <label for="noneToggle">navigate</label>
+            </li>
+            <li>
+                <input type="radio" name="type" value="draw" id="lineToggle" onclick="toggleControl(this);" />
+                <label for="lineToggle">draw line</label>
+            </li>
+        </ul>
+
+        <div id="docs">
+            <p>This map's div has a border and absolute positioning, wrapped
+                by a container which also has a border. The page is also
+                scrollable. Neither the borders nor scrolling the page should
+                result in unwanted offsets on pixel positions reported by map
+                events.</p>
+            <p>With the line drawing control active, click on the map to add a
+                point.  The point should be drawn at the exact mouse location.</p>
+            <p>With the navigation control active, shift-drag a zoom rectangle.
+                The rectangle's corner should align exactly with the mouse
+                cursor.</p>
+            <p>Scroll the page and repeat the above tests.</p>
+            <div id="scrollspace"><div>
+        </div>
+    </body>
+</html>

Modified: sandbox/tschaub/canvas/tests/run-tests.html
===================================================================
--- sandbox/tschaub/canvas/tests/run-tests.html	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tests/run-tests.html	2011-02-24 15:01:55 UTC (rev 11421)
@@ -686,7 +686,7 @@
 		timeout_seconds=4;
 	}
 	var no_close=document.getElementById( "dont_close_test_windows" );
-	var action={ action_kind: "window", wnd_url: url.toString(), wnd_wnd: null, wnd_fn: fn, wnd_timeout_milliseconds: timeout_seconds*1000, wnd_no_close: no_close.checked };
+	var action={ action_kind: "window", wnd_url: url.toString() + (window.location.search || ""), wnd_wnd: null, wnd_fn: fn, wnd_timeout_milliseconds: timeout_seconds*1000, wnd_no_close: no_close.checked };
 	this.delay_total_milliseconds_left+=Test.AnotherWay._action_estimate_milliseconds( action );
 	this.delay_actions.push( action );
 }
@@ -2410,4 +2410,10 @@
 </div>
 
 </span>
+<script>
+    if (/noscroll/.test(location.href)) {
+        document.getElementById('scroller').style.height='auto';
+        document.getElementById('right_frame').style.height='auto';
+    }
+</script>
 </body></html>

Modified: sandbox/tschaub/canvas/theme/default/google.css
===================================================================
--- sandbox/tschaub/canvas/theme/default/google.css	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/theme/default/google.css	2011-02-24 15:01:55 UTC (rev 11421)
@@ -3,8 +3,15 @@
     bottom: 2px;
     left: auto;  
 }
+.olLayerGoogleV3.olLayerGoogleCopyright {
+    bottom: 0px;
+    right: 0px !important;
+}
 .olLayerGooglePoweredBy {
     left: 2px;
     bottom: 2px;   
 }
+.olLayerGoogleV3.olLayerGooglePoweredBy {
+    bottom: 0px !important;
+}
 

Modified: sandbox/tschaub/canvas/theme/default/style.css
===================================================================
--- sandbox/tschaub/canvas/theme/default/style.css	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/theme/default/style.css	2011-02-24 15:01:55 UTC (rev 11421)
@@ -11,16 +11,23 @@
 
 div.olLayerDiv {
    -moz-user-select: none;
+   -khtml-user-select: none;
 }
 
 .olLayerGoogleCopyright {
     left: 2px;
-    bottom: 2px;  
+    bottom: 2px;
 }
+.olLayerGoogleV3.olLayerGoogleCopyright {
+    right: auto !important;
+}
 .olLayerGooglePoweredBy {
     left: 2px;
     bottom: 15px;   
 }
+.olLayerGoogleV3.olLayerGooglePoweredBy {
+    bottom: 15px !important;
+}
 .olControlAttribution {
     font-size: smaller; 
     right: 3px; 
@@ -86,11 +93,13 @@
 .olControlOverviewMapMinimizeButton {
     right: 0px;
     bottom: 80px;
+    cursor: pointer;
 }    
 
 .olControlOverviewMapMaximizeButton {
     right: 0px;
     bottom: 80px;
+    cursor: pointer;
 }
 
 .olControlOverviewMapExtentRectangle {
@@ -322,6 +331,7 @@
 
 .olControlNoSelect {
  -moz-user-select: none;
+ -khtml-user-select: none;
 }
 
 .olImageLoadError {
@@ -394,4 +404,12 @@
 .olControlLayerSwitcher .minimizeDiv {
     top: 5px;
     right: 0px;
+    cursor: pointer;
 }
+
+.olBingAttribution {
+    color: #DDD;
+}
+.olBingAttribution.road {
+    color: #333;
+}

Modified: sandbox/tschaub/canvas/tools/exampleparser.py
===================================================================
--- sandbox/tschaub/canvas/tools/exampleparser.py	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tools/exampleparser.py	2011-02-24 15:01:55 UTC (rev 11421)
@@ -20,7 +20,14 @@
 
 missing_deps = False
 try:
-    import simplejson
+    import json
+except ImportError:
+    try:
+        import simplejson as json
+    except ImportError, E:
+        missing_deps = E 
+    
+try:
     from BeautifulSoup import BeautifulSoup
 except ImportError, E:
     missing_deps = E 
@@ -196,7 +203,7 @@
 if __name__ == "__main__":
 
     if missing_deps:
-        print "This script requires simplejson and BeautifulSoup. You don't have them. \n(%s)" % E
+        print "This script requires json or simplejson and BeautifulSoup. You don't have them. \n(%s)" % E
         sys.exit()
     
     if len(sys.argv) > 1:
@@ -237,7 +244,7 @@
     
     index = wordIndex(exampleList)
 
-    json = simplejson.dumps({"examples": exampleList, "index": index})
+    json = json.dumps({"examples": exampleList, "index": index})
     #give the json a global variable we can use in our js.  This should be replaced or made optional.
     json = 'var info=' + json 
     outFile.write(json)

Modified: sandbox/tschaub/canvas/tools/mergejs.py
===================================================================
--- sandbox/tschaub/canvas/tools/mergejs.py	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tools/mergejs.py	2011-02-24 15:01:55 UTC (rev 11421)
@@ -31,7 +31,7 @@
 #
 # Note: This is a very rough initial version of this code.
 #
-# -- Copyright 2005-2010 OpenLayers contributors / OpenLayers project --
+# -- Copyright 2005-2011 OpenLayers contributors / OpenLayers project --
 #
 
 # TODO: Allow files to be excluded. e.g. `Crossbrowser/DebugMode.js`?
@@ -44,6 +44,10 @@
 SUFFIX_JAVASCRIPT = ".js"
 
 RE_REQUIRE = "@requires:? (.*)\n" # TODO: Ensure in comment?
+
+class MissingImport(Exception):
+    """Exception raised when a listed import is not found in the lib."""
+
 class SourceFile:
     """
     Represents a Javascript source code file.
@@ -161,8 +165,6 @@
 
     files = {}
 
-    order = [] # List of filepaths to output, in a dependency satisfying order 
-
     ## Import file source code
     ## TODO: Do import when we walk the directories above?
     for filepath in allFiles:
@@ -179,41 +181,31 @@
     resolution_pass = 1
 
     while not complete:
-        order = [] # List of filepaths to output, in a dependency satisfying order 
-        nodes = []
-        routes = []
+        complete = True
+
         ## Resolve the dependencies
         print "Resolution pass %s... " % resolution_pass
         resolution_pass += 1 
 
         for filepath, info in files.items():
-            nodes.append(filepath)
-            for neededFilePath in info.requires:
-                routes.append((neededFilePath, filepath))
-
-        for dependencyLevel in toposort(nodes, routes):
-            for filepath in dependencyLevel:
-                order.append(filepath)
-                if not files.has_key(filepath):
-                    print "Importing: %s" % filepath
-                    fullpath = os.path.join(sourceDirectory, filepath).strip()
-                    content = open(fullpath, "U").read() # TODO: Ensure end of line @ EOF?
-                    files[filepath] = SourceFile(filepath, content) # TODO: Chop path?
-        
-
-
-        # Double check all dependencies have been met
-        complete = True
-        try:
-            for fp in order:
-                if max([order.index(rfp) for rfp in files[fp].requires] +
-                       [order.index(fp)]) != order.index(fp):
+            for path in info.requires:
+                if not files.has_key(path):
                     complete = False
-        except:
-            complete = False
+                    fullpath = os.path.join(sourceDirectory, path).strip()
+                    if os.path.exists(fullpath):
+                        print "Importing: %s" % path
+                        content = open(fullpath, "U").read() # TODO: Ensure end of line @ EOF?
+                        files[path] = SourceFile(path, content) # TODO: Chop path?
+                    else:
+                        raise MissingImport("File '%s' not found (required by '%s')." % (path, filepath))
         
-        print    
+    # create dictionary of dependencies
+    dependencies = {}
+    for filepath, info in files.items():
+        dependencies[filepath] = info.requires
 
+    print "Sorting..."
+    order = toposort(dependencies) #[x for x in toposort(dependencies)]
 
     ## Move forced first and last files to the required position
     if cfg:

Modified: sandbox/tschaub/canvas/tools/toposort.py
===================================================================
--- sandbox/tschaub/canvas/tools/toposort.py	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tools/toposort.py	2011-02-24 15:01:55 UTC (rev 11421)
@@ -1,260 +1,35 @@
-#
-# According to <http://www.vrplumber.com/programming/> this file
-# is licensed under a BSD-style license. We only use the section
-# originally by Tim Peters.
-#
-# TODO: The use of this code needs to be okayed by someone.
-#
+"""
+toposort.py
+Sorts dictionary keys based on lists of dependencies.
+"""
 
-class RecursionError( OverflowError, ValueError ):
-    '''Unable to calculate result because of recursive structure'''
-    
+class MissingDependency(Exception):
+    """Exception raised when a listed dependency is not in the dictionary."""
 
-def sort(nodes, routes, noRecursion=1):
-    '''Passed a list of node IDs and a list of source,dest ID routes
-    attempt to create a list of stages where each sub list
-    is one stage in a process.
-    '''
-    children, parents = _buildChildrenLists(routes)
-    # first stage is those nodes
-    # having no incoming routes...
-    stage = []
-    stages = [stage]
-    taken = []
-    for node in nodes:
-        if (not parents.get(node)):
-            stage.append (node)
-    if nodes and not stage:
-        # there is no element which does not depend on
-        # some other element!!!
-        stage.append( nodes[0])
-    taken.extend( stage )
-    nodes = filter ( lambda x, l=stage: x not in l, nodes )
-    while nodes:
-        previousStageChildren = []
-        nodelen = len(nodes)
-        # second stage are those nodes
-        # which are direct children of the first stage
-        for node in stage:
-            for child in children.get (node, []):
-                if child not in previousStageChildren and child not in taken:
-                    previousStageChildren.append(child)
-                elif child in taken and noRecursion:
-                    raise RecursionError( (child, node) )
-        # unless they are children of other direct children...
-        # TODO, actually do that...
-        stage = previousStageChildren
-        removes = []
-        for current in stage:
-            currentParents = parents.get( current, [] )
-            for parent in currentParents:
-                if parent in stage and parent != current:
-                    # might wind up removing current...
-                    if not current in parents.get(parent, []):
-                        # is not mutually dependent...
-                        removes.append( current )
-        for remove in removes:
-            while remove in stage:
-                stage.remove( remove )
-        stages.append( stage)
-        taken.extend( stage )
-        nodes = filter ( lambda x, l=stage: x not in l, nodes )
-        if nodelen == len(nodes):
-            if noRecursion:
-                raise RecursionError( nodes )
-            else:
-                stages.append( nodes[:] )
-                nodes = []
-    return stages
-
-def _buildChildrenLists (routes):
-    childrenTable = {}
-    parentTable = {}
-    for sourceID,destinationID in routes:
-        currentChildren = childrenTable.get( sourceID, [])
-        currentParents = parentTable.get( destinationID, [])
-        if not destinationID in currentChildren:
-            currentChildren.append ( destinationID)
-        if not sourceID in currentParents:
-            currentParents.append ( sourceID)
-        childrenTable[sourceID] = currentChildren
-        parentTable[destinationID] = currentParents
-    return childrenTable, parentTable
-
-
-def toposort (nodes, routes, noRecursion=1):
-    '''Topological sort from Tim Peters, fairly efficient
-    in comparison (it seems).'''
-    #first calculate the recursion depth
+class Sorter(object):
+    def __init__(self, dependencies):
+        self.dependencies = dependencies
+        self.visited = set()
+        self.sorted = ()
     
-    dependencies = {}
-    inversedependencies = {}
-    if not nodes:
-        return []
-    if not routes:
-        return [nodes]
-    for node in nodes:
-        dependencies[ node ] = (0, node)
-        inversedependencies[ node ] = []
+    def sort(self):
+        for key in self.dependencies:
+            self._visit(key)
+        return self.sorted
     
-    
-    for depended, depends in routes:
-        # is it a null rule
-        try:
-            newdependencylevel, object = dependencies.get ( depends, (0, depends))
-        except TypeError:
-            print depends
-            raise
-        dependencies[ depends ] = (newdependencylevel + 1,  depends)
-        # "dependency (existence) of depended-on"
-        newdependencylevel,object = dependencies.get ( depended, (0, depended) )
-        dependencies[ depended ] = (newdependencylevel, depended)
-        # Inverse dependency set up
-        dependencieslist = inversedependencies.get ( depended, [])
-        dependencieslist.append (depends)
-        inversedependencies[depended] = dependencieslist
-    ### Now we do the actual sorting
-    # The first task is to create the sortable
-    # list of dependency-levels
-    sortinglist = dependencies.values()
-    sortinglist.sort ()
-    output = []
-    while sortinglist:
-        deletelist = []
-        generation = []
-        output.append( generation)
-        while sortinglist and sortinglist[0][0] == 0:
-            number, object = sortinglist[0]
-            generation.append ( object )
-            deletelist.append( object )
-            for inverse in inversedependencies.get(object, () ):
-                try:
-                    oldcount, inverse = dependencies [ inverse]
-                    if oldcount > 0:
-                        # will be dealt with on later pass
-                        dependencies [ inverse] = (oldcount-1, inverse)
-                    else:
-                        # will be dealt with on this pass,
-                        # so needs not to be in the sorting list next time
-                        deletelist.append( inverse )
-                    # just in case a loop comes through
-                    inversedependencies[object] = []
-                except KeyError:
-                    # dealing with a recursion-breaking run...
-                    pass
-            del sortinglist [0]
-        # if no elements could be deleted, then
-        # there is something which depends upon itself
-        if not deletelist:
-            if noRecursion:
-                raise RecursionError( sortinglist )
-            else:
-                # hack so that something gets deleted...
-##                import pdb
-##                pdb.set_trace()
-                dependencies[sortinglist[0][1]] = (0,sortinglist[0][1])
-        # delete the items that were dealt with
-        for item in deletelist:
-            try:
-                del dependencies [ item ]
-            except KeyError:
-                pass
-        # need to recreate the sortinglist
-        sortinglist = dependencies.values()
-        if not generation:
-            output.remove( generation )
-        sortinglist.sort ()
-    return output
+    def _visit(self, key):
+        if key not in self.visited:
+            self.visited.add(key)
+            if not self.dependencies.has_key(key):
+                raise MissingDependency(key)
+            for depends in self.dependencies[key]:
+                self._visit(depends)
+            self.sorted += (key,)
 
-
-
-
-
-if __name__ == "__main__":
-
-    nodes = ['a', 'b', 'c', 'd', 'e', 'f']
-    route = [('a', 'b'), ('b', 'c'), ('b', 'd'), ('e','f')]
-
-    for x in  toposort( nodes, route):
-        for a in x:
-            print a
-
-    raise SystemExit
-
-
-
-    import pprint, traceback
-    nodes= [ 0,1,2,3,4,5 ]
-    testingValues = [
-        [ (0,1),(1,2),(2,3),(3,4),(4,5)],
-        [ (0,1),(0,2),(1,2),(3,4),(4,5)],
-        [
-        (0,1),
-        (0,2),
-        (0,2),
-                    (2,4),
-                    (2,5),
-                (3,2),
-        (0,3)],
-        [
-        (0,1), # 3-element cycle test, no orphan nodes
-        (1,2),
-        (2,0),
-                    (2,4),
-                    (2,5),
-                (3,2),
-        (0,3)],
-        [
-        (0,1),
-        (1,1),
-        (1,1),
-                (1,4),
-                (1,5),
-                (1,2),
-        (3,1),
-        (2,1),
-        (2,0)],
-        [
-            (0,1),
-            (1,0),
-            (0,2),
-            (0,3),
-        ],
-        [
-            (0,1),
-            (1,0),
-            (0,2),
-            (3,1),
-        ],
-    ]
-    print 'sort, no recursion allowed'
-    for index in range(len(testingValues)):
-##        print '    %s -- %s'%( index, testingValues[index])
-        try:
-            print '        ', sort( nodes, testingValues[index] )
-        except:
-            print 'exception raised'
-    print 'toposort, no recursion allowed'
-    for index in range(len(testingValues)):
-##        print '    %s -- %s'%( index, testingValues[index])
-        try:
-            print '        ', toposort( nodes, testingValues[index] )
-        except:
-            print 'exception raised'
-    print 'sort, recursion allowed'
-    for index in range(len(testingValues)):
-##        print '    %s -- %s'%( index, testingValues[index])
-        try:
-            print '        ', sort( nodes, testingValues[index],0 )
-        except:
-            print 'exception raised'
-    print 'toposort, recursion allowed'
-    for index in range(len(testingValues)):
-##        print '    %s -- %s'%( index, testingValues[index])
-        try:
-            print '        ', toposort( nodes, testingValues[index],0 )
-        except:
-            print 'exception raised'
-        
-        
-    
+def toposort(dependencies):
+    """Returns a tuple of the dependencies dictionary keys sorted by entries
+    in the dependency lists.  Given circular dependencies, sort will impose
+    an order.  Raises MissingDependency if a key is not found.
+    """
+    s = Sorter(dependencies)
+    return s.sort()

Modified: sandbox/tschaub/canvas/tools/update_dev_dir.sh
===================================================================
--- sandbox/tschaub/canvas/tools/update_dev_dir.sh	2011-02-24 14:58:52 UTC (rev 11420)
+++ sandbox/tschaub/canvas/tools/update_dev_dir.sh	2011-02-24 15:01:55 UTC (rev 11421)
@@ -2,10 +2,9 @@
 
 # Used to update http://openlayers.org/dev/ 
 
-svn up /osgeo/openlayers/docs/dev; 
 
 # Get current 'Last Changed Rev'
-REV=`svn info /osgeo/openlayers/docs/dev/ | grep 'Revision' | awk '{print $2}'`
+REV=`svn info http://svn.openlayers.org/ | grep 'Revision' | awk '{print $2}'`
 
 # Get the last svn rev
 touch /tmp/ol_svn_rev
@@ -13,11 +12,13 @@
 
 # If they're not equal, do some work.
 if [ ! o$REV = $OLD_REV ]; then
+    svn revert -R /osgeo/openlayers/docs/dev
+    svn up /osgeo/openlayers/docs/dev
 
     cd /osgeo/openlayers/docs/dev/tools/ 
     python exampleparser.py
     cd /osgeo/openlayers/docs/dev/build
-    ./build.py
+    ./build.py tests.cfg
     
     cp OpenLayers.js ..
     cd ..



More information about the Commits mailing list