[OpenLayers-Commits] r11705 - in sandbox/august/trunk: . build doc examples examples/img img lib lib/Firebug lib/OpenLayers lib/OpenLayers/BaseTypes lib/OpenLayers/Control lib/OpenLayers/Format lib/OpenLayers/Format/CSWGetDomain lib/OpenLayers/Format/OWSContext lib/OpenLayers/Format/WFSCapabilities lib/OpenLayers/Format/WFST lib/OpenLayers/Format/WMTSCapabilities lib/OpenLayers/Geometry lib/OpenLayers/Handler lib/OpenLayers/Layer lib/OpenLayers/Layer/Google lib/OpenLayers/Protocol lib/OpenLayers/Protocol/WFS lib/OpenLayers/Renderer lib/OpenLayers/Strategy 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/Handl er 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/node.js tests/speed theme/default theme/default/img tools

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Mon Mar 14 17:06:01 EDT 2011


Author: augusttown
Date: 2011-03-14 14:05:59 -0700 (Mon, 14 Mar 2011)
New Revision: 11705

Added:
   sandbox/august/trunk/build/mobile.cfg
   sandbox/august/trunk/build/tests.cfg
   sandbox/august/trunk/examples/accelerometer.html
   sandbox/august/trunk/examples/anchor-permalink.html
   sandbox/august/trunk/examples/anchor-permalink.js
   sandbox/august/trunk/examples/arcgiscache_ags.html
   sandbox/august/trunk/examples/arcgiscache_direct.html
   sandbox/august/trunk/examples/arcgiscache_jsonp.html
   sandbox/august/trunk/examples/browser.html
   sandbox/august/trunk/examples/browser.js
   sandbox/august/trunk/examples/cross-origin.html
   sandbox/august/trunk/examples/cross-origin.js
   sandbox/august/trunk/examples/fullScreen.js
   sandbox/august/trunk/examples/game-accel-ball.html
   sandbox/august/trunk/examples/geolocation.html
   sandbox/august/trunk/examples/geolocation.js
   sandbox/august/trunk/examples/img/
   sandbox/august/trunk/examples/img/check-round-green.png
   sandbox/august/trunk/examples/img/check-round-grey.png
   sandbox/august/trunk/examples/img/list.png
   sandbox/august/trunk/examples/img/locate.png
   sandbox/august/trunk/examples/img/marker_shadow.png
   sandbox/august/trunk/examples/img/minus1.png
   sandbox/august/trunk/examples/img/mobile-layers.png
   sandbox/august/trunk/examples/img/mobile-loc.png
   sandbox/august/trunk/examples/img/mobile-zoombar.png
   sandbox/august/trunk/examples/img/openlayers.png
   sandbox/august/trunk/examples/img/popupMatrix.jpg
   sandbox/august/trunk/examples/img/small.jpg
   sandbox/august/trunk/examples/img/thinlong.jpg
   sandbox/august/trunk/examples/img/widelong.jpg
   sandbox/august/trunk/examples/img/wideshort.jpg
   sandbox/august/trunk/examples/kinetic.html
   sandbox/august/trunk/examples/kinetic.js
   sandbox/august/trunk/examples/mobile-base.js
   sandbox/august/trunk/examples/mobile-drawing.html
   sandbox/august/trunk/examples/mobile-drawing.js
   sandbox/august/trunk/examples/mobile-jq.html
   sandbox/august/trunk/examples/mobile-jq.js
   sandbox/august/trunk/examples/mobile-navigation.html
   sandbox/august/trunk/examples/mobile-navigation.js
   sandbox/august/trunk/examples/mobile-sencha.html
   sandbox/august/trunk/examples/mobile-sencha.js
   sandbox/august/trunk/examples/mobile.html
   sandbox/august/trunk/examples/mobile.js
   sandbox/august/trunk/examples/multitouch.html
   sandbox/august/trunk/examples/style.mobile-jq.css
   sandbox/august/trunk/examples/style.mobile.css
   sandbox/august/trunk/lib/OpenLayers/Control/Geolocate.js
   sandbox/august/trunk/lib/OpenLayers/Control/PinchZoom.js
   sandbox/august/trunk/lib/OpenLayers/Control/TouchNavigation.js
   sandbox/august/trunk/lib/OpenLayers/Handler/Pinch.js
   sandbox/august/trunk/lib/OpenLayers/Kinetic.js
   sandbox/august/trunk/lib/OpenLayers/Layer/ArcGISCache.js
   sandbox/august/trunk/lib/OpenLayers/Protocol/Script.js
   sandbox/august/trunk/lib/OpenLayers/Protocol/SimpleFilterSerializer.js
   sandbox/august/trunk/lib/OpenLayers/Renderer/NG.js
   sandbox/august/trunk/lib/OpenLayers/Renderer/SVG2.js
   sandbox/august/trunk/tests/Control/ArgParser.html
   sandbox/august/trunk/tests/Control/Geolocate.html
   sandbox/august/trunk/tests/Control/PinchZoom.html
   sandbox/august/trunk/tests/Control/TouchNavigation.html
   sandbox/august/trunk/tests/Handler/Box.html
   sandbox/august/trunk/tests/Handler/Pinch.html
   sandbox/august/trunk/tests/Kinetic.html
   sandbox/august/trunk/tests/Layer/ArcGISCache.html
   sandbox/august/trunk/tests/Layer/ArcGISCache.json
   sandbox/august/trunk/tests/OLLoader.js
   sandbox/august/trunk/tests/OpenLayersJsFiles.html
   sandbox/august/trunk/tests/Protocol/Script.html
   sandbox/august/trunk/tests/Protocol/SimpleFilterSerializer.html
   sandbox/august/trunk/tests/Renderer/SVG2.html
   sandbox/august/trunk/tests/node.js/
   sandbox/august/trunk/tests/node.js/mockdom.js
   sandbox/august/trunk/tests/node.js/node-tests.cfg
   sandbox/august/trunk/tests/node.js/node.js
   sandbox/august/trunk/tests/node.js/run-test.js
   sandbox/august/trunk/tests/node.js/run.sh
   sandbox/august/trunk/tests/speed/vector-renderers.html
   sandbox/august/trunk/tests/speed/vector-renderers.js
   sandbox/august/trunk/tools/closure.py
   sandbox/august/trunk/tools/closure_ws.py
Removed:
   sandbox/august/trunk/examples/img/check-round-green.png
   sandbox/august/trunk/examples/img/check-round-grey.png
   sandbox/august/trunk/examples/img/list.png
   sandbox/august/trunk/examples/img/locate.png
   sandbox/august/trunk/examples/img/marker_shadow.png
   sandbox/august/trunk/examples/img/minus1.png
   sandbox/august/trunk/examples/img/mobile-layers.png
   sandbox/august/trunk/examples/img/mobile-loc.png
   sandbox/august/trunk/examples/img/mobile-zoombar.png
   sandbox/august/trunk/examples/img/openlayers.png
   sandbox/august/trunk/examples/img/popupMatrix.jpg
   sandbox/august/trunk/examples/img/small.jpg
   sandbox/august/trunk/examples/img/thinlong.jpg
   sandbox/august/trunk/examples/img/widelong.jpg
   sandbox/august/trunk/examples/img/wideshort.jpg
   sandbox/august/trunk/examples/marker_shadow.png
   sandbox/august/trunk/examples/popupMatrix.jpg
   sandbox/august/trunk/examples/small.jpg
   sandbox/august/trunk/examples/thinlong.jpg
   sandbox/august/trunk/examples/widelong.jpg
   sandbox/august/trunk/examples/wideshort.jpg
   sandbox/august/trunk/tests/node.js/mockdom.js
   sandbox/august/trunk/tests/node.js/node-tests.cfg
   sandbox/august/trunk/tests/node.js/node.js
   sandbox/august/trunk/tests/node.js/run-test.js
   sandbox/august/trunk/tests/node.js/run.sh
Modified:
   sandbox/august/trunk/
   sandbox/august/trunk/build/README.txt
   sandbox/august/trunk/build/build.py
   sandbox/august/trunk/doc/authors.txt
   sandbox/august/trunk/examples/GMLParser.html
   sandbox/august/trunk/examples/KMLParser.html
   sandbox/august/trunk/examples/SLDSelect.html
   sandbox/august/trunk/examples/WMSDescribeLayerParser.html
   sandbox/august/trunk/examples/WMSPost.html
   sandbox/august/trunk/examples/accessible.html
   sandbox/august/trunk/examples/all-overlays-google.html
   sandbox/august/trunk/examples/all-overlays.html
   sandbox/august/trunk/examples/animated_panning.html
   sandbox/august/trunk/examples/arcgis93rest.html
   sandbox/august/trunk/examples/arcims-thematic.html
   sandbox/august/trunk/examples/arcims.html
   sandbox/august/trunk/examples/attribution.html
   sandbox/august/trunk/examples/baseLayers.html
   sandbox/august/trunk/examples/behavior-fixed-http-gml.html
   sandbox/august/trunk/examples/bing-tiles.html
   sandbox/august/trunk/examples/bing.html
   sandbox/august/trunk/examples/boxes-vector.html
   sandbox/august/trunk/examples/boxes.html
   sandbox/august/trunk/examples/browser-name.html
   sandbox/august/trunk/examples/buffer.html
   sandbox/august/trunk/examples/canvas.html
   sandbox/august/trunk/examples/canvas.js
   sandbox/august/trunk/examples/click-handler.html
   sandbox/august/trunk/examples/click.html
   sandbox/august/trunk/examples/controls.html
   sandbox/august/trunk/examples/cql-format.html
   sandbox/august/trunk/examples/custom-control-point.html
   sandbox/august/trunk/examples/custom-control.html
   sandbox/august/trunk/examples/custom-style.html
   sandbox/august/trunk/examples/debug.html
   sandbox/august/trunk/examples/document-drag.html
   sandbox/august/trunk/examples/donut.html
   sandbox/august/trunk/examples/doubleSetCenter.html
   sandbox/august/trunk/examples/drag-feature.html
   sandbox/august/trunk/examples/draw-feature.html
   sandbox/august/trunk/examples/dynamic-text-layer.html
   sandbox/august/trunk/examples/editingtoolbar-outside.html
   sandbox/august/trunk/examples/editingtoolbar.html
   sandbox/august/trunk/examples/events.html
   sandbox/august/trunk/examples/example-list.html
   sandbox/august/trunk/examples/example.html
   sandbox/august/trunk/examples/filter-strategy.html
   sandbox/august/trunk/examples/filter.html
   sandbox/august/trunk/examples/fractional-zoom.html
   sandbox/august/trunk/examples/fullScreen.html
   sandbox/august/trunk/examples/geojson.html
   sandbox/august/trunk/examples/georss-flickr.html
   sandbox/august/trunk/examples/georss-markers.html
   sandbox/august/trunk/examples/georss.html
   sandbox/august/trunk/examples/getfeature-wfs.html
   sandbox/august/trunk/examples/getfeatureinfo-control.html
   sandbox/august/trunk/examples/getfeatureinfo-popup.html
   sandbox/august/trunk/examples/getfeatureinfo.html
   sandbox/august/trunk/examples/gml-layer.html
   sandbox/august/trunk/examples/google-reproject.html
   sandbox/august/trunk/examples/google-v3-alloverlays.html
   sandbox/august/trunk/examples/google-v3.html
   sandbox/august/trunk/examples/google.html
   sandbox/august/trunk/examples/graphic-name.html
   sandbox/august/trunk/examples/graticule.html
   sandbox/august/trunk/examples/gutter.html
   sandbox/august/trunk/examples/highlight-feature.html
   sandbox/august/trunk/examples/hover-handler.html
   sandbox/august/trunk/examples/image-layer.html
   sandbox/august/trunk/examples/intersects.html
   sandbox/august/trunk/examples/kamap.html
   sandbox/august/trunk/examples/kml-layer.html
   sandbox/august/trunk/examples/kml-track.html
   sandbox/august/trunk/examples/late-render.html
   sandbox/august/trunk/examples/layer-opacity.html
   sandbox/august/trunk/examples/layerLoadMonitoring.html
   sandbox/august/trunk/examples/layerswitcher.html
   sandbox/august/trunk/examples/lite.html
   sandbox/august/trunk/examples/mapguide.html
   sandbox/august/trunk/examples/mapserver.html
   sandbox/august/trunk/examples/mapserver_untiled.html
   sandbox/august/trunk/examples/marker-shadow.html
   sandbox/august/trunk/examples/markerResize.html
   sandbox/august/trunk/examples/markers.html
   sandbox/august/trunk/examples/markersTextLayer.html
   sandbox/august/trunk/examples/measure.html
   sandbox/august/trunk/examples/mm.html
   sandbox/august/trunk/examples/modify-feature.html
   sandbox/august/trunk/examples/mouse-position.html
   sandbox/august/trunk/examples/mousewheel-interval.html
   sandbox/august/trunk/examples/multimap-mercator.html
   sandbox/august/trunk/examples/multiserver.html
   sandbox/august/trunk/examples/mvs.html
   sandbox/august/trunk/examples/navigation-control.html
   sandbox/august/trunk/examples/navigation-history.html
   sandbox/august/trunk/examples/navtoolbar-alwaysZoom.html
   sandbox/august/trunk/examples/navtoolbar-outsidemap.html
   sandbox/august/trunk/examples/navtoolbar.html
   sandbox/august/trunk/examples/ordering.html
   sandbox/august/trunk/examples/osm-google.html
   sandbox/august/trunk/examples/osm-layer.html
   sandbox/august/trunk/examples/osm.html
   sandbox/august/trunk/examples/outOfRangeMarkers.html
   sandbox/august/trunk/examples/overviewmap.html
   sandbox/august/trunk/examples/pan-zoom-panels.html
   sandbox/august/trunk/examples/panel.html
   sandbox/august/trunk/examples/point-track-markers.html
   sandbox/august/trunk/examples/popupMatrix.html
   sandbox/august/trunk/examples/popups.html
   sandbox/august/trunk/examples/projected-map.html
   sandbox/august/trunk/examples/protocol-gears.html
   sandbox/august/trunk/examples/regular-polygons.html
   sandbox/august/trunk/examples/resize-features.html
   sandbox/august/trunk/examples/restricted-extent.html
   sandbox/august/trunk/examples/rotate-features.html
   sandbox/august/trunk/examples/select-feature-multilayer.html
   sandbox/august/trunk/examples/select-feature-openpopup.html
   sandbox/august/trunk/examples/select-feature.html
   sandbox/august/trunk/examples/setextent.html
   sandbox/august/trunk/examples/simplify-linestring.html
   sandbox/august/trunk/examples/single-tile.html
   sandbox/august/trunk/examples/sld-parser.html
   sandbox/august/trunk/examples/sld.html
   sandbox/august/trunk/examples/snap-split.html
   sandbox/august/trunk/examples/snapping.html
   sandbox/august/trunk/examples/sos.html
   sandbox/august/trunk/examples/spherical-mercator.html
   sandbox/august/trunk/examples/split-feature.html
   sandbox/august/trunk/examples/strategy-bbox.html
   sandbox/august/trunk/examples/strategy-cluster-extended.html
   sandbox/august/trunk/examples/strategy-cluster-threshold.html
   sandbox/august/trunk/examples/strategy-cluster.html
   sandbox/august/trunk/examples/strategy-paging.html
   sandbox/august/trunk/examples/style-rules.html
   sandbox/august/trunk/examples/style.css
   sandbox/august/trunk/examples/stylemap.html
   sandbox/august/trunk/examples/styles-context.html
   sandbox/august/trunk/examples/styles-rotation.html
   sandbox/august/trunk/examples/styles-unique.html
   sandbox/august/trunk/examples/sundials-spherical-mercator.html
   sandbox/august/trunk/examples/sundials.html
   sandbox/august/trunk/examples/symbolizers-fill-stroke-graphic.html
   sandbox/august/trunk/examples/teleportation.html
   sandbox/august/trunk/examples/tile-origin.html
   sandbox/august/trunk/examples/tilecache.html
   sandbox/august/trunk/examples/tms.html
   sandbox/august/trunk/examples/transform-feature.html
   sandbox/august/trunk/examples/transition.html
   sandbox/august/trunk/examples/urban.html
   sandbox/august/trunk/examples/ve-novibrate.html
   sandbox/august/trunk/examples/ve.html
   sandbox/august/trunk/examples/vector-features-with-text.html
   sandbox/august/trunk/examples/vector-features.html
   sandbox/august/trunk/examples/vector-formats.html
   sandbox/august/trunk/examples/web-mercator.html
   sandbox/august/trunk/examples/wfs-filter.html
   sandbox/august/trunk/examples/wfs-protocol-transactions.html
   sandbox/august/trunk/examples/wfs-protocol.html
   sandbox/august/trunk/examples/wfs-reprojection.html
   sandbox/august/trunk/examples/wfs-snap-split.html
   sandbox/august/trunk/examples/wfs-states.html
   sandbox/august/trunk/examples/wfs-states.js
   sandbox/august/trunk/examples/wmc.html
   sandbox/august/trunk/examples/wms-long-url.html
   sandbox/august/trunk/examples/wms-untiled.html
   sandbox/august/trunk/examples/wms-v13.html
   sandbox/august/trunk/examples/wms.html
   sandbox/august/trunk/examples/wmst.html
   sandbox/august/trunk/examples/wmts-capabilities.html
   sandbox/august/trunk/examples/wmts-getfeatureinfo.html
   sandbox/august/trunk/examples/wmts.html
   sandbox/august/trunk/examples/worldwind.html
   sandbox/august/trunk/examples/wrapDateLine.html
   sandbox/august/trunk/examples/xhtml.html
   sandbox/august/trunk/examples/xml.html
   sandbox/august/trunk/examples/xyz-esri.html
   sandbox/august/trunk/examples/xyz-offset.html
   sandbox/august/trunk/examples/yahoo.html
   sandbox/august/trunk/examples/zoomLevels.html
   sandbox/august/trunk/examples/zoomify.html
   sandbox/august/trunk/img/cloud-popup-relative.png
   sandbox/august/trunk/img/drag-rectangle-off.png
   sandbox/august/trunk/img/drag-rectangle-on.png
   sandbox/august/trunk/img/east-mini.png
   sandbox/august/trunk/img/layer-switcher-maximize.png
   sandbox/august/trunk/img/layer-switcher-minimize.png
   sandbox/august/trunk/img/marker-blue.png
   sandbox/august/trunk/img/marker-gold.png
   sandbox/august/trunk/img/marker-green.png
   sandbox/august/trunk/img/marker.png
   sandbox/august/trunk/img/measuring-stick-off.png
   sandbox/august/trunk/img/measuring-stick-on.png
   sandbox/august/trunk/img/north-mini.png
   sandbox/august/trunk/img/panning-hand-off.png
   sandbox/august/trunk/img/panning-hand-on.png
   sandbox/august/trunk/img/slider.png
   sandbox/august/trunk/img/south-mini.png
   sandbox/august/trunk/img/west-mini.png
   sandbox/august/trunk/img/zoom-minus-mini.png
   sandbox/august/trunk/img/zoom-plus-mini.png
   sandbox/august/trunk/img/zoom-world-mini.png
   sandbox/august/trunk/img/zoombar.png
   sandbox/august/trunk/lib/Firebug/firebugx.js
   sandbox/august/trunk/lib/OpenLayers.js
   sandbox/august/trunk/lib/OpenLayers/BaseTypes.js
   sandbox/august/trunk/lib/OpenLayers/BaseTypes/Bounds.js
   sandbox/august/trunk/lib/OpenLayers/BaseTypes/Element.js
   sandbox/august/trunk/lib/OpenLayers/BaseTypes/Pixel.js
   sandbox/august/trunk/lib/OpenLayers/Console.js
   sandbox/august/trunk/lib/OpenLayers/Control.js
   sandbox/august/trunk/lib/OpenLayers/Control/ArgParser.js
   sandbox/august/trunk/lib/OpenLayers/Control/Attribution.js
   sandbox/august/trunk/lib/OpenLayers/Control/DragPan.js
   sandbox/august/trunk/lib/OpenLayers/Control/KeyboardDefaults.js
   sandbox/august/trunk/lib/OpenLayers/Control/LayerSwitcher.js
   sandbox/august/trunk/lib/OpenLayers/Control/Measure.js
   sandbox/august/trunk/lib/OpenLayers/Control/ModifyFeature.js
   sandbox/august/trunk/lib/OpenLayers/Control/MouseDefaults.js
   sandbox/august/trunk/lib/OpenLayers/Control/MousePosition.js
   sandbox/august/trunk/lib/OpenLayers/Control/MouseToolbar.js
   sandbox/august/trunk/lib/OpenLayers/Control/Navigation.js
   sandbox/august/trunk/lib/OpenLayers/Control/OverviewMap.js
   sandbox/august/trunk/lib/OpenLayers/Control/PanZoom.js
   sandbox/august/trunk/lib/OpenLayers/Control/PanZoomBar.js
   sandbox/august/trunk/lib/OpenLayers/Control/Permalink.js
   sandbox/august/trunk/lib/OpenLayers/Control/ScaleLine.js
   sandbox/august/trunk/lib/OpenLayers/Control/SelectFeature.js
   sandbox/august/trunk/lib/OpenLayers/Control/Snapping.js
   sandbox/august/trunk/lib/OpenLayers/Control/Split.js
   sandbox/august/trunk/lib/OpenLayers/Events.js
   sandbox/august/trunk/lib/OpenLayers/Format/Atom.js
   sandbox/august/trunk/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js
   sandbox/august/trunk/lib/OpenLayers/Format/Filter.js
   sandbox/august/trunk/lib/OpenLayers/Format/GML.js
   sandbox/august/trunk/lib/OpenLayers/Format/GPX.js
   sandbox/august/trunk/lib/OpenLayers/Format/GeoJSON.js
   sandbox/august/trunk/lib/OpenLayers/Format/GeoRSS.js
   sandbox/august/trunk/lib/OpenLayers/Format/JSON.js
   sandbox/august/trunk/lib/OpenLayers/Format/KML.js
   sandbox/august/trunk/lib/OpenLayers/Format/OSM.js
   sandbox/august/trunk/lib/OpenLayers/Format/OWSContext.js
   sandbox/august/trunk/lib/OpenLayers/Format/OWSContext/v0_3_1.js
   sandbox/august/trunk/lib/OpenLayers/Format/SLD.js
   sandbox/august/trunk/lib/OpenLayers/Format/SOSCapabilities.js
   sandbox/august/trunk/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js
   sandbox/august/trunk/lib/OpenLayers/Format/SOSGetObservation.js
   sandbox/august/trunk/lib/OpenLayers/Format/WFSCapabilities.js
   sandbox/august/trunk/lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js
   sandbox/august/trunk/lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js
   sandbox/august/trunk/lib/OpenLayers/Format/WFSDescribeFeatureType.js
   sandbox/august/trunk/lib/OpenLayers/Format/WFST/v1.js
   sandbox/august/trunk/lib/OpenLayers/Format/WMC.js
   sandbox/august/trunk/lib/OpenLayers/Format/WMSCapabilities.js
   sandbox/august/trunk/lib/OpenLayers/Format/WMSDescribeLayer.js
   sandbox/august/trunk/lib/OpenLayers/Format/WMSGetFeatureInfo.js
   sandbox/august/trunk/lib/OpenLayers/Format/WMTSCapabilities.js
   sandbox/august/trunk/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js
   sandbox/august/trunk/lib/OpenLayers/Geometry/Rectangle.js
   sandbox/august/trunk/lib/OpenLayers/Handler/Box.js
   sandbox/august/trunk/lib/OpenLayers/Handler/Click.js
   sandbox/august/trunk/lib/OpenLayers/Handler/Drag.js
   sandbox/august/trunk/lib/OpenLayers/Handler/Feature.js
   sandbox/august/trunk/lib/OpenLayers/Handler/Path.js
   sandbox/august/trunk/lib/OpenLayers/Handler/Point.js
   sandbox/august/trunk/lib/OpenLayers/Handler/Polygon.js
   sandbox/august/trunk/lib/OpenLayers/Layer.js
   sandbox/august/trunk/lib/OpenLayers/Layer/ArcGIS93Rest.js
   sandbox/august/trunk/lib/OpenLayers/Layer/ArcIMS.js
   sandbox/august/trunk/lib/OpenLayers/Layer/Bing.js
   sandbox/august/trunk/lib/OpenLayers/Layer/EventPane.js
   sandbox/august/trunk/lib/OpenLayers/Layer/Google/v3.js
   sandbox/august/trunk/lib/OpenLayers/Layer/Grid.js
   sandbox/august/trunk/lib/OpenLayers/Layer/HTTPRequest.js
   sandbox/august/trunk/lib/OpenLayers/Layer/KaMap.js
   sandbox/august/trunk/lib/OpenLayers/Layer/MapGuide.js
   sandbox/august/trunk/lib/OpenLayers/Layer/MapServer.js
   sandbox/august/trunk/lib/OpenLayers/Layer/MultiMap.js
   sandbox/august/trunk/lib/OpenLayers/Layer/SphericalMercator.js
   sandbox/august/trunk/lib/OpenLayers/Layer/TMS.js
   sandbox/august/trunk/lib/OpenLayers/Layer/TileCache.js
   sandbox/august/trunk/lib/OpenLayers/Layer/Vector.js
   sandbox/august/trunk/lib/OpenLayers/Layer/VirtualEarth.js
   sandbox/august/trunk/lib/OpenLayers/Layer/WMS.js
   sandbox/august/trunk/lib/OpenLayers/Layer/WMTS.js
   sandbox/august/trunk/lib/OpenLayers/Layer/WorldWind.js
   sandbox/august/trunk/lib/OpenLayers/Layer/XYZ.js
   sandbox/august/trunk/lib/OpenLayers/Layer/Zoomify.js
   sandbox/august/trunk/lib/OpenLayers/Map.js
   sandbox/august/trunk/lib/OpenLayers/Popup.js
   sandbox/august/trunk/lib/OpenLayers/Projection.js
   sandbox/august/trunk/lib/OpenLayers/Protocol/HTTP.js
   sandbox/august/trunk/lib/OpenLayers/Protocol/WFS/v1.js
   sandbox/august/trunk/lib/OpenLayers/Renderer/Elements.js
   sandbox/august/trunk/lib/OpenLayers/Renderer/SVG.js
   sandbox/august/trunk/lib/OpenLayers/Renderer/VML.js
   sandbox/august/trunk/lib/OpenLayers/Request.js
   sandbox/august/trunk/lib/OpenLayers/Strategy/BBOX.js
   sandbox/august/trunk/lib/OpenLayers/Strategy/Cluster.js
   sandbox/august/trunk/lib/OpenLayers/Strategy/Filter.js
   sandbox/august/trunk/lib/OpenLayers/Strategy/Fixed.js
   sandbox/august/trunk/lib/OpenLayers/Strategy/Paging.js
   sandbox/august/trunk/lib/OpenLayers/Strategy/Refresh.js
   sandbox/august/trunk/lib/OpenLayers/Tile/Image/IFrame.js
   sandbox/august/trunk/lib/OpenLayers/Util.js
   sandbox/august/trunk/lib/Rico/Color.js
   sandbox/august/trunk/tests/Ajax.html
   sandbox/august/trunk/tests/BaseTypes.html
   sandbox/august/trunk/tests/BaseTypes/Bounds.html
   sandbox/august/trunk/tests/BaseTypes/Class.html
   sandbox/august/trunk/tests/BaseTypes/Element.html
   sandbox/august/trunk/tests/BaseTypes/LonLat.html
   sandbox/august/trunk/tests/BaseTypes/Pixel.html
   sandbox/august/trunk/tests/BaseTypes/Size.html
   sandbox/august/trunk/tests/Console.html
   sandbox/august/trunk/tests/Control.html
   sandbox/august/trunk/tests/Control/Attribution.html
   sandbox/august/trunk/tests/Control/Button.html
   sandbox/august/trunk/tests/Control/DragFeature.html
   sandbox/august/trunk/tests/Control/DragPan.html
   sandbox/august/trunk/tests/Control/DrawFeature.html
   sandbox/august/trunk/tests/Control/GetFeature.html
   sandbox/august/trunk/tests/Control/Graticule.html
   sandbox/august/trunk/tests/Control/KeyboardDefaults.html
   sandbox/august/trunk/tests/Control/LayerSwitcher.html
   sandbox/august/trunk/tests/Control/Measure.html
   sandbox/august/trunk/tests/Control/ModifyFeature.html
   sandbox/august/trunk/tests/Control/MousePosition.html
   sandbox/august/trunk/tests/Control/MouseToolbar.html
   sandbox/august/trunk/tests/Control/NavToolbar.html
   sandbox/august/trunk/tests/Control/Navigation.html
   sandbox/august/trunk/tests/Control/NavigationHistory.html
   sandbox/august/trunk/tests/Control/OverviewMap.html
   sandbox/august/trunk/tests/Control/PanPanel.html
   sandbox/august/trunk/tests/Control/PanZoom.html
   sandbox/august/trunk/tests/Control/PanZoomBar.html
   sandbox/august/trunk/tests/Control/Panel.html
   sandbox/august/trunk/tests/Control/Permalink.html
   sandbox/august/trunk/tests/Control/SLDSelect.html
   sandbox/august/trunk/tests/Control/Scale.html
   sandbox/august/trunk/tests/Control/ScaleLine.html
   sandbox/august/trunk/tests/Control/SelectFeature.html
   sandbox/august/trunk/tests/Control/Snapping.html
   sandbox/august/trunk/tests/Control/Split.html
   sandbox/august/trunk/tests/Control/TransformFeature.html
   sandbox/august/trunk/tests/Control/WMSGetFeatureInfo.html
   sandbox/august/trunk/tests/Control/WMTSGetFeatureInfo.html
   sandbox/august/trunk/tests/Events.html
   sandbox/august/trunk/tests/Extras.html
   sandbox/august/trunk/tests/Feature.html
   sandbox/august/trunk/tests/Feature/Vector.html
   sandbox/august/trunk/tests/Filter.html
   sandbox/august/trunk/tests/Filter/Comparison.html
   sandbox/august/trunk/tests/Filter/FeatureId.html
   sandbox/august/trunk/tests/Filter/Logical.html
   sandbox/august/trunk/tests/Filter/Spatial.html
   sandbox/august/trunk/tests/Format.html
   sandbox/august/trunk/tests/Format/ArcXML.html
   sandbox/august/trunk/tests/Format/ArcXML/Features.html
   sandbox/august/trunk/tests/Format/Atom.html
   sandbox/august/trunk/tests/Format/CQL.html
   sandbox/august/trunk/tests/Format/CSWGetDomain.html
   sandbox/august/trunk/tests/Format/CSWGetDomain/v2_0_2.html
   sandbox/august/trunk/tests/Format/CSWGetRecords.html
   sandbox/august/trunk/tests/Format/CSWGetRecords/v2_0_2.html
   sandbox/august/trunk/tests/Format/Filter.html
   sandbox/august/trunk/tests/Format/Filter/v1.html
   sandbox/august/trunk/tests/Format/Filter/v1_0_0.html
   sandbox/august/trunk/tests/Format/Filter/v1_1_0.html
   sandbox/august/trunk/tests/Format/GML.html
   sandbox/august/trunk/tests/Format/GML/v2.html
   sandbox/august/trunk/tests/Format/GML/v3.html
   sandbox/august/trunk/tests/Format/GPX.html
   sandbox/august/trunk/tests/Format/GeoJSON.html
   sandbox/august/trunk/tests/Format/GeoRSS.html
   sandbox/august/trunk/tests/Format/JSON.html
   sandbox/august/trunk/tests/Format/KML.html
   sandbox/august/trunk/tests/Format/OSM.html
   sandbox/august/trunk/tests/Format/OWSContext/v0_3_1.html
   sandbox/august/trunk/tests/Format/SLD.html
   sandbox/august/trunk/tests/Format/SLD/v1_0_0.html
   sandbox/august/trunk/tests/Format/SOSCapabilities/v1_0_0.html
   sandbox/august/trunk/tests/Format/SOSGetFeatureOfInterest.html
   sandbox/august/trunk/tests/Format/SOSGetObservation.html
   sandbox/august/trunk/tests/Format/Text.html
   sandbox/august/trunk/tests/Format/WFS.html
   sandbox/august/trunk/tests/Format/WFSCapabilities.html
   sandbox/august/trunk/tests/Format/WFSCapabilities/v1.html
   sandbox/august/trunk/tests/Format/WFSDescribeFeatureType.html
   sandbox/august/trunk/tests/Format/WFST.html
   sandbox/august/trunk/tests/Format/WFST/v1.html
   sandbox/august/trunk/tests/Format/WFST/v1_0_0.html
   sandbox/august/trunk/tests/Format/WFST/v1_1_0.html
   sandbox/august/trunk/tests/Format/WKT.html
   sandbox/august/trunk/tests/Format/WMC.html
   sandbox/august/trunk/tests/Format/WMC/v1.html
   sandbox/august/trunk/tests/Format/WMC/v1_1_0.html
   sandbox/august/trunk/tests/Format/WMSCapabilities.html
   sandbox/august/trunk/tests/Format/WMSCapabilities/v1_1_1.html
   sandbox/august/trunk/tests/Format/WMSCapabilities/v1_1_1_WMSC.html
   sandbox/august/trunk/tests/Format/WMSCapabilities/v1_3_0.html
   sandbox/august/trunk/tests/Format/WMSDescribeLayer.html
   sandbox/august/trunk/tests/Format/WMSGetFeatureInfo.html
   sandbox/august/trunk/tests/Format/WMTSCapabilities.html
   sandbox/august/trunk/tests/Format/WMTSCapabilities/v1_0_0.html
   sandbox/august/trunk/tests/Format/XML.html
   sandbox/august/trunk/tests/Geometry.html
   sandbox/august/trunk/tests/Geometry/Collection.html
   sandbox/august/trunk/tests/Geometry/Curve.html
   sandbox/august/trunk/tests/Geometry/LineString.html
   sandbox/august/trunk/tests/Geometry/LinearRing.html
   sandbox/august/trunk/tests/Geometry/MultiLineString.html
   sandbox/august/trunk/tests/Geometry/MultiPoint.html
   sandbox/august/trunk/tests/Geometry/MultiPolygon.html
   sandbox/august/trunk/tests/Geometry/Point.html
   sandbox/august/trunk/tests/Geometry/Polygon.html
   sandbox/august/trunk/tests/Geometry/Rectangle.html
   sandbox/august/trunk/tests/Geometry/Surface.html
   sandbox/august/trunk/tests/Handler.html
   sandbox/august/trunk/tests/Handler/Click.html
   sandbox/august/trunk/tests/Handler/Drag.html
   sandbox/august/trunk/tests/Handler/Feature.html
   sandbox/august/trunk/tests/Handler/Hover.html
   sandbox/august/trunk/tests/Handler/Keyboard.html
   sandbox/august/trunk/tests/Handler/MouseWheel.html
   sandbox/august/trunk/tests/Handler/Path.html
   sandbox/august/trunk/tests/Handler/Point.html
   sandbox/august/trunk/tests/Handler/Polygon.html
   sandbox/august/trunk/tests/Handler/RegularPolygon.html
   sandbox/august/trunk/tests/Icon.html
   sandbox/august/trunk/tests/Lang.html
   sandbox/august/trunk/tests/Layer.html
   sandbox/august/trunk/tests/Layer/ArcGIS93Rest.html
   sandbox/august/trunk/tests/Layer/ArcIMS.html
   sandbox/august/trunk/tests/Layer/Bing.html
   sandbox/august/trunk/tests/Layer/EventPane.html
   sandbox/august/trunk/tests/Layer/FixedZoomLevels.html
   sandbox/august/trunk/tests/Layer/GML.html
   sandbox/august/trunk/tests/Layer/GeoRSS.html
   sandbox/august/trunk/tests/Layer/Google.html
   sandbox/august/trunk/tests/Layer/Google/v3.html
   sandbox/august/trunk/tests/Layer/Grid.html
   sandbox/august/trunk/tests/Layer/HTTPRequest.html
   sandbox/august/trunk/tests/Layer/Image.html
   sandbox/august/trunk/tests/Layer/KaMap.html
   sandbox/august/trunk/tests/Layer/MapGuide.html
   sandbox/august/trunk/tests/Layer/MapServer.html
   sandbox/august/trunk/tests/Layer/Markers.html
   sandbox/august/trunk/tests/Layer/MultiMap.html
   sandbox/august/trunk/tests/Layer/PointTrack.html
   sandbox/august/trunk/tests/Layer/SphericalMercator.html
   sandbox/august/trunk/tests/Layer/TMS.html
   sandbox/august/trunk/tests/Layer/Text.html
   sandbox/august/trunk/tests/Layer/TileCache.html
   sandbox/august/trunk/tests/Layer/Vector.html
   sandbox/august/trunk/tests/Layer/Vector/RootContainer.html
   sandbox/august/trunk/tests/Layer/WFS.html
   sandbox/august/trunk/tests/Layer/WMS.html
   sandbox/august/trunk/tests/Layer/WMS/Post.html
   sandbox/august/trunk/tests/Layer/WMTS.html
   sandbox/august/trunk/tests/Layer/WrapDateLine.html
   sandbox/august/trunk/tests/Layer/XYZ.html
   sandbox/august/trunk/tests/Layer/Yahoo.html
   sandbox/august/trunk/tests/Map.html
   sandbox/august/trunk/tests/Marker.html
   sandbox/august/trunk/tests/Marker/Box.html
   sandbox/august/trunk/tests/OpenLayers4.html
   sandbox/august/trunk/tests/Popup.html
   sandbox/august/trunk/tests/Popup/Anchored.html
   sandbox/august/trunk/tests/Popup/AnchoredBubble.html
   sandbox/august/trunk/tests/Popup/FramedCloud.html
   sandbox/august/trunk/tests/Projection.html
   sandbox/august/trunk/tests/Protocol.html
   sandbox/august/trunk/tests/Protocol/HTTP.html
   sandbox/august/trunk/tests/Protocol/SOS.html
   sandbox/august/trunk/tests/Protocol/SQL.html
   sandbox/august/trunk/tests/Protocol/SQL/Gears.html
   sandbox/august/trunk/tests/Protocol/WFS.html
   sandbox/august/trunk/tests/Renderer.html
   sandbox/august/trunk/tests/Renderer/Canvas.html
   sandbox/august/trunk/tests/Renderer/Elements.html
   sandbox/august/trunk/tests/Renderer/SVG.html
   sandbox/august/trunk/tests/Renderer/VML.html
   sandbox/august/trunk/tests/Request.html
   sandbox/august/trunk/tests/Request/XMLHttpRequest.html
   sandbox/august/trunk/tests/Rule.html
   sandbox/august/trunk/tests/Strategy.html
   sandbox/august/trunk/tests/Strategy/BBOX.html
   sandbox/august/trunk/tests/Strategy/Cluster.html
   sandbox/august/trunk/tests/Strategy/Filter.html
   sandbox/august/trunk/tests/Strategy/Fixed.html
   sandbox/august/trunk/tests/Strategy/Paging.html
   sandbox/august/trunk/tests/Strategy/Refresh.html
   sandbox/august/trunk/tests/Strategy/Save.html
   sandbox/august/trunk/tests/Style.html
   sandbox/august/trunk/tests/Style2.html
   sandbox/august/trunk/tests/StyleMap.html
   sandbox/august/trunk/tests/Symbolizer.html
   sandbox/august/trunk/tests/Symbolizer/Line.html
   sandbox/august/trunk/tests/Symbolizer/Point.html
   sandbox/august/trunk/tests/Symbolizer/Polygon.html
   sandbox/august/trunk/tests/Symbolizer/Raster.html
   sandbox/august/trunk/tests/Symbolizer/Text.html
   sandbox/august/trunk/tests/Tile.html
   sandbox/august/trunk/tests/Tile/Image.html
   sandbox/august/trunk/tests/Tile/Image/IFrame.html
   sandbox/august/trunk/tests/Tile/WFS.html
   sandbox/august/trunk/tests/Tween.html
   sandbox/august/trunk/tests/Util.html
   sandbox/august/trunk/tests/list-tests.html
   sandbox/august/trunk/tests/run-tests.html
   sandbox/august/trunk/theme/default/img/add_point_off.png
   sandbox/august/trunk/theme/default/img/drag-rectangle-off.png
   sandbox/august/trunk/theme/default/img/drag-rectangle-on.png
   sandbox/august/trunk/theme/default/img/draw_line_off.png
   sandbox/august/trunk/theme/default/img/draw_line_on.png
   sandbox/august/trunk/theme/default/img/draw_point_off.png
   sandbox/august/trunk/theme/default/img/draw_point_on.png
   sandbox/august/trunk/theme/default/img/draw_polygon_off.png
   sandbox/august/trunk/theme/default/img/draw_polygon_on.png
   sandbox/august/trunk/theme/default/img/editing_tool_bar.png
   sandbox/august/trunk/theme/default/img/move_feature_off.png
   sandbox/august/trunk/theme/default/img/move_feature_on.png
   sandbox/august/trunk/theme/default/img/navigation_history.png
   sandbox/august/trunk/theme/default/img/pan-panel-NOALPHA.png
   sandbox/august/trunk/theme/default/img/pan-panel.png
   sandbox/august/trunk/theme/default/img/pan_on.png
   sandbox/august/trunk/theme/default/img/panning-hand-off.png
   sandbox/august/trunk/theme/default/img/panning-hand-on.png
   sandbox/august/trunk/theme/default/img/remove_point_on.png
   sandbox/august/trunk/theme/default/img/save_features_off.png
   sandbox/august/trunk/theme/default/img/save_features_on.png
   sandbox/august/trunk/theme/default/img/view_next_off.png
   sandbox/august/trunk/theme/default/img/view_previous_off.png
   sandbox/august/trunk/theme/default/img/zoom-panel.png
   sandbox/august/trunk/theme/default/style.css
   sandbox/august/trunk/tools/
   sandbox/august/trunk/tools/exampleparser.py
   sandbox/august/trunk/tools/release.sh
   sandbox/august/trunk/tools/update_dev_dir.sh
Log:
Merge with trunk at revision 11704


Property changes on: sandbox/august/trunk
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/openlayers:10329-10354,10357-10502,10504-11073
   + /trunk/openlayers:10329-10354,10357-10502,10504-11704

Modified: sandbox/august/trunk/build/README.txt
===================================================================
--- sandbox/august/trunk/build/README.txt	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/build/README.txt	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,14 +1,43 @@
+The OpenLayers build tool supports several different
+forms of compressing your javascript code, and a method
+of describing build profiles to create customized 
+OpenLayers builds with only the components you need.
 
-## HowTo: Build & deploy "Shrunk" Single File Library version of OpenLayers ##
+When building a file, you can choose to build with several
+different compression options to the Python-based build.py
+script. The following is an example script:
 
- * Build:
+python build.py -c closure full OpenLayers-closure.js
 
-     cd build
-     ./build.py
-     cd ..
+This script selects the 'closure' compression mechanism,
+uses a config file called 'full.cfg', and writes the output
+to OpenLayers-closure.js.
 
- * Upload the result to the server: e.g.
+The options available for compression are:
 
-  scp build/OpenLayers.js openlayers at openlayers.org:openlayers.org/htdocs/code/
+ * closure
+   This requires you to have a closure-compiler.jar in your
+   tools directory. You can do this by fetching the compiler
+   from:
 
+     http://closure-compiler.googlecode.com/files/compiler-latest.zip
 
+   Then unzipping that file, and placing compiler.jar into tools
+   and renaming it closure-compiler.jar.
+
+ * closure_ws
+   This uses the closure compiler webservice. This will only work
+   for files source Javascript files which are under 1MB. (Note that
+   the default OpenLayers full build is not under 1MB.)
+
+ * jsmin
+   jsmin is the default compiler, and uses the Python-based
+   jsmin script to compress the Javascript. 
+
+ * minimize
+   This is a simple whitespace removing Python script, designed
+   to fill in when other tools are unavailable.
+
+ * none
+   None will leave the Javascript uncompressed.
+

Modified: sandbox/august/trunk/build/build.py
===================================================================
--- sandbox/august/trunk/build/build.py	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/build/build.py	2011-03-14 21:05:59 UTC (rev 11705)
@@ -3,44 +3,62 @@
 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 closure
+        have_compressor.append("closure")
+    except Exception, E:
+        print "No closure (%s) % E"
+    try:
+        import closure_ws
+        have_compressor.append("closure_ws")
+    except ImportError:
+        print "No closure_ws"
+    
+    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":
-        print "Compressing using jsmin."
+    print "Compressing using %s" % use_compressor
+    if use_compressor == "jsmin":
         minimized = jsmin.jsmin(merged)
-    elif have_compressor == "minimize":
-        print "Compressing using minimize."
+    elif use_compressor == "minimize":
         minimized = minimize.minimize(merged)
+    elif use_compressor == "closure_ws":
+        minimized = closure_ws.minimize(merged)      
+    elif use_compressor == "closure":
+        minimized = closure.minimize(merged)      
     else: # fallback
-        print "Not compressing."
         minimized = merged 
     print "Adding license file."
     minimized = file("license.txt").read() + minimized
@@ -51,4 +69,14 @@
     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()
+  if not len(args):
+    build(options=options)
+  elif len(args) == 1:
+    build(args[0], options=options)
+  elif len(args) == 2:
+    build(args[0], args[1], options=options)
+  else:
+    print "Wrong number of arguments"

Copied: sandbox/august/trunk/build/mobile.cfg (from rev 11704, trunk/openlayers/build/mobile.cfg)
===================================================================
--- sandbox/august/trunk/build/mobile.cfg	                        (rev 0)
+++ sandbox/august/trunk/build/mobile.cfg	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,24 @@
+[first]
+
+[last]
+
+[include]
+OpenLayers/Map.js
+OpenLayers/Kinetic.js
+OpenLayers/Projection.js
+OpenLayers/Layer/SphericalMercator.js
+OpenLayers/Layer/XYZ.js
+OpenLayers/Layer/Bing.js
+OpenLayers/Control/TouchNavigation.js
+OpenLayers/Control/Geolocate.js
+OpenLayers/Control/ZoomPanel.js
+OpenLayers/Control/Attribution.js
+OpenLayers/Control/SelectFeature.js
+OpenLayers/Layer/Vector.js
+OpenLayers/Renderer/SVG.js
+OpenLayers/Renderer/Canvas.js
+OpenLayers/Format/GeoJSON.js
+
+[exclude]
+
+

Copied: sandbox/august/trunk/build/tests.cfg (from rev 11704, trunk/openlayers/build/tests.cfg)
===================================================================
--- sandbox/august/trunk/build/tests.cfg	                        (rev 0)
+++ sandbox/august/trunk/build/tests.cfg	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/doc/authors.txt
===================================================================
--- sandbox/august/trunk/doc/authors.txt	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/doc/authors.txt	2011-03-14 21:05:59 UTC (rev 11705)
@@ -15,6 +15,7 @@
 John Frank
 Sean Gilles
 Pierre Giraud
+Ivan Grcic
 Andreas Hocevar
 Ian Johnson
 Eric Lemoine

Modified: sandbox/august/trunk/examples/GMLParser.html
===================================================================
--- sandbox/august/trunk/examples/GMLParser.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/GMLParser.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/KMLParser.html
===================================================================
--- sandbox/august/trunk/examples/KMLParser.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/KMLParser.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/SLDSelect.html
===================================================================
--- sandbox/august/trunk/examples/SLDSelect.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/SLDSelect.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/WMSDescribeLayerParser.html
===================================================================
--- sandbox/august/trunk/examples/WMSDescribeLayerParser.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/WMSDescribeLayerParser.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/WMSPost.html
===================================================================
--- sandbox/august/trunk/examples/WMSPost.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/WMSPost.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />

Copied: sandbox/august/trunk/examples/accelerometer.html (from rev 11704, trunk/openlayers/examples/accelerometer.html)
===================================================================
--- sandbox/august/trunk/examples/accelerometer.html	                        (rev 0)
+++ sandbox/august/trunk/examples/accelerometer.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,99 @@
+<!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 Accelerometer Usage</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() {
+            if (isEventSupported('deviceorientation', window) || isEventSupported('mozorientation', window) || isEventSupported('devicemotion', window)) {
+                if (window.DeviceOrientationEvent) {
+                    window.addEventListener("deviceorientation", function (event) {
+                        document.getElementById('resultDeviceOrientation').innerHTML = '';
+                        if (typeof(event.alpha) != 'undefined') {
+                            document.getElementById('resultDeviceOrientation').innerHTML = document.getElementById('resultDeviceOrientation').innerHTML + "Alpha: " + event.alpha + "<br>";
+                            document.getElementById('resultDeviceOrientation').innerHTML = document.getElementById('resultDeviceOrientation').innerHTML + "Beta: " + event.beta + "<br>";
+                            document.getElementById('resultDeviceOrientation').innerHTML = document.getElementById('resultDeviceOrientation').innerHTML + "Gamma: " + event.gamma + "<br>";
+                        }
+                        if (typeof(event.absolute) != 'undefined') {
+                            document.getElementById('resultDeviceOrientation').innerHTML = document.getElementById('resultDeviceOrientation').innerHTML + "Gamma: " + event.absolute + "<br>";
+                        }
+                        if (typeof(event.compassCalibrate) != 'undefined') {
+                            document.getElementById('resultDeviceOrientation').innerHTML = document.getElementById('resultDeviceOrientation').innerHTML + "Gamma: " + event.compassCalibrated + "<br>";
+                        }
+                    }, true);
+                }
+                if (window.DeviceMotionEvent) {
+                    window.addEventListener('devicemotion', function (event) {
+                        document.getElementById('resultDeviceMotion').innerHTML = '';
+                        if (typeof(event.accelerationIncludingGravity) != 'undefined') {
+                            document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "accelerationIncludingGravity.x: " + event.accelerationIncludingGravity.x + "<br>";
+                            document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "accelerationIncludingGravity.y: " + event.accelerationIncludingGravity.y + "<br>";
+                            document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "accelerationIncludingGravity.z: " + event.accelerationIncludingGravity.z + "<br>";
+                        }
+                        if (typeof(event.acceleration) != 'undefined') {
+                            document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "acceleration.x: " + event.acceleration.x + "<br>";
+                            document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "acceleration.y: " + event.acceleration.y + "<br>";
+                            document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "acceleration.z: " + event.acceleration.z + "<br>";
+                        }
+                        if (typeof(event.rotationRate) != 'undefined') {
+                            document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "rotationRate.alpha: " + event.rotationRate.alpha + "<br>";
+                            document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "rotationRate.beta: " + event.rotationRate.beta + "<br>";
+                            document.getElementById('resultDeviceMotion').innerHTML = document.getElementById('resultDeviceMotion').innerHTML + "rotationRate.gamma: " + event.rotationRate.gamma + "<br>";
+                        }
+                    }, true);
+                }
+                if (window.MozOrientation) {
+                    window.addEventListener("MozOrientation", function (orientation) {
+                        document.getElementById('resultMozOrientation').innerHTML = "orientation.x: " + orientation.x + "<br>";
+                        document.getElementById('resultMozOrientation').innerHTML = document.getElementById('resultMozOrientation').innerHTML + "orientation.y: " + orientation.y + "<br>";
+                        document.getElementById('resultMozOrientation').innerHTML = document.getElementById('resultMozOrientation').innerHTML + "orientation.z: " + orientation.z + "<br>";
+                    }, true);
+                }
+            } else {
+                alert("Unfortunately, your brower doesn't support the orientation usage");
+            }
+
+        }
+    </script>
+</head>
+<body onload="init()">
+<h1 id="title">Accelerometer</h1>
+
+<p id="shortdesc">
+    The goal of this script is to demonstrate the usage of accelerometer.
+</p>
+<p>
+  The orientation specification can be found <a href="http://dev.w3.org/geo/api/spec-source-orientation.html">here</a>.
+</p>
+
+<div id="tags">
+  browser, vendor, mobile, orientation 
+</div>  
+
+<h1>Device motion</h1>
+
+<div id="resultDeviceMotion">
+
+</div>
+<h1>Device orientation</h1>
+
+<div id="resultDeviceOrientation">
+
+</div>
+<h1>MOZ orientation</h1>
+
+<div id="resultMozOrientation">
+
+</div>
+</body>
+</html>

Modified: sandbox/august/trunk/examples/accessible.html
===================================================================
--- sandbox/august/trunk/examples/accessible.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/accessible.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/all-overlays-google.html
===================================================================
--- sandbox/august/trunk/examples/all-overlays-google.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/all-overlays-google.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/all-overlays.html
===================================================================
--- sandbox/august/trunk/examples/all-overlays.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/all-overlays.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/anchor-permalink.html (from rev 11704, trunk/openlayers/examples/anchor-permalink.html)
===================================================================
--- sandbox/august/trunk/examples/anchor-permalink.html	                        (rev 0)
+++ sandbox/august/trunk/examples/anchor-permalink.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/anchor-permalink.js (from rev 11704, trunk/openlayers/examples/anchor-permalink.js)
===================================================================
--- sandbox/august/trunk/examples/anchor-permalink.js	                        (rev 0)
+++ sandbox/august/trunk/examples/anchor-permalink.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/animated_panning.html
===================================================================
--- sandbox/august/trunk/examples/animated_panning.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/animated_panning.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/arcgis93rest.html
===================================================================
--- sandbox/august/trunk/examples/arcgis93rest.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/arcgis93rest.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/arcgiscache_ags.html (from rev 11704, trunk/openlayers/examples/arcgiscache_ags.html)
===================================================================
--- sandbox/august/trunk/examples/arcgiscache_ags.html	                        (rev 0)
+++ sandbox/august/trunk/examples/arcgiscache_ags.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,219 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>OpenLayers ArcGIS Cache Example (MapServer Access)</title>
+    <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>
+    <script src="../lib/OpenLayers.js"></script>
+    <script src="../lib/OpenLayers/Layer/ArcGISCache.js" type="text/javascript"></script>
+    <script type="text/javascript">
+        var map, 
+            cacheLayer,
+            testLayer,
+            //This layer requires meta data about the ArcGIS service.  Typically you should use a 
+            //JSONP call to get this dynamically.  For this example, we are just going to hard-code
+            //an example that we got from here (yes, it's very big):
+            //    http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer?f=json&pretty=true
+            layerInfo = {
+                  "currentVersion" : 10.01, 
+                  "serviceDescription" : "This worldwide street map presents highway-level data for the world and street-level data for the United States, Canada, Japan, Southern Africa, and a number of countries in Europe and elsewhere. This comprehensive street map includes highways, major roads, minor roads, railways, water features, administrative boundaries, cities, parks, and landmarks, overlaid on shaded relief imagery for added context. The street map was developed by ESRI using ESRI basemap data, AND road data, USGS elevation data, and UNEP-WCMC parks and protected areas for the world, and Tele Atlas Dynamap® and Multinet® street data for North America and Europe. Coverage for street-level data in Europe includes Andorra, Austria, Belgium, Czech Republic, Denmark, France, Germany, Great Britain, Greece, Hungary, Ireland, Italy, Luxembourg, Netherlands, Northern Ireland (Belfast only), Norway, Poland, Portugal, San Marino, Slovakia, Spain, Sweden, and Switzerland. Co
 verage for street-level data elsewhere in the world includes China (Hong Kong only), Colombia, Egypt (Cairo only), Indonesia (Jakarta only), Japan, Mexico (Mexico City only), Russia (Moscow and St. Petersburg only), South Africa, Thailand, and Turkey (Istanbul and Ankara only). For more information on this map, visit us \u003ca href=\"http://goto.arcgisonline.com/maps/World_Street_Map \" target=\"_new\"\u003eonline\u003c/a\u003e.", 
+                  "mapName" : "Layers", 
+                  "description" : "This worldwide street map presents highway-level data for the world and street-level data for the United States, Canada, Japan, Southern Africa, most countries in Europe, and several other countries. This comprehensive street map includes highways, major roads, minor roads, one-way arrow indicators, railways, water features, administrative boundaries, cities, parks, and landmarks, overlaid on shaded relief imagery for added context. The map also includes building footprints for selected areas in the United States and Europe and parcel boundaries for much of the lower 48 states.\n\nThe street map was developed by ESRI using ESRI basemap data, DeLorme base map layers, AND road data, USGS elevation data, UNEP-WCMC parks and protected areas for the world, Tele Atlas Dynamap® and Multinet® street data for North America and Europe, and First American parcel data for the United States. Coverage for street-level data in Europe includes Andorra, Aus
 tria, Belgium, Czech Republic, Denmark, France, Germany, Great Britain, Greece, Hungary, Ireland, Italy, Luxembourg, Netherlands, Norway, Poland, Portugal, San Marino, Slovakia, Spain, Sweden, and Switzerland. Coverage for street-level data elsewhere in the world includes China (Hong Kong only), Colombia, Egypt (Cairo only), Indonesia (Jakarta only), Japan, Mexico, Russia, South Africa, Thailand, and Turkey (Istanbul and Ankara only). For more information on this map, visit us online at http://goto.arcgisonline.com/maps/World_Street_Map\n", 
+                  "copyrightText" : "Sources: ESRI, DeLorme, AND, Tele Atlas, First American, ESRI Japan, UNEP-WCMC, USGS, METI, ESRI Hong Kong, ESRI Thailand, Procalculo Prosis", 
+                  "layers" : [
+                    {
+                      "id" : 0, 
+                      "name" : "World Street Map", 
+                      "parentLayerId" : -1, 
+                      "defaultVisibility" : true, 
+                      "subLayerIds" : null, 
+                      "minScale" : 0, 
+                      "maxScale" : 0
+                    }
+                  ], 
+                  "tables" : [
+                    
+                  ], 
+                  "spatialReference" : {
+                    "wkid" : 102100
+                  }, 
+                  "singleFusedMapCache" : true, 
+                  "tileInfo" : {
+                    "rows" : 256, 
+                    "cols" : 256, 
+                    "dpi" : 96, 
+                    "format" : "JPEG", 
+                    "compressionQuality" : 90, 
+                    "origin" : {
+                      "x" : -20037508.342787, 
+                      "y" : 20037508.342787
+                    }, 
+                    "spatialReference" : {
+                      "wkid" : 102100
+                    }, 
+                    "lods" : [
+                      {"level" : 0, "resolution" : 156543.033928, "scale" : 591657527.591555}, 
+                      {"level" : 1, "resolution" : 78271.5169639999, "scale" : 295828763.795777}, 
+                      {"level" : 2, "resolution" : 39135.7584820001, "scale" : 147914381.897889}, 
+                      {"level" : 3, "resolution" : 19567.8792409999, "scale" : 73957190.948944}, 
+                      {"level" : 4, "resolution" : 9783.93962049996, "scale" : 36978595.474472}, 
+                      {"level" : 5, "resolution" : 4891.96981024998, "scale" : 18489297.737236}, 
+                      {"level" : 6, "resolution" : 2445.98490512499, "scale" : 9244648.868618}, 
+                      {"level" : 7, "resolution" : 1222.99245256249, "scale" : 4622324.434309}, 
+                      {"level" : 8, "resolution" : 611.49622628138, "scale" : 2311162.217155}, 
+                      {"level" : 9, "resolution" : 305.748113140558, "scale" : 1155581.108577}, 
+                      {"level" : 10, "resolution" : 152.874056570411, "scale" : 577790.554289}, 
+                      {"level" : 11, "resolution" : 76.4370282850732, "scale" : 288895.277144}, 
+                      {"level" : 12, "resolution" : 38.2185141425366, "scale" : 144447.638572}, 
+                      {"level" : 13, "resolution" : 19.1092570712683, "scale" : 72223.819286}, 
+                      {"level" : 14, "resolution" : 9.55462853563415, "scale" : 36111.909643}, 
+                      {"level" : 15, "resolution" : 4.77731426794937, "scale" : 18055.954822}, 
+                      {"level" : 16, "resolution" : 2.38865713397468, "scale" : 9027.977411}, 
+                      {"level" : 17, "resolution" : 1.19432856685505, "scale" : 4513.988705}
+                    ]
+                  }, 
+                  "initialExtent" : {
+                    "xmin" : -20037507.0671618, 
+                    "ymin" : -20037507.0671618, 
+                    "xmax" : 20037507.0671618, 
+                    "ymax" : 20037507.0671619, 
+                    "spatialReference" : {
+                      "wkid" : 102100
+                    }
+                  }, 
+                  "fullExtent" : {
+                    "xmin" : -20037507.0671618, 
+                    "ymin" : -19971868.8804086, 
+                    "xmax" : 20037507.0671618, 
+                    "ymax" : 19971868.8804086, 
+                    "spatialReference" : {
+                      "wkid" : 102100
+                    }
+                  }, 
+                  "units" : "esriMeters", 
+                  "supportedImageFormatTypes" : "PNG24,PNG,JPG,DIB,TIFF,EMF,PS,PDF,GIF,SVG,SVGZ,AI,BMP", 
+                  "documentInfo" : {
+                    "Title" : "World Street Map", 
+                    "Author" : "ESRI", 
+                    "Comments" : "", 
+                    "Subject" : "streets, highways, major roads, railways, water features, administrative boundaries, cities, parks, protected areas, landmarks ", 
+                    "Category" : "transportation(Transportation Networks) ", 
+                    "Keywords" : "World, Global, 2009, Japan, UNEP-WCMC", 
+                    "Credits" : ""
+                  }, 
+                  "capabilities" : "Map"
+                };
+
+        function init(){
+            //The max extent for spherical mercator
+            var maxExtent = new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34);
+            
+            //Max extent from layerInfo above            
+            var layerMaxExtent = new OpenLayers.Bounds(
+                layerInfo.fullExtent.xmin, 
+                layerInfo.fullExtent.ymin, 
+                layerInfo.fullExtent.xmax, 
+                layerInfo.fullExtent.ymax  
+            );
+            
+            var resolutions = [];
+            for (var i=0; i<layerInfo.tileInfo.lods.length; i++) {
+                resolutions.push(layerInfo.tileInfo.lods[i].resolution);
+            }
+            
+            map = new OpenLayers.Map('map', {
+                maxExtent: maxExtent,
+                StartBounds: layerMaxExtent,
+                units: (layerInfo.units == "esriFeet") ? 'ft' : 'm',
+                resolutions: resolutions,
+                tileSize: new OpenLayers.Size(layerInfo.tileInfo.width, layerInfo.tileInfo.height),                
+                projection: 'EPSG:' + layerInfo.spatialReference.wkid
+            });
+            
+            
+            
+            cacheLayer = new OpenLayers.Layer.ArcGISCache( "AGSCache",
+                    "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer", {
+                        isBaseLayer: true,
+
+                        //From layerInfo above                        
+                        resolutions: resolutions,                        
+                        tileSize: new OpenLayers.Size(layerInfo.tileInfo.cols, layerInfo.tileInfo.rows),                        
+                        tileOrigin: new OpenLayers.LonLat(layerInfo.tileInfo.origin.x , layerInfo.tileInfo.origin.y),                        
+                        maxExtent: layerMaxExtent,                        
+                        projection: 'EPSG:' + layerInfo.spatialReference.wkid,
+                    });
+
+            
+            // create Google Mercator layers
+            testLayer = new OpenLayers.Layer.Google(
+                "Google Streets",
+                {'sphericalMercator': true}
+            );
+            
+            map.addLayers([testLayer, cacheLayer]);
+            
+            map.addControl(new OpenLayers.Control.LayerSwitcher());
+            map.addControl( new OpenLayers.Control.MousePosition() );
+            
+            map.zoomToExtent(new OpenLayers.Bounds(-8341644, 4711236, -8339198, 4712459));
+        }
+    </script>
+  </head>
+  <body onload="init()">
+      <h1 id="title">OpenLayers ArcGIS Cache Example (MapServer Access)</h1>
+
+    <div id="tags">
+        arcgis, arcgiscache, cache, tms
+    </div>
+
+    <p id="shortdesc">
+        Demonstrates the basic initialization of the ArcGIS Cache layer using a prebuilt configuration, and standard tile access.
+    </p>
+
+    <div id="map" class="smallmap"></div>
+
+    <div id="docs">
+        <p>This example demonstrates using the ArcGISCache layer for 
+        accessing ESRI's ArcGIS Server (AGS) Map Cache tiles through 
+        an AGS MapServer.  Toggle the visibility of the AGS layer to
+        demonstrate how the two maps are lined up correctly.</p>
+        
+         <h2>Notes on this layer</h2>
+        <p>A few attempts have been made at this kind of layer before. See 
+        <a href="http://trac.osgeo.org/openlayers/ticket/1967">here</a> and 
+        <a href="http://trac.osgeo.org/openlayers/browser/sandbox/tschaub/arcgiscache/lib/OpenLayers/Layer/ArcGISCache.js">here</a>.
+        A problem the users encounter is that the tiles seem to "jump around".
+        This is due to the fact that the max extent for the cached layer actually
+        changes at each zoom level due to the way these caches are constructed.
+        We have attempted to use the resolutions, tile size, and tile origin
+        from the cache meta data to make the appropriate changes to the max extent
+        of the tile to compensate for this behavior.</p>
+        You will need to know:
+        <ul>
+            <li>Max Extent: The max extent of the layer</li>
+            <li>Resolutions: An array of resolutions, one for each zoom level</li>
+            <li>Tile Origin: The location of the tile origin for the cache in the upper left.</li>
+            <li>Tile Size: The size of each tile in the cache. Commonly 256 x 256</li>
+        </ul>
+        <p>It's important that you set the correct values in your layer, and these
+        values will differ from layer to layer. You can find these values for your 
+        layer in a metadata page in ArcGIS Server. 
+        (ie. <a href="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer">http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer</a>)</p>
+        <ul>
+            <li>Max Extent: Full Extent</li>
+            <li>Resolutions: Tile Info -> Levels of Detail -> Resolution</li>
+            <li>Tile Origin: Origin -> X,Y</li>
+            <li>Tile Size: Tile Info -> Height,Width</li>
+        </ul>
+        
+        <h2> Other Examples </h2>
+        <p>This is one of three examples for this layer.  You can also configure this
+        layer to use <a href="arcgiscache_direct.html">prebuilt tiles in a file store
+         (not a live server).</a> It is also  possible to let this
+          <a href="arcgiscache_jsonp.html">layer 'auto-configure' itself using the
+          capabilities json object from the server itself when using a live ArcGIS server.</a>
+        </p>
+    </div>
+  </body>
+</html>

Copied: sandbox/august/trunk/examples/arcgiscache_direct.html (from rev 11704, trunk/openlayers/examples/arcgiscache_direct.html)
===================================================================
--- sandbox/august/trunk/examples/arcgiscache_direct.html	                        (rev 0)
+++ sandbox/august/trunk/examples/arcgiscache_direct.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,106 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+    <head>
+        <title>ArcGIS Server Map Cache Example (Direct Access)</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="../lib/OpenLayers/Layer/ArcGISCache.js" type="text/javascript"></script>
+        <script type="text/javascript">
+        /* First 4 variables extracted from conf.xml file */
+        
+            /* Tile layers & map MUST have same projection */
+            var proj='EPSG:26915';
+        
+        
+            /* Layer can also accept serverResolutions array
+             * to deal with situation in which layer resolution array & map resolution
+             * array are out of sync*/
+            var mapResolutions = [33.0729828126323,16.9333672000677,8.46668360003387,4.23334180001693,2.11667090000847,1.05833545000423];
+
+            /* For this example this next line is not really needed, 256x256 is default.
+             * However, you would need to change this if your layer had different tile sizes */
+            var tileSize = new OpenLayers.Size(256,256);
+            
+            /* Tile Origin is required unless it is the same as the implicit map origin
+             * which can be affected by several variables including maxExtent for map or base layer */
+            var agsTileOrigin = new OpenLayers.LonLat(-5120900,9998100);
+            
+            /* This can really be any valid bounds that the map would reasonably be within */
+            /*  var mapExtent = new OpenLayers.Bounds(293449.454286,4307691.661132,314827.830376,4323381.484178); */
+            var mapExtent = new OpenLayers.Bounds(289310.8204,4300021.937,314710.8712,4325421.988);
+            
+            var aerialsUrl = 'http://serverx.esri.com/arcgiscache/dgaerials/Layers/_alllayers';
+            var roadsUrl = 'http://serverx.esri.com/arcgiscache/DG_County_roads_yesA_backgroundDark/Layers/_alllayers';
+            
+            var map;
+            function init(){
+                map = new OpenLayers.Map('map', {
+                    maxExtent:mapExtent,
+                    controls: [
+                        new OpenLayers.Control.Navigation(),
+                        new OpenLayers.Control.LayerSwitcher(), 
+                        new OpenLayers.Control.PanZoomBar(),
+                        new OpenLayers.Control.MousePosition()]
+                });
+                
+                var baseLayer = new OpenLayers.Layer.ArcGISCache('Aerials', aerialsUrl, {
+                    tileOrigin: agsTileOrigin,
+                    resolutions: mapResolutions,
+                    sphericalMercator: true,
+                    maxExtent: mapExtent,
+                    useArcGISServer: false,
+                    isBaseLayer: true,
+                    type: 'jpg',
+                    projection: proj
+                });
+                var overlayLayer = new OpenLayers.Layer.ArcGISCache('Roads', roadsUrl, {
+                    tileOrigin: agsTileOrigin,
+                    resolutions: mapResolutions,
+                    sphericalMercator: true,
+                    maxExtent: mapExtent,
+                    useArcGISServer: false,
+                    isBaseLayer: false,
+                    projection: proj
+                });
+                map.addLayers([baseLayer, overlayLayer]);
+                
+                //map.zoomToExtent(new OpenLayers.Bounds(295892.34, 4308521.69, 312825.71, 4316988.37));
+                map.zoomToExtent(new OpenLayers.Bounds(-8341644, 4711236, -8339198, 4712459));
+            }
+        </script>
+    </head>
+    <body onload="init()">
+        <h1 id="title">ArcGIS Server Map Cache Example (Direct Access)</h1>
+
+        <div id="tags">
+        </div>
+
+        <p id="shortdesc">
+            Demonstrates the basic initialization of the ArcGIS Cache layer using a prebuilt configuration, and direct tile access from a file store.
+        </p>
+
+        <div id="map" class="smallmap"></div>
+        
+        <div id="docs">
+            <p>This example demonstrates using the ArcGISCache layer for 
+            accessing ESRI's ArcGIS Server (AGS) Map Cache tiles directly 
+            via the folder structure and HTTP.  Toggle the visibility of the AGS layer to
+            demonstrate how the two maps are lined up correctly.</p>
+
+            <h2>Notes on this Layer</h2>
+            <p>It's important that you set the correct values in your layer, and these
+            values will differ between tile sets. You can find these values for your 
+            layer in conf.xml at the root of your cache. 
+            (ie. <a href="http://serverx.esri.com/arcgiscache/dgaerials/Layers/conf.xml">http://serverx.esri.com/arcgiscache/dgaerials/Layers/conf.xml</a>)</p>
+
+            <p>For fused map caches this is often http:<i>ServerName</i>/arcgiscache/<i>MapServiceName</i>/Layers <br />
+            For individual layer caches this is often  http:<i>ServerName</i>/arcgiscache/<i>LayerName</i>/Layers </p>
+            
+            <h2> Other Examples </h2>
+            <p>This is one of three examples for this layer.  You can also configure this
+            layer to use <a href="arcgiscache_ags.html">prebuilt tiles from a live server.</a> It is also
+            possible to let this <a href="arcgiscache_jsonp.html">layer 'auto-configure' itself using the capabilities json object from the server itself when using a live ArcGIS server.</a>
+            </p>
+        </div>
+    </body>
+</html>

Copied: sandbox/august/trunk/examples/arcgiscache_jsonp.html (from rev 11704, trunk/openlayers/examples/arcgiscache_jsonp.html)
===================================================================
--- sandbox/august/trunk/examples/arcgiscache_jsonp.html	                        (rev 0)
+++ sandbox/august/trunk/examples/arcgiscache_jsonp.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,108 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+  <head>
+    <title>OpenLayers ArcGIS Cache Example (Autoconfigure with JSONP)</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 src="../lib/OpenLayers/Layer/ArcGISCache.js" type="text/javascript"></script>
+    
+    <!-- This is to simplify making the JSONP request for this example -->
+    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
+    
+    <script type="text/javascript">
+        var map,
+            layerURL = "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer";
+        
+        function init() {
+            var jsonp_url = layerURL + '?f=json&pretty=true&callback=?';
+            $.getJSON(jsonp_url, function(data) {                
+                initMap(data);
+            });
+        }
+
+        function initMap(layerInfo){
+            /*
+             * The initialize function in this layer has the ability to automatically configure
+             * itself if given the JSON capabilities object from the ArcGIS map server.
+             * This hugely simplifies setting up a new layer, and switching basemaps when using this technique.
+             *
+             * see the 'initialize' function in ArcGISCache.js, or 
+             * see the other two ArcGISCache.js examples for direct manual configuration options
+             *
+             */
+            var baseLayer = new OpenLayers.Layer.ArcGISCache("AGSCache", layerURL, {
+                layerInfo: layerInfo
+            });
+            
+            /*
+             * Make sure our baselayer and our map are synced up
+             */
+            map = new OpenLayers.Map('map', { 
+                maxExtent: baseLayer.maxExtent,
+                units: baseLayer.units,
+                resolutions: baseLayer.resolutions,
+                numZoomLevels: baseLayer.numZoomLevels,
+                tileSize: baseLayer.tileSize,
+                displayProjection: baseLayer.displayProjection,
+                StartBounds: baseLayer.initialExtent                
+            });
+            map.addLayers([baseLayer]);
+            
+            
+            //overlay test layer
+            //http://openlayers.org/dev/examples/web-mercator.html
+            var wms = new OpenLayers.Layer.WMS("Highways",
+                "http://sampleserver1.arcgisonline.com/arcgis/services/Specialty/ESRI_StateCityHighway_USA/MapServer/WMSServer", 
+                {layers: "2", format: "image/gif", transparent: "true"}, 
+                { isBaseLayer: false, wrapDateLine: false } 
+            );
+            map.addLayers([wms]);
+
+            
+            
+            map.addControl(new OpenLayers.Control.LayerSwitcher());
+            map.addControl(new OpenLayers.Control.MousePosition() );            
+            //map.zoomToExtent(new OpenLayers.Bounds(-8341644, 4711236, -8339198, 4712459));
+            map.zoomToExtent(new OpenLayers.Bounds(-8725663.6225564, 4683718.6735907, -8099491.4868444, 4996804.7414467));
+        }
+    </script>
+  </head>
+  <body onload="init()">
+      <h1 id="title">OpenLayers ArcGIS Cache Example (Autoconfigure with JSONP)</h1>
+
+    <div id="tags">
+        arcgis, arcgiscache, cache, tms, jsonp
+    </div>
+
+    <p id="shortdesc">
+        Demonstrates the basic initialization of the ArcGIS Cache layer by using the server capabilities object.
+    </p>
+
+    <div id="map" class="smallmap"></div>
+
+    <div id="docs">
+        <p>This example demonstrates using the ArcGISCache layer for 
+        accessing ESRI's ArcGIS Server (AGS) Map Cache tiles normally through 
+        a live AGS MapServer.  Toggle the visibility of the overlay to
+        demonstrate how the two layers are lined up correctly.</p>
+        
+        <h2>Notes on this Layer</h2>
+        <p>
+        This method automatically configures the layer using the capabilities object 
+        generated by the server itself.  This page shows how to construct the url for the server capabilities object,
+        retrieve it using JSONP (and jQuery), and pass it in during construction.  Note that in this case, 
+        the layer is constructed before the map.  This approach greatly simplifies the
+        configuration of your map, and works best when all your tiles / overlays are similarly laid out.
+        If you are using a live AGS map server for your layer, it can be helpful to check your
+        server configuration using this technique before trying one of the other examples for this layer.  
+        </p>
+        
+        <h2> Other Examples </h2>
+        <p>This is one of three examples for this layer.  You can also configure this
+        layer to use <a href="arcgiscache_direct.html">prebuilt tiles in a file store (not a live server).</a>  
+        As well a retrieve <a href="arcgiscache_ags.html">tiles from a live server.</a> 
+        </p>
+    </div>
+  </body>
+</html>

Modified: sandbox/august/trunk/examples/arcims-thematic.html
===================================================================
--- sandbox/august/trunk/examples/arcims-thematic.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/arcims-thematic.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/arcims.html
===================================================================
--- sandbox/august/trunk/examples/arcims.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/arcims.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/attribution.html
===================================================================
--- sandbox/august/trunk/examples/attribution.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/attribution.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/baseLayers.html
===================================================================
--- sandbox/august/trunk/examples/baseLayers.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/baseLayers.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/behavior-fixed-http-gml.html
===================================================================
--- sandbox/august/trunk/examples/behavior-fixed-http-gml.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/behavior-fixed-http-gml.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/bing-tiles.html
===================================================================
--- sandbox/august/trunk/examples/bing-tiles.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/bing-tiles.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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 Bing Tiles Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
     <link rel="stylesheet" href="style.css" type="text/css">

Modified: sandbox/august/trunk/examples/bing.html
===================================================================
--- sandbox/august/trunk/examples/bing.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/bing.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />
@@ -10,9 +12,16 @@
     <script>
 
         var map;
-
+ 
         function init(){
+            // setting restrictedExtent so that we can use the 
+            // VirtualEarth-layers, see e.g. 
+            // http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/VirtualEarth-js.html
+            var restrictedExtent = new OpenLayers.Bounds(-180, -90, 
+                180, 90);
+            
             map = new OpenLayers.Map("map");
+            
             map.addControl(new OpenLayers.Control.LayerSwitcher());
 
             var shaded = new OpenLayers.Layer.VirtualEarth("Shaded", {

Modified: sandbox/august/trunk/examples/boxes-vector.html
===================================================================
--- sandbox/august/trunk/examples/boxes-vector.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/boxes-vector.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/boxes.html
===================================================================
--- sandbox/august/trunk/examples/boxes.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/boxes.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/browser-name.html
===================================================================
--- sandbox/august/trunk/examples/browser-name.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/browser-name.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/browser.html (from rev 11704, trunk/openlayers/examples/browser.html)
===================================================================
--- sandbox/august/trunk/examples/browser.html	                        (rev 0)
+++ sandbox/august/trunk/examples/browser.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,151 @@
+<!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;
+        }
+
+        .tester {
+            margin: 3px;
+        }
+    </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>
+
+<h1>Click or touch the red square to get information about the selected events</h1>
+
+<div>
+    <div class="tester">
+        <INPUT TYPE=CHECKBOX ID="clickID" checked>click<BR>
+        <INPUT TYPE=CHECKBOX ID="dblclickID">dblclick<BR>
+        <INPUT TYPE=CHECKBOX ID="mousedownID">mousedown<BR>
+        <INPUT TYPE=CHECKBOX ID="mouseupID">mouseup<BR>
+        <INPUT TYPE=CHECKBOX ID="mouseoverID">mouseover<BR>
+        <INPUT TYPE=CHECKBOX ID="mousemoveID">mousemove<BR>
+        <INPUT TYPE=CHECKBOX ID="mouseoutID">mouseout<BR>
+        <INPUT TYPE=CHECKBOX ID="touchstartID">touchstart<BR>
+        <INPUT TYPE=CHECKBOX ID="touchendID">touchend<BR>
+        <INPUT TYPE=CHECKBOX ID="touchmoveID">touchmove<BR>
+        <INPUT TYPE=CHECKBOX ID="touchcancelID">touchcancel<BR>
+        <INPUT TYPE=CHECKBOX ID="gesturestartID">gesturestart<BR>
+        <INPUT TYPE=CHECKBOX ID="gesturechangeID">gesturechange<BR>
+        <INPUT TYPE=CHECKBOX ID="gestureendID">gestureend<BR>
+    </div>
+
+    <div style="height: 200px;width: 200px;" class="tester">
+        <div id="box" style="height: 200px; width: 200px; background: none repeat scroll 0% 0% red; "
+             onclick="click(event)"
+             ondblclick="dblclick(event)"
+             onmousedown="mousedown(event)"
+             onmouseup="mouseup(event)"
+             onmouseover="mouseover(event)"
+             onmousemove="mousemove(event)"
+             onmouseout="mouseout(event)"
+             ontouchstart="touchstart(event)"
+             ontouchend="touchend(event)"
+             ontouchmove="touchmove(event)"
+             ontouchcancel="touchcancel(event)"
+             ongesturestart="gesturestart(event)"
+             ongesturechange="gesturechange(event)"
+             ongestureend="gestureend(event)">
+        </div>
+    </div>
+
+    <div id="log" class="tester"></div>
+</div>
+
+
+</body>
+</html>

Copied: sandbox/august/trunk/examples/browser.js (from rev 11704, trunk/openlayers/examples/browser.js)
===================================================================
--- sandbox/august/trunk/examples/browser.js	                        (rev 0)
+++ sandbox/august/trunk/examples/browser.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,241 @@
+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>";
+}
+var counter = 1;
+
+function log(title, detail) {
+    var logDiv = document.getElementById("log");
+    idString = "'id" + counter + "'";
+    var newlink = document.createElement('a');
+    newlink.setAttribute('href', "javascript:toggle_visibility(" + idString + ")");
+    newlink.innerHTML = counter + ". " + title;
+    var br1 = document.createElement('br');
+    logDiv.appendChild(newlink);
+    logDiv.appendChild(br1);
+
+    var childDiv = document.createElement('div');
+    childDiv.setAttribute("id", idString.replace("'", "").replace("'", ""));
+    childDiv.setAttribute("style", 'display: none; margin-left : 5px;');
+    childDiv.innerHTML = detail;
+    var br2 = document.createElement('br');
+    logDiv.appendChild(childDiv);
+
+    counter = counter + 1;
+}
+
+function inspect(obj) {
+    if (typeof obj === "undefined") {
+        return "undefined";
+    }
+    var _props = [];
+
+    for (var i in obj) {
+        _props.push(i + " : " + obj[i]);
+    }
+    return " {" + _props.join(",<br>") + "} ";
+}
+
+function click(e) {
+    if (document.getElementById("clickID").checked) {
+        var box = document.getElementById("box");
+        log(e.type, inspect(e));
+        if (e.preventDefault) e.preventDefault();
+    }
+    return false;
+}
+
+function dblclick(e) {
+    if (document.getElementById("dblclickID").checked) {
+        var box = document.getElementById("box");
+        log(e.type, inspect(e));
+        if (e.preventDefault) e.preventDefault();
+    }
+    return false;
+}
+
+function mousedown(e) {
+    if (document.getElementById("mousedownID").checked) {
+        var box = document.getElementById("box");
+        log(e.type, inspect(e));
+        if (e.preventDefault) e.preventDefault();
+    }
+    return false;
+}
+
+function mouseup(e) {
+    if (document.getElementById("mouseupID").checked) {
+        var box = document.getElementById("box");
+        log(e.type, inspect(e));
+        if (e.preventDefault) e.preventDefault();
+    }
+    return false;
+}
+
+function mouseover(e) {
+    if (document.getElementById("mouseoverID").checked) {
+        var box = document.getElementById("box");
+        log(e.type, inspect(e));
+        if (e.preventDefault) e.preventDefault();
+    }
+    return false;
+}
+
+function mousemove(e) {
+    if (document.getElementById("mousemoveID").checked) {
+        var box = document.getElementById("box");
+        log(e.type, inspect(e));
+        if (e.preventDefault) e.preventDefault();
+    }
+    return false;
+}
+
+function mouseout(e) {
+    if (document.getElementById("mouseoutID").checked) {
+        var box = document.getElementById("box");
+        log(e.type, inspect(e));
+        if (e.preventDefault) e.preventDefault();
+    }
+    return false;
+}
+
+function touchstart(e) {
+    if (document.getElementById("touchstartID").checked) {
+        var box = document.getElementById("box");
+        var result = inspect(e);
+        for (var i = 0; i < e.touches.length; i++) {
+            result = result + "<br> Touches nr." + i + " <br>" + inspect(e.touches[i]);
+        }
+        log(e.type, result);
+        if (e.preventDefault) e.preventDefault();
+    }
+    return false;
+}
+
+function touchend(e) {
+    if (document.getElementById("touchendID").checked) {
+        var box = document.getElementById("box");
+        var result = inspect(e);
+        for (var i = 0; i < e.touches.length; i++) {
+            result = result + "<br> Touches nr." + i + " <br>" + inspect(e.touches[i]);
+        }
+        log(e.type, result);
+        if (e.preventDefault) e.preventDefault();
+    }
+    return false;
+}
+
+function touchmove(e) {
+    if (document.getElementById("touchmoveID").checked) {
+        var targetEvent = e.touches.item(0);
+        var box = document.getElementById("box");
+        box.style.left = targetEvent.clientX + "px";
+        box.style.top = targetEvent.clientY + "px";
+        var result = inspect(e);
+        for (var i = 0; i < e.touches.length; i++) {
+            result = result + "<br> Touches nr." + i + " <br>" + inspect(e.touches[i]);
+        }
+        log(e.type, result);
+        if (e.preventDefault) e.preventDefault();
+    }
+    return false;
+}
+
+function touchcancel(e) {
+    if (document.getElementById("touchcancelID").checked) {
+        var box = document.getElementById("box");
+        var result = inspect(e);
+        for (var i = 0; i < e.touches.length; i++) {
+            result = result + "<br> Touches nr." + i + " <br>" + inspect(e.touches[i]);
+        }
+        log(e.type, result);
+        if (e.preventDefault) e.preventDefault();
+    }
+    return false;
+}
+
+function gesturestart(e) {
+    if (document.getElementById("gesturestartID").checked) {
+        var box = document.getElementById("box");
+        log(e.type, inspect(e));
+        if (e.preventDefault) e.preventDefault();
+    }
+    return false;
+}
+
+function gesturechange(e) {
+    if (document.getElementById("gesturechangeID").checked) {
+        var box = document.getElementById("box");
+        log(e.type, inspect(e));
+        if (e.preventDefault) e.preventDefault();
+    }
+    return false;
+}
+
+function gestureend(e) {
+    if (document.getElementById("gestureendID").checked) {
+        var box = document.getElementById("box");
+        log(e.type, inspect(e));
+        if (e.preventDefault) e.preventDefault();
+    }
+    return false;
+}
+
+function toggle_visibility(id) {
+    var e = document.getElementById(id);
+    if (e.style.display == 'block') {
+        e.style.display = 'none';
+    } else {
+        e.style.display = 'block';
+    }
+}
+
+
+

Modified: sandbox/august/trunk/examples/buffer.html
===================================================================
--- sandbox/august/trunk/examples/buffer.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/buffer.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/canvas.html
===================================================================
--- sandbox/august/trunk/examples/canvas.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/canvas.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/canvas.js
===================================================================
--- sandbox/august/trunk/examples/canvas.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/canvas.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -43,9 +43,9 @@
         protocol: new OpenLayers.Protocol.WFS({
             version: "1.1.0",
             srsName: "EPSG:900913",
-            url:  "http://demo.opengeo.org/geoserver/wfs",
+            url:  "http://v2.suite.opengeo.org/geoserver/wfs",
             featureType: "states",
-            featureNS: "http://www.openplans.org/topp"
+            featureNS: "http://usa.opengeo.org"
         }),
         styleMap: styleMap,
         renderers: ["Canvas", "SVG", "VML"]

Modified: sandbox/august/trunk/examples/click-handler.html
===================================================================
--- sandbox/august/trunk/examples/click-handler.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/click-handler.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/click.html
===================================================================
--- sandbox/august/trunk/examples/click.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/click.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/controls.html
===================================================================
--- sandbox/august/trunk/examples/controls.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/controls.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />
@@ -23,25 +25,33 @@
                     numZoomLevels: 6
                     
                 });
-    
 
-                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, gwc, dm_wms]);
 
-                map.addLayers([ol_wms, jpl_wms, dm_wms]);
-                if (!map.getCenter()) map.zoomToMaxExtent();
+                if (!map.getCenter()) {
+                    map.zoomToMaxExtent();
+                }
             }
         </script>
     </head>
@@ -56,8 +66,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>

Modified: sandbox/august/trunk/examples/cql-format.html
===================================================================
--- sandbox/august/trunk/examples/cql-format.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/cql-format.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,6 +1,8 @@
 <!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>

Copied: sandbox/august/trunk/examples/cross-origin.html (from rev 11704, trunk/openlayers/examples/cross-origin.html)
===================================================================
--- sandbox/august/trunk/examples/cross-origin.html	                        (rev 0)
+++ sandbox/august/trunk/examples/cross-origin.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>OpenLayers Script Protocol Example</title>
+        <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
+        <link rel="stylesheet" href="style.css" type="text/css">
+        <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" />
+        <script src="../lib/OpenLayers.js"></script>
+    </head>
+    <body>
+        <h1 id="title">Script Protocol</h1>
+        <div id="tags">
+            protocol, script, cross origin, advanced
+        </div>
+        <p id="shortdesc">
+            Demonstrates the use of a script protocol for making feature requests 
+            cross origin.
+        </p>
+        <div id="map" class="smallmap"></div>
+        <div id="docs">
+            <p>
+                In cases where a service returns serialized features and accepts
+                a named callback (e.g. http://example.com/features.json?callback=foo),
+                the script protocol can be used to read features without being
+                restricted by the same origin policy.
+            </p>
+            <p>
+                View the <a href="cross-origin.js" target="_blank">cross-origin.js</a>
+                source to see how this is done
+            </p>
+        </div>
+        <script src="cross-origin.js"></script>
+    </body>
+</html>

Copied: sandbox/august/trunk/examples/cross-origin.js (from rev 11704, trunk/openlayers/examples/cross-origin.js)
===================================================================
--- sandbox/august/trunk/examples/cross-origin.js	                        (rev 0)
+++ sandbox/august/trunk/examples/cross-origin.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,39 @@
+var map = new OpenLayers.Map({
+    div: "map",
+    layers: [
+        new OpenLayers.Layer.WMS(
+            "World Map",
+            "http://maps.opengeo.org/geowebcache/service/wms",
+            {layers: "bluemarble"}
+        ),
+        new OpenLayers.Layer.Vector("States", {
+            strategies: [new OpenLayers.Strategy.BBOX()],
+            protocol: new OpenLayers.Protocol.Script({
+                url: "http://suite.opengeo.org/geoserver/wfs",
+                callbackKey: "format_options",
+                callbackPrefix: "callback:",
+                params: {
+                    service: "WFS",
+                    version: "1.1.0",
+                    srsName: "EPSG:4326",
+                    request: "GetFeature",
+                    typeName: "world:cities",
+                    outputFormat: "json"
+                },
+                filterToParams: function(filter, params) {
+                    // example to demonstrate BBOX serialization
+                    if (filter.type === OpenLayers.Filter.Spatial.BBOX) {
+                        params.bbox = filter.value.toArray();
+                        if (filter.projection) {
+                            params.bbox.push(filter.projection.getCode());
+                        }
+                    }
+                    return params;
+                }
+            })
+        })
+    ],
+    center: new OpenLayers.LonLat(0, 0),
+    zoom: 1
+});
+

Modified: sandbox/august/trunk/examples/custom-control-point.html
===================================================================
--- sandbox/august/trunk/examples/custom-control-point.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/custom-control-point.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/custom-control.html
===================================================================
--- sandbox/august/trunk/examples/custom-control.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/custom-control.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/custom-style.html
===================================================================
--- sandbox/august/trunk/examples/custom-style.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/custom-style.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/debug.html
===================================================================
--- sandbox/august/trunk/examples/debug.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/debug.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/document-drag.html
===================================================================
--- sandbox/august/trunk/examples/document-drag.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/document-drag.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />

Modified: sandbox/august/trunk/examples/donut.html
===================================================================
--- sandbox/august/trunk/examples/donut.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/donut.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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 Polygon Hole Digitizing</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="style.css" type="text/css">

Modified: sandbox/august/trunk/examples/doubleSetCenter.html
===================================================================
--- sandbox/august/trunk/examples/doubleSetCenter.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/doubleSetCenter.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/drag-feature.html
===================================================================
--- sandbox/august/trunk/examples/drag-feature.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/drag-feature.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/draw-feature.html
===================================================================
--- sandbox/august/trunk/examples/draw-feature.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/draw-feature.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/dynamic-text-layer.html
===================================================================
--- sandbox/august/trunk/examples/dynamic-text-layer.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/dynamic-text-layer.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/editingtoolbar-outside.html
===================================================================
--- sandbox/august/trunk/examples/editingtoolbar-outside.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/editingtoolbar-outside.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/editingtoolbar.html
===================================================================
--- sandbox/august/trunk/examples/editingtoolbar.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/editingtoolbar.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/events.html
===================================================================
--- sandbox/august/trunk/examples/events.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/events.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/example-list.html
===================================================================
--- sandbox/august/trunk/examples/example-list.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/example-list.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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: auto;
+            }
             #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/august/trunk/examples/example.html
===================================================================
--- sandbox/august/trunk/examples/example.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/example.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/filter-strategy.html
===================================================================
--- sandbox/august/trunk/examples/filter-strategy.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/filter-strategy.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/filter.html
===================================================================
--- sandbox/august/trunk/examples/filter.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/filter.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/fractional-zoom.html
===================================================================
--- sandbox/august/trunk/examples/fractional-zoom.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/fractional-zoom.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/fullScreen.html
===================================================================
--- sandbox/august/trunk/examples/fullScreen.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/fullScreen.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/fullScreen.js (from rev 11704, trunk/openlayers/examples/fullScreen.js)
===================================================================
--- sandbox/august/trunk/examples/fullScreen.js	                        (rev 0)
+++ sandbox/august/trunk/examples/fullScreen.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,15 @@
+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);
+}

Copied: sandbox/august/trunk/examples/game-accel-ball.html (from rev 11704, trunk/openlayers/examples/game-accel-ball.html)
===================================================================
--- sandbox/august/trunk/examples/game-accel-ball.html	                        (rev 0)
+++ sandbox/august/trunk/examples/game-accel-ball.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,80 @@
+<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 Game: Bounce Ball</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?mobile"></script>
+    <style type="text/css">
+      html, body { height: 100%; }
+      #shortdesc { display: none; }
+      #tags { display: none; }
+    </style>  
+
+    <script type="text/javascript">
+        var map, vlayer;
+        function adjustLocation(delta, feature) {
+            feature.geometry.move(delta.x, delta.y);
+            var me = map.maxExtent; 
+            var rad = 6;
+            if (feature.geometry.x > (me.right - rad)) { 
+                feature.geometry.x = me.right - rad;
+            } else if (feature.geometry.x < (me.left+rad)) {
+                feature.geometry.x = me.left+rad;
+            } 
+            if (feature.geometry.y > (me.top-rad)) {
+                feature.geometry.y = me.top-rad;
+            } else if (feature.geometry.y < (me.bottom+rad)) {
+                feature.geometry.y = me.bottom+rad;
+            }    
+            vlayer.drawFeature(feature);
+        }
+        function init() {
+            map = new OpenLayers.Map( 'map', 
+                {
+                 'maxExtent': new OpenLayers.Bounds(0, 0, $("map").clientWidth, $("map").clientHeight), 
+                 controls: [], 
+                 maxResolution: 'auto'} 
+            );
+            var layer = new OpenLayers.Layer("",
+                    {isBaseLayer: true} );
+            map.addLayer(layer);
+            map.zoomToMaxExtent();
+            vlayer = new OpenLayers.Layer.Vector();
+            var feature = new OpenLayers.Feature.Vector(
+                new OpenLayers.Geometry.Point(map.getCenter().lon, map.getCenter().lat));
+            vlayer.addFeatures(feature);    
+            map.addLayer(vlayer);
+            if (window.DeviceMotionEvent) {
+                window.addEventListener('devicemotion', function (evt) {
+                    var delta = null;
+                    if (typeof(evt.accelerationIncludingGravity) != 'undefined') {
+                        delta = {
+                            'x': evt.accelerationIncludingGravity.x * 3,
+                            'y': evt.accelerationIncludingGravity.y * 3,
+                            'z': evt.accelerationIncludingGravity.z
+                        }    
+                    }
+                    adjustLocation(delta, feature);
+                }, true);    
+            } else {
+                alert("This demo does not work on your browser.");
+            }    
+        }
+    </script>
+  </head>
+  <body onload="init()">
+    <h1 id="title">Accelerometer Example</h1>
+    <div id="tags">
+      mobile, game
+    </div>  
+    <div id="shortdesc">Simple acceleration demo; roll a vector feature around
+    on a map. (Only tested on iOS 4.)</div>
+
+    <div id="map" width="100%" height="100%" style="background-color: grey"></div>
+    <div id="docs">
+      Demo works best when device is locked in portrait mode. 
+    </div>
+  </body>
+</html>

Modified: sandbox/august/trunk/examples/geojson.html
===================================================================
--- sandbox/august/trunk/examples/geojson.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/geojson.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/geolocation.html (from rev 11704, trunk/openlayers/examples/geolocation.html)
===================================================================
--- sandbox/august/trunk/examples/geolocation.html	                        (rev 0)
+++ sandbox/august/trunk/examples/geolocation.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/geolocation.js (from rev 11704, trunk/openlayers/examples/geolocation.js)
===================================================================
--- sandbox/august/trunk/examples/geolocation.js	                        (rev 0)
+++ sandbox/august/trunk/examples/geolocation.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,105 @@
+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/august/trunk/examples/georss-flickr.html
===================================================================
--- sandbox/august/trunk/examples/georss-flickr.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/georss-flickr.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/georss-markers.html
===================================================================
--- sandbox/august/trunk/examples/georss-markers.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/georss-markers.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/georss.html
===================================================================
--- sandbox/august/trunk/examples/georss.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/georss.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/getfeature-wfs.html
===================================================================
--- sandbox/august/trunk/examples/getfeature-wfs.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/getfeature-wfs.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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>

Modified: sandbox/august/trunk/examples/getfeatureinfo-control.html
===================================================================
--- sandbox/august/trunk/examples/getfeatureinfo-control.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/getfeatureinfo-control.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/getfeatureinfo-popup.html
===================================================================
--- sandbox/august/trunk/examples/getfeatureinfo-popup.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/getfeatureinfo-popup.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/getfeatureinfo.html
===================================================================
--- sandbox/august/trunk/examples/getfeatureinfo.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/getfeatureinfo.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/gml-layer.html
===================================================================
--- sandbox/august/trunk/examples/gml-layer.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/gml-layer.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/google-reproject.html
===================================================================
--- sandbox/august/trunk/examples/google-reproject.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/google-reproject.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/google-v3-alloverlays.html
===================================================================
--- sandbox/august/trunk/examples/google-v3-alloverlays.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/google-v3-alloverlays.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/google-v3.html
===================================================================
--- sandbox/august/trunk/examples/google-v3.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/google-v3.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/google.html
===================================================================
--- sandbox/august/trunk/examples/google.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/google.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/graphic-name.html
===================================================================
--- sandbox/august/trunk/examples/graphic-name.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/graphic-name.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />
         <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" />

Modified: sandbox/august/trunk/examples/graticule.html
===================================================================
--- sandbox/august/trunk/examples/graticule.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/graticule.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/gutter.html
===================================================================
--- sandbox/august/trunk/examples/gutter.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/gutter.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/highlight-feature.html
===================================================================
--- sandbox/august/trunk/examples/highlight-feature.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/highlight-feature.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/hover-handler.html
===================================================================
--- sandbox/august/trunk/examples/hover-handler.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/hover-handler.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/image-layer.html
===================================================================
--- sandbox/august/trunk/examples/image-layer.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/image-layer.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/img/check-round-green.png
===================================================================
(Binary files differ)

Copied: sandbox/august/trunk/examples/img/check-round-green.png (from rev 11704, trunk/openlayers/examples/img/check-round-green.png)
===================================================================
(Binary files differ)

Deleted: sandbox/august/trunk/examples/img/check-round-grey.png
===================================================================
(Binary files differ)

Copied: sandbox/august/trunk/examples/img/check-round-grey.png (from rev 11704, trunk/openlayers/examples/img/check-round-grey.png)
===================================================================
(Binary files differ)

Deleted: sandbox/august/trunk/examples/img/list.png
===================================================================
(Binary files differ)

Copied: sandbox/august/trunk/examples/img/list.png (from rev 11704, trunk/openlayers/examples/img/list.png)
===================================================================
(Binary files differ)

Deleted: sandbox/august/trunk/examples/img/locate.png
===================================================================
(Binary files differ)

Copied: sandbox/august/trunk/examples/img/locate.png (from rev 11704, trunk/openlayers/examples/img/locate.png)
===================================================================
(Binary files differ)

Deleted: sandbox/august/trunk/examples/img/marker_shadow.png
===================================================================
(Binary files differ)

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

Deleted: sandbox/august/trunk/examples/img/minus1.png
===================================================================
(Binary files differ)

Copied: sandbox/august/trunk/examples/img/minus1.png (from rev 11704, trunk/openlayers/examples/img/minus1.png)
===================================================================
(Binary files differ)

Deleted: sandbox/august/trunk/examples/img/mobile-layers.png
===================================================================
(Binary files differ)

Copied: sandbox/august/trunk/examples/img/mobile-layers.png (from rev 11704, trunk/openlayers/examples/img/mobile-layers.png)
===================================================================
(Binary files differ)

Deleted: sandbox/august/trunk/examples/img/mobile-loc.png
===================================================================
(Binary files differ)

Copied: sandbox/august/trunk/examples/img/mobile-loc.png (from rev 11704, trunk/openlayers/examples/img/mobile-loc.png)
===================================================================
(Binary files differ)

Deleted: sandbox/august/trunk/examples/img/mobile-zoombar.png
===================================================================
--- trunk/openlayers/examples/img/mobile-zoombar.png	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/img/mobile-zoombar.png	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/img/mobile-zoombar.png (from rev 11704, trunk/openlayers/examples/img/mobile-zoombar.png)
===================================================================
--- sandbox/august/trunk/examples/img/mobile-zoombar.png	                        (rev 0)
+++ sandbox/august/trunk/examples/img/mobile-zoombar.png	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/img/openlayers.png
===================================================================
(Binary files differ)

Copied: sandbox/august/trunk/examples/img/openlayers.png (from rev 11704, trunk/openlayers/examples/img/openlayers.png)
===================================================================
(Binary files differ)

Deleted: sandbox/august/trunk/examples/img/popupMatrix.jpg
===================================================================
(Binary files differ)

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

Deleted: sandbox/august/trunk/examples/img/small.jpg
===================================================================
(Binary files differ)

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

Deleted: sandbox/august/trunk/examples/img/thinlong.jpg
===================================================================
(Binary files differ)

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

Deleted: sandbox/august/trunk/examples/img/widelong.jpg
===================================================================
(Binary files differ)

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

Deleted: sandbox/august/trunk/examples/img/wideshort.jpg
===================================================================
(Binary files differ)

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

Modified: sandbox/august/trunk/examples/intersects.html
===================================================================
--- sandbox/august/trunk/examples/intersects.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/intersects.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/kamap.html
===================================================================
--- sandbox/august/trunk/examples/kamap.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/kamap.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/kinetic.html (from rev 11704, trunk/openlayers/examples/kinetic.html)
===================================================================
--- sandbox/august/trunk/examples/kinetic.html	                        (rev 0)
+++ sandbox/august/trunk/examples/kinetic.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/kinetic.js (from rev 11704, trunk/openlayers/examples/kinetic.js)
===================================================================
--- sandbox/august/trunk/examples/kinetic.js	                        (rev 0)
+++ sandbox/august/trunk/examples/kinetic.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/kml-layer.html
===================================================================
--- sandbox/august/trunk/examples/kml-layer.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/kml-layer.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="style.css" type="text/css">
     </head>

Modified: sandbox/august/trunk/examples/kml-track.html
===================================================================
--- sandbox/august/trunk/examples/kml-track.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/kml-track.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/late-render.html
===================================================================
--- sandbox/august/trunk/examples/late-render.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/late-render.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/layer-opacity.html
===================================================================
--- sandbox/august/trunk/examples/layer-opacity.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/layer-opacity.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/layerLoadMonitoring.html
===================================================================
--- sandbox/august/trunk/examples/layerLoadMonitoring.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/layerLoadMonitoring.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/layerswitcher.html
===================================================================
--- sandbox/august/trunk/examples/layerswitcher.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/layerswitcher.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/lite.html
===================================================================
--- sandbox/august/trunk/examples/lite.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/lite.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/mapguide.html
===================================================================
--- sandbox/august/trunk/examples/mapguide.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/mapguide.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/mapserver.html
===================================================================
--- sandbox/august/trunk/examples/mapserver.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/mapserver.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/mapserver_untiled.html
===================================================================
--- sandbox/august/trunk/examples/mapserver_untiled.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/mapserver_untiled.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/marker-shadow.html
===================================================================
--- sandbox/august/trunk/examples/marker-shadow.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/marker-shadow.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />
@@ -31,13 +33,17 @@
         function init() {
             map = new OpenLayers.Map("map");
             
+            // allow testing of specific renderers via "?renderer=Canvas", etc
+            var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
+            renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
+
             layer = new OpenLayers.Layer.Vector(
                 "Marker Drop Shadows",
                 {
                     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.
@@ -53,7 +59,8 @@
                         pointRadius: 10
                     }),
                     isBaseLayer: true,
-                    rendererOptions: {yOrdering: true}
+                    rendererOptions: {yOrdering: true},
+                    renderers: renderer
                 }
             );
             

Modified: sandbox/august/trunk/examples/markerResize.html
===================================================================
--- sandbox/august/trunk/examples/markerResize.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/markerResize.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/marker_shadow.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/examples/markers.html
===================================================================
--- sandbox/august/trunk/examples/markers.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/markers.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/markersTextLayer.html
===================================================================
--- sandbox/august/trunk/examples/markersTextLayer.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/markersTextLayer.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/measure.html
===================================================================
--- sandbox/august/trunk/examples/measure.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/measure.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/mm.html
===================================================================
--- sandbox/august/trunk/examples/mm.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/mm.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/mobile-base.js (from rev 11704, trunk/openlayers/examples/mobile-base.js)
===================================================================
--- sandbox/august/trunk/examples/mobile-base.js	                        (rev 0)
+++ sandbox/august/trunk/examples/mobile-base.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,109 @@
+// API key for http://openlayers.org. Please get your own at
+// http://bingmapsportal.com/ and use that instead.
+var apiKey = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf";
+
+// initialize map when page ready
+var map;
+var gg = new OpenLayers.Projection("EPSG:4326");
+var sm = new OpenLayers.Projection("EPSG:900913");
+
+var init = function () {
+
+    var vector = new OpenLayers.Layer.Vector("Vector Layer", {});
+
+    var geolocate = new OpenLayers.Control.Geolocate({
+        id: 'locate-control',
+        geolocationOptions: {
+            enableHighAccuracy: false,
+            maximumAge: 0,
+            timeout: 7000
+        }
+    });
+    // create map
+    map = new OpenLayers.Map({
+        div: "map",
+        theme: null,
+        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.Attribution(),
+            new OpenLayers.Control.TouchNavigation({
+                dragPanOptions: {
+                    interval: 100,
+                    enableKinetic: true
+                }
+            }),
+            geolocate
+        ],
+        layers: [
+            new OpenLayers.Layer.OSM("OpenStreetMap", null, {
+                transitionEffect: 'resize'
+            }),
+            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"
+                },
+                name: "Bing Road",
+                transitionEffect: 'resize'
+            }),
+            new OpenLayers.Layer.Bing({
+                key: apiKey,
+                type: "Aerial",
+                name: "Bing Aerial",
+                transitionEffect: 'resize'
+            }),
+            new OpenLayers.Layer.Bing({
+                key: apiKey,
+                type: "AerialWithLabels",
+                name: "Bing Aerial + Labels",
+                transitionEffect: 'resize'
+            }), 
+            vector
+        ],
+        center: new OpenLayers.LonLat(0, 0),
+        zoom: 1
+    });
+
+    var style = {
+        fillOpacity: 0.1,
+        fillColor: '#000',
+        strokeColor: '#f00',
+        strokeOpacity: 0.6
+    };
+    geolocate.events.register("locationupdated",this,function(e) {
+        vector.removeAllFeatures();
+        vector.addFeatures([
+            new OpenLayers.Feature.Vector(
+                e.point,
+                {},
+                {
+                    graphicName: 'cross',
+                    strokeColor: '#f00',
+                    strokeWidth: 2,
+                    fillOpacity: 0,
+                    pointRadius: 10
+                }
+            ),
+            new OpenLayers.Feature.Vector(
+                OpenLayers.Geometry.Polygon.createRegularPolygon(
+                    new OpenLayers.Geometry.Point(e.point.x, e.point.y),
+                    e.position.coords.accuracy/2,
+                    50,
+                    0
+                ),
+                {},
+                style
+            )
+        ]);
+        map.zoomToExtent(vector.getDataExtent());
+    });
+};

Copied: sandbox/august/trunk/examples/mobile-drawing.html (from rev 11704, trunk/openlayers/examples/mobile-drawing.html)
===================================================================
--- sandbox/august/trunk/examples/mobile-drawing.html	                        (rev 0)
+++ sandbox/august/trunk/examples/mobile-drawing.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,45 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>OpenLayers Mobile Drawing</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">
+        <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
+        <script src="../lib/OpenLayers.js"></script>
+        <script src="mobile-drawing.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">Mobile Drawing Example</h1>
+        <div id="tags">
+            mobile, drawing
+        </div>
+        <p id="shortdesc">
+            A full-screen map with drawing tools for mobile devices.
+        </p>
+        <div id="map"></div>
+        <script>
+            init();
+        </script>
+    </body>
+</html>

Copied: sandbox/august/trunk/examples/mobile-drawing.js (from rev 11704, trunk/openlayers/examples/mobile-drawing.js)
===================================================================
--- sandbox/august/trunk/examples/mobile-drawing.js	                        (rev 0)
+++ sandbox/august/trunk/examples/mobile-drawing.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,33 @@
+
+function init() {
+
+    var vector = new OpenLayers.Layer.Vector();
+    var toolbar = new OpenLayers.Control.EditingToolbar(vector);
+
+    map = new OpenLayers.Map({
+        div: 'map',
+        projection: 'EPSG:900913',
+        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: 100
+                }
+            }),
+            new OpenLayers.Control.ZoomPanel(),
+            toolbar
+        ],
+        layers: [new OpenLayers.Layer.OSM(), vector],
+        center: new OpenLayers.LonLat(0, 0),
+        zoom: 1,
+        theme: null
+    });
+
+    toolbar.controls[0].activate();
+
+};

Copied: sandbox/august/trunk/examples/mobile-jq.html (from rev 11704, trunk/openlayers/examples/mobile-jq.html)
===================================================================
--- sandbox/august/trunk/examples/mobile-jq.html	                        (rev 0)
+++ sandbox/august/trunk/examples/mobile-jq.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,75 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
+        <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">
+        <link rel="stylesheet" href="style.mobile-jq.css" type="text/css">
+        <script src="../lib/OpenLayers.js?mobile"></script>
+        <script src="mobile-base.js"></script>
+        <script src="mobile-jq.js"></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" id="mappage">
+          <div data-role="content">
+            <div id="map"></div>
+          </div>
+
+          <div data-role="footer">
+            <a href="#searchpage" data-icon="search" data-role="button">Search</a>
+            <a href="#" id="locate" data-icon="locate" data-role="button">Locate</a>
+            <a href="#layerspage" data-icon="layers" data-role="button">Layers</a>
+          </div>
+          <div id="navigation" data-role="controlgroup" data-type="vertical">
+            <a href="#" data-role="button" data-icon="plus" id="plus"
+               data-iconpos="notext"></a>
+            <a href="#" data-role="button" data-icon="minus" id="minus"
+               data-iconpos="notext"></a>
+          </div>
+        </div>
+
+        <div data-role="page" id="searchpage">
+          <div data-role="header">
+            <h1>Search</h1>
+          </div>
+          <div data-role="fieldcontain">
+            <input type="search" name="query" id="query"
+                   value="" placeholder="Search for places"
+                   autocomplete="off"/>
+          </div>
+          <ul data-role="listview" data-inset="true" id="search_results"></ul> 
+        </div>
+
+        <div data-role="page" id="layerspage">
+          <div data-role="header">
+            <h1>Layers</h1>
+          </div>
+          <div data-role="content">
+            <ul data-role="listview" data-inset="true" data-theme="d" data-dividertheme="c" id="layerslist"> 
+          </div>
+        </div>
+
+        <div id="popup" data-role="dialog">
+            <div data-position="inline" data-theme="d" data-role="header">
+                <h1>Details</h1>
+            </div>
+            <div data-theme="c" data-role="content">
+                <ul id="details-list" data-role="listview">
+                </ul>
+            </div>
+        </div>
+    </body>
+</html>

Copied: sandbox/august/trunk/examples/mobile-jq.js (from rev 11704, trunk/openlayers/examples/mobile-jq.js)
===================================================================
--- sandbox/august/trunk/examples/mobile-jq.js	                        (rev 0)
+++ sandbox/august/trunk/examples/mobile-jq.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,214 @@
+var selectedFeature = null;
+
+$(document).ready(function() {
+
+    // Start with the map page
+    if (window.location.hash && window.location.hash!='#mappage') {
+        $.mobile.changePage('mappage');
+    }
+
+    // fix height of content
+    function fixContentHeight() {
+        var footer = $("div[data-role='footer']:visible"),
+        content = $("div[data-role='content']:visible:visible"),
+        viewHeight = $(window).height(),
+        contentHeight = viewHeight - footer.outerHeight();
+
+        if ((content.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(); 
+    //init();
+
+    // Map zoom  
+    $("#plus").click(function(){
+        map.zoomIn();
+    });
+    $("#minus").click(function(){
+        map.zoomOut();
+    });
+    $("#locate").click(function(){
+        var control = map.getControlsBy("id", "locate-control")[0];
+        if (control.active) {
+            control.getCurrentLocation();
+        } else {
+            control.activate();
+        }
+    });
+
+    var sprintersLayer = new OpenLayers.Layer.Vector("Sprinters", {
+        styleMap: new OpenLayers.StyleMap({
+            externalGraphic: "img/mobile-loc.png",
+            graphicOpacity: 1.0,
+            graphicWith: 16,
+            graphicHeight: 26,
+            graphicYOffset: -26
+        })
+    });
+    
+    var sprinters = getFeatures();
+    sprintersLayer.addFeatures(sprinters);
+    
+    map.addLayer(sprintersLayer);
+    
+    var selectControl = new OpenLayers.Control.SelectFeature(sprintersLayer, {onSelect: function(feature){
+        selectedFeature = feature;
+        $.mobile.changePage($("#popup"), "pop");
+    }});
+    
+    map.addControl(selectControl);
+    selectControl.activate();
+    
+    $('div#popup').live('pageshow',function(event, ui){
+        var li = "";
+        for(var attr in selectedFeature.attributes){
+            li += "<li><div style='width:25%;float:left'>" + attr + "</div><div style='width:75%;float:right'>" 
+            + selectedFeature.attributes[attr] + "</div></li>";
+        }
+        $("ul#details-list").empty().append(li).listview("refresh");
+    });
+
+    $('#searchpage').live('pageshow',function(event, ui){
+        $('#query').bind('change', function(e){
+            $('#search_results').empty();
+            if ($('#query')[0].value === '') {
+                return;
+            }
+            $.mobile.pageLoading();
+
+            // Prevent form send
+            e.preventDefault();
+
+            var searchUrl = 'http://ws.geonames.org/searchJSON?featureClass=P&maxRows=10';
+            searchUrl += '&name_startsWith=' + $('#query')[0].value;
+            $.getJSON(searchUrl, function(data) {
+                $.each(data.geonames, function() {
+                    var place = this;
+                    $('<li>')
+                        .hide()
+                        .append($('<h2 />', {
+                            text: place.name
+                        }))
+                        .append($('<p />', {
+                            html: '<b>' + place.countryName + '</b> ' + place.fcodeName
+                        }))
+                        .appendTo('#search_results')
+                        .click(function() {
+                            $.mobile.changePage('mappage');
+                            var lonlat = new OpenLayers.LonLat(place.lng, place.lat);
+                            map.setCenter(lonlat.transform(gg, sm), 10);
+                        })
+                        .show();
+                });
+                $('#search_results').listview('refresh');
+                $.mobile.pageLoading(true);
+            });
+        });
+        // only listen to the first event triggered
+        $('#searchpage').die('pageshow', arguments.callee);
+    });
+
+    $('#layerslist').listview();
+    $('<li>', {
+            "data-role": "list-divider",
+            text: "Base Layers"
+        })
+        .appendTo('#layerslist');
+    var baseLayers = map.getLayersBy("isBaseLayer", true);
+    $.each(baseLayers, function() {
+        addLayerToList(this);
+    });
+
+    $('<li>', {
+            "data-role": "list-divider",
+            text: "Overlay Layers"
+        })
+        .appendTo('#layerslist');
+    var overlayLayers = map.getLayersBy("isBaseLayer", false);
+    $.each(overlayLayers, function() {
+        addLayerToList(this);
+    });
+    $('#layerslist').listview('refresh');
+    
+    map.events.register("addlayer", this, function(e) {
+        addLayerToList(e.layer);
+    });
+});
+
+function addLayerToList(layer) {
+    var item = $('<li>', {
+            "data-icon": "check",
+            "class": layer.visibility ? "checked" : ""
+        })
+        .append($('<a />', {
+            text: layer.name
+        })
+            .click(function() {
+                $.mobile.changePage('mappage');
+                if (layer.isBaseLayer) {
+                    layer.map.setBaseLayer(layer);
+                } else {
+                    layer.setVisibility(!layer.getVisibility());
+                }
+            })
+        )
+        .appendTo('#layerslist');
+    layer.events.on({
+        'visibilitychanged': function() {
+            $(item).toggleClass('checked');
+        }
+    });
+}
+
+function getFeatures(){
+    var features = {
+      "type": "FeatureCollection", 
+      "features": [
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [1332700, 7906300]}, 
+            "properties": {"Name": "Igor Tihonov", "Country":"Sweden", "City":"Gothenburg"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [790300, 6573900]}, 
+            "properties": {"Name": "Marc Jansen", "Country":"Germany", "City":"Bonn"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [568600, 6817300]}, 
+            "properties": {"Name": "Bart van den Eijnden", "Country":"Netherlands", "City":"Utrecht"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-7909900, 5215100]}, 
+            "properties": {"Name": "Christopher Schmidt", "Country":"United States of America", "City":"Boston"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-937400, 5093200]}, 
+            "properties": {"Name": "Jorge Gustavo Rocha", "Country":"Portugal", "City":"Braga"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-355300, 7547800]}, 
+            "properties": {"Name": "Jennie Fletcher ", "Country":"Scotland", "City":"Edinburgh"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [657068.53608487, 5712321.2472725]}, 
+            "properties": {"Name": "Bruno Binet ", "Country":"France", "City":"Chambéry"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [667250.8958124, 5668048.6072737]}, 
+            "properties": {"Name": "Eric Lemoine", "Country":"France", "City":"Theys"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [653518.03606319, 5721118.5122914]}, 
+            "properties": {"Name": "Antoine Abt", "Country":"France", "City":"La Motte Servolex"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [657985.78042416, 5711862.6251028]}, 
+            "properties": {"Name": "Pierre Giraud", "Country":"France", "City":"Chambéry"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [742941.93818208, 5861818.9477535]}, 
+            "properties": {"Name": "Stéphane Brunner", "Country":"Switzerland", "City":"Paudex"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [736082.61064069, 5908165.4649505]},
+            "properties": {"Name": "Frédéric Junod", "Country":"Switzerland", "City":"Montagny-près-Yverdon"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [771595.97057525, 5912284.7041793]},
+            "properties": {"Name": "Cédric Moullet", "Country":"Switzerland", "City":"Payerne"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [744205.23922364, 5861277.319748]},
+            "properties": {"Name": "Benoit Quartier", "Country":"Switzerland", "City":"Lutry"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [1717430.147101, 5954568.7127565]}, 
+            "properties": {"Name": "Andreas Hocevar", "Country":"Austria", "City":"Graz"}},
+            { "type": "Feature", "geometry": {"type": "Point", "coordinates": [-12362007.067301,5729082.2365672]}, 
+            "properties": {"Name": "Tim Schaub", "Country":"United States of America", "City":"Bozeman"}}
+       ]
+    };
+
+    var reader = new OpenLayers.Format.GeoJSON();
+    
+    return reader.read(features);
+}

Copied: sandbox/august/trunk/examples/mobile-navigation.html (from rev 11704, trunk/openlayers/examples/mobile-navigation.html)
===================================================================
--- sandbox/august/trunk/examples/mobile-navigation.html	                        (rev 0)
+++ sandbox/august/trunk/examples/mobile-navigation.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/mobile-navigation.js (from rev 11704, trunk/openlayers/examples/mobile-navigation.js)
===================================================================
--- sandbox/august/trunk/examples/mobile-navigation.js	                        (rev 0)
+++ sandbox/august/trunk/examples/mobile-navigation.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,30 @@
+var map;
+
+function init() {
+    map = new OpenLayers.Map({
+        div: "map",
+        theme: null,
+        projection: new OpenLayers.Projection("EPSG:900913"),
+        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: 100,
+                    enableKinetic: true
+                }
+            }),
+            new OpenLayers.Control.ZoomPanel()
+        ],
+        layers: [
+            new OpenLayers.Layer.OSM("OpenStreetMap", null, {
+                transitionEffect: 'resize'
+            })
+        ]
+    });
+    map.setCenter(new OpenLayers.LonLat(0, 0), 3);
+}

Copied: sandbox/august/trunk/examples/mobile-sencha.html (from rev 11704, trunk/openlayers/examples/mobile-sencha.html)
===================================================================
--- sandbox/august/trunk/examples/mobile-sencha.html	                        (rev 0)
+++ sandbox/august/trunk/examples/mobile-sencha.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,150 @@
+<!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?mobile"></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-sencha.js"></script>
+        <script src="mobile-base.js"></script>
+        <style>
+            .searchList {
+                min-height: 150px;
+            }
+            .close-btn {
+                position: absolute;
+                right: 10px;
+                top: 10px;
+            }
+            img.minus {
+                -webkit-mask-image: url(img/minus1.png);
+            }
+            img.layers {
+                -webkit-mask-image: url(img/list.png);
+            }
+            .gx-layer-item {
+                margin-left: 10px;
+            }
+            #map {
+                width: 100%;
+                height: 100%;
+            }
+            .olControlAttribution {
+                font-size: 10px;
+                bottom: 5px;
+                right: 5px;
+            }
+            #title, #tags, #shortdesc {
+                display: none;
+            }
+        </style>
+        <script>
+
+        var app = new Ext.Application({
+            name: "ol",
+            launch: function() {
+                this.viewport = new Ext.Panel({
+                    fullscreen: true,
+                    dockedItems: [{
+                        dock: "bottom",
+                        xtype: "toolbar",
+                        ui: "light",
+                        layout: {
+                            pack: "center"
+                        },
+                        items: [{
+                            iconCls: "search",
+                            iconMask: true,
+                            handler: function(){
+                                // this is the app
+                                if (!app.searchFormPopupPanel) {
+                                    app.searchFormPopupPanel = new App.SearchFormPopupPanel({
+                                        map: map
+                                    });
+                                }
+                                app.searchFormPopupPanel.show('pop');
+                            }
+                        }, {
+                            iconCls: "locate",
+                            iconMask: true,
+                            handler: function() {
+                                var geolocate = map.getControlsBy("id", "locate-control")[0];
+                                if (geolocate.active) {
+                                    geolocate.getCurrentLocation();
+                                } else {
+                                    geolocate.activate();
+                                }
+                            }
+                        }, {
+                            xtype: "spacer"
+                        }, {
+                            iconMask: true,
+                            iconCls: "add",
+                            handler: function() {
+                                map.zoomIn();
+                            }
+                        }, {
+                            iconMask: true,
+                            iconCls: "minus",
+                            handler: function() {
+                                map.zoomOut();
+                            }
+                        }, {
+                            xtype: "spacer"
+                        }, {
+                            iconMask: true,
+                            iconCls: "layers",
+                            handler: function() {
+                                if (!app.popup) {
+                                    app.popup = new Ext.Panel({
+                                        floating: true,
+                                        modal: true,
+                                        centered: true,
+                                        hideOnMaskTap: true,
+                                        width: 240,
+                                        items: [{
+                                            xtype: 'app_layerlist',
+                                            map: map
+                                        }],
+                                        scroll: 'vertical'
+                                    });
+                                }
+                                app.popup.show('pop');
+                            }
+                        }]
+                    }],
+                    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/august/trunk/examples/mobile-sencha.js (from rev 11704, trunk/openlayers/examples/mobile-sencha.js)
===================================================================
--- sandbox/august/trunk/examples/mobile-sencha.js	                        (rev 0)
+++ sandbox/august/trunk/examples/mobile-sencha.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,198 @@
+Ext.ns('App');
+
+/**
+ * The model for the geonames records used in the search
+ */
+Ext.regModel('Geonames', {
+    fields: ['countryName', 'toponymName', 'name', 'lat', 'lng']
+});
+
+/**
+ * Custom class for the Search 
+ */
+App.SearchFormPopupPanel = Ext.extend(Ext.Panel, {
+    map: null,
+    floating: true,
+    modal: true,
+    centered: true,
+    hideOnMaskTap: true,
+    width: Ext.is.Phone ? undefined : 400,
+    height: Ext.is.Phone ? undefined : 400,
+    scroll: false,
+    layout: 'fit',
+    fullscreen: Ext.is.Phone ? true : undefined,
+    url: 'http://ws.geonames.org/searchJSON?',
+    errorText: 'Sorry, we had problems communicating with geonames.org. Please try again.',
+    errorTitle: 'Communication error',
+    maxResults: 6,
+    featureClass: "P",
+    
+    createStore: function(){
+        this.store = new Ext.data.Store({
+            model: 'Geonames',
+            proxy: {
+                type: 'scripttag',
+                timeout: 5000,
+                listeners: {
+                    exception: function(){
+                        this.hide();
+                        Ext.Msg.alert(this.errorTitle, this.errorText, Ext.emptyFn);
+                    },
+                    scope: this
+                },
+                url: this.url,
+                reader: {
+                    type: 'json',
+                    root: 'geonames'
+                }
+            }
+        });
+    },
+    
+    doSearch: function(searchfield, evt){
+        var q = searchfield.getValue();
+        this.store.load({
+            params: {
+                featureClass: this.featureClass,
+                maxRows: this.maxResults,
+                name_startsWith: encodeURIComponent(q)
+            }
+        });
+    },
+    
+    onItemTap: function(dataView, index, item, event){
+        var record = this.store.getAt(index);
+        var lon = record.get('lng');
+        var lat = record.get('lat');
+        var lonlat = new OpenLayers.LonLat(lon, lat);
+        map.setCenter(lonlat.transform(gg, sm), 12);
+        this.hide("pop");
+    },
+    
+    initComponent: function(){
+        this.createStore();
+        this.resultList = new Ext.List({
+            scroll: 'vertical',
+            cls: 'searchList',
+            loadingText: "Searching ...",
+            store: this.store,
+            itemTpl: '<div>{name} ({countryName})</div>',
+            listeners: {
+                itemtap: this.onItemTap,
+                scope: this
+            }
+        });
+        this.formContainer = new Ext.form.FormPanel({
+            scroll: false,
+            items: [{
+                xtype: 'button',
+                cls: 'close-btn',
+                ui: 'decline-small',
+                text: 'Close',
+                handler: function(){
+                    this.hide();
+                },
+                scope: this 
+            }, {
+                xtype: 'fieldset',
+                scroll: false,
+                title: 'Search for a place',
+                items: [{
+                    xtype: 'searchfield',
+                    label: 'Search',
+                    placeHolder: 'placename',
+                    listeners: {
+                        action: this.doSearch,
+                        scope: this
+                    }
+                },
+                    this.resultList
+                ]
+            }]
+        });
+        this.items = [{
+            xtype: 'panel',
+            layout: 'fit',
+            items: [this.formContainer]
+        }];
+        App.SearchFormPopupPanel.superclass.initComponent.call(this);
+    }
+});
+
+App.LayerList = Ext.extend(Ext.List, {
+    
+    map: null,
+    
+    createStore: function(){
+        Ext.regModel('Layer', {
+            fields: ['id', 'name', 'visibility', 'zindex']
+        });
+        var data = [];
+        Ext.each(this.map.layers, function(layer){
+            if (layer.displayInLayerSwitcher === true) {
+                var visibility = layer.isBaseLayer ? (this.map.baseLayer == layer) : layer.getVisibility();
+                data.push({
+                    id: layer.id,
+                    name: layer.name,
+                    visibility: visibility,
+                    zindex: layer.getZIndex()
+                });
+            }
+        });
+        return new Ext.data.Store({
+            model: 'Layer',
+            sorters: 'zindex',
+            data: data
+        });
+    },
+    
+    initComponent: function(){
+        this.store = this.createStore();
+        this.itemTpl = new Ext.XTemplate(
+            '<tpl if="visibility == true">', 
+                '<img width="20" src="img/check-round-green.png">', 
+            '</tpl>', 
+            '<tpl if="visibility == false">', 
+                '<img width="20" src="img/check-round-grey.png">', 
+            '</tpl>', 
+            '<span class="gx-layer-item">{name}</span>'
+        );
+        this.listeners = {
+            itemtap: function(dataview, index, item, e){
+                var record = dataview.getStore().getAt(index);
+                var layer = this.map.getLayersBy("id", record.get("id"))[0];
+                if (layer.isBaseLayer) {
+                    this.map.setBaseLayer(layer);
+                }
+                else {
+                    layer.setVisibility(!layer.getVisibility());
+                }
+                record.set("visibility", layer.getVisibility());
+            }
+        };
+        this.map.events.on({
+            "changelayer": this.onChangeLayer,
+            scope: this
+        });
+        App.LayerList.superclass.initComponent.call(this);
+    },
+
+    findLayerRecord: function(layer){
+        var found;
+        this.store.each(function(record){
+            if (record.get("id") === layer.id) {
+                found = record;
+            }
+        }, this);
+        return found;
+    },
+    
+    onChangeLayer: function(evt){
+        if (evt.property == "visibility") {
+            var record = this.findLayerRecord(evt.layer);
+            record.set("visibility", evt.layer.getVisibility());
+        }
+    }
+    
+});
+Ext.reg('app_layerlist', App.LayerList);

Copied: sandbox/august/trunk/examples/mobile.html (from rev 11704, trunk/openlayers/examples/mobile.html)
===================================================================
--- sandbox/august/trunk/examples/mobile.html	                        (rev 0)
+++ sandbox/august/trunk/examples/mobile.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<html>
+    <head>
+        <title>OpenLayers Mobile</title>
+        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+        <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%;
+                width   : 100%;
+            }
+            @media only screen and (max-width: 600px) {
+                html, body {
+                    height  : 117%;
+                }
+            }
+            #map {
+                width    : 100%;
+                position : relative;
+                height   : 100%;
+            }
+            .olControlAttribution {
+                position      : absolute;
+                font-size     : 10px;
+                bottom        : 0 !important;
+                right         : 0 !important;
+                background    : rgba(0,0,0,0.1);
+                font-family   : Arial;
+                padding       : 2px 4px;
+                border-radius : 5px 0 0 0;
+            }
+            div.olControlZoomPanel .olControlZoomInItemInactive,
+            div.olControlZoomPanel .olControlZoomOutItemInactive {
+                background: rgba(0,0,0,0.2);
+                position: absolute;
+            }
+            div.olControlZoomPanel .olControlZoomInItemInactive {
+                border-radius: 5px 5px 0 0;
+            }
+            div.olControlZoomPanel .olControlZoomOutItemInactive {
+                border-radius: 0 0 5px 5px ;
+                top: 37px;
+            }
+            div.olControlZoomPanel .olControlZoomOutItemInactive:after ,
+            div.olControlZoomPanel .olControlZoomInItemInactive:after{
+                font-weight: bold;
+                content   : '+';
+                font-size : 36px;
+                padding:  7px;
+                z-index: 2000;
+                color     : #fff;
+                line-height: 1em;
+            }
+            div.olControlZoomPanel .olControlZoomOutItemInactive:after{
+                content: '–';
+                line-height: 0.9em;
+                padding: 0 8px;
+            }
+            div.olControlZoomPanel .olControlZoomToMaxExtentItemInactive {
+                display: none;
+            }
+            #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/august/trunk/examples/mobile.js (from rev 11704, trunk/openlayers/examples/mobile.js)
===================================================================
--- sandbox/august/trunk/examples/mobile.js	                        (rev 0)
+++ sandbox/august/trunk/examples/mobile.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,40 @@
+// initialize map when page ready
+var map;
+
+// Get rid of address bar on iphone/ipod
+var fixSize = function() {
+    window.scrollTo(0,0);
+    document.body.style.height = '100%';
+    if (!(/(iphone|ipod)/.test(navigator.userAgent.toLowerCase()))) {
+        if (document.body.parentNode) {
+            document.body.parentNode.style.height = '100%';
+        }
+    }
+};
+setTimeout(fixSize, 700);
+setTimeout(fixSize, 1500);
+
+var init = function () {
+    // create map
+    map = new OpenLayers.Map({
+        div: "map",
+        theme: null,
+        controls: [
+            new OpenLayers.Control.Attribution(),
+            new OpenLayers.Control.TouchNavigation({
+                dragPanOptions: {
+                    interval: 100,
+                    enableKinetic: true
+                }
+            }),
+            new OpenLayers.Control.ZoomPanel()
+        ],
+        layers: [
+            new OpenLayers.Layer.OSM("OpenStreetMap", null, {
+                transitionEffect: 'resize'
+            })
+        ],
+        center: new OpenLayers.LonLat(742000, 5861000),
+        zoom: 3
+    });
+};

Modified: sandbox/august/trunk/examples/modify-feature.html
===================================================================
--- sandbox/august/trunk/examples/modify-feature.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/modify-feature.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/mouse-position.html
===================================================================
--- sandbox/august/trunk/examples/mouse-position.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/mouse-position.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/mousewheel-interval.html
===================================================================
--- sandbox/august/trunk/examples/mousewheel-interval.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/mousewheel-interval.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/multimap-mercator.html
===================================================================
--- sandbox/august/trunk/examples/multimap-mercator.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/multimap-mercator.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/multiserver.html
===================================================================
--- sandbox/august/trunk/examples/multiserver.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/multiserver.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />

Copied: sandbox/august/trunk/examples/multitouch.html (from rev 11704, trunk/openlayers/examples/multitouch.html)
===================================================================
--- sandbox/august/trunk/examples/multitouch.html	                        (rev 0)
+++ sandbox/august/trunk/examples/multitouch.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,26 @@
+<html>
+  <head>
+   <title>Multitouch Test</title>
+  </head>
+  <body>
+   <div style="width:80%; height: 80%; border: 1px solid black; font-size: 5em;" id="box">
+   </div>
+   Touch inside the box. On a touch enabled browser, you will get the number
+   of detected touch events. If the box is red, your browser does not support
+   touch events.
+  <script>
+    var box = document.getElementById("box");
+    box.addEventListener("touchstart", function(evt) {
+        box.innerHTML = evt.touches.length;
+        evt.preventDefault();
+    });    
+    box.addEventListener("touchmove", function(evt) {
+        box.innerHTML = evt.touches.length;
+        evt.preventDefault();
+    });    
+    if (!(typeof box.ontouchstart != 'undefined')) { 
+        box.style.backgroundColor = "red";
+    }    
+  </script>
+  </body>
+</html>  

Modified: sandbox/august/trunk/examples/mvs.html
===================================================================
--- sandbox/august/trunk/examples/mvs.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/mvs.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/navigation-control.html
===================================================================
--- sandbox/august/trunk/examples/navigation-control.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/navigation-control.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/navigation-history.html
===================================================================
--- sandbox/august/trunk/examples/navigation-history.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/navigation-history.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/navtoolbar-alwaysZoom.html
===================================================================
--- sandbox/august/trunk/examples/navtoolbar-alwaysZoom.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/navtoolbar-alwaysZoom.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/navtoolbar-outsidemap.html
===================================================================
--- sandbox/august/trunk/examples/navtoolbar-outsidemap.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/navtoolbar-outsidemap.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/navtoolbar.html
===================================================================
--- sandbox/august/trunk/examples/navtoolbar.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/navtoolbar.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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>

Modified: sandbox/august/trunk/examples/ordering.html
===================================================================
--- sandbox/august/trunk/examples/ordering.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/ordering.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />
@@ -30,6 +32,10 @@
         function initYOrderMap() {
             var map = new OpenLayers.Map("yorder");
             
+            // allow testing of specific renderers via "?renderer=Canvas", etc
+            var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
+            renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
+
             var layer = new OpenLayers.Layer.Vector(
                 "Y-Order",
                 {
@@ -39,7 +45,8 @@
                         graphicZIndex: GOLD_Z_INDEX
                     }),
                     isBaseLayer: true,
-                    rendererOptions: {yOrdering: true}
+                    rendererOptions: {yOrdering: true},
+                    renderers: renderer
                 }
             );
             

Modified: sandbox/august/trunk/examples/osm-google.html
===================================================================
--- sandbox/august/trunk/examples/osm-google.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/osm-google.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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 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">

Modified: sandbox/august/trunk/examples/osm-layer.html
===================================================================
--- sandbox/august/trunk/examples/osm-layer.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/osm-layer.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/osm.html
===================================================================
--- sandbox/august/trunk/examples/osm.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/osm.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/outOfRangeMarkers.html
===================================================================
--- sandbox/august/trunk/examples/outOfRangeMarkers.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/outOfRangeMarkers.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/overviewmap.html
===================================================================
--- sandbox/august/trunk/examples/overviewmap.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/overviewmap.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/pan-zoom-panels.html
===================================================================
--- sandbox/august/trunk/examples/pan-zoom-panels.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/pan-zoom-panels.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/panel.html
===================================================================
--- sandbox/august/trunk/examples/panel.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/panel.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/point-track-markers.html
===================================================================
--- sandbox/august/trunk/examples/point-track-markers.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/point-track-markers.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/popupMatrix.html
===================================================================
--- sandbox/august/trunk/examples/popupMatrix.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/popupMatrix.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/popupMatrix.jpg
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/examples/popups.html
===================================================================
--- sandbox/august/trunk/examples/popups.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/popups.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/projected-map.html
===================================================================
--- sandbox/august/trunk/examples/projected-map.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/projected-map.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/protocol-gears.html
===================================================================
--- sandbox/august/trunk/examples/protocol-gears.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/protocol-gears.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/regular-polygons.html
===================================================================
--- sandbox/august/trunk/examples/regular-polygons.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/regular-polygons.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/resize-features.html
===================================================================
--- sandbox/august/trunk/examples/resize-features.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/resize-features.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/restricted-extent.html
===================================================================
--- sandbox/august/trunk/examples/restricted-extent.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/restricted-extent.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />
@@ -7,7 +9,7 @@
     <script src="../lib/OpenLayers.js"></script>
     <script type="text/javascript">
         var map = null;
-        var extent = new OpenLayers.Bounds(-180, -90, 180, 90);
+        var extent = new OpenLayers.Bounds(8, 44.5, 19, 50);
 
         function init() {
             var options = {
@@ -22,7 +24,7 @@
             ); 
 
             map.addLayers([wms]);
-            map.setCenter(extent, 1);
+            map.zoomToExtent(extent);
             document.getElementById("toggle").checked = true;
         }
         
@@ -66,8 +68,8 @@
         <input type="checkbox" id="toggle" checked="checked"
                onclick="toggleRestrictedExtent();" />
         <label for="toggle">
-            Toggle restricted extent (to [-180, -90, 180, 90]).
+            Toggle restricted extent (to [8, 44.5, 19, 50]).
         </label>
     
   </body>
-</html>
+</html>
\ No newline at end of file

Modified: sandbox/august/trunk/examples/rotate-features.html
===================================================================
--- sandbox/august/trunk/examples/rotate-features.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/rotate-features.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/select-feature-multilayer.html
===================================================================
--- sandbox/august/trunk/examples/select-feature-multilayer.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/select-feature-multilayer.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/select-feature-openpopup.html
===================================================================
--- sandbox/august/trunk/examples/select-feature-openpopup.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/select-feature-openpopup.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/select-feature.html
===================================================================
--- sandbox/august/trunk/examples/select-feature.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/select-feature.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/setextent.html
===================================================================
--- sandbox/august/trunk/examples/setextent.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/setextent.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />

Modified: sandbox/august/trunk/examples/simplify-linestring.html
===================================================================
--- sandbox/august/trunk/examples/simplify-linestring.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/simplify-linestring.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />
         <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">

Modified: sandbox/august/trunk/examples/single-tile.html
===================================================================
--- sandbox/august/trunk/examples/single-tile.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/single-tile.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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: Single Tile</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="style.css" type="text/css">

Modified: sandbox/august/trunk/examples/sld-parser.html
===================================================================
--- sandbox/august/trunk/examples/sld-parser.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/sld-parser.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/sld.html
===================================================================
--- sandbox/august/trunk/examples/sld.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/sld.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/small.jpg
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/examples/snap-split.html
===================================================================
--- sandbox/august/trunk/examples/snap-split.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/snap-split.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />
@@ -90,6 +92,10 @@
                 })
             });
 
+            // allow testing of specific renderers via "?renderer=Canvas", etc
+            var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
+            renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
+
             // create three vector layers
             vectors = new OpenLayers.Layer.Vector("Lines", {
                 isBaseLayer: true,
@@ -101,7 +107,8 @@
                 styleMap: styles,
                 maxExtent: new OpenLayers.Bounds(
                     1549471.9221, 6403610.94, 1550001.32545, 6404015.8
-                )
+                ),
+                renderers: renderer
             });
             map.addLayer(vectors);
             

Modified: sandbox/august/trunk/examples/snapping.html
===================================================================
--- sandbox/august/trunk/examples/snapping.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/snapping.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />

Modified: sandbox/august/trunk/examples/sos.html
===================================================================
--- sandbox/august/trunk/examples/sos.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/sos.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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>SOS Client Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/august/trunk/examples/spherical-mercator.html
===================================================================
--- sandbox/august/trunk/examples/spherical-mercator.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/spherical-mercator.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />
@@ -22,107 +24,111 @@
     <script src="../lib/OpenLayers.js"></script>
     <script type="text/javascript">
 
-        // make map available for easy debugging
-        var map;
+// make map available for easy debugging
+var map;
 
-        // increase reload attempts 
-        OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
+// increase reload attempts 
+OpenLayers.IMAGE_RELOAD_ATTEMPTS = 3;
 
-        function init(){
-            var options = {
-                projection: new OpenLayers.Projection("EPSG:900913"),
-                displayProjection: new OpenLayers.Projection("EPSG:4326"),
-                units: "m",
-                numZoomLevels: 18,
-                maxResolution: 156543.0339,
-                maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
-                                                 20037508, 20037508.34)
-            };
-            map = new OpenLayers.Map('map', options);
+function init(){
+    var maxExtent = new OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508),
+        restrictedExtent = maxExtent.clone(),
+        maxResolution = 156543.0339;
+    
+    var options = {
+        projection: new OpenLayers.Projection("EPSG:900913"),
+        displayProjection: new OpenLayers.Projection("EPSG:4326"),
+        units: "m",
+        numZoomLevels: 18,
+        maxResolution: maxResolution,
+        maxExtent: maxExtent,
+        restrictedExtent: restrictedExtent
+    };
+    map = new OpenLayers.Map('map', options);
 
-            // create Google Mercator layers
-            var gmap = new OpenLayers.Layer.Google(
-                "Google Streets",
-                {'sphericalMercator': true}
-            );
-            var gsat = new OpenLayers.Layer.Google(
-                "Google Satellite",
-                {type: G_SATELLITE_MAP, 'sphericalMercator': true, numZoomLevels: 22}
-            );
-            var ghyb = new OpenLayers.Layer.Google(
-                "Google Hybrid",
-                {type: G_HYBRID_MAP, 'sphericalMercator': true}
-            );
+    // create Google Mercator layers
+    var gmap = new OpenLayers.Layer.Google(
+        "Google Streets",
+        {sphericalMercator: true}
+    );
+    var gsat = new OpenLayers.Layer.Google(
+        "Google Satellite",
+        {type: G_SATELLITE_MAP, sphericalMercator: true, numZoomLevels: 22}
+    );
+    var ghyb = new OpenLayers.Layer.Google(
+        "Google Hybrid",
+        {type: G_HYBRID_MAP, sphericalMercator: true}
+    );
 
-            // create Virtual Earth layers
-            var veroad = new OpenLayers.Layer.VirtualEarth(
-                "Virtual Earth Roads",
-                {'type': VEMapStyle.Road, 'sphericalMercator': true}
-            );
-            var veaer = new OpenLayers.Layer.VirtualEarth(
-                "Virtual Earth Aerial",
-                {'type': VEMapStyle.Aerial, 'sphericalMercator': true}
-            );
-            var vehyb = new OpenLayers.Layer.VirtualEarth(
-                "Virtual Earth Hybrid",
-                {'type': VEMapStyle.Hybrid, 'sphericalMercator': true}
-            );
+    // create Virtual Earth layers
+    var veroad = new OpenLayers.Layer.VirtualEarth(
+        "Virtual Earth Roads",
+        {'type': VEMapStyle.Road, sphericalMercator: true}
+    );
+    var veaer = new OpenLayers.Layer.VirtualEarth(
+        "Virtual Earth Aerial",
+        {'type': VEMapStyle.Aerial, sphericalMercator: true}
+    );
+    var vehyb = new OpenLayers.Layer.VirtualEarth(
+        "Virtual Earth Hybrid",
+        {'type': VEMapStyle.Hybrid, sphericalMercator: true}
+    );
 
-            // create Yahoo layer
-            var yahoo = new OpenLayers.Layer.Yahoo(
-                "Yahoo Street",
-                {'sphericalMercator': true}
-            );
-            var yahoosat = new OpenLayers.Layer.Yahoo(
-                "Yahoo Satellite",
-                {'type': YAHOO_MAP_SAT, 'sphericalMercator': true}
-            );
-            var yahoohyb = new OpenLayers.Layer.Yahoo(
-                "Yahoo Hybrid",
-                {'type': YAHOO_MAP_HYB, 'sphericalMercator': true}
-            );
+    // create Yahoo layer
+    var yahoo = new OpenLayers.Layer.Yahoo(
+        "Yahoo Street",
+        {sphericalMercator: true}
+    );
+    var yahoosat = new OpenLayers.Layer.Yahoo(
+        "Yahoo Satellite",
+        {'type': YAHOO_MAP_SAT, sphericalMercator: true}
+    );
+    var yahoohyb = new OpenLayers.Layer.Yahoo(
+        "Yahoo Hybrid",
+        {'type': YAHOO_MAP_HYB, sphericalMercator: true}
+    );
 
-            // create OSM layer
-            var mapnik = new OpenLayers.Layer.OSM();
-            // create OAM layer
-            var oam = new OpenLayers.Layer.XYZ(
-                "OpenAerialMap",
-                "http://tile.openaerialmap.org/tiles/1.0.0/openaerialmap-900913/${z}/${x}/${y}.png",
-                {
-                    sphericalMercator: true
-                }
-            );
+    // create OSM layer
+    var mapnik = new OpenLayers.Layer.OSM();
+    // create OAM layer
+    var oam = new OpenLayers.Layer.XYZ(
+        "OpenAerialMap",
+        "http://tile.openaerialmap.org/tiles/1.0.0/openaerialmap-900913/${z}/${x}/${y}.png",
+        {
+            sphericalMercator: true
+        }
+    );
 
-            // create OSM layer
-            var osmarender = new OpenLayers.Layer.OSM(
-                "OpenStreetMap (Tiles at Home)",
-                "http://tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png"
-            );
+    // create OSM layer
+    var osmarender = new OpenLayers.Layer.OSM(
+        "OpenStreetMap (Tiles at Home)",
+        "http://tah.openstreetmap.org/Tiles/tile/${z}/${x}/${y}.png"
+    );
 
 
-            // create WMS layer
-            var wms = new OpenLayers.Layer.WMS(
-                "World Map",
-                "http://world.freemap.in/tiles/",
-                {'layers': 'factbook-overlay', 'format':'png'},
-                {
-                    'opacity': 0.4, visibility: false,
-                    'isBaseLayer': false,'wrapDateLine': true
-                }
-            );
+    // create WMS layer
+    var wms = new OpenLayers.Layer.WMS(
+        "World Map",
+        "http://world.freemap.in/tiles/",
+        {'layers': 'factbook-overlay', 'format':'png'},
+        {
+            'opacity': 0.4, visibility: false,
+            'isBaseLayer': false,'wrapDateLine': true
+        }
+    );
 
-            // create a vector layer for drawing
-            var vector = new OpenLayers.Layer.Vector("Editable Vectors");
+    // create a vector layer for drawing
+    var vector = new OpenLayers.Layer.Vector("Editable Vectors");
 
-            map.addLayers([gmap, gsat, ghyb, veroad, veaer, vehyb,
-                           yahoo, yahoosat, yahoohyb, oam, mapnik, osmarender,
-                           wms, vector]);
-            map.addControl(new OpenLayers.Control.LayerSwitcher());
-            map.addControl(new OpenLayers.Control.EditingToolbar(vector));
-            map.addControl(new OpenLayers.Control.Permalink());
-            map.addControl(new OpenLayers.Control.MousePosition());
-            if (!map.getCenter()) {map.zoomToMaxExtent()}
-        }
+    map.addLayers([gmap, gsat, ghyb, veroad, veaer, vehyb,
+                   yahoo, yahoosat, yahoohyb, oam, mapnik, osmarender,
+                   wms, vector]);
+    map.addControl(new OpenLayers.Control.LayerSwitcher());
+    map.addControl(new OpenLayers.Control.EditingToolbar(vector));
+    map.addControl(new OpenLayers.Control.Permalink());
+    map.addControl(new OpenLayers.Control.MousePosition());
+    if (!map.getCenter()) {map.zoomToMaxExtent()}
+}
 
     </script>
   </head>

Modified: sandbox/august/trunk/examples/split-feature.html
===================================================================
--- sandbox/august/trunk/examples/split-feature.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/split-feature.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />
@@ -66,9 +68,10 @@
                     }
                 });
                 map.addControl(split);
-                split.activate();
+
                 map.zoomToMaxExtent();
 
+                split.activate();
             }
             
             function flashFeatures(features, index) {

Modified: sandbox/august/trunk/examples/strategy-bbox.html
===================================================================
--- sandbox/august/trunk/examples/strategy-bbox.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/strategy-bbox.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/strategy-cluster-extended.html
===================================================================
--- sandbox/august/trunk/examples/strategy-cluster-extended.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/strategy-cluster-extended.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/strategy-cluster-threshold.html
===================================================================
--- sandbox/august/trunk/examples/strategy-cluster-threshold.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/strategy-cluster-threshold.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/strategy-cluster.html
===================================================================
--- sandbox/august/trunk/examples/strategy-cluster.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/strategy-cluster.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/strategy-paging.html
===================================================================
--- sandbox/august/trunk/examples/strategy-paging.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/strategy-paging.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/style-rules.html
===================================================================
--- sandbox/august/trunk/examples/style-rules.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/style-rules.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/style.css
===================================================================
--- sandbox/august/trunk/examples/style.css	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/style.css	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/style.mobile-jq.css (from rev 11704, trunk/openlayers/examples/style.mobile-jq.css)
===================================================================
--- sandbox/august/trunk/examples/style.mobile-jq.css	                        (rev 0)
+++ sandbox/august/trunk/examples/style.mobile-jq.css	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,120 @@
+html ,
+body {
+    margin: 0;
+    padding: 0;
+    height: 100%;
+}
+.ui-content {
+    padding: 0;
+}
+.ui-footer {
+    text-align: center;
+    padding: 5px 0;
+}
+.portrait, .portrait #mappage {
+    min-height: 0;
+}
+/*.portrait, .portrait .ui-page{*/
+    /*min-height: 0;*/
+/*}*/
+#mappage, #mappage .ui-content, #map {
+    width: 100%;
+    height: 100%;
+}
+.olControlAttribution {
+    font-size: 10px;
+    bottom: 5px;
+    right: 5px;
+}
+#navigation {
+    position: absolute;
+    bottom: 70px;
+    left: 10px;
+    z-index: 1000;
+}
+#navigation .ui-btn-icon-notext {
+    display: block;
+    padding: 7px 6px 7px 8px;
+}
+#title, #tags, #shortdesc {
+    display: none;
+}
+.ui-icon-check {
+    opacity: 0.3;
+}
+.checked .ui-icon-check {
+    opacity: 1;
+}
+.ui-icon-locate {
+    background-image: url(img/locate.png);
+}
+.ui-icon-layers {
+    background-image: url(img/openlayers.png);
+}
+.ui-content .ui-listview-inset, #search_results {
+    margin: 1em;
+}
+.ui-content .ui-listview {
+    margin: 0px;
+}
+#details-list li{
+	padding:15px 10px;
+}
+html {
+    height: 100%;
+}
+body {
+    margin: 0;
+    padding: 0;
+    height: 100%;
+}
+.ui-content {
+    padding: 0;
+}
+.ui-footer {
+    text-align: center;
+    padding: 5px 0;
+}
+#map {
+    width: 100%;
+    height: 100%;
+}
+.olControlAttribution {
+    font-size: 10px;
+    bottom: 5px;
+    right: 5px;
+}
+#navigation {
+    position: absolute;
+    bottom: 70px;
+    left: 10px;
+    z-index: 1000;
+}
+#navigation .ui-btn-icon-notext {
+    display: block;
+    padding: 7px 6px 7px 8px;
+}
+#title, #tags, #shortdesc {
+    display: none;
+}
+.ui-icon-check {
+    opacity: 0.3;
+}
+.checked .ui-icon-check {
+    opacity: 1;
+}
+.ui-icon-locate {
+    background-image: url(img/locate.png);
+}
+.ui-icon-layers {
+    background-image: url(img/openlayers.png);
+}
+.ui-content .ui-listview-inset, #search_results {
+    margin: 1em;
+}
+.ui-content .ui-listview {
+    margin: 0px;
+}
+#details-list li{
+	padding:15px 10px;
+}
\ No newline at end of file

Copied: sandbox/august/trunk/examples/style.mobile.css (from rev 11704, trunk/openlayers/examples/style.mobile.css)
===================================================================
--- sandbox/august/trunk/examples/style.mobile.css	                        (rev 0)
+++ sandbox/august/trunk/examples/style.mobile.css	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/stylemap.html
===================================================================
--- sandbox/august/trunk/examples/stylemap.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/stylemap.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/styles-context.html
===================================================================
--- sandbox/august/trunk/examples/styles-context.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/styles-context.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/styles-rotation.html
===================================================================
--- sandbox/august/trunk/examples/styles-rotation.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/styles-rotation.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/styles-unique.html
===================================================================
--- sandbox/august/trunk/examples/styles-unique.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/styles-unique.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/sundials-spherical-mercator.html
===================================================================
--- sandbox/august/trunk/examples/sundials-spherical-mercator.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/sundials-spherical-mercator.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />

Modified: sandbox/august/trunk/examples/sundials.html
===================================================================
--- sandbox/august/trunk/examples/sundials.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/sundials.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/symbolizers-fill-stroke-graphic.html
===================================================================
--- sandbox/august/trunk/examples/symbolizers-fill-stroke-graphic.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/symbolizers-fill-stroke-graphic.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/teleportation.html
===================================================================
--- sandbox/august/trunk/examples/teleportation.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/teleportation.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/thinlong.jpg
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/examples/tile-origin.html
===================================================================
--- sandbox/august/trunk/examples/tile-origin.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/tile-origin.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,9 +1,10 @@
 <!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>

Modified: sandbox/august/trunk/examples/tilecache.html
===================================================================
--- sandbox/august/trunk/examples/tilecache.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/tilecache.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/tms.html
===================================================================
--- sandbox/august/trunk/examples/tms.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/tms.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/transform-feature.html
===================================================================
--- sandbox/august/trunk/examples/transform-feature.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/transform-feature.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/transition.html
===================================================================
--- sandbox/august/trunk/examples/transition.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/transition.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/urban.html
===================================================================
--- sandbox/august/trunk/examples/urban.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/urban.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/ve-novibrate.html
===================================================================
--- sandbox/august/trunk/examples/ve-novibrate.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/ve-novibrate.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/ve.html
===================================================================
--- sandbox/august/trunk/examples/ve.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/ve.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/vector-features-with-text.html
===================================================================
--- sandbox/august/trunk/examples/vector-features-with-text.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/vector-features-with-text.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/vector-features.html
===================================================================
--- sandbox/august/trunk/examples/vector-features.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/vector-features.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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" />
@@ -14,6 +16,10 @@
                     "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: 'basic'} );
             map.addLayer(layer);
 
+            // allow testing of specific renderers via "?renderer=Canvas", etc
+            var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
+            renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
+
             /*
              * Layer style
              */
@@ -66,7 +72,10 @@
             // graphicTitle only works in Firefox and Internet Explorer
             style_mark.graphicTitle = "this is a test tooltip";
 
-            var vectorLayer = new OpenLayers.Layer.Vector("Simple Geometry", {style: layer_style});
+            var vectorLayer = new OpenLayers.Layer.Vector("Simple Geometry", {
+                style: layer_style,
+                renderers: renderer
+            });
 
             // create a point feature
             var point = new OpenLayers.Geometry.Point(-111.04, 45.68);

Modified: sandbox/august/trunk/examples/vector-formats.html
===================================================================
--- sandbox/august/trunk/examples/vector-formats.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/vector-formats.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/web-mercator.html
===================================================================
--- sandbox/august/trunk/examples/web-mercator.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/web-mercator.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/wfs-filter.html
===================================================================
--- sandbox/august/trunk/examples/wfs-filter.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/wfs-filter.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/wfs-protocol-transactions.html
===================================================================
--- sandbox/august/trunk/examples/wfs-protocol-transactions.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/wfs-protocol-transactions.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/wfs-protocol.html
===================================================================
--- sandbox/august/trunk/examples/wfs-protocol.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/wfs-protocol.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/wfs-reprojection.html
===================================================================
--- sandbox/august/trunk/examples/wfs-reprojection.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/wfs-reprojection.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/wfs-snap-split.html
===================================================================
--- sandbox/august/trunk/examples/wfs-snap-split.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/wfs-snap-split.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/wfs-states.html
===================================================================
--- sandbox/august/trunk/examples/wfs-states.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/wfs-states.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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>

Modified: sandbox/august/trunk/examples/wfs-states.js
===================================================================
--- sandbox/august/trunk/examples/wfs-states.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/wfs-states.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -10,13 +10,18 @@
     );
     map.addLayer(base);
 
+    // allow testing of specific renderers via "?renderer=Canvas", etc
+    var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
+    renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
+
     var wfs = new OpenLayers.Layer.Vector("States", {
         strategies: [new OpenLayers.Strategy.BBOX()],
         protocol: new OpenLayers.Protocol.WFS({
             url: "http://demo.opengeo.org/geoserver/wfs",
             featureType: "states",
             featureNS: "http://www.openplans.org/topp"
-        })
+        }),
+        renderers: renderer
     });
     map.addLayer(wfs);
 

Deleted: sandbox/august/trunk/examples/widelong.jpg
===================================================================
(Binary files differ)

Deleted: sandbox/august/trunk/examples/wideshort.jpg
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/examples/wmc.html
===================================================================
--- sandbox/august/trunk/examples/wmc.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/wmc.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/wms-long-url.html
===================================================================
--- sandbox/august/trunk/examples/wms-long-url.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/wms-long-url.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/wms-untiled.html
===================================================================
--- sandbox/august/trunk/examples/wms-untiled.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/wms-untiled.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/wms-v13.html
===================================================================
--- sandbox/august/trunk/examples/wms-v13.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/wms-v13.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/wms.html
===================================================================
--- sandbox/august/trunk/examples/wms.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/wms.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/wmst.html
===================================================================
--- sandbox/august/trunk/examples/wmst.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/wmst.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/wmts-capabilities.html
===================================================================
--- sandbox/august/trunk/examples/wmts-capabilities.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/wmts-capabilities.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/wmts-getfeatureinfo.html
===================================================================
--- sandbox/august/trunk/examples/wmts-getfeatureinfo.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/wmts-getfeatureinfo.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/wmts.html
===================================================================
--- sandbox/august/trunk/examples/wmts.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/wmts.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/worldwind.html
===================================================================
--- sandbox/august/trunk/examples/worldwind.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/worldwind.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/wrapDateLine.html
===================================================================
--- sandbox/august/trunk/examples/wrapDateLine.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/wrapDateLine.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/xhtml.html
===================================================================
--- sandbox/august/trunk/examples/xhtml.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/xhtml.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/xml.html
===================================================================
--- sandbox/august/trunk/examples/xml.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/xml.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/xyz-esri.html
===================================================================
--- sandbox/august/trunk/examples/xyz-esri.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/xyz-esri.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/xyz-offset.html
===================================================================
--- sandbox/august/trunk/examples/xyz-offset.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/xyz-offset.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/yahoo.html
===================================================================
--- sandbox/august/trunk/examples/yahoo.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/yahoo.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/zoomLevels.html
===================================================================
--- sandbox/august/trunk/examples/zoomLevels.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/zoomLevels.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/examples/zoomify.html
===================================================================
--- sandbox/august/trunk/examples/zoomify.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/examples/zoomify.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/img/cloud-popup-relative.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/drag-rectangle-off.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/drag-rectangle-on.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/east-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/layer-switcher-maximize.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/layer-switcher-minimize.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/marker-blue.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/marker-gold.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/marker-green.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/marker.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/measuring-stick-off.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/measuring-stick-on.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/north-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/panning-hand-off.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/panning-hand-on.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/slider.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/south-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/west-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/zoom-minus-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/zoom-plus-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/zoom-world-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/img/zoombar.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/lib/Firebug/firebugx.js
===================================================================
--- sandbox/august/trunk/lib/Firebug/firebugx.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/Firebug/firebugx.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,9 +1,10 @@
+(function() {
+    if (!window.console || !console.firebug) {
+        var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
+        "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
 
-if (!window.console || !console.firebug) {
-    var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml",
-    "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
-
-    window.console = {};
-    for (var i = 0; i < names.length; ++i)
-        window.console[names[i]] = function() {}
-}
+        window.console = {};
+        for (var i = 0; i < names.length; ++i)
+            window.console[names[i]] = function() {}
+    }
+})();

Modified: sandbox/august/trunk/lib/OpenLayers/BaseTypes/Bounds.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/BaseTypes/Bounds.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/BaseTypes/Bounds.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -260,7 +260,7 @@
      *          Default is center.
      *
      * Returns:
-     * {<OpenLayers.Bound>} A new bounds that is scaled by ratio
+     * {<OpenLayers.Bounds>} A new bounds that is scaled by ratio
      *                      from origin.
      */
 
@@ -560,6 +560,8 @@
      * Parameters:
      * maxExtent - {<OpenLayers.Bounds>}
      * options - {Object} Some possible options are:
+     *
+     * Allowed Options:
      *                    leftTolerance - {float} Allow for a margin of error 
      *                                            with the 'left' value of this 
      *                                            bound.

Modified: sandbox/august/trunk/lib/OpenLayers/BaseTypes/Element.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/BaseTypes/Element.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/BaseTypes/Element.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -45,12 +45,16 @@
 
     /**
      * APIFunction: hide
-     * Hide element(s) passed in
+     * *Deprecated*. Hide element(s) passed in
      * 
      * Parameters:
      * element - {DOMElement} Actually user can pass any number of elements
      */
     hide: function() {
+        OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", {
+            newMethod: "element.style.display = 'none';"
+        }));
+
         for (var i=0, len=arguments.length; i<len; i++) {
             var element = OpenLayers.Util.getElement(arguments[i]);
             if (element) {
@@ -61,12 +65,16 @@
 
     /**
      * APIFunction: show
-     * Show element(s) passed in
+     * *Deprecated*. Show element(s) passed in
      * 
      * Parameters:
      * element - {DOMElement} Actually user can pass any number of elements
      */
     show: function() {
+        OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated", {
+            newMethod: "element.style.display = '';"
+        }));
+
         for (var i=0, len=arguments.length; i<len; i++) {
             var element = OpenLayers.Util.getElement(arguments[i]);
             if (element) {

Modified: sandbox/august/trunk/lib/OpenLayers/BaseTypes/Pixel.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/BaseTypes/Pixel.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/BaseTypes/Pixel.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -86,6 +86,24 @@
     },
 
     /**
+     * APIMethod: distanceTo
+     * Returns the distance to the pixel point passed in as a parameter.
+     *
+     * Parameters:
+     * px - {<OpenLayers.Pixel>}
+     *
+     * Returns:
+     * {Float} The pixel point passed in as parameter to calculate the
+     *     distance to.
+     */
+    distanceTo:function(px) {
+        return Math.sqrt(
+            Math.pow(this.x - px.x, 2) +
+            Math.pow(this.y - px.y, 2)
+        );
+    },
+
+    /**
      * APIMethod: add
      *
      * Parameters:

Modified: sandbox/august/trunk/lib/OpenLayers/BaseTypes.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/BaseTypes.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/BaseTypes.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -25,7 +25,7 @@
      * 
      * Parameters:
      * str - {String} The string to test.
-     * sub - {Sring} The substring to look for.
+     * sub - {String} The substring to look for.
      *  
      * Returns:
      * {Boolean} The first string starts with the second.
@@ -204,7 +204,7 @@
      * *Deprecated*. Whether or not a string starts with another string. 
      * 
      * Parameters:
-     * sStart - {Sring} The string we're testing for.
+     * sStart - {String} The string we're testing for.
      *  
      * Returns:
      * {Boolean} Whether or not this string starts with the string passed in.
@@ -458,7 +458,17 @@
      */
     True : function() {
         return true;
-    }
+    },
+    
+    /**
+     * APIFunction: Void
+     * A reusable function that returns ``undefined``.
+     *
+     * Returns:
+     * {undefined}
+     */
+    Void: function() {}
+
 };
 
 if (!Function.prototype.bind) {
@@ -622,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. 
@@ -637,37 +649,31 @@
      */
     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}))?)))?$/);
-            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);
-                    }
+        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;
     }

Modified: sandbox/august/trunk/lib/OpenLayers/Console.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Console.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Console.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -101,7 +101,7 @@
      * Expects a single error message
      * 
      * Parameters:
-     * object - {Object}
+     * error - {Object}
      */
     userError: function(error) {
         alert(error);

Modified: sandbox/august/trunk/lib/OpenLayers/Control/ArgParser.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/ArgParser.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/ArgParser.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -60,11 +60,27 @@
      * Parameters:
      * options - {Object}
      */
-    initialize: function(options) {
-        OpenLayers.Control.prototype.initialize.apply(this, arguments);
-    },
 
     /**
+     * Method: getParameters
+     */    
+    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/august/trunk/lib/OpenLayers/Control/Attribution.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/Attribution.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/Attribution.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -30,9 +30,6 @@
      * Parameters:
      * options - {Object} Options for control.
      */
-    initialize: function(options) {
-        OpenLayers.Control.prototype.initialize.apply(this, arguments);
-    },
 
     /** 
      * Method: destroy

Modified: sandbox/august/trunk/lib/OpenLayers/Control/DragPan.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/DragPan.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/DragPan.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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;
         }
     },

Copied: sandbox/august/trunk/lib/OpenLayers/Control/Geolocate.js (from rev 11704, trunk/openlayers/lib/OpenLayers/Control/Geolocate.js)
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/Geolocate.js	                        (rev 0)
+++ sandbox/august/trunk/lib/OpenLayers/Control/Geolocate.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,180 @@
+/* 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: destroy
+     */
+    destroy: function() {
+        this.deactivate();
+        OpenLayers.Control.prototype.destroy.apply(this, arguments);
+    },
+
+    /**
+     * 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/august/trunk/lib/OpenLayers/Control/KeyboardDefaults.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/KeyboardDefaults.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/KeyboardDefaults.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -37,22 +37,7 @@
     /**
      * Constructor: OpenLayers.Control.KeyboardDefaults
      */
-    initialize: function() {
-        OpenLayers.Control.prototype.initialize.apply(this, arguments);
-    },
-    
-    /**
-     * APIMethod: destroy
-     */
-    destroy: function() {
-        if (this.handler) {
-            this.handler.destroy();
-        }        
-        this.handler = null;
         
-        OpenLayers.Control.prototype.destroy.apply(this, arguments);
-    },
-    
     /**
      * Method: draw
      * Create handler.

Modified: sandbox/august/trunk/lib/OpenLayers/Control/LayerSwitcher.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/LayerSwitcher.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/LayerSwitcher.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -316,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/august/trunk/lib/OpenLayers/Control/Measure.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/Measure.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/Measure.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -237,8 +237,8 @@
      * Parameters: point - {<OpenLayers.Geometry.Point>} The point at the
      * mouseposition. feature - {<OpenLayers.Feature.Vector>} The sketch feature.
      */
-    measureImmediate : function(point, feature) {
-        if (this.delayedTrigger === null &&
+    measureImmediate : function(point, feature, drawing) {
+        if (drawing && this.delayedTrigger === null &&
                                 !this.handler.freehandMode(this.handler.evt)) {
             this.measure(feature.geometry, "measurepartial");
         }

Modified: sandbox/august/trunk/lib/OpenLayers/Control/ModifyFeature.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/ModifyFeature.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/ModifyFeature.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -351,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);
+        }
     },
 
     /**

Modified: sandbox/august/trunk/lib/OpenLayers/Control/MouseDefaults.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/MouseDefaults.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/MouseDefaults.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -165,7 +165,7 @@
             this.zoomBox.style.opacity = "0.50";
             this.zoomBox.style.fontSize = "1px";
             this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
-            this.map.viewPortDiv.appendChild(this.zoomBox);
+            this.map.eventsDiv.appendChild(this.zoomBox);
         }
         document.onselectstart = OpenLayers.Function.False;
         OpenLayers.Event.stop(evt);
@@ -302,7 +302,7 @@
      * Remove the zoombox from the screen and nullify our reference to it.
      */
     removeZoomBox: function() {
-        this.map.viewPortDiv.removeChild(this.zoomBox);
+        this.map.eventsDiv.removeChild(this.zoomBox);
         this.zoomBox = null;
     },
 

Modified: sandbox/august/trunk/lib/OpenLayers/Control/MousePosition.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/MousePosition.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/MousePosition.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -87,9 +87,6 @@
      * Parameters:
      * options - {Object} Options for control.
      */
-    initialize: function(options) {
-        OpenLayers.Control.prototype.initialize.apply(this, arguments);
-    },
 
     /**
      * Method: destroy

Modified: sandbox/august/trunk/lib/OpenLayers/Control/MouseToolbar.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/MouseToolbar.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/MouseToolbar.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -207,7 +207,7 @@
                 this.zoomBox.style.opacity = "0.50";
                 this.zoomBox.style.fontSize = "1px";
                 this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
-                this.map.viewPortDiv.appendChild(this.zoomBox);
+                this.map.eventsDiv.appendChild(this.zoomBox);
                 this.performedDrag = true;
                 break;
             case "measure":

Modified: sandbox/august/trunk/lib/OpenLayers/Control/Navigation.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/Navigation.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/Navigation.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -32,7 +32,7 @@
     dragPan: null,
 
     /**
-     * APIProprety: dragPanOptions
+     * APIProperty: dragPanOptions
      * {Object} Options passed to the DragPan control.
      */
     dragPanOptions: null,
@@ -163,6 +163,7 @@
         }
 
         var clickCallbacks = { 
+            'click': this.defaultClick,
             'dblclick': this.defaultDblClick, 
             'dblrightclick': this.defaultDblRightClick 
         };
@@ -190,6 +191,18 @@
     },
 
     /**
+     * Method: defaultClick
+     *
+     * Parameters:
+     * evt - {Event}
+     */
+    defaultClick: function (evt) {
+        if (evt.lastTouches && evt.lastTouches.length == 2) {
+            this.map.zoomOut();
+        }
+    },
+
+    /**
      * Method: defaultDblClick 
      * 
      * Parameters:

Modified: sandbox/august/trunk/lib/OpenLayers/Control/OverviewMap.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/OverviewMap.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/OverviewMap.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -157,7 +157,7 @@
             this.handlers.drag.destroy();
         }
 
-        this.ovmap && this.ovmap.viewPortDiv.removeChild(this.extentRectangle);
+        this.ovmap && this.ovmap.eventsDiv.removeChild(this.extentRectangle);
         this.extentRectangle = null;
 
         if (this.rectEvents) {
@@ -489,7 +489,7 @@
                         {controls: [], maxResolution: 'auto', 
                          fallThrough: false}, this.mapOptions);
         this.ovmap = new OpenLayers.Map(this.mapDiv, options);
-        this.ovmap.viewPortDiv.appendChild(this.extentRectangle);
+        this.ovmap.eventsDiv.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/august/trunk/lib/OpenLayers/Control/PanZoom.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/PanZoom.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/PanZoom.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -64,10 +64,10 @@
      * APIMethod: destroy
      */
     destroy: function() {
-        OpenLayers.Control.prototype.destroy.apply(this, arguments);
         this.removeButtons();
         this.buttons = null;
         this.position = null;
+        OpenLayers.Control.prototype.destroy.apply(this, arguments);
     },
 
     /**
@@ -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/august/trunk/lib/OpenLayers/Control/PanZoomBar.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/PanZoomBar.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/PanZoomBar.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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>}
      */
@@ -81,9 +87,6 @@
     /**
      * Constructor: OpenLayers.Control.PanZoomBar
      */ 
-    initialize: function() {
-        OpenLayers.Control.PanZoom.prototype.initialize.apply(this, arguments);
-    },
 
     /**
      * APIMethod: destroy
@@ -180,11 +183,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 +219,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 +249,7 @@
      */
     _removeZoomBar: function() {
         this.sliderEvents.un({
+            "touchmove": this.zoomBarDrag,
             "mousedown": this.zoomBarDown,
             "mousemove": this.zoomBarDrag,
             "mouseup": this.zoomBarUp,
@@ -250,6 +259,7 @@
         this.sliderEvents.destroy();
 
         this.divEvents.un({
+            "touchmove": this.passEventToSlider,
             "mousedown": this.divClick,
             "mousemove": this.passEventToSlider,
             "dblclick": this.doubleClick,
@@ -304,10 +314,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
@@ -340,6 +351,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);
         }
     },
@@ -353,28 +366,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/august/trunk/lib/OpenLayers/Control/Permalink.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/Permalink.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/Permalink.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -36,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}
      */
@@ -59,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
      */
@@ -122,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="";
@@ -146,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;
+        }
     }, 
     
     /**

Copied: sandbox/august/trunk/lib/OpenLayers/Control/PinchZoom.js (from rev 11704, trunk/openlayers/lib/OpenLayers/Control/PinchZoom.js)
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/PinchZoom.js	                        (rev 0)
+++ sandbox/august/trunk/lib/OpenLayers/Control/PinchZoom.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,192 @@
+/* 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/Pinch.js
+ */
+
+/**
+ * Class: OpenLayers.Control.PinchZoom
+ *
+ * Inherits:
+ *  - <OpenLayers.Control>
+ */
+OpenLayers.Control.PinchZoom = OpenLayers.Class(OpenLayers.Control, {
+
+    /** 
+     * Property: type
+     * {OpenLayers.Control.TYPES}
+     */
+    type: OpenLayers.Control.TYPE_TOOL,
+
+    /**
+     * Property: containerOrigin
+     * {Object} Cached object representing the layer container origin (in pixels).
+     */
+    containerOrigin: null,
+
+    /**
+     * Property: pinchOrigin
+     * {Object} Cached object representing the pinch start (in pixels).
+     */
+    pinchOrigin: null,    
+    
+    /**
+     * Property: currentCenter
+     * {Object} Cached object representing the latest pinch center (in pixels).
+     */
+    currentCenter: null,    
+
+    /**
+     * APIProperty: autoActivate
+     * {Boolean} Activate the control when it is added to a map.  Default is
+     *     true.
+     */
+    autoActivate: true,
+    
+    /**
+     * Constructor: OpenLayers.Control.PinchZoom
+     * Create a control for zooming with pinch gestures.  This works on devices
+     *     with multi-touch support.
+     *
+     * Parameters:
+     * options - {Object} An optional object whose properties will be set on
+     *                    the control
+     */
+    initialize: function(options) {
+        OpenLayers.Control.prototype.initialize.apply(this, arguments);
+        this.handler = new OpenLayers.Handler.Pinch(this, {
+            start: this.pinchStart,
+            move: this.pinchMove,
+            done: this.pinchDone
+        }, this.handlerOptions);
+    },
+    
+    /**
+     * APIMethod: activate
+     * Activate this control.  Must be called after the control is added to a 
+     * map.
+     *
+     * Returns:
+     * {Boolean} The control was successfully activated.
+     */
+    activate: function() {
+        var activated = OpenLayers.Control.prototype.activate.apply(this,arguments);
+        if (activated) {
+            this.map.events.on({
+                moveend: this.updateContainerOrigin,
+                scope: this
+            });
+            this.updateContainerOrigin();
+        }
+        return activated;
+    },
+
+    /**
+     * APIMethod: deactivate
+     * Deactivate this control.
+     *
+     * Returns:
+     * {Boolean} The control was successfully deactivated.
+     */
+    deactivate: function() {
+        var deactivated = OpenLayers.Control.prototype.deactivate.apply(this,arguments);
+        if (this.map && this.map.events) {
+            this.map.events.un({
+                moveend: this.updateContainerOrigin,
+                scope: this
+            });
+        }
+        return deactivated;
+    },
+    
+    /**
+     * Method: updateContainerOrigin
+     * Must be called each time the layer container origin changes.
+     */
+    updateContainerOrigin: function() {
+        var container = this.map.layerContainerDiv;
+        this.containerOrigin = {
+            x: parseInt(container.style.left, 10),
+            y: parseInt(container.style.top, 10)
+        };
+    },
+
+    /**
+     * Method: pinchStart
+     *
+     * Parameters:
+     * evt - {Event}
+     * pinchData - {Object} pinch data object related to the current touchmove
+     *     of the pinch gesture. This give us the current scale of the pinch.
+     */
+    pinchStart: function(evt, pinchData) {
+        this.pinchOrigin = evt.xy;
+        this.currentCenter = evt.xy;
+    },
+    
+    /**
+     * Method: pinchMove
+     *
+     * Parameters:
+     * evt - {Event}
+     * pinchData - {Object} pinch data object related to the current touchmove
+     *     of the pinch gesture. This give us the current scale of the pinch.
+     */
+    pinchMove: function(evt, pinchData) {
+        var scale = pinchData.scale;
+        var containerOrigin = this.containerOrigin;
+        var pinchOrigin = this.pinchOrigin;
+        var current = evt.xy;
+
+        var dx = Math.round((current.x - pinchOrigin.x) + (scale - 1) * (containerOrigin.x - pinchOrigin.x));
+        var dy = Math.round((current.y - pinchOrigin.y) + (scale - 1) * (containerOrigin.y - pinchOrigin.y));
+
+        this.applyTransform(
+            "translate(" + dx + "px, " + dy + "px) scale(" + scale + ")"
+        );
+        this.currentCenter = current;
+    },
+    
+    /**
+     * Method: applyTransform
+     * Applies the given transform to layers.
+     */
+    applyTransform: function(transform) {
+        var style = this.map.layerContainerDiv.style;
+        style['-webkit-transform'] = transform;
+        style['-moz-transform'] = transform;
+    },
+    
+    /**
+     * Method: pinchDone
+     *
+     * Parameters:
+     * evt - {Event}
+     * start - {Object} pinch data object related to the touchstart event that
+     *     started the pinch gesture.
+     * last - {Object} pinch data object related to the last touchmove event
+     *     of the pinch gesture. This give us the final scale of the pinch.
+     */
+    pinchDone: function(evt, start, last) {
+        this.applyTransform("");
+        var zoom = this.map.getZoomForResolution(this.map.getResolution() / last.scale, true);
+        if (zoom !== this.map.getZoom() || !this.currentCenter.equals(this.pinchOrigin)) {
+            var resolution = this.map.getResolutionForZoom(zoom);
+
+            var location = this.map.getLonLatFromPixel(this.pinchOrigin);
+            var zoomPixel = this.currentCenter;        
+            var size = this.map.getSize();
+
+            location.lon += resolution * ((size.w / 2) - zoomPixel.x);
+            location.lat -= resolution * ((size.h / 2) - zoomPixel.y);
+
+            this.map.setCenter(location, zoom);
+        }
+    },
+
+    CLASS_NAME: "OpenLayers.Control.PinchZoom"
+
+});

Modified: sandbox/august/trunk/lib/OpenLayers/Control/ScaleLine.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/ScaleLine.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/ScaleLine.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -80,9 +80,6 @@
      * options - {Object} An optional object whose properties will be used
      *     to extend the control.
      */
-    initialize: function(options) {
-        OpenLayers.Control.prototype.initialize.apply(this, [options]);     
-    },
 
     /**
      * Method: draw

Modified: sandbox/august/trunk/lib/OpenLayers/Control/SelectFeature.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/SelectFeature.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/SelectFeature.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -132,7 +132,7 @@
     
     /**
      * Property: layers
-     * {Array(<OpenLayers.Layer.Vector>} The layers this control will work on,
+     * {Array(<OpenLayers.Layer.Vector>)} The layers this control will work on,
      * or null if the control was configured with a single layer
      */
     layers: null,
@@ -463,8 +463,23 @@
      */
     unhighlight: function(feature) {
         var layer = feature.layer;
-        feature._lastHighlighter = feature._prevHighlighter;
-        delete feature._prevHighlighter;
+        // three cases:
+        // 1. there's no other highlighter, in that case _prev is undefined,
+        //    and we just need to undef _last
+        // 2. another control highlighted the feature after we did it, in
+        //    that case _last references this other control, and we just
+        //    need to undef _prev
+        // 3. another control highlighted the feature before we did it, in
+        //    that case _prev references this other control, and we need to
+        //    set _last to _prev and undef _prev
+        if(feature._prevHighlighter == undefined) {
+            delete feature._lastHighlighter;
+        } else if(feature._prevHighlighter == this.id) {
+            delete feature._prevHighlighter;
+        } else {
+            feature._lastHighlighter = feature._prevHighlighter;
+            delete feature._prevHighlighter;
+        }
         layer.drawFeature(feature, feature.style || feature.layer.style ||
             "default");
         this.events.triggerEvent("featureunhighlighted", {feature : feature});

Modified: sandbox/august/trunk/lib/OpenLayers/Control/Snapping.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/Snapping.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/Snapping.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -372,7 +372,7 @@
      * Method: considerSnapping
      *
      * Parameters:
-     * point - {<OpenLayers.Geometry.Point}} The vertex to be snapped (or
+     * point - {<OpenLayers.Geometry.Point>} The vertex to be snapped (or
      *     unsnapped).
      * loc - {<OpenLayers.Geometry.Point>} The location of the mouse in map
      *     coords.

Modified: sandbox/august/trunk/lib/OpenLayers/Control/Split.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/Split.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control/Split.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -297,7 +297,7 @@
      * Remove a feature from a list based on the given geometry.
      *
      * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>} A list of features.
+     * features - {Array(<OpenLayers.Feature.Vector>)} A list of features.
      * geometry - {<OpenLayers.Geometry>} A geometry.
      */
     removeByGeometry: function(features, geometry) {
@@ -340,7 +340,7 @@
      *     will be split if eligible.
      *
      * Parameters:
-     * feature - {<OpenLayers.Feature.Vector}} The newly created or modified
+     * feature - {<OpenLayers.Feature.Vector>} The newly created or modified
      *     feature.
      *
      * Returns:

Copied: sandbox/august/trunk/lib/OpenLayers/Control/TouchNavigation.js (from rev 11704, trunk/openlayers/lib/OpenLayers/Control/TouchNavigation.js)
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control/TouchNavigation.js	                        (rev 0)
+++ sandbox/august/trunk/lib/OpenLayers/Control/TouchNavigation.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,177 @@
+/* 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/DragPan.js
+ * @requires OpenLayers/Control/PinchZoom.js
+ * @requires OpenLayers/Handler/Click.js
+ */
+
+/**
+ * Class: OpenLayers.Control.TouchNavigation
+ * The navigation control handles map browsing with touch events (dragging,
+ *     double-tapping, tap with two fingers, and pinch zoom).  Create a new 
+ *     control with the <OpenLayers.Control.TouchNavigation> constructor.
+ *
+ * Inherits:
+ *  - <OpenLayers.Control>
+ */
+OpenLayers.Control.TouchNavigation = OpenLayers.Class(OpenLayers.Control, {
+
+    /**
+     * Property: dragPan
+     * {<OpenLayers.Control.DragPan>}
+     */
+    dragPan: null,
+
+    /**
+     * APIProperty: dragPanOptions
+     * {Object} Options passed to the DragPan control.
+     */
+    dragPanOptions: null,
+
+    /**
+     * Property: pinchZoom
+     * {<OpenLayers.Control.PinchZoom>}
+     */
+    pinchZoom: null,
+
+    /**
+     * APIProperty: pinchZoomOptions
+     * {Object} Options passed to the PinchZoom control.
+     */
+    pinchZoomOptions: null,
+
+    /**
+     * APIProperty: clickHandlerOptions
+     * {Object} Options passed to the Click handler.
+     */
+    clickHandlerOptions: 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;
+        if (this.pinchZoom) {
+            this.pinchZoom.destroy();
+            delete this.pinchZoom;
+        }
+        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();
+            this.pinchZoom.activate();
+            return true;
+        }
+        return false;
+    },
+
+    /**
+     * Method: deactivate
+     */
+    deactivate: function() {
+        if(OpenLayers.Control.prototype.deactivate.apply(this,arguments)) {
+            this.dragPan.deactivate();
+            this.handlers.click.deactivate();
+            this.pinchZoom.deactivate();
+            return true;
+        }
+        return false;
+    },
+    
+    /**
+     * Method: draw
+     */
+    draw: function() {
+        var clickCallbacks = {
+            click: this.defaultClick,
+            dblclick: this.defaultDblClick
+        };
+        var clickOptions = OpenLayers.Util.extend({
+            "double": true,
+            stopDouble: true,
+            pixelTolerance: 2
+        }, this.clickHandlerOptions);
+        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();
+        this.pinchZoom = new OpenLayers.Control.PinchZoom(
+            OpenLayers.Util.extend({map: this.map}, this.pinchZoomOptions)
+        );
+    },
+
+    /**
+     * 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/august/trunk/lib/OpenLayers/Control.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Control.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Control.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -71,13 +71,14 @@
     map: null,
 
     /** 
-     * Property: div 
-     * {DOMElement} 
+     * APIProperty: div 
+     * {DOMElement} The element that contains the control, if not present the 
+     *     control is placed inside the map.
      */
     div: null,
 
     /** 
-     * Property: type 
+     * APIProperty: type 
      * {Number} Controls can have a 'type'. The type determines the type of
      * interactions which are possible with them when they are placed in an
      * <OpenLayers.Control.Panel>. 
@@ -101,7 +102,7 @@
     displayClass: "",
     
     /**
-    * Property: title  
+    * APIProperty: title  
     * {string}  This property is used for showing a tooltip over the  
     * Control.  
     */ 
@@ -136,9 +137,9 @@
     eventListeners: null,
 
     /** 
-     * Property: events
-     * {<OpenLayers.Events>} Events instance for triggering control specific
-     *     events.
+     * APIProperty: events
+     * {<OpenLayers.Events>} Events instance for listeners and triggering
+     *     control specific events.
      */
     events: null,
 
@@ -228,6 +229,7 @@
             this.map.removeControl(this);
             this.map = null;
         }
+        this.div = null;
     },
 
     /** 
@@ -296,7 +298,7 @@
     },
 
     /**
-     * Method: activate
+     * APIMethod: activate
      * Explicitly activates a control and it's associated
      * handler if one has been set.  Controls can be
      * deactivated by calling the deactivate() method.
@@ -324,7 +326,7 @@
     },
     
     /**
-     * Method: deactivate
+     * APIMethod: deactivate
      * Deactivates a control and it's associated handler if any.  The exact
      * effect of this depends on the control itself.
      * 

Modified: sandbox/august/trunk/lib/OpenLayers/Events.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Events.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Events.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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"
     ],
 
     /** 
@@ -575,6 +604,9 @@
      * events.register("loadstart", object, loadStartListener);
      * events.register("loadstart", object, loadEndListener);
      * (end)
+     *
+     * Parameters:
+     *  object - {Object}     
      */
     on: function(object) {
         for(var type in object) {
@@ -792,6 +824,21 @@
             // noone's listening, bail out
             return;
         }
+        // add clientX & clientY to all events - corresponds to average x, y
+        var touches = evt.touches;
+        if (touches && touches[0]) {
+            var x = 0;
+            var y = 0;
+            var num = touches.length;
+            var touch;
+            for (var i=0; i<num; ++i) {
+                touch = touches[i];
+                x += touch.clientX;
+                y += touch.clientY;
+            }
+            evt.clientX = x / num;
+            evt.clientY = y / num;
+        }
         if (this.includeXY) {
             evt.xy = this.getMousePosition(evt);
         } 
@@ -846,6 +893,7 @@
         if (!this.element.offsets) {
             this.element.offsets = OpenLayers.Util.pagePosition(this.element);
         }
+
         return new OpenLayers.Pixel(
             (evt.clientX + this.element.scrolls[0]) - this.element.offsets[0]
                          - this.element.lefttop[0], 

Modified: sandbox/august/trunk/lib/OpenLayers/Format/Atom.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/Atom.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/Atom.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -67,9 +67,6 @@
      * options - {Object} An optional object whose properties will be set on
      *     this instance.
      */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
     
     /**
      * APIMethod: read

Modified: sandbox/august/trunk/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/lib/OpenLayers/Format/Filter.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/Filter.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/Filter.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -47,9 +47,6 @@
      * options - {Object} An optional object whose properties will be set on
      *     this instance.
      */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
 
     /**
      * APIMethod: write

Modified: sandbox/august/trunk/lib/OpenLayers/Format/GML.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/GML.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/GML.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -582,7 +582,7 @@
      * Method: parseAttributes
      *
      * Parameters:
-     * node - {<DOMElement>}
+     * node - {DOMElement}
      *
      * Returns:
      * {Object} An attributes object.

Modified: sandbox/august/trunk/lib/OpenLayers/Format/GPX.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/GPX.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/GPX.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -134,7 +134,7 @@
     * Method: extractSegment
     *
     * Parameters:
-    * segment - {<DOMElement>} a trkseg or rte node to parse
+    * segment - {DOMElement} a trkseg or rte node to parse
     * segmentType - {String} nodeName of waypoints that form the line
     *
     * Returns:

Modified: sandbox/august/trunk/lib/OpenLayers/Format/GeoJSON.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/GeoJSON.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/GeoJSON.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -40,9 +40,6 @@
      * options - {Object} An optional object whose properties will be set on
      *     this instance.
      */
-    initialize: function(options) {
-        OpenLayers.Format.JSON.prototype.initialize.apply(this, [options]);
-    },
 
     /**
      * APIMethod: read

Modified: sandbox/august/trunk/lib/OpenLayers/Format/GeoRSS.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/GeoRSS.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/GeoRSS.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -83,9 +83,6 @@
      * 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: createGeometryFromItem
@@ -253,7 +250,7 @@
         var eles = this.getElementsByTagNameNS(node, nsuri, name);
         if(eles && eles[0] && eles[0].firstChild
             && eles[0].firstChild.nodeValue) {
-            value = eles[0].firstChild.nodeValue;
+            value = OpenLayers.Format.XML.prototype.getChildValue(eles[0]);
         } else {
             value = (def == undefined) ? "" : def;
         }
@@ -263,12 +260,12 @@
     /**
      * APIMethod: read
      * Return a list of features from a GeoRSS doc
-     
+     *
      * Parameters:
-     * data - {Element} 
+     * doc - {Element} 
      *
      * Returns:
-     * An Array of <OpenLayers.Feature.Vector>s
+     * {Array(<OpenLayers.Feature.Vector>)}
      */
     read: function(doc) {
         if (typeof doc == "string") { 

Modified: sandbox/august/trunk/lib/OpenLayers/Format/JSON.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/JSON.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/JSON.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -75,9 +75,6 @@
      * options - {Object} An optional object whose properties will be set on
      *     this instance.
      */
-    initialize: function(options) {
-        OpenLayers.Format.prototype.initialize.apply(this, [options]);
-    },
 
     /**
      * APIMethod: read

Modified: sandbox/august/trunk/lib/OpenLayers/Format/KML.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/KML.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/KML.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1125,7 +1125,7 @@
      * Accept Feature Collection, and return a string. 
      * 
      * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>} An array of features.
+     * features - {Array(<OpenLayers.Feature.Vector>)} An array of features.
      *
      * Returns:
      * {String} A KML string.
@@ -1222,7 +1222,8 @@
      * {DOMElement}
      */
     buildGeometryNode: function(geometry) {
-        if (this.internalProjection && this.externalProjection) {
+        if (this.internalProjection && this.externalProjection && 
+            !(geometry instanceof OpenLayers.Geometry.Collection)) {
             geometry = geometry.clone();
             geometry.transform(this.internalProjection, 
                                this.externalProjection);

Modified: sandbox/august/trunk/lib/OpenLayers/Format/OSM.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/OSM.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/OSM.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -347,6 +347,13 @@
         'point': function(point) {
             var id = null;
             var geometry = point.geometry ? point.geometry : point;
+            
+            if (this.internalProjection && this.externalProjection) {
+                geometry = geometry.clone();
+                geometry.transform(this.internalProjection, 
+                                   this.externalProjection);
+            }                       
+            
             var already_exists = false; // We don't return anything if the node
                                         // has already been created
             if (point.osm_id) {

Modified: sandbox/august/trunk/lib/OpenLayers/Format/OWSContext/v0_3_1.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/OWSContext/v0_3_1.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/OWSContext/v0_3_1.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -179,9 +179,10 @@
     decomposeNestingPath: function(nPath){
         var a = [];
         if (nPath instanceof Array) {
-            while (nPath.length > 0) {
-                a.push(nPath.slice());
-                nPath.pop();
+            var path = nPath.slice();
+            while (path.length > 0) {
+                a.push(path.slice());
+                path.pop();
             }
             a.reverse();
         }
@@ -440,7 +441,9 @@
                 var node = this.createElementNSPlus("Style");
                 this.writeNode("Name", style, node);
                 this.writeNode("Title", style, node);
-                this.writeNode("LegendURL", style, node);
+                if (style.legend) {
+                    this.writeNode("LegendURL", style, node);
+                }
                 return node;
             },
             "Name": function(obj) {

Modified: sandbox/august/trunk/lib/OpenLayers/Format/OWSContext.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/OWSContext.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/OWSContext.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -23,6 +23,15 @@
      * {String} Version number to assume if none found.  Default is "0.3.1".
      */
     defaultVersion: "0.3.1",
+
+    /**
+     * Constructor: OpenLayers.Format.OWSContext
+     * Create a new parser for OWS Context documents.
+     *
+     * Parameters:
+     * options - {Object} An optional object whose properties will be set on
+     *     this instance.
+     */
     
     /**
      * Method: getParser

Modified: sandbox/august/trunk/lib/OpenLayers/Format/SLD.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/SLD.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/SLD.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -58,9 +58,6 @@
      * options - {Object} An optional object whose properties will be set on
      *     this instance.
      */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
 
     /**
      * APIMethod: write

Modified: sandbox/august/trunk/lib/OpenLayers/Format/SOSCapabilities.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/SOSCapabilities.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/SOSCapabilities.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -36,16 +36,12 @@
 
     /**
      * Constructor: OpenLayers.Format.SOSCapabilities
-     * Create a new parser for SOS capabilities.
+     * Create a new parser for SOS Capabilities.
      *
      * 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]);
-        this.options = options;
-    },
 
     /**
      * APIMethod: read

Modified: sandbox/august/trunk/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -66,9 +66,6 @@
      * options - {Object} An optional object whose properties will be set on
      *     this instance.
      */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
 
     /**
      * APIMethod: read

Modified: sandbox/august/trunk/lib/OpenLayers/Format/SOSGetObservation.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/SOSGetObservation.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/SOSGetObservation.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -68,9 +68,6 @@
      * 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

Modified: sandbox/august/trunk/lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -151,7 +151,17 @@
     read_cap_Post: function(obj, node) {
         obj.post = node.getAttribute("onlineResource");
     },
+
+    /**
+     * Method: read_cap_SRS
+     */
+    read_cap_SRS: function(obj, node) {
+        var srs = this.getChildValue(node);
+        if (srs) {
+            obj.srs = srs;
+        }
+    },
     
     CLASS_NAME: "OpenLayers.Format.WFSCapabilities.v1_0_0" 
 
-});
\ No newline at end of file
+});

Modified: sandbox/august/trunk/lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -31,6 +31,16 @@
         );
     },
 
+    /**
+     * Method: read_cap_DefaultSRS
+     */
+    read_cap_DefaultSRS: function(obj, node) {
+        var defaultSRS = this.getChildValue(node);
+        if (defaultSRS) {
+            obj.srs = defaultSRS;
+        }
+    },
+
     CLASS_NAME: "OpenLayers.Format.WFSCapabilities.v1_1_0" 
 
-});
\ No newline at end of file
+});

Modified: sandbox/august/trunk/lib/OpenLayers/Format/WFSCapabilities.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WFSCapabilities.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WFSCapabilities.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -36,10 +36,6 @@
      * options - {Object} An optional object whose properties will be set on
      *     this instance.
      */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-        this.options = options;
-    },
 
     /**
      * APIMethod: read
@@ -77,4 +73,4 @@
     
     CLASS_NAME: "OpenLayers.Format.WFSCapabilities" 
 
-});
\ No newline at end of file
+});

Modified: sandbox/august/trunk/lib/OpenLayers/Format/WFSDescribeFeatureType.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WFSDescribeFeatureType.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WFSDescribeFeatureType.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -31,9 +31,6 @@
      * options - {Object} An optional object whose properties will be set on
      *     this instance.
      */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-    },
     
     /**
      * Property: readers
@@ -195,4 +192,4 @@
     
     CLASS_NAME: "OpenLayers.Format.WFSDescribeFeatureType" 
 
-});
\ No newline at end of file
+});

Modified: sandbox/august/trunk/lib/OpenLayers/Format/WFST/v1.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WFST/v1.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WFST/v1.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -182,7 +182,7 @@
         if(value) {
             this.setAttributeNS(
                 node, this.namespaces["xsi"], "xsi:schemaLocation",  value
-            )
+            );
         }
         return OpenLayers.Format.XML.prototype.write.apply(this, [node]);
     },

Modified: sandbox/august/trunk/lib/OpenLayers/Format/WMC.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WMC.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WMC.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -22,6 +22,15 @@
      * {String} Version number to assume if none found.  Default is "1.1.0".
      */
     defaultVersion: "1.1.0",
+
+    /**
+     * Constructor: OpenLayers.Format.WMC
+     * Create a new parser for Web Map Context documents.
+     *
+     * Parameters:
+     * options - {Object} An optional object whose properties will be set on
+     *     this instance.
+     */
     
     /**
      * Method: getParser

Modified: sandbox/august/trunk/lib/OpenLayers/Format/WMSCapabilities.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WMSCapabilities.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WMSCapabilities.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -51,10 +51,6 @@
      * options - {Object} An optional object whose properties will be set on
      *     this instance.
      */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-        this.options = options;
-    },
 
     /**
      * APIMethod: read
@@ -90,4 +86,4 @@
     
     CLASS_NAME: "OpenLayers.Format.WMSCapabilities" 
 
-});
\ No newline at end of file
+});

Modified: sandbox/august/trunk/lib/OpenLayers/Format/WMSDescribeLayer.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WMSDescribeLayer.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WMSDescribeLayer.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -37,10 +37,6 @@
      * options - {Object} An optional object whose properties will be set on
      *     this instance.
      */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-        this.options = options;
-    },
 
     /**
      * APIMethod: read

Modified: sandbox/august/trunk/lib/OpenLayers/Format/WMSGetFeatureInfo.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WMSGetFeatureInfo.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WMSGetFeatureInfo.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -56,11 +56,6 @@
      * options - {Object} An optional object whose properties will be set on
      *     this instance.
      */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, arguments);
-        OpenLayers.Util.extend(this, options);
-        this.options = options;
-    },
 
     /**
      * APIMethod: read
@@ -235,12 +230,14 @@
                 var child = children[i];
                 if (child.nodeType == 1) {
                     var grandchildren = child.childNodes;
-                    if (grandchildren.length == 1) {
+                    var name = (child.prefix) ?
+                        child.nodeName.split(":")[1] : child.nodeName;
+                    if (grandchildren.length == 0) {
+                        attributes[name] = null
+                    } else if (grandchildren.length == 1) {
                         var grandchild = grandchildren[0];
                         if (grandchild.nodeType == 3 ||
                             grandchild.nodeType == 4) {
-                            var name = (child.prefix) ? 
-                                child.nodeName.split(":")[1] : child.nodeName;
                             var value = grandchild.nodeValue.replace(
                                 this.regExes.trimSpace, "");
                             attributes[name] = value;

Modified: sandbox/august/trunk/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/lib/OpenLayers/Format/WMTSCapabilities.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Format/WMTSCapabilities.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Format/WMTSCapabilities.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -55,10 +55,6 @@
      * options - {Object} An optional object whose properties will be set on
      *     this instance.
      */
-    initialize: function(options) {
-        OpenLayers.Format.XML.prototype.initialize.apply(this, [options]);
-        this.options = options;
-    },
 
     /**
      * APIMethod: read
@@ -149,7 +145,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/august/trunk/lib/OpenLayers/Geometry/Rectangle.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Geometry/Rectangle.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Geometry/Rectangle.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -50,7 +50,7 @@
      * Constructor: OpenLayers.Geometry.Rectangle
      * 
      * Parameters:
-     * points - {Array(<OpenLayers.Geometry.Point>}
+     * points - {Array(<OpenLayers.Geometry.Point>)}
      */
     initialize: function(x, y, width, height) {
         OpenLayers.Geometry.prototype.initialize.apply(this, arguments);

Modified: sandbox/august/trunk/lib/OpenLayers/Handler/Box.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Handler/Box.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Handler/Box.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -68,11 +68,11 @@
      * 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);
     },
 
     /**
@@ -96,10 +96,10 @@
              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);
+        this.map.eventsDiv.appendChild(this.zoomBox);
 
         OpenLayers.Element.addClass(
-            this.map.viewPortDiv, "olDrawBox"
+            this.map.eventsDiv, "olDrawBox"
         );
     },
 
@@ -157,11 +157,11 @@
      * Remove the zoombox from the screen and nullify our reference to it.
      */
     removeBox: function() {
-        this.map.viewPortDiv.removeChild(this.zoomBox);
+        this.map.eventsDiv.removeChild(this.zoomBox);
         this.zoomBox = null;
         this.boxCharacteristics = null;
         OpenLayers.Element.removeClass(
-            this.map.viewPortDiv, "olDrawBox"
+            this.map.eventsDiv, "olDrawBox"
         );
 
     },

Modified: sandbox/august/trunk/lib/OpenLayers/Handler/Click.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Handler/Click.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Handler/Click.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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
@@ -52,13 +51,21 @@
      *     constructed.
      */
     pixelTolerance: 0,
-    
+        
     /**
+     * APIProperty: dblclickTolerance
+     * {Number} Maximum distance in pixels between clicks for a sequence of 
+     *     events to be considered a double click.  Default is 13.  If the
+     *     distance between two clicks is greater than this value, a double-
+     *     click will not be fired.
+     */
+    dblclickTolerance: 13,
+        
+    /**
      * APIProperty: stopSingle
      * {Boolean} Stop other listeners from being notified of clicks.  Default
-     *     is false.  If true, any click listeners registered before this one
-     *     will not be notified of *any* click event (associated with double
-     *     or single clicks).
+     *     is false.  If true, any listeners registered before this one for 
+     *     click or rightclick events will not be notified.
      */
     stopSingle: false,
     
@@ -83,14 +90,40 @@
      * {Number} The id of the timeout waiting to clear the <delayedCall>.
      */
     timerId: null,
+
+    /**
+     * Property: touch
+     * {Boolean} When a touchstart event is fired, touch will be true and all
+     *     mouse related listeners will do nothing.
+     */
+    touch: false,
     
     /**
      * Property: down
-     * {<OpenLayers.Pixel>} The pixel location of the last mousedown.
+     * {Object} Object that store relevant information about the last
+     *     mousedown or touchstart. Its 'xy' OpenLayers.Pixel property gives
+     *     the average location of the mouse/touch event. Its 'touches'
+     *     property records clientX/clientY of each touches.
      */
     down: null,
-    
+
     /**
+     * Property: last
+     * {Object} Object that store relevant information about the last
+     *     mousemove or touchmove. Its 'xy' OpenLayers.Pixel property gives
+     *     the average location of the mouse/touch event. Its 'touches'
+     *     property records clientX/clientY of each touches.
+     */
+    last: null,
+
+    /** 
+     * Property: first
+     * {Object} When waiting for double clicks, this object will store 
+     *     information about the first click in a two click sequence.
+     */
+    first: null,
+
+    /**
      * Property: rightclickTimerId
      * {Number} The id of the right mouse timeout waiting to clear the 
      *     <delayedEvent>.
@@ -115,24 +148,79 @@
      */
     initialize: function(control, callbacks, options) {
         OpenLayers.Handler.prototype.initialize.apply(this, arguments);
-        // optionally register for mouseup and mousedown
-        if(this.pixelTolerance != null) {
-            this.mousedown = function(evt) {
-                this.down = evt.xy;
-                return true;
-            };
+    },
+    
+    /**
+     * Method: touchstart
+     * Handle touchstart.
+     *
+     * Returns:
+     * {Boolean} Continue propagating this event.
+     */
+    touchstart: function(evt) {
+        if (!this.touch) {
+            this.unregisterMouseListeners();
+            this.touch = true;
         }
+        this.down = this.getEventInfo(evt);
+        this.last = this.getEventInfo(evt);
+        return true;
     },
     
     /**
+     * Method: touchmove
+     *    Store position of last move, because touchend event can have
+     *    an empty "touches" property.
+     *
+     * Returns:
+     * {Boolean} Continue propagating this event.
+     */
+    touchmove: function(evt) {
+        this.last = this.getEventInfo(evt);
+        return true;
+    },
+
+    /**
+     * Method: touchend
+     *   Correctly set event xy property, and add lastTouches to have
+     *   touches property from last touchstart or touchmove
+     */
+    touchend: function(evt) {
+        // touchstart may not have been allowed to propagate
+        if (this.down) {
+            evt.xy = this.last.xy;
+            evt.lastTouches = this.last.touches;
+            this.handleSingle(evt);
+        }
+        return true;
+    },
+    
+    /**
+     * Method: unregisterMouseListeners
+     * In a touch environment, we don't want to handle mouse events.
+     */
+    unregisterMouseListeners: function() {
+        this.map.events.un({
+            mousedown: this.mousedown,
+            mouseup: this.mouseup,
+            click: this.click,
+            dblclick: this.dblclick,
+            scope: this
+        });
+    },
+
+    /**
      * Method: mousedown
-     * Handle mousedown.  Only registered as a listener if pixelTolerance is
-     *     a non-zero value at construction.
+     * Handle mousedown.
      *
      * Returns:
      * {Boolean} Continue propagating this event.
      */
-    mousedown: null,
+    mousedown: function(evt) {
+        this.down = this.getEventInfo(evt);
+        this.last = this.getEventInfo(evt);
+        return true;
+    },
 
     /**
      * Method: mouseup
@@ -141,16 +229,15 @@
      * 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;
@@ -170,7 +257,7 @@
            if(this.rightclickTimerId != null) {
                 //Second click received before timeout this must be 
                 // a double click
-                this.clearTimer();      
+                this.clearTimer();
                 this.callback('dblrightclick', [evt]);
                 return !this.stopDouble;
             } else { 
@@ -203,55 +290,93 @@
         if (evt) {
            this.callback('rightclick', [evt]);
         }
-        return !this.stopSingle;
     },
     
     /**
+     * Method: click
+     * Handle click events from the browser.  This is registered as a listener
+     *     for click events and should not be called from other events in this
+     *     handler.
+     *
+     * Returns:
+     * {Boolean} Continue propagating this event.
+     */
+    click: function(evt) {
+        if (!this.last) {
+            this.last = this.getEventInfo(evt);
+        }
+        this.handleSingle(evt);
+        return !this.stopSingle;
+    },
+
+    /**
      * Method: dblclick
      * Handle dblclick.  For a dblclick, we get two clicks in some browsers
      *     (FF) and one in others (IE).  So we need to always register for
-     *     dblclick to properly handle single clicks.
+     *     dblclick to properly handle single clicks.  This method is registered
+     *     as a listener for the dblclick browser event.  It should *not* be
+     *     called by other methods in this handler.
      *     
      * Returns:
      * {Boolean} Continue propagating this event.
      */
     dblclick: function(evt) {
-        if(this.passesTolerance(evt)) {
-            if(this["double"]) {
-                this.callback('dblclick', [evt]);
-            }
-            this.clearTimer();
-        }
+        this.handleDouble(evt);
         return !this.stopDouble;
     },
     
-    /**
-     * Method: click
-     * Handle click.
-     *
-     * Returns:
-     * {Boolean} Continue propagating this event.
+    /** 
+     * Method: handleDouble
+     * Handle double-click sequence.
      */
-    click: function(evt) {
-        if(this.passesTolerance(evt)) {
-            if(this.timerId != null) {
+    handleDouble: function(evt) {
+        if (this["double"] && this.passesDblclickTolerance(evt)) {
+            this.callback("dblclick", [evt]);
+        }
+    },
+    
+    /** 
+     * Method: handleSingle
+     * Handle single click sequence.
+     */
+    handleSingle: function(evt) {
+        if (this.passesTolerance(evt)) {
+            if (this.timerId != null) {
                 // already received a click
-                this.clearTimer();
+                if (this.last.touches && this.last.touches.length === 1) {
+                    // touch device, no dblclick event - this may be a double
+                    this.handleDouble(evt);
+                }
+                // if we're not in a touch environment we clear the click timer
+                // if we've got a second touch, we'll get two touchend events
+                if (!this.last.touches || this.last.touches.length !== 2) {
+                    this.clearTimer();
+                }
             } else {
+                // remember the first click info so we can compare to the second
+                this.first = this.getEventInfo(evt);
                 // set the timer, send evt only if single is true
                 //use a clone of the event object because it will no longer 
                 //be a valid event object in IE in the timer callback
                 var clickEvent = this.single ?
                     OpenLayers.Util.extend({}, evt) : null;
-                this.timerId = window.setTimeout(
-                    OpenLayers.Function.bind(this.delayedCall, this, clickEvent),
-                    this.delay
-                );
+                this.queuePotentialClick(clickEvent);
             }
         }
-        return !this.stopSingle;
     },
     
+    /** 
+     * Method: queuePotentialClick
+     * This method is separated out largely to make testing easier (so we
+     *     don't have to override window.setTimeout)
+     */
+    queuePotentialClick: function(evt) {
+        this.timerId = window.setTimeout(
+            OpenLayers.Function.bind(this.delayedCall, this, evt),
+            this.delay
+        );
+    },
+
     /**
      * Method: passesTolerance
      * Determine whether the event is within the optional pixel tolerance.  Note
@@ -265,28 +390,67 @@
      */
     passesTolerance: function(evt) {
         var passes = true;
-        if(this.pixelTolerance != null && this.down) {
-            var dpx = Math.sqrt(
-                Math.pow(this.down.x - evt.xy.x, 2) +
-                Math.pow(this.down.y - evt.xy.y, 2)
-            );
-            if(dpx > this.pixelTolerance) {
-                passes = false;
+        if (this.pixelTolerance != null && this.down && this.down.xy) {
+            passes = this.pixelTolerance >= this.down.xy.distanceTo(evt.xy);
+            // for touch environments, we also enforce that all touches
+            // start and end within the given tolerance to be considered a click
+            if (passes && this.touch && 
+                this.down.touches.length === this.last.touches.length) {
+                // the touchend event doesn't come with touches, so we check
+                // down and last
+                for (var i=0, ii=this.down.touches.length; i<ii; ++i) {
+                    if (this.getTouchDistance(
+                            this.down.touches[i], 
+                            this.last.touches[i]
+                        ) > this.pixelTolerance) {
+                        passes = false;
+                        break;
+                    }
+                }
             }
         }
         return passes;
     },
+    
+    /** 
+     * Method: getTouchDistance
+     *
+     * Returns:
+     * {Boolean} The pixel displacement between two touches.
+     */
+    getTouchDistance: function(from, to) {
+        return Math.sqrt(
+            Math.pow(from.clientX - to.clientX, 2) +
+            Math.pow(from.clientY - to.clientY, 2)
+        );
+    },
+    
+    /**
+     * Method: passesDblclickTolerance
+     * Determine whether the event is within the optional double-cick pixel 
+     *     tolerance.
+     *
+     * Returns:
+     * {Boolean} The click is within the double-click pixel tolerance.
+     */
+    passesDblclickTolerance: function(evt) {
+        var passes = true;
+        if (this.down && this.first) {
+            passes = this.down.xy.distanceTo(this.first.xy) <= this.dblclickTolerance;
+        }
+        return passes;
+    },
 
     /**
      * Method: clearTimer
      * Clear the timer and set <timerId> to null.
      */
     clearTimer: function() {
-        if(this.timerId != null) {
+        if (this.timerId != null) {
             window.clearTimeout(this.timerId);
             this.timerId = null;
         }
-        if(this.rightclickTimerId != null) {
+        if (this.rightclickTimerId != null) {
             window.clearTimeout(this.rightclickTimerId);
             this.rightclickTimerId = null;
         }
@@ -299,12 +463,41 @@
      */
     delayedCall: function(evt) {
         this.timerId = null;
-        if(evt) {
-            this.callback('click', [evt]);
+        if (evt) {
+            this.callback("click", [evt]);
         }
     },
 
     /**
+     * Method: getEventInfo
+     * This method allows us to store event information without storing the
+     *     actual event.  In touch devices (at least), the same event is 
+     *     modified between touchstart, touchmove, and touchend.
+     *
+     * Returns:
+     * {Object} An object with event related info.
+     */
+    getEventInfo: function(evt) {
+        var touches;
+        if (evt.touches) {
+            var len = evt.touches.length;
+            touches = new Array(len);
+            var touch;
+            for (var i=0; i<len; i++) {
+                touch = evt.touches[i];
+                touches[i] = {
+                    clientX: touch.clientX,
+                    clientY: touch.clientY
+                };
+            }
+        }
+        return {
+            xy: evt.xy,
+            touches: touches
+        };
+    },
+
+    /**
      * APIMethod: deactivate
      * Deactivate the handler.
      *
@@ -316,6 +509,7 @@
         if(OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
             this.clearTimer();
             this.down = null;
+            this.first = null;
             deactivated = true;
         }
         return deactivated;

Modified: sandbox/august/trunk/lib/OpenLayers/Handler/Drag.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Handler/Drag.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Handler/Drag.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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
@@ -63,6 +63,14 @@
     start: null,
 
     /**
+     * Property: lastMoveEvt
+     * {Object} The last mousemove event that occurred. Used to
+     *     position the map correctly when our "delay drag"
+     *     timeout expired.
+     */
+    lastMoveEvt: null,
+
+    /**
      * Property: oldOnselectstart
      * {Function}
      */
@@ -132,10 +140,126 @@
     },
     
     /**
+     * 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) {
+        this.lastMoveEvt = 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 = 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.
@@ -146,7 +270,7 @@
      */
     down: function(evt) {
     },
-    
+
     /**
      * Method: move
      * This method is called during the handling of the mouse move event.
@@ -192,82 +316,69 @@
      * 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.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;
+    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.
      */
     removeTimeout: function() {
         this.timeoutId = null;
+        // if timeout expires while we're still dragging (mouseup
+        // hasn't occurred) then call mousemove to move to the
+        // correct position
+        if(this.dragging) {
+            this.mousemove(this.lastMoveEvt);
+        }
     },
 
     /**
@@ -275,39 +386,38 @@
      * 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.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;
+    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.

Modified: sandbox/august/trunk/lib/OpenLayers/Handler/Feature.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Handler/Feature.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Handler/Feature.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -29,7 +29,8 @@
         'mousemove': {'in': 'over', 'out': 'out'},
         'dblclick': {'in': 'dblclick', 'out': null},
         'mousedown': {'in': null, 'out': null},
-        'mouseup': {'in': null, 'out': null}
+        'mouseup': {'in': null, 'out': null},
+        'touchstart': {'in': 'click', 'out': 'clickout'}
     },
 
     /**
@@ -117,6 +118,19 @@
         this.layer = layer;
     },
 
+    /**
+     * Method: touchstart
+     * Handle touchmove events
+     *
+     * Parameters:
+     * evt - {Event}
+     *
+     * Returns:
+     * {Boolean} Let the event propagate.
+     */
+    touchstart: function(evt) {
+        return this.mousedown(evt);
+    },
 
     /**
      * Method: mousedown

Modified: sandbox/august/trunk/lib/OpenLayers/Handler/Path.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Handler/Path.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Handler/Path.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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();
     },
@@ -208,23 +223,18 @@
      * Returns: 
      * {Boolean} Allow event propagation
      */
-    mousedown: function(evt) {
-        // ignore double-clicks
-        if (this.lastDown && this.lastDown.equals(evt.xy)) {
-            return false;
+    down: function(evt) {
+        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.touch && (!this.lastDown || !this.passesTolerance(this.lastDown, evt.xy, this.pixelTolerance))) {
+            this.modifyFeature(evt.xy, !!this.lastUp);
         }
         this.mouseDown = true;
         this.lastDown = evt.xy;
-        this.drawing = true;
-        return false;
+        this.stoppedDown = stopDown;
+        return !stopDown;
     },
 
     /**
@@ -238,14 +248,17 @@
      * Returns: 
      * {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);
+    move: function (evt) {
+        if(this.stoppedDown && this.freehandMode(evt)) {
+            if(this.persist) {
+                this.destroyPersistedFeature();
             }
+            this.addPoint(evt.xy);
+            return false;
         }
+        if (!this.touch && (!this.mouseDown || this.stoppedDown)) {
+            this.modifyFeature(evt.xy, !!this.lastUp);
+        }
         return true;
     },
     
@@ -260,24 +273,39 @@
      * Returns: 
      * {Boolean} Allow event propagation
      */
-    mouseup: function (evt) {
-        this.mouseDown = false;
-        if(this.drawing) {
-            if(this.freehandMode(evt)) {
+    up: function (evt) {
+        if (this.mouseDown && (!this.lastUp || !this.passesTolerance(
+                this.lastUp, evt.xy, this.dblclickTolerance))) {
+            if(this.stoppedDown && this.freehandMode(evt)) {
                 this.removePoint();
                 this.finalize();
             } else {
-                if(this.lastUp == null) {
-                   this.addPoint(evt.xy);
+                if (this.passesTolerance(this.lastDown, evt.xy, this.pixelTolerance)) {
+                    if (this.touch) {
+                        this.modifyFeature(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 && !this.isDblclick;
     },
 
     /**
+     * Method: finishTouchGeometry
+     * Finish the geometry and send it back to the control.
+     */
+    finishTouchGeometry: function() {
+        this.finishGeometry();
+    },
+
+    /**
      * APIMethod: finishGeometry
      * Finish the geometry and send it back to the control.
      */

Copied: sandbox/august/trunk/lib/OpenLayers/Handler/Pinch.js (from rev 11704, trunk/openlayers/lib/OpenLayers/Handler/Pinch.js)
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Handler/Pinch.js	                        (rev 0)
+++ sandbox/august/trunk/lib/OpenLayers/Handler/Pinch.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,230 @@
+/* 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 false.
+     */
+    stopDown: false,
+
+    /**
+     * 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;
+        }
+        // prevent document dragging
+        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;
+            // prevent document dragging
+            OpenLayers.Event.stop(evt);
+        }
+        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/august/trunk/lib/OpenLayers/Handler/Point.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Handler/Point.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Handler/Point.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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,12 +77,69 @@
     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.
      */
     layerOptions: null,
+    
+    /**
+     * APIProperty: pixelTolerance
+     * {Number} Maximum number of pixels between mouseup and mousedown for an
+     *     event to be considered a click.  Default is 5.  If set to an
+     *     integer value, clicks with a drag greater than the value will be
+     *     ignored.  This property can only be set when the handler is
+     *     constructed.
+     */
+    pixelTolerance: 5,
 
     /**
+     * APIProperty: dblclickTolerance
+     * {Number} Maximum number of pixels between two touchend for an
+     *     event to be considered a dblclick.  Default is 20.
+     */
+    dblclickTolerance: 20,
+
+    /**
+     * Property: touch
+     * {Boolean} Indcates the support of touch events.
+     */
+    touch: false,
+
+    /**
+     * Property: timerId
+     * {Integer} The timer used to test the double touch.
+     */
+    timerId: null,
+
+    /**
+     * Property: last
+     * {<OpenLayers.Pixel>} The last pixel used to know the distance between
+     * two touches (for double touch).
+     */
+    last: null,
+
+    /**
+     * Property: dblclick
+     * {Boolean} The current event is a dblclick.
+     */
+    isDblclick: false,
+    
+    
+    /**
      * Constructor: OpenLayers.Handler.Point
      * Create a new point handler.
      *
@@ -130,6 +188,7 @@
         }, this.layerOptions);
         this.layer = new OpenLayers.Layer.Vector(this.CLASS_NAME, options);
         this.map.addLayer(this.layer);
+        this.createFeature();
         return true;
     },
     
@@ -141,6 +200,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 +220,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 +246,35 @@
     },
 
     /**
+     * Method: destroyPersistedFeature
+     * Destroy the persisted feature.
+     */
+    destroyPersistedFeature: function() {
+        var layer = this.layer;
+        if(layer && layer.features.length > 1) {
+            this.layer.features[0].destroy();
+        }
+    },
+
+    /**
+     * Method: finishTouchGeometry
+     * Finish the geometry and send it back to the control.
+     */
+    finishTouchGeometry: function() {
+        this.finalize();
+    },
+    
+    /**
      * 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 +284,21 @@
         if(cancel || !this.persist) {
             this.destroyFeature();
         }
+        if(!noNew && this.active) {
+            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 +344,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();
     },
@@ -297,11 +384,10 @@
         var geom = this.getGeometry();
         return geom && geom.clone();
     },
-  
+
     /**
      * Method: mousedown
-     * Handle mouse down.  Adjust the geometry and redraw.
-     * Return determines whether to propagate the event on the map.
+     * Handle mousedown.
      * 
      * Parameters:
      * evt - {Event} The browser event
@@ -310,25 +396,135 @@
      * {Boolean} Allow event propagation
      */
     mousedown: function(evt) {
-        // check keyboard modifiers
-        if(!this.checkModifiers(evt)) {
-            return true;
+        if (this.touch) {
+            return;
         }
-        // ignore double-clicks
-        if(this.lastDown && this.lastDown.equals(evt.xy)) {
-            return true;
+        return this.down(evt);
+    },
+
+    /**
+     * Method: touchstart
+     * Handle touchstart.
+     * 
+     * Parameters:
+     * evt - {Event} The browser event
+     *
+     * Returns: 
+     * {Boolean} Allow event propagation
+     */
+    touchstart: function(evt) {
+        this.touch = true;
+
+        var last = this.last;
+        this.last = evt.xy;
+
+        if (this.timerId &&
+                this.passesTolerance(last, evt.xy, this.dblclickTolerance)) {
+            this.isDblclick = true;
+            // a valid touch immediately adds a component and leaves us with a
+            // complete geometry
+            this.finishTouchGeometry();
+            window.clearTimeout(this.timerId);
+            this.timerId = null;
+            return false;
         }
-        this.drawing = true;
-        if(this.lastDown == null) {
-            if(this.persist) {
-                this.destroyFeature();
+        else {
+            if (this.timerId) {
+                window.clearTimeout(this.timerId);
+                this.timerId = null;
             }
-            this.createFeature(evt.xy);
-        } else {
+            this.isDblclick = false;
+            this.timerId = window.setTimeout(
+                OpenLayers.Function.bind(function() {
+                    this.timerId = null;
+                }, this), 300);
+            return this.down(evt);
+        }
+    },
+
+    /**
+     * Method: mousemove
+     * Handle mousemove.
+     * 
+     * Parameters:
+     * evt - {Event} The browser event
+     *
+     * Returns: 
+     * {Boolean} Allow event propagation
+     */
+    mousemove: function(evt) {
+        if (this.touch) {
+            return;
+        }
+        return this.move(evt);
+    },
+
+    /**
+     * Method: touchmove
+     * Handle touchmove.
+     * 
+     * Parameters:
+     * evt - {Event} The browser event
+     *
+     * Returns: 
+     * {Boolean} Allow event propagation
+     */
+    touchmove: function(evt) {
+        this.last = evt.xy;
+        return this.move(evt);
+    },
+
+    /**
+     * Method: mouseup
+     * Handle mouseup.
+     * 
+     * Parameters:
+     * evt - {Event} The browser event
+     *
+     * Returns: 
+     * {Boolean} Allow event propagation
+     */
+    mouseup: function(evt) {
+        if (this.touch) {
+            return;
+        }
+        return this.up(evt);
+    },
+
+    /**
+     * Method: touchend
+     * Handle touchend.
+     * 
+     * Parameters:
+     * evt - {Event} The browser event
+     *
+     * Returns: 
+     * {Boolean} Allow event propagation
+     */
+    touchend: function(evt) {
+        evt.xy = this.last;
+        return this.up(evt);
+    },
+  
+    /**
+     * Method: mousedown
+     * Handle mouse down.  Adjust the geometry and redraw.
+     * Return determines whether to propagate the event on the map.
+     * 
+     * Parameters:
+     * evt - {Event} The browser event
+     *
+     * Returns: 
+     * {Boolean} Allow event propagation
+     */
+    down: function(evt) {
+        this.mouseDown = true;
+        this.lastDown = evt.xy;
+        if (!this.touch) {
             this.modifyFeature(evt.xy);
         }
-        this.lastDown = evt.xy;
-        return false;
+        this.stoppedDown = this.stopDown;
+        return !this.stopDown;
     },
 
     /**
@@ -342,8 +538,8 @@
      * Returns: 
      * {Boolean} Allow event propagation
      */
-    mousemove: function (evt) {
-        if(this.drawing) {
+    move: function (evt) {
+        if(!this.touch && (!this.mouseDown || this.stoppedDown)) {
             this.modifyFeature(evt.xy);
         }
         return true;
@@ -360,14 +556,72 @@
      * Returns: 
      * {Boolean} Allow event propagation
      */
-    mouseup: function (evt) {
-        if(this.drawing) {
+    up: function (evt) {
+        this.mouseDown = false;
+        this.stoppedDown = this.stopDown;
+
+        // check keyboard modifiers
+        if(!this.checkModifiers(evt)) {
+            return true;
+        }
+        // ignore double-clicks
+        if (this.lastUp && this.passesTolerance(this.lastUp, evt.xy,
+                                                    this.dblclickTolerance)) {
+            return true;
+        }
+        if (this.lastDown && this.passesTolerance(this.lastDown, evt.xy,
+                                                    this.pixelTolerance)) {
+            if (this.touch) {
+                this.modifyFeature(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;
+        }
+    },
+
+    /**
+     * Method: passesTolerance
+     * Determine whether the event is within the optional pixel tolerance.
+     * Note that the pixel tolerance check only works if mousedown events get
+     * to the listeners registered here.  If they are stopped by other
+     * elements, <pixelTolerance> and <dblclickTolerance> will have no effect
+     * here (this method will always return true).
+     *
+     * Returns:
+     * {Boolean} The click is within the pixel tolerance (if specified).
+     */
+    passesTolerance: function(pixel1, pixel2, tolerance) {
+        var passes = true;
+
+        if (tolerance != null && pixel1 && pixel2) {
+            var dist = pixel1.distanceTo(pixel2);
+            if (dist > tolerance) {
+                passes = false;
+            }
+        }
+        return passes;
+    },
+    
     CLASS_NAME: "OpenLayers.Handler.Point"
 });

Modified: sandbox/august/trunk/lib/OpenLayers/Handler/Polygon.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Handler/Polygon.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Handler/Polygon.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -75,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)
@@ -82,13 +85,27 @@
         this.line = new OpenLayers.Feature.Vector(
             new OpenLayers.Geometry.LinearRing([this.point.geometry])
         );
-        
-        // check for hole digitizing
-        var polygon;
-        if (this.holeModifier && (this.evt[this.holeModifier])) {
+        this.polygon = new OpenLayers.Feature.Vector(
+            new OpenLayers.Geometry.Polygon([this.line.geometry])
+        );
+        this.callback("create", [this.point.geometry, this.getSketch()]);
+        this.point.geometry.clearBounds();
+        this.layer.addFeatures([this.polygon, this.point], {silent: true});
+    },
+
+    /**
+     * 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;
+            var candidate, polygon;
             // look for intersections, last drawn gets priority
             for (var i=features.length-1; i>=0; --i) {
                 candidate = features[i].geometry;
@@ -110,15 +127,7 @@
                 }
             }
         }
-        if (!polygon) {
-            this.polygon = new OpenLayers.Feature.Vector(
-                new OpenLayers.Geometry.Polygon([this.line.geometry])
-            );
-        }
-        
-        this.callback("create", [this.point.geometry, this.getSketch()]);
-        this.point.geometry.clearBounds();
-        this.layer.addFeatures([this.polygon, this.point], {silent: true});
+        OpenLayers.Handler.Path.prototype.addPoint.apply(this, arguments);
     },
     
     /**
@@ -139,8 +148,19 @@
             point.y = last.y;
         }
     },
-    
+
     /**
+     * Method: finishTouchGeometry
+     * Finish the geometry and send it back to the control.
+     */
+    finishTouchGeometry: function() {
+        var index = this.line.geometry.components.length - 2;
+        this.line.geometry.removeComponent(this.line.geometry.components[index]);
+        this.removePoint();
+        this.finalize();
+    },
+
+    /**
      * Method: finalizeInteriorRing
      * Enforces that new ring has some area and doesn't contain vertices of any
      *     other rings.

Copied: sandbox/august/trunk/lib/OpenLayers/Kinetic.js (from rev 11704, trunk/openlayers/lib/OpenLayers/Kinetic.js)
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Kinetic.js	                        (rev 0)
+++ sandbox/august/trunk/lib/OpenLayers/Kinetic.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/lib/OpenLayers/Layer/ArcGIS93Rest.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/ArcGIS93Rest.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/ArcGIS93Rest.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -232,22 +232,5 @@
                                                              newArguments);
     },
 
-    /**
-     * Method: addTile
-     * addTile creates a tile, initializes it, and adds it to the layer div. 
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
-     */
-    addTile:function(bounds,position) {
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                         null, this.tileSize);
-    },
-
-    
     CLASS_NAME: "OpenLayers.Layer.ArcGIS93Rest"
 });

Copied: sandbox/august/trunk/lib/OpenLayers/Layer/ArcGISCache.js (from rev 11704, trunk/openlayers/lib/OpenLayers/Layer/ArcGISCache.js)
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/ArcGISCache.js	                        (rev 0)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/ArcGISCache.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,475 @@
+/** 
+ * @requires OpenLayers/Layer/XYZ.js 
+ */ 
+
+/** 
+ * Class: OpenLayers.Layer.ArcGISCache   
+ * Layer for accessing cached map tiles from an ArcGIS Server style mapcache. 
+ * Tile must already be cached for this layer to access it. This does not require 
+ * ArcGIS Server itself.
+ * 
+ * A few attempts have been made at this kind of layer before. See 
+ * http://trac.osgeo.org/openlayers/ticket/1967 
+ * and 
+ * http://trac.osgeo.org/openlayers/browser/sandbox/tschaub/arcgiscache/lib/OpenLayers/Layer/ArcGISCache.js
+ *
+ * Typically the problem encountered is that the tiles seem to "jump around".
+ * This is due to the fact that the actual max extent for the tiles on AGS layers
+ * changes at each zoom level due to the way these caches are constructed.
+ * We have attempted to use the resolutions, tile size, and tile origin
+ * from the cache meta data to make the appropriate changes to the max extent
+ * of the tile to compensate for this behavior.  This must be done as zoom levels change
+ * and before tiles are requested, which is why methods from base classes are overridden.
+ *
+ * For reference, you can access mapcache meta data in two ways. For accessing a 
+ * mapcache through ArcGIS Server, you can simply go to the landing page for the
+ * layer. (ie. http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer)
+ * For accessing it directly through HTTP, there should always be a conf.xml file
+ * in the root directory. 
+ * (ie. http://serverx.esri.com/arcgiscache/DG_County_roads_yesA_backgroundDark/Layers/conf.xml)
+ *  
+ *Inherits from: 
+ *  - <OpenLayers.Layer.XYZ>             
+ */    
+OpenLayers.Layer.ArcGISCache = OpenLayers.Class(OpenLayers.Layer.XYZ, {  
+
+    /**
+     * APIProperty: url
+     * {String | Array} The base URL for the layer cache.  You can also
+     *     provide a list of URL strings for the layer if your cache is
+     *     available from multiple origins.  This must be set before the layer
+     *     is drawn.
+     */
+    url: null,
+    
+   /**
+    * APIProperty: tileOrigin
+    * {<OpenLayers.LonLat>} The location of the tile origin for the cache.
+    *     An ArcGIS cache has it's origin at the upper-left (lowest x value
+    *     and highest y value of the coordinate system).  The units for the
+    *     tile origin should be the same as the units for the cached data.
+    */
+    tileOrigin: null, 
+   
+   /**
+    * APIProperty: tileSize
+    * {<OpenLayers.Size>} This size of each tile. Defaults to 256 by 256 pixels.
+    */
+    tileSize: new OpenLayers.Size(256, 256),
+    
+   /**
+    * APIProperty: useAGS
+    * {Boolean} Indicates if we are going to be accessing the ArcGIS Server (AGS)
+    *     cache via an AGS MapServer or directly through HTTP. When accessing via
+    *     AGS the path structure uses a standard z/y/x structure. But AGS actually
+    *     stores the tile images on disk using a hex based folder structure that looks
+    *     like "http://example.com/mylayer/L00/R00000000/C00000000.png".  Learn more
+    *     about this here:
+    *     http://blogs.esri.com/Support/blogs/mappingcenter/archive/2010/08/20/Checking-Your-Local-Cache-Folders.aspx
+    *     Defaults to true;
+    */    
+    useArcGISServer: true,
+
+   /**
+    * APIProperty: type
+    * {String} Image type for the layer.  This becomes the filename extension
+    *     in tile requests.  Default is "png" (generating a url like
+    *     "http://example.com/mylayer/L00/R00000000/C00000000.png").
+    */
+    type: 'png',
+    
+    /**
+    * APIProperty: useScales
+    * {Boolean} Optional override to indicate that the layer should use 'scale' information
+    *     returned from the server capabilities object instead of 'resolution' information.
+    *     This can be important if your tile server uses an unusual DPI for the tiles.
+    */
+    useScales: false,
+    
+   /**
+    * APIProperty: overrideDPI
+    * {Boolean} Optional override to change the OpenLayers.DOTS_PER_INCH setting based 
+    *     on the tile information in the server capabilities object.  This can be useful 
+    *     if your server has a non-standard DPI setting on its tiles, and you're only using 
+    *     tiles with that DPI.  This value is used while OpenLayers is calculating resolution
+    *     using scales, and is not necessary if you have resolution information. (This is
+    *     typically the case)  Regardless, this setting can be useful, but is dangerous
+    *     because it will impact other layers while calculating resolution.  Only use this
+    *     if you know what you are doing.  (See OpenLayers.Util.getResolutionFromScale)
+    */
+    overrideDPI: false,
+    
+   /**
+    * Constructor: OpenLayers.Layer.ArcGISCache 
+    * Creates a new instance of this class 
+    * 
+    * Parameters: 
+    * name - {String} 
+    * url - {String} 
+    * options - {Object} extra layer options
+    */ 
+    initialize: function(name, url, options) { 
+        OpenLayers.Layer.XYZ.prototype.initialize.apply(this, arguments);
+
+        if (this.resolutions) {        
+            this.serverResolutions = this.resolutions;
+            this.maxExtent = this.getMaxExtentForResolution(this.resolutions[0]);
+        }
+
+        // this block steps through translating the values from the server layer JSON 
+        // capabilities object into values that we can use.  This is also a helpful
+        // reference when configuring this layer directly.
+        if (this.layerInfo) {
+            // alias the object
+            var info = this.layerInfo;
+            
+            // build our extents
+            var startingTileExtent = new OpenLayers.Bounds(
+                info.fullExtent.xmin, 
+                info.fullExtent.ymin, 
+                info.fullExtent.xmax, 
+                info.fullExtent.ymax  
+            );
+
+            // set our projection based on the given spatial reference.
+            // esri uses slightly different IDs, so this may not be comprehensive
+            this.projection = 'EPSG:' + info.spatialReference.wkid;
+            this.sphericalMercator = (info.spatialReference.wkid == 102100);
+            
+            // convert esri units into openlayers units (basic feet or meters only)
+            this.units = (info.units == "esriFeet") ? 'ft' : 'm';
+
+            // optional extended section based on whether or not the server returned
+            // specific tile information
+            if (!!info.tileInfo) {            
+                // either set the tiles based on rows/columns, or specific width/height
+                this.tileSize = new OpenLayers.Size(
+                    info.tileInfo.width || info.tileInfo.cols, 
+                    info.tileInfo.height || info.tileInfo.rows
+                );
+                
+                // this must be set when manually configuring this layer
+                this.tileOrigin = new OpenLayers.LonLat(
+                    info.tileInfo.origin.x, 
+                    info.tileInfo.origin.y
+                );
+
+                var upperLeft = new OpenLayers.Geometry.Point(
+                    startingTileExtent.left, 
+                    startingTileExtent.top
+                );
+                
+                var bottomRight = new OpenLayers.Geometry.Point(
+                    startingTileExtent.right, 
+                    startingTileExtent.bottom
+                );            
+                
+                if (this.useScales) {
+                    this.scales = [];
+                } else {
+                    this.resolutions = [];
+                }
+                
+                this.lods = [];
+                for(var key in info.tileInfo.lods) {
+                    var lod = info.tileInfo.lods[key];
+                    if (this.useScales) {
+                        this.scales.push(lod.scale);
+                    } else {
+                        this.resolutions.push(lod.resolution);
+                    }
+                    
+                    var start = this.getContainingTileCoords(upperLeft, lod.resolution);
+                    lod.startTileCol = start.x;
+                    lod.startTileRow = start.y;
+                    
+                    var end = this.getContainingTileCoords(bottomRight, lod.resolution);
+                    lod.endTileCol = end.x;
+                    lod.endTileRow = end.y;    
+                    this.lods.push(lod);
+                }
+
+                this.maxExtent = this.calculateMaxExtentWithLOD(this.lods[0]);
+                this.serverResolutions = this.resolutions;
+                if (this.overrideDPI && info.tileInfo.dpi) {
+                    // see comment above for 'overrideDPI'
+                    OpenLayers.DOTS_PER_INCH = info.tileInfo.dpi;
+                }
+            } 
+       }
+    }, 
+
+   /** 
+    * Method: getContainingTileCoords
+    * Calculates the x/y pixel corresponding to the position of the tile
+    *     that contains the given point and for the for the given resolution.
+    * 
+    * Parameters:
+    * point - {<OpenLayers.Geometry.Point>} 
+    * res - {Float} The resolution for which to compute the extent.
+    * 
+    * Returns: 
+    * {<OpenLayers.Pixel>} The x/y pixel corresponding to the position 
+    * of the upper left tile for the given resolution.
+    */
+    getContainingTileCoords: function(point, res) {
+        return new OpenLayers.Pixel(
+           Math.max(Math.floor((point.x - this.tileOrigin.lon) / (this.tileSize.w * res)),0),
+           Math.max(Math.floor((this.tileOrigin.lat - point.y) / (this.tileSize.h * res)),0)
+        );
+    },
+    
+   /** 
+    * Method: calculateMaxExtentWithLOD
+    * Given a Level of Detail object from the server, this function
+    *     calculates the actual max extent
+    * 
+    * Parameters: 
+    * lod - {Object} a Level of Detail Object from the server capabilities object 
+            representing a particular zoom level
+    * 
+    * Returns: 
+    * {<OpenLayers.Bounds>} The actual extent of the tiles for the given zoom level
+    */
+   calculateMaxExtentWithLOD: function(lod) {
+        // the max extent we're provided with just overlaps some tiles
+        // our real extent is the bounds of all the tiles we touch
+
+        var numTileCols = (lod.endTileCol - lod.startTileCol) + 1;
+        var numTileRows = (lod.endTileRow - lod.startTileRow) + 1;        
+
+        var minX = this.tileOrigin.lon + (lod.startTileCol * this.tileSize.w * lod.resolution);
+        var maxX = minX + (numTileCols * this.tileSize.w * lod.resolution);
+
+        var maxY = this.tileOrigin.lat - (lod.startTileRow * this.tileSize.h * lod.resolution);
+        var minY = maxY - (numTileRows * this.tileSize.h * lod.resolution);
+        return new OpenLayers.Bounds(minX, minY, maxX, maxY);
+   },
+    
+   /** 
+    * Method: calculateMaxExtentWithExtent
+    * Given a 'suggested' max extent from the server, this function uses
+    *     information about the actual tile sizes to determine the actual
+    *     extent of the layer.
+    * 
+    * Parameters: 
+    * extent - {<OpenLayers.Bounds>} The 'suggested' extent for the layer
+    * res - {Float} The resolution for which to compute the extent.
+    * 
+    * Returns: 
+    * {<OpenLayers.Bounds>} The actual extent of the tiles for the given zoom level
+    */
+   calculateMaxExtentWithExtent: function(extent, res) {
+        var upperLeft = new OpenLayers.Geometry.Point(extent.left, extent.top);
+        var bottomRight = new OpenLayers.Geometry.Point(extent.right, extent.bottom);
+        var start = this.getContainingTileCoords(upperLeft, res);
+        var end = this.getContainingTileCoords(bottomRight, res);
+        var lod = {
+            resolution: res,
+            startTileCol: start.x,
+            startTileRow: start.y,
+            endTileCol: end.x,
+            endTileRow: end.y
+        };
+        return this.calculateMaxExtentWithLOD(lod);
+   },
+    
+    /** 
+    * Method: getUpperLeftTileCoord
+    * Calculates the x/y pixel corresponding to the position 
+    *     of the upper left tile for the given resolution.
+    * 
+    * Parameters: 
+    * res - {Float} The resolution for which to compute the extent.
+    * 
+    * Returns: 
+    * {<OpenLayers.Pixel>} The x/y pixel corresponding to the position 
+    * of the upper left tile for the given resolution.
+    */
+    getUpperLeftTileCoord: function(res) {
+        var upperLeft = new OpenLayers.Geometry.Point(
+            this.maxExtent.left,
+            this.maxExtent.top);
+        return this.getContainingTileCoords(upperLeft, res);
+    },
+
+    /** 
+    * Method: getLowerRightTileCoord
+    * Calculates the x/y pixel corresponding to the position 
+    *     of the lower right tile for the given resolution.
+    *  
+    * Parameters: 
+    * res - {Float} The resolution for which to compute the extent.
+    * 
+    * Returns: 
+    * {<OpenLayers.Pixel>} The x/y pixel corresponding to the position
+    * of the lower right tile for the given resolution.
+    */
+    getLowerRightTileCoord: function(res) {
+        var bottomRight = new OpenLayers.Geometry.Point(
+            this.maxExtent.right,
+            this.maxExtent.bottom);
+        return this.getContainingTileCoords(bottomRight, res);
+    },
+    
+   /** 
+    * Method: getMaxExtentForResolution
+    * Since the max extent of a set of tiles can change from zoom level
+    *     to zoom level, we need to be able to calculate that max extent 
+    *     for a given resolution.
+    *
+    * Parameters: 
+    * res - {Float} The resolution for which to compute the extent.
+    * 
+    * Returns: 
+    * {<OpenLayers.Bounds>} The extent for this resolution
+    */ 
+    getMaxExtentForResolution: function(res) {
+        var start = this.getUpperLeftTileCoord(res);
+        var end = this.getLowerRightTileCoord(res);
+
+        var numTileCols = (end.x - start.x) + 1;
+        var numTileRows = (end.y - start.y) + 1;
+
+        var minX = this.tileOrigin.lon + (start.x * this.tileSize.w * res);
+        var maxX = minX + (numTileCols * this.tileSize.w * res);
+        
+        var maxY = this.tileOrigin.lat - (start.y * this.tileSize.h * res);
+        var minY = maxY - (numTileRows * this.tileSize.h * res);
+        return new OpenLayers.Bounds(minX, minY, maxX, maxY);
+    },
+    
+   /** 
+    * APIMethod: clone 
+    * Returns an exact clone of this OpenLayers.Layer.ArcGISCache
+    * 
+    * Parameters: 
+    * [obj] - {Object} optional object to assign the cloned instance to.
+    *  
+    * Returns: 
+    * {<OpenLayers.Layer.ArcGISCache>} clone of this instance 
+    */ 
+    clone: function (obj) { 
+        if (obj == null) { 
+            obj = new OpenLayers.Layer.ArcGISCache(this.name, this.url, this.options);
+        }
+        return OpenLayers.Layer.XYZ.prototype.clone.apply(this, [obj]);
+    },
+
+    /**
+     * Method: getMaxExtent
+     * Get this layer's maximum extent.
+     *
+     * Returns:
+     * {OpenLayers.Bounds}
+     */
+    getMaxExtent: function() {
+        var resolution = this.map.getResolution();
+        return this.maxExtent = this.getMaxExtentForResolution(resolution);
+    },
+
+    /**
+     * Method: getTileOrigin
+     * Determine the origin for aligning the grid of tiles.  
+     *     The origin will be derived from the layer's <maxExtent> property. 
+     *
+     * Returns:
+     * {<OpenLayers.LonLat>} The tile origin.
+     */
+    getTileOrigin: function() {
+        var extent = this.getMaxExtent();
+        return new OpenLayers.LonLat(extent.left, extent.bottom);
+    },
+
+   /**
+    * Method: getURL
+    * Determine the URL for a tile given the tile bounds.  This is should support
+    *     urls that access tiles through an ArcGIS Server MapServer or directly through
+    *     the hex folder structure using HTTP.  Just be sure to set the useArcGISServer
+    *     property appropriately!  This is basically the same as 
+    *     'OpenLayers.Layer.TMS.getURL',  but with the addition of hex addressing,
+    *     and tile rounding.
+    *
+    * Parameters:
+    * bounds - {<OpenLayers.Bounds>}
+    *
+    * Returns:
+    * {String} The URL for a tile based on given bounds.
+    */
+    getURL: function (bounds) {
+        var res = this.getResolution(); 
+
+        // tile center
+        var originTileX = (this.tileOrigin.lon + (res * this.tileSize.w/2)); 
+        var originTileY = (this.tileOrigin.lat - (res * this.tileSize.h/2));
+
+        var center = bounds.getCenterLonLat();
+        var point = { x: center.lon, y: center.lat };
+        var x = (Math.round(Math.abs((center.lon - originTileX) / (res * this.tileSize.w)))); 
+        var y = (Math.round(Math.abs((originTileY - center.lat) / (res * this.tileSize.h)))); 
+        var z = this.map.getZoom();
+
+        // this prevents us from getting pink tiles (non-existant tiles)
+        if (this.lods) {        
+            var lod = this.lods[this.map.getZoom()];
+            if ((x < lod.startTileCol || x > lod.endTileCol) 
+                || (y < lod.startTileRow || y > lod.endTileRow)) {
+                    return null;
+            }
+        }
+        else {
+            var start = this.getUpperLeftTileCoord(res);
+            var end = this.getLowerRightTileCoord(res);
+            if ((x < start.x || x >= end.x)
+                || (y < start.y || y >= end.y)) {
+                    return null;
+            }        
+        }
+
+        // Construct the url string
+        var url = this.url;
+        var s = '' + x + y + z;
+
+        if (url instanceof Array) {
+            url = this.selectUrl(s, url);
+        }
+
+        // Accessing tiles through ArcGIS Server uses a different path
+        // structure than direct access via the folder structure.
+        if (this.useArcGISServer) {
+            // AGS MapServers have pretty url access to tiles
+            url = url + '/tile/${z}/${y}/${x}';
+        } else {
+            // The tile images are stored using hex values on disk.
+            x = 'C' + this.zeroPad(x, 8, 16);
+            y = 'R' + this.zeroPad(y, 8, 16);
+            z = 'L' + this.zeroPad(z, 2, 16);
+            url = url + '/${z}/${y}/${x}.' + this.type;
+        }
+
+        // Write the values into our formatted url
+        url = OpenLayers.String.format(url, {'x': x, 'y': y, 'z': z});
+
+        return url;
+    },
+
+    /**
+     * Method: zeroPad
+     * Create a zero padded string optionally with a radix for casting numbers.
+     *
+     * Parameters:
+     * num - {Number} The number to be zero padded.
+     * len - {Number} The length of the string to be returned.
+     * radix - {Number} An integer between 2 and 36 specifying the base to use
+     *     for representing numeric values.
+     */
+    zeroPad: function(num, len, radix) {
+        var str = num.toString(radix || 10);
+        while (str.length < len) {
+            str = "0" + str;
+        }
+        return str;
+    },
+
+    CLASS_NAME: 'OpenLayers.Layer.ArcGISCache' 
+}); 

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/ArcIMS.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/ArcIMS.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/ArcIMS.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -445,22 +445,5 @@
         return obj;
     },
     
-    /**
-     * Method: addTile
-     * addTile creates a tile, initializes it, and adds it to the layer div. 
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added image tile.
-     */
-    addTile:function(bounds,position) {
-        return new OpenLayers.Tile.Image(
-            this, position, bounds, null, this.tileSize
-        );
-    },
-    
     CLASS_NAME: "OpenLayers.Layer.ArcIMS"
 });

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/Bing.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/Bing.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/Bing.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -79,7 +79,7 @@
         options = OpenLayers.Util.applyDefaults({
             restrictedMinZoom: 1,
             sphericalMercator: true
-        }, options)
+        }, options);
         var name = options.name || "Bing " + (options.type || this.type);
         
         var newArgs = [name, null, options];

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/EventPane.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/EventPane.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/EventPane.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -211,6 +211,24 @@
         OpenLayers.Layer.prototype.setZIndex.apply(this, arguments);
         this.pane.style.zIndex = parseInt(this.div.style.zIndex) + 1;
     },
+    
+    /**
+     * Method: moveByPx
+     * Move the layer based on pixel vector. To be implemented by subclasses.
+     *
+     * Parameters:
+     * dx - {Number} The x coord of the displacement vector.
+     * dy - {Number} The y coord of the displacement vector.
+     */
+    moveByPx: function(dx, dy) {
+        OpenLayers.Layer.prototype.moveByPx.apply(this, arguments);
+        
+        if (this.dragPanMapObject) {
+            this.dragPanMapObject(dx, -dy);
+        } else {
+            this.moveTo(this.map.getCachedCenter());
+        }
+    },
 
     /**
      * Method: moveTo
@@ -240,7 +258,7 @@
                 if ( !(newCenter.equals(oldCenter)) || 
                      !(newZoom == oldZoom) ) {
 
-                    if (dragging && this.dragPanMapObject && 
+                    if (!zoomChanged && oldCenter && this.dragPanMapObject && 
                         this.smoothDragPan) {
                         var oldPx = this.map.getViewPortPxFromLonLat(oldCenter);
                         var newPx = this.map.getViewPortPxFromLonLat(newCenter);

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/Google/v3.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/Google/v3.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/Google/v3.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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,13 +40,13 @@
      */
     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"
     },
@@ -181,15 +181,16 @@
         if (this.visibility) {
             google.maps.event.trigger(this.mapObject, "resize");
         } else {
-            if (!this._resized) {
+            var cache = OpenLayers.Layer.Google.cache[this.map.id];
+            if (!cache.resized) {
                 var layer = this;
                 google.maps.event.addListenerOnce(this.mapObject, "tilesloaded", function() {
-                    delete layer._resized;
                     google.maps.event.trigger(layer.mapObject, "resize");
                     layer.moveTo(layer.map.getCenter(), layer.map.getZoom());
+                    delete cache.resized;
                 });
             }
-            this._resized = true;
+            cache.resized = true;
         }
     },
 
@@ -202,7 +203,7 @@
      */
     setGMapVisibility: function(visible) {
         var cache = OpenLayers.Layer.Google.cache[this.map.id];
-        if (cache) {
+        if (cache && !cache.resized) {
             var type = this.type;
             var layers = this.map.layers;
             var layer;

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/Grid.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/Grid.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/Grid.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -78,8 +78,11 @@
      * {Integer} Used only when in gridded mode, this specifies the number of 
      *           extra rows and colums of tiles on each side which will
      *           surround the minimum grid tiles to cover the map.
+     *           For very slow loading layers, a larger value may increase
+     *           performance somewhat when dragging, but will increase bandwidth
+     *           use significantly. 
      */
-    buffer: 2,
+    buffer: 0,
 
     /**
      * APIProperty: numLoadingTiles
@@ -88,6 +91,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
      *
@@ -109,9 +125,27 @@
         this.events.addEventType("tileloaded");
 
         this.grid = [];
+        
+        this._moveGriddedTiles = OpenLayers.Function.bind(
+            this.moveGriddedTiles, this
+        );
     },
 
     /**
+     * Method: removeMap
+     * Called when the layer is removed from the map.
+     *
+     * Parameters:
+     * map - {<OpenLayers.Map>} The map.
+     */
+    removeMap: function(map) {
+        if(this.timerId != null) {
+            window.clearTimeout(this.timerId);
+            this.timerId = null;
+        }
+    },
+
+    /**
      * APIMethod: destroy
      * Deconstruct the layer and clear the grid.
      */
@@ -217,12 +251,37 @@
                 if (forceReTile || !tilesBounds.containsBounds(bounds, true)) {
                     this.initGriddedTiles(bounds);
                 } else {
-                    //we might have to shift our buffer tiles
-                    this.moveGriddedTiles(bounds);
+                    this.scheduleMoveGriddedTiles();
                 }
             }
         }
     },
+
+    /**
+     * Method: moveByPx
+     * Move the layer based on pixel vector.
+     *
+     * Parameters:
+     * dx - {Number}
+     * dy - {Number}
+     */
+    moveByPx: function(dx, dy) {
+        this.scheduleMoveGriddedTiles();
+    },
+
+    /**
+     * Method: scheduleMoveGriddedTiles
+     * Schedule the move of tiles.
+     */
+    scheduleMoveGriddedTiles: function() {
+        if (this.timerId != null) {
+            window.clearTimeout(this.timerId);
+        }
+        this.timerId = window.setTimeout(
+            this._moveGriddedTiles,
+            this.tileLoadingDelay
+        );
+    },
     
     /**
      * APIMethod: setTileSize
@@ -570,9 +629,7 @@
 
     /**
      * APIMethod: addTile
-     * Gives subclasses of Grid the opportunity to create an 
-     * OpenLayer.Tile of their choosing. The implementer should initialize 
-     * the new tile and take whatever steps necessary to display it.
+     * Create a tile, initialize it, and add it to the layer div. 
      *
      * Parameters
      * bounds - {<OpenLayers.Bounds>}
@@ -582,7 +639,8 @@
      * {<OpenLayers.Tile>} The added OpenLayers.Tile
      */
     addTile:function(bounds, position) {
-        // Should be implemented by subclasses
+        return new OpenLayers.Tile.Image(this, position, bounds, null, 
+                                         this.tileSize, this.tileOptions);
     },
     
     /** 
@@ -636,28 +694,31 @@
     
     /**
      * 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 offsetX = parseInt(this.map.layerContainerDiv.style.left);
+        var offsetY = parseInt(this.map.layerContainerDiv.style.top);
+        var tlViewPort = tlLayer.add(offsetX, offsetY);
+        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);
+        }
     },
 
     /**
@@ -737,7 +798,7 @@
      * 
      * Parameters:
      * rows - {Integer} Maximum number of rows we want our grid to have.
-     * colums - {Integer} Maximum number of columns we want our grid to have.
+     * columns - {Integer} Maximum number of columns we want our grid to have.
      */
     removeExcessTiles: function(rows, columns) {
         

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/HTTPRequest.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/HTTPRequest.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/HTTPRequest.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/lib/OpenLayers/Layer/KaMap.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/KaMap.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/KaMap.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -94,22 +94,6 @@
                       });
     },
 
-    /**
-     * Method: addTile
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>}
-     */    
-    addTile:function(bounds,position) {
-        var url = this.getURL(bounds);
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                             url, this.tileSize);
-    },
-
     /** 
      * Method: calculateGridLayout
      * ka-Map uses the center point of the map as an origin for 
@@ -118,14 +102,14 @@
      *
      * 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;
         

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/MapGuide.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/MapGuide.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/MapGuide.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -116,6 +116,12 @@
      **/
     defaultSize: new OpenLayers.Size(300,300),
 
+    /** 
+     * Property: tileOriginCorner
+     * {String} MapGuide tile server uses top-left as tile origin
+     **/
+    tileOriginCorner: "tl",
+
     /**
      * Constructor: OpenLayers.Layer.MapGuide
      * Create a new Mapguide layer, either tiled or untiled.  
@@ -234,22 +240,6 @@
     },
 
     /**
-     * Method: addTile
-     * Creates a tile, initializes it, and adds it to the layer div. 
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
-     */
-    addTile:function(bounds,position) {
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                         null, this.tileSize);
-    },
-
-    /**
      * Method: getURL
      * Return a query string for this layer
      *
@@ -455,28 +445,28 @@
      *
      * 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 = extent.top - bounds.top + tilelat; 
+        var offsetlat = origin.lat - bounds.top + tilelat; 
         var tilerow = Math.floor(offsetlat/tilelat) - this.buffer;
         var tilerowremain = tilerow - offsetlat/tilelat;
         var tileoffsety = tilerowremain * this.tileSize.h;
-        var tileoffsetlat = extent.top - tilelat*tilerow;
+        var tileoffsetlat = origin.lat - tilelat*tilerow;
         
         return { 
           tilelon: tilelon, tilelat: tilelat,

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/MapServer.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/MapServer.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/MapServer.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -76,22 +76,6 @@
 
         return obj;
     },
-
-    /**
-     * Method: addTile
-     * Creates a tile, initializes it, and adds it to the layer div. 
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
-     */
-    addTile:function(bounds,position) {
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                         null, this.tileSize);
-    },
     
     /**
      * Method: getURL

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/MultiMap.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/MultiMap.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/MultiMap.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -13,6 +13,7 @@
  * 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/august/trunk/lib/OpenLayers/Layer/SphericalMercator.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/SphericalMercator.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/SphericalMercator.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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);
         }

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/TMS.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/TMS.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/TMS.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -131,22 +131,6 @@
         return url + path;
     },
 
-    /**
-     * Method: addTile
-     * addTile creates a tile, initializes it, and adds it to the layer div. 
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
-     */
-    addTile:function(bounds,position) {
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                         null, this.tileSize);
-    },
-
     /** 
      * APIMethod: setMap
      * When the layer is added to a map, then we can fetch our origin 

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/TileCache.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/TileCache.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/TileCache.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -144,23 +144,6 @@
         url = (url.charAt(url.length - 1) == '/') ? url : url + '/';
         return url + path;
     },
-
-    /**
-     * Method: addTile
-     * Create a tile, initialize it, and add it to the layer div. 
-     *
-     * Parameters: 
-     * bounds - {<OpenLayers.Bounds>} 
-     * position - {<OpenLayers.Pixel>}
-     *
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added <OpenLayers.Tile.Image>
-     */
-    addTile:function(bounds, position) {
-        var url = this.getURL(bounds);
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                             url, this.tileSize);
-    },
     
     CLASS_NAME: "OpenLayers.Layer.TileCache"
 });

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/Vector.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/Vector.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/Vector.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -472,34 +472,38 @@
     moveTo: function(bounds, zoomChanged, dragging) {
         OpenLayers.Layer.prototype.moveTo.apply(this, arguments);
         
-        var coordSysUnchanged = true;
+        var ng = (OpenLayers.Renderer.NG && this.renderer instanceof OpenLayers.Renderer.NG);
+        if (ng) {
+            zoomChanged && this.renderer.updateDimensions();
+        } else {
+            var coordSysUnchanged = true;
 
-        if (!dragging) {
-            this.renderer.root.style.visibility = "hidden";
+            if (!dragging) {
+                this.renderer.root.style.visibility = "hidden";
             
-            this.div.style.left = -parseInt(this.map.layerContainerDiv.style.left) + "px";
-            this.div.style.top = -parseInt(this.map.layerContainerDiv.style.top) + "px";
-            var extent = this.map.getExtent();
-            coordSysUnchanged = this.renderer.setExtent(extent, zoomChanged);
+                this.div.style.left = -parseInt(this.map.layerContainerDiv.style.left) + "px";
+                this.div.style.top = -parseInt(this.map.layerContainerDiv.style.top) + "px";
+                var extent = this.map.getExtent();
+                coordSysUnchanged = this.renderer.setExtent(extent, zoomChanged);
             
-            this.renderer.root.style.visibility = "visible";
+                this.renderer.root.style.visibility = "visible";
 
-            // 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 (OpenLayers.IS_GECKO === true) {
-                this.div.scrollLeft = this.div.scrollLeft;
-            }
+                // 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 (OpenLayers.IS_GECKO === true) {
+                    this.div.scrollLeft = this.div.scrollLeft;
+                }
             
-            if(!zoomChanged && coordSysUnchanged) {
-                for(var i in this.unrenderedFeatures) {
-                    var feature = this.unrenderedFeatures[i];
-                    this.drawFeature(feature);
+                if(!zoomChanged && coordSysUnchanged) {
+                    for(var i in this.unrenderedFeatures) {
+                        var feature = this.unrenderedFeatures[i];
+                        this.drawFeature(feature);
+                    }
                 }
             }
         }
-        
-        if (!this.drawn || zoomChanged || !coordSysUnchanged) {
+        if (!this.drawn || (!ng && (zoomChanged || !coordSysUnchanged))) {
             this.drawn = true;
             var feature;
             for(var i=0, len=this.features.length; i<len; i++) {
@@ -510,6 +514,20 @@
         }    
     },
     
+    /**
+     * APIMethod: redraw
+     * Redraws the layer.  Returns true if the layer was redrawn, false if not.
+     *
+     * Returns:
+     * {Boolean} The layer was redrawn.
+     */
+    redraw: function() {
+        if (OpenLayers.Renderer.NG && this.renderer instanceof OpenLayers.Renderer.NG) {
+            this.drawn = false;
+        }
+        return OpenLayers.Layer.prototype.redraw.apply(this, arguments);
+    },
+    
     /** 
      * APIMethod: display
      * Hide or show the Layer
@@ -779,7 +797,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) {

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/VirtualEarth.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/VirtualEarth.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/VirtualEarth.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -13,7 +13,11 @@
 
 /**
  * Class: OpenLayers.Layer.VirtualEarth
- * 
+ * Instances of OpenLayers.Layer.VirtualEarth are used to display the data from
+ *     the Bing Maps AJAX Control (see e.g. 
+ *     http://msdn.microsoft.com/library/bb429619.aspx). Create a VirtualEarth 
+ *     layer with the <OpenLayers.Layer.VirtualEarth> constructor.
+ *     
  * Inherits from:
  *  - <OpenLayers.Layer.EventPane>
  *  - <OpenLayers.Layer.FixedZoomLevels>
@@ -94,7 +98,23 @@
 
     /** 
      * Constructor: OpenLayers.Layer.VirtualEarth
+     * Creates a new instance of a OpenLayers.Layer.VirtualEarth. If you use an
+     *     instance of OpenLayers.Layer.VirtualEarth in you map, you should set 
+     *     the <OpenLayers.Map> option restrictedExtent to a meaningful value,
+     *     e.g.:
+     * (code)
+     * var map = new OpenLayers.Map( 'map', {
+     *     // other map options
+     *     restrictedExtent : OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508)
+     * } );
      * 
+     * var veLayer = new OpenLayers.Layer.VirtualEarth (
+     *     "Virtual Earth Layer"
+     * );
+     * 
+     * map.addLayer( veLayer );
+     * (end)
+     * 
      * Parameters:
      * name - {String}
      * options - {Object}

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/WMS.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/WMS.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/WMS.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -257,7 +257,7 @@
         var projectionCode = this.projection.equals(mapProjection) ?
             this.projection.getCode() :
             mapProjection.getCode();
-        var value = (projectionCode == "none") ? null : projectionCode
+        var value = (projectionCode == "none") ? null : projectionCode;
 		if (parseFloat(this.params.VERSION) >= 1.3) {        	
 			this.params.CRS = this.params.CRS || value;
 			this.params.SRS = null;

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/WMTS.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/WMTS.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/WMTS.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -456,21 +456,5 @@
         }
     },
 
-    /**
-     * Method: addTile
-     * Create a tile, initialize it, and add it to the layer div. 
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
-     */
-    addTile: function(bounds,position) {
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                         null, this.tileSize);
-    },
-
     CLASS_NAME: "OpenLayers.Layer.WMTS"
 });

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/WorldWind.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/WorldWind.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/WorldWind.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -59,20 +59,6 @@
             this.params, this.DEFAULT_PARAMS
         );
     },
-    /**
-     * Method: addTile
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
-     */
-    addTile:function(bounds,position) {
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                             null, this.tileSize);
-    },
 
     /**
      * Method: getZoom

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/XYZ.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/XYZ.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/XYZ.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -65,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"
@@ -151,22 +151,6 @@
         return {'x': x, 'y': y, 'z': z};
     },
     
-    /**
-     * Method: addTile
-     * addTile creates a tile, initializes it, and adds it to the layer div. 
-     * 
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     * 
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
-     */
-    addTile:function(bounds,position) {
-        return new OpenLayers.Tile.Image(this, position, bounds, 
-                                         null, this.tileSize);
-    },
-     
     /* APIMethod: setMap
      * When the layer is added to a map, then we can fetch our origin 
      *    (if we don't have one.) 

Modified: sandbox/august/trunk/lib/OpenLayers/Layer/Zoomify.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer/Zoomify.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer/Zoomify.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -45,6 +45,12 @@
      */
     standardTileSize: 256,
 
+    /** 
+     * Property: tileOriginCorner
+     * {String} This layer uses top-left as tile origin
+     **/
+    tileOriginCorner: "tl",
+
     /**
      * Property: numberOfTiers
      * {Integer} Depth of the Zoomify pyramid, number of tiers (zoom levels)
@@ -105,7 +111,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 +157,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;
 
     },
 
@@ -239,22 +245,6 @@
     },
 
     /**
-     * Method: addTile
-     * addTile creates a tile, initializes it, and adds it to the layer div.
-     *
-     * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
-     * position - {<OpenLayers.Pixel>}
-     *
-     * Returns:
-     * {<OpenLayers.Tile.Image>} The added OpenLayers.Tile.Image
-     */
-    addTile:function(bounds,position) {
-        return new OpenLayers.Tile.Image(this, position, bounds,
-                                         null, this.tileSize);
-    },
-
-    /**
      * APIMethod: setMap
      * When the layer is added to a map, then we can fetch our origin
      *    (if we don't have one.)
@@ -274,28 +264,28 @@
      *
      * 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 = extent.top - bounds.top + tilelat;
+        var offsetlat = origin.lat - bounds.top + tilelat;
         var tilerow = Math.floor(offsetlat/tilelat) - this.buffer;
         var tilerowremain = tilerow - offsetlat/tilelat;
         var tileoffsety = tilerowremain * this.tileSize.h;
-        var tileoffsetlat = extent.top - tilelat*tilerow;
+        var tileoffsetlat = origin.lat - tilelat*tilerow;
 
         return {
           tilelon: tilelon, tilelat: tilelat,

Modified: sandbox/august/trunk/lib/OpenLayers/Layer.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Layer.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Layer.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -556,7 +556,7 @@
      * Method: moveTo
      * 
      * Parameters:
-     * bound - {<OpenLayers.Bounds>}
+     * bounds - {<OpenLayers.Bounds>}
      * zoomChanged - {Boolean} Tells when zoom has changed, as layers have to
      *     do some init work in that case.
      * dragging - {Boolean}
@@ -570,6 +570,17 @@
     },
 
     /**
+     * Method: moveByPx
+     * Move the layer based on pixel vector. To be implemented by subclasses.
+     *
+     * Parameters:
+     * dx - {Number} The x coord of the displacement vector.
+     * dy - {Number} The y coord of the displacement vector.
+     */
+    moveByPx: function(dx, dy) {
+    },
+
+    /**
      * Method: setMap
      * Set the map property for the layer. This is done through an accessor
      *     so that subclasses can override this and take special action once 
@@ -704,7 +715,7 @@
      *     subverted.
      * 
      * Parameters:
-     * visible - {Boolean} Whether or not to display the layer (if in range)
+     * visibility - {Boolean} Whether or not to display the layer (if in range)
      */
     setVisibility: function(visibility) {
         if (visibility != this.visibility) {
@@ -815,13 +826,13 @@
         //    map
         // 7. hope for the best!
 
-        var i, len;
+        var i, len, p;
         var props = {}, alwaysInRange = true;
 
         // get resolution data from layer config
         // (we also set alwaysInRange in the layer as appropriate)
         for(i=0, len=this.RESOLUTION_PROPERTIES.length; i<len; i++) {
-            var p = this.RESOLUTION_PROPERTIES[i];
+            p = this.RESOLUTION_PROPERTIES[i];
             props[p] = this.options[p];
             if(alwaysInRange && this.options[p]) {
                 alwaysInRange = false;
@@ -845,7 +856,7 @@
         // in the map
         if(props.resolutions == null) {
             for(i=0, len=this.RESOLUTION_PROPERTIES.length; i<len; i++) {
-                var p = this.RESOLUTION_PROPERTIES[i];
+                p = this.RESOLUTION_PROPERTIES[i];
                 props[p] = this.options[p] != null ?
                     this.options[p] : this.map[p];
             }
@@ -960,6 +971,8 @@
      */
     calculateResolutions: function(props) {
 
+        var viewSize, wRes, hRes;
+
         // determine maxResolution
         var maxResolution = props.maxResolution;
         if(props.minScale != null) {
@@ -967,9 +980,9 @@
                 OpenLayers.Util.getResolutionFromScale(props.minScale,
                                                        this.units);
         } else if(maxResolution == "auto" && this.maxExtent != null) {
-            var viewSize = this.map.getSize();
-            var wRes = this.maxExtent.getWidth() / viewSize.w;
-            var hRes = this.maxExtent.getHeight() / viewSize.h;
+            viewSize = this.map.getSize();
+            wRes = this.maxExtent.getWidth() / viewSize.w;
+            hRes = this.maxExtent.getHeight() / viewSize.h;
             maxResolution = Math.max(wRes, hRes);
         }
 
@@ -980,9 +993,9 @@
                 OpenLayers.Util.getResolutionFromScale(props.maxScale,
                                                        this.units);
         } else if(props.minResolution == "auto" && this.minExtent != null) {
-            var viewSize = this.map.getSize();
-            var wRes = this.minExtent.getWidth() / viewSize.w;
-            var hRes = this.minExtent.getHeight()/ viewSize.h;
+            viewSize = this.map.getSize();
+            wRes = this.minExtent.getWidth() / viewSize.w;
+            hRes = this.minExtent.getHeight()/ viewSize.h;
             minResolution = Math.max(wRes, hRes);
         }
 
@@ -1066,7 +1079,7 @@
      * APIMethod: getZoomForExtent
      * 
      * Parameters:
-     * bounds - {<OpenLayers.Bounds>}
+     * extent - {<OpenLayers.Bounds>}
      * closest - {Boolean} Find the zoom level that most closely fits the 
      *     specified bounds. Note that this may result in a zoom that does 
      *     not exactly contain the entire extent.
@@ -1141,14 +1154,14 @@
      *     value and the 'closest' specification.
      */
     getZoomForResolution: function(resolution, closest) {
-        var zoom;
+        var zoom, i, len;
         if(this.map.fractionalZoom) {
             var lowZoom = 0;
             var highZoom = this.resolutions.length - 1;
             var highRes = this.resolutions[lowZoom];
             var lowRes = this.resolutions[highZoom];
             var res;
-            for(var i=0, len=this.resolutions.length; i<len; ++i) {
+            for(i=0, len=this.resolutions.length; i<len; ++i) {
                 res = this.resolutions[i];
                 if(res >= resolution) {
                     highRes = res;
@@ -1169,7 +1182,7 @@
         } else {
             var diff;
             var minDiff = Number.POSITIVE_INFINITY;
-            for(var i=0, len=this.resolutions.length; i<len; i++) {            
+            for(i=0, len=this.resolutions.length; i<len; i++) {            
                 if (closest) {
                     diff = Math.abs(this.resolutions[i] - resolution);
                     if (diff > minDiff) {
@@ -1199,22 +1212,17 @@
      */
     getLonLatFromViewPortPx: function (viewPortPx) {
         var lonlat = null;
-        if (viewPortPx != null) {
-            var size = this.map.getSize();
-            var center = this.map.getCenter();
-            if (center) {
-                var res  = this.map.getResolution();
-        
-                var delta_x = viewPortPx.x - (size.w / 2);
-                var delta_y = viewPortPx.y - (size.h / 2);
-            
-                lonlat = new OpenLayers.LonLat(center.lon + delta_x * res ,
-                                             center.lat - delta_y * res); 
+        var map = this.map;
+        if (viewPortPx != null && map.minPx) {
+            var res = map.getResolution();
+            var maxExtent = map.getMaxExtent({restricted: true});
+            var lon = (viewPortPx.x - map.minPx.x) * res + maxExtent.left;
+            var lat = (map.minPx.y - viewPortPx.y) * res + maxExtent.top;
+            lonlat = new OpenLayers.LonLat(lon, lat);
 
-                if (this.wrapDateLine) {
-                    lonlat = lonlat.wrapDateLine(this.maxExtent);
-                }
-            } // else { DEBUG STATEMENT }
+            if (this.wrapDateLine) {
+                lonlat = lonlat.wrapDateLine(this.maxExtent);
+            }
         }
         return lonlat;
     },

Modified: sandbox/august/trunk/lib/OpenLayers/Map.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Map.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Map.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -416,6 +416,23 @@
     paddingForPopups : null,
     
     /**
+     * Property: minPx
+     * {<OpenLayers.Pixel>} Lower left of maxExtent in viewport pixel space.
+     *     Used to verify in moveByPx that the new location we're moving to
+     *     is valid. It is also used in the getLonLatFromViewPortPx function
+     *     of Layer.
+     */
+    minPx: null,
+    
+    /**
+     * Property: maxPx
+     * {<OpenLayers.Pixel>} Top right of maxExtent in viewport pixel space.
+     *     Used to verify in moveByPx that the new location we're moving to
+     *     is valid.
+     */
+    maxPx: null,
+    
+    /**
      * Constructor: OpenLayers.Map
      * Constructor for a new OpenLayers.Map instance.  There are two possible
      *     ways to call the map constructor.  See the examples below.
@@ -507,18 +524,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.viewPortDiv, 
-                                            this.EVENT_TYPES, 
-                                            this.fallThrough, 
-                                            {includeXY: true});
         this.updateSize();
         if(this.eventListeners instanceof Object) {
             this.events.on(this.eventListeners);
@@ -591,6 +617,14 @@
         
         // add any initial layers
         if (options && options.layers) {
+            /** 
+             * If you have set options.center, the map center property will be
+             * set at this point.  However, since setCenter has not been caleld,
+             * addLayers gets confused.  So we delete the map center in this 
+             * case.  Because the check below uses options.center, it will
+             * be properly set below.
+             */
+            delete this.center;
             this.addLayers(options.layers);        
             // set center (and optionally zoom)
             if (options.center) {
@@ -634,7 +668,15 @@
 
     /**
      * APIMethod: destroy
-     * Destroy this map
+     * Destroy this map.
+     *    Note that if you are using an application which removes a container
+     *    of the map from the DOM, you need to ensure that you destroy the
+     *    map *before* this happens; otherwise, the page unload handler
+     *    will fail because the DOM elements that map.destroy() wants
+     *    to clean up will be gone. (See 
+     *    http://trac.osgeo.org/openlayers/ticket/2277 for more information).
+     *    This will apply to GeoExt and also to other applications which
+     *    modify the DOM of the container of the OpenLayers Map.
      */
     destroy:function() {
         // if unloadDestroy is null, we've already been destroyed
@@ -697,7 +739,13 @@
      * options - {Object} Hashtable of options to tag to the map
      */
     setOptions: function(options) {
+        var updatePxExtent = this.minPx &&
+            options.restrictedExtent != this.restrictedExtent;
         OpenLayers.Util.extend(this, options);
+        // force recalculation of minPx and maxPx
+        updatePxExtent && this.moveTo(this.getCachedCenter(), this.zoom, {
+            forceZoomChange: true
+        });
     },
 
     /**
@@ -943,7 +991,7 @@
         }
 
         this.events.triggerEvent("addlayer", {layer: layer});
-		layer.events.triggerEvent("added", {map: this, layer: layer});
+        layer.events.triggerEvent("added", {map: this, layer: layer});
         layer.afterAdd();
     },
 
@@ -1018,7 +1066,7 @@
         this.resetLayersZIndex();
 
         this.events.triggerEvent("removelayer", {layer: layer});
-		layer.events.triggerEvent("removed", {map: this, layer: layer})
+        layer.events.triggerEvent("removed", {map: this, layer: layer});
     },
 
     /**
@@ -1115,7 +1163,7 @@
             if (OpenLayers.Util.indexOf(this.layers, newBaseLayer) != -1) {
 
                 // preserve center and scale when changing base layers
-                var center = this.getCenter();
+                var center = this.getCachedCenter();
                 var newResolution = OpenLayers.Util.getResolutionFromScale(
                     this.getScale(), newBaseLayer.units
                 );
@@ -1377,7 +1425,7 @@
                     this.layers[i].onMapResize();                
                 }
     
-                var center = this.getCenter();
+                var center = this.getCachedCenter();
     
                 if (this.baseLayer != null && center != null) {
                     var zoom = this.getZoom();
@@ -1428,7 +1476,7 @@
         var extent = null;
         
         if (center == null) {
-            center = this.getCenter();
+            center = this.getCachedCenter();
         }                
         if (resolution == null) {
             resolution = this.getResolution();
@@ -1468,12 +1516,27 @@
      */
     getCenter: function () {
         var center = null;
-        if (this.center) {
-            center = this.center.clone();
+        var cachedCenter = this.getCachedCenter();
+        if (cachedCenter) {
+            center = cachedCenter.clone();
         }
         return center;
     },
 
+    /**
+     * Method: getCachedCenter
+     *
+     * Returns:
+     * {<OpenLayers.LonLat>}
+     */
+    getCachedCenter: function() {
+        if (!this.center && this.size) {
+            this.center = this.getLonLatFromViewPortPx(
+                new OpenLayers.Pixel(this.size.w / 2, this.size.h / 2)
+            );
+        }
+        return this.center;
+    },
 
     /**
      * APIMethod: getZoom
@@ -1502,22 +1565,29 @@
             animate: true,
             dragging: false
         });
-        // getCenter
-        var centerPx = this.getViewPortPxFromLonLat(this.getCenter());
+        if (options.dragging) {
+            if (dx != 0 || dy != 0) {
+                this.moveByPx(dx, dy);
+            }
+        } else {
+            // getCenter
+            var centerPx = this.getViewPortPxFromLonLat(this.getCachedCenter());
 
-        // adjust
-        var newCenterPx = centerPx.add(dx, dy);
-        
-        // only call setCenter if not dragging or there has been a change
-        if (!options.dragging || !newCenterPx.equals(centerPx)) {
-            var newCenterLonLat = this.getLonLatFromViewPortPx(newCenterPx);
-            if (options.animate) {
-                this.panTo(newCenterLonLat);
-            } else {
-                this.setCenter(newCenterLonLat, null, options.dragging);
-            }    
-        }
+            // adjust
+            var newCenterPx = centerPx.add(dx, dy);
 
+            if (this.dragging || !newCenterPx.equals(centerPx)) {
+                var newCenterLonLat = this.getLonLatFromViewPortPx(newCenterPx);
+                if (options.animate) {
+                    this.panTo(newCenterLonLat);
+                } else {
+                    this.moveTo(newCenterLonLat);
+                    this.dragging = false;
+                    this.events.triggerEvent("moveend");
+                }    
+            }
+        }        
+
    },
    
    /** 
@@ -1526,46 +1596,37 @@
      * If the new lonlat is in the current extent the map will slide smoothly
      * 
      * Parameters:
-     * lonlat - {<OpenLayers.Lonlat>}
+     * lonlat - {<OpenLayers.LonLat>}
      */
     panTo: function(lonlat) {
         if (this.panMethod && this.getExtent().scale(this.panRatio).containsLonLat(lonlat)) {
             if (!this.panTween) {
                 this.panTween = new OpenLayers.Tween(this.panMethod);
             }
-            var center = this.getCenter();
+            var center = this.getCachedCenter();
 
             // center will not change, don't do nothing
-            if (lonlat.lon == center.lon &&
-                lonlat.lat == center.lat) {
+            if (lonlat.equals(center)) {
                 return;
             }
 
-            var from = {
-                lon: center.lon,
-                lat: center.lat
-            };
-            var to = {
-                lon: lonlat.lon,
-                lat: lonlat.lat
-            };
-            this.panTween.start(from, to, this.panDuration, {
+            var from = this.getPixelFromLonLat(center);
+            var to = this.getPixelFromLonLat(lonlat);
+            var vector = { x: to.x - from.x, y: to.y - from.y };
+            var last = { x: 0, y: 0 };
+
+            this.panTween.start( { x: 0, y: 0 }, vector, this.panDuration, {
                 callbacks: {
-                    start: OpenLayers.Function.bind(function(lonlat) {
-                        this.events.triggerEvent("movestart");
+                    eachStep: OpenLayers.Function.bind(function(px) {
+                        var x = px.x - last.x,
+                            y = px.y - last.y;
+                        this.moveByPx(x, y);
+                        last.x = Math.round(px.x);
+                        last.y = Math.round(px.y);
                     }, this),
-                    eachStep: OpenLayers.Function.bind(function(lonlat) {
-                        lonlat = new OpenLayers.LonLat(lonlat.lon, lonlat.lat);
-                        this.moveTo(lonlat, this.zoom, {
-                            'dragging': true,
-                            'noEvent': true
-                        });
-                    }, this),
-                    done: OpenLayers.Function.bind(function(lonlat) {
-                        lonlat = new OpenLayers.LonLat(lonlat.lon, lonlat.lat);
-                        this.moveTo(lonlat, this.zoom, {
-                            'noEvent': true
-                        });
+                    done: OpenLayers.Function.bind(function(px) {
+                        this.moveTo(lonlat);
+                        this.dragging = false;
                         this.events.triggerEvent("moveend");
                     }, this)
                 }
@@ -1590,12 +1651,82 @@
      * TBD: reconsider forceZoomChange in 3.0
      */
     setCenter: function(lonlat, zoom, dragging, forceZoomChange) {
+        this.panTween && this.panTween.stop();             
         this.moveTo(lonlat, zoom, {
             'dragging': dragging,
-            'forceZoomChange': forceZoomChange,
-            'caller': 'setCenter'
+            'forceZoomChange': forceZoomChange
         });
     },
+    
+    /** 
+     * Method: moveByPx
+     * Drag the map by pixels.
+     *
+     * Parameters:
+     * dx - {Number}
+     * dy - {Number}
+     */
+    moveByPx: function(dx, dy) {
+        dx = Math.round(dx);
+        dy = Math.round(dy);
+        var hw = this.size.w / 2;
+        var hh = this.size.h / 2;
+        var x = hw + dx;
+        var y = hh + dy;
+        var wrapDateLine = this.baseLayer.wrapDateLine;
+        var xRestriction = 0;
+        var yRestriction = 0;
+        if (this.restrictedExtent) {
+            xRestriction = hw;
+            yRestriction = hh;
+            // wrapping the date line makes no sense for restricted extents
+            wrapDateLine = false;
+        }
+        var valid = y <= this.maxPx.y - yRestriction &&
+                    y >= this.minPx.y + yRestriction;
+        var minX = this.minPx.x, maxX = this.maxPx.x;
+        if (!wrapDateLine) {
+            valid = valid &&
+                    x <= this.maxPx.x - xRestriction &&
+                    x >= this.minPx.x + xRestriction;
+        }
+        if (valid) {
+            if (!this.dragging) {
+                this.dragging = true;
+                this.events.triggerEvent("movestart");
+            }
+            this.center = null;
+            if (dx) {
+                this.layerContainerDiv.style.left =
+                    parseInt(this.layerContainerDiv.style.left) - dx + "px";
+                this.minPx.x -= dx;
+                this.maxPx.x -= dx;
+                if (wrapDateLine) {
+                    if (this.maxPx.x > maxX) {
+                        this.maxPx.x -= (maxX - minX);
+                    };
+                    if (this.minPx.x < minX) {
+                        this.minPx.x += (maxX - minX);
+                    };
+                }
+            }
+            if (dy) {
+                this.layerContainerDiv.style.top =
+                    parseInt(this.layerContainerDiv.style.top) - dy + "px";
+                this.minPx.y -= dy;
+                this.maxPx.y -= dy;
+            }
+            var layer, i, len;
+            for (i=0, len=this.layers.length; i<len; ++i) {
+                layer = this.layers[i];
+                if (layer.visibility) {
+                    layer.moveByPx(dx, dy);
+                    layer.events.triggerEvent("move");
+                }
+            }
+            this.events.triggerEvent("move");
+        }
+    },
 
     /**
      * Method: moveTo
@@ -1616,24 +1747,19 @@
             }
         }
         // dragging is false by default
-        var dragging = options.dragging;
+        var dragging = options.dragging || this.dragging;
         // forceZoomChange is false by default
         var forceZoomChange = options.forceZoomChange;
-        // noEvent is false by default
-        var noEvent = options.noEvent;
 
-        if (this.panTween && options.caller == "setCenter") {
-            this.panTween.stop();
-        }    
-             
-        if (!this.center && !this.isValidLonLat(lonlat)) {
+        if (!this.getCachedCenter() && !this.isValidLonLat(lonlat)) {
             lonlat = this.maxExtent.getCenterLonLat();
+            this.center = lonlat.clone();
         }
 
         if(this.restrictedExtent != null) {
             // In 3.0, decide if we want to change interpretation of maxExtent.
             if(lonlat == null) { 
-                lonlat = this.getCenter(); 
+                lonlat = this.center; 
             }
             if(zoom == null) { 
                 zoom = this.getZoom(); 
@@ -1671,16 +1797,12 @@
         var centerChanged = (this.isValidLonLat(lonlat)) && 
                             (!lonlat.equals(this.center));
 
-
         // if neither center nor zoom will change, no need to do anything
-        if (zoomChanged || centerChanged || !dragging) {
+        if (zoomChanged || centerChanged || dragging) {
+            dragging || this.events.triggerEvent("movestart");
 
-            if (!this.dragging && !noEvent) {
-                this.events.triggerEvent("movestart");
-            }
-
             if (centerChanged) {
-                if ((!zoomChanged) && (this.center)) { 
+                if (!zoomChanged && this.center) { 
                     // if zoom hasnt changed, just slide layerContainer
                     //  (must be done before setting this.center to new value)
                     this.centerLayerContainer(lonlat);
@@ -1688,16 +1810,28 @@
                 this.center = lonlat.clone();
             }
 
+            var res = zoomChanged ?
+                this.getResolutionForZoom(zoom) : this.getResolution();
             // (re)set the layerContainerDiv's location
-            if ((zoomChanged) || (this.layerContainerOrigin == null)) {
-                this.layerContainerOrigin = this.center.clone();
+            if (zoomChanged || this.layerContainerOrigin == null) {
+                this.layerContainerOrigin = this.getCachedCenter();
                 this.layerContainerDiv.style.left = "0px";
                 this.layerContainerDiv.style.top  = "0px";
+                var maxExtent = this.getMaxExtent({restricted: true});
+                var maxExtentCenter = maxExtent.getCenterLonLat();
+                var lonDelta = this.center.lon - maxExtentCenter.lon;
+                var latDelta = maxExtentCenter.lat - this.center.lat;
+                var extentWidth = Math.round(maxExtent.getWidth() / res);
+                var extentHeight = Math.round(maxExtent.getHeight() / res);
+                var left = (this.size.w - extentWidth) / 2 - lonDelta / res;
+                var top = (this.size.h - extentHeight) / 2 - latDelta / res;
+                this.minPx = new OpenLayers.Pixel(left, top);
+                this.maxPx = new OpenLayers.Pixel(left + extentWidth, top + extentHeight);
             }
 
             if (zoomChanged) {
                 this.zoom = zoom;
-                this.resolution = this.getResolutionForZoom(zoom);
+                this.resolution = res;
                 // zoom level has changed, increment viewRequestID.
                 this.viewRequestID++;
             }    
@@ -1707,14 +1841,10 @@
             //send the move call to the baselayer and all the overlays    
 
             if(this.baseLayer.visibility) {
-                this.baseLayer.moveTo(bounds, zoomChanged, dragging);
-                if(dragging) {
-                    this.baseLayer.events.triggerEvent("move");
-                } else {
-                    this.baseLayer.events.triggerEvent("moveend",
-                        {"zoomChanged": zoomChanged}
-                    );
-                }
+                this.baseLayer.moveTo(bounds, zoomChanged, options.dragging);
+                options.dragging || this.baseLayer.events.triggerEvent(
+                    "moveend", {zoomChanged: zoomChanged}
+                );
             }
             
             bounds = this.baseLayer.getExtent();
@@ -1737,38 +1867,25 @@
                         });
                     }
                     if (inRange && layer.visibility) {
-                        layer.moveTo(bounds, zoomChanged, dragging);
-                        if(dragging) {
-                            layer.events.triggerEvent("move");
-                        } else {
-                            layer.events.triggerEvent("moveend",
-                                {"zoomChanged": zoomChanged}
-                            );
-                        }
+                        layer.moveTo(bounds, zoomChanged, options.dragging);
+                        options.dragging || layer.events.triggerEvent(
+                            "moveend", {zoomChanged: zoomChanged}
+                        );
                     }
                 }                
             }
             
+            this.events.triggerEvent("move");
+            dragging || this.events.triggerEvent("moveend");
+
             if (zoomChanged) {
                 //redraw popups
                 for (var i=0, len=this.popups.length; i<len; i++) {
                     this.popups[i].updatePosition();
                 }
-            }    
-            
-            this.events.triggerEvent("move");
-    
-            if (zoomChanged) { this.events.triggerEvent("zoomend"); }
+                this.events.triggerEvent("zoomend");
+            }
         }
-
-        // even if nothing was done, we want to notify of this
-        if (!dragging && !noEvent) {
-            this.events.triggerEvent("moveend");
-        }
-        
-        // Store the map dragging state for later use
-        this.dragging = !!dragging; 
-
     },
 
     /** 
@@ -1779,14 +1896,23 @@
      * lonlat - {<OpenLayers.LonLat>}
      */
     centerLayerContainer: function (lonlat) {
-
         var originPx = this.getViewPortPxFromLonLat(this.layerContainerOrigin);
         var newPx = this.getViewPortPxFromLonLat(lonlat);
 
         if ((originPx != null) && (newPx != null)) {
-            this.layerContainerDiv.style.left = Math.round(originPx.x - newPx.x) + "px";
-            this.layerContainerDiv.style.top  = Math.round(originPx.y - newPx.y) + "px";
-        }
+            var oldLeft = parseInt(this.layerContainerDiv.style.left);
+            var oldTop = parseInt(this.layerContainerDiv.style.top);
+            var newLeft = Math.round(originPx.x - newPx.x);
+            var newTop = Math.round(originPx.y - newPx.y);
+            this.layerContainerDiv.style.left = newLeft + "px";
+            this.layerContainerDiv.style.top  = newTop + "px";
+            var dx = oldLeft - newLeft;
+            var dy = oldTop - newTop;
+            this.minPx.x -= dx;
+            this.maxPx.x -= dx;
+            this.minPx.y -= dy;
+            this.maxPx.y -= dy;
+        }        
     },
 
     /**
@@ -2105,8 +2231,6 @@
     /**
      * APIMethod: zoomIn
      * 
-     * Parameters:
-     * zoom - {int}
      */
     zoomIn: function() {
         this.zoomTo(this.getZoom() + 1);
@@ -2115,8 +2239,6 @@
     /**
      * APIMethod: zoomOut
      * 
-     * Parameters:
-     * zoom - {int}
      */
     zoomOut: function() {
         this.zoomTo(this.getZoom() - 1);
@@ -2200,7 +2322,7 @@
         var size = this.getSize();
         var w_deg = size.w * res;
         var h_deg = size.h * res;
-        var center = this.getCenter();
+        var center = this.getCachedCenter();
 
         var extent = new OpenLayers.Bounds(center.lon - w_deg / 2,
                                            center.lat - h_deg / 2,
@@ -2312,8 +2434,8 @@
      * {<OpenLayers.Size>} The geodesic size of the pixel in kilometers.
      */
     getGeodesicPixelSize: function(px) {
-        var lonlat = px ? this.getLonLatFromPixel(px) : (this.getCenter() ||
-            new OpenLayers.LonLat(0, 0));
+        var lonlat = px ? this.getLonLatFromPixel(px) : (
+            this.getCachedCenter() || new OpenLayers.LonLat(0, 0));
         var res = this.getResolution();
         var left = lonlat.add(-res / 2, 0);
         var right = lonlat.add(res / 2, 0);

Modified: sandbox/august/trunk/lib/OpenLayers/Popup.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Popup.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Popup.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -431,7 +431,7 @@
      * Makes the popup visible.
      */
     show: function() {
-        OpenLayers.Element.show(this.div);
+        this.div.style.display = '';
 
         if (this.panMapIfOutOfView) {
             this.panIntoView();
@@ -443,7 +443,7 @@
      * Makes the popup invisible.
      */
     hide: function() {
-        OpenLayers.Element.hide(this.div);
+        this.div.style.display = 'none';
     },
 
     /**

Modified: sandbox/august/trunk/lib/OpenLayers/Projection.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Projection.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Projection.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -30,7 +30,7 @@
     
     /**
      * Property: titleRegEx
-     * {RegEx} regular expression to strip the title from a proj4js definition
+     * {RegExp} regular expression to strip the title from a proj4js definition
      */
     titleRegEx: /\+title=[^\+]*/,
 
@@ -174,10 +174,10 @@
  *     the input point is transformed in place.
  * 
  * Parameters:
- * point - {{OpenLayers.Geometry.Point> | Object} An object with x and y
+ * point - {<OpenLayers.Geometry.Point> | Object} An object with x and y
  *     properties representing coordinates in those dimensions.
- * sourceProj - {OpenLayers.Projection} Source map coordinate system
- * destProj - {OpenLayers.Projection} Destination map coordinate system
+ * source - {OpenLayers.Projection} Source map coordinate system
+ * dest - {OpenLayers.Projection} Destination map coordinate system
  *
  * Returns:
  * point - {object} A transformed coordinate.  The original point is modified.

Modified: sandbox/august/trunk/lib/OpenLayers/Protocol/HTTP.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Protocol/HTTP.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Protocol/HTTP.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -14,6 +14,11 @@
  */
 
 /**
+ * TODO: remove this dependency in 3.0
+ * @requires OpenLayers/Protocol/SimpleFilterSerializer.js
+ */
+
+/**
  * Class: OpenLayers.Protocol.HTTP
  * A basic HTTP protocol for vector layers.  Create a new instance with the
  *     <OpenLayers.Protocol.HTTP> constructor.
@@ -109,6 +114,12 @@
         this.params = {};
         this.headers = {};
         OpenLayers.Protocol.prototype.initialize.apply(this, arguments);
+
+        if (!this.filterToParams && OpenLayers.Protocol.simpleFilterSerializer) {
+            this.filterToParams = OpenLayers.Function.bind(
+                OpenLayers.Protocol.simpleFilterSerializer, this
+            );
+        }
     },
     
     /**
@@ -120,8 +131,23 @@
         this.headers = null;
         OpenLayers.Protocol.prototype.destroy.apply(this);
     },
-   
+
     /**
+     * APIMethod: filterToParams
+     * Optional method to translate an <OpenLayers.Filter> object into an object
+     *     that can be serialized as request query string provided.  If a custom
+     *     method is not provided, the filter will be serialized using the 
+     *     <OpenLayers.Protocol.simpleFilterSerializer> method.
+     *
+     * Parameters:
+     * filter - {<OpenLayers.Filter>} filter to convert.
+     * params - {Object} The parameters object.
+     *
+     * Returns:
+     * {Object} The resulting parameters object.
+     */
+
+    /**
      * APIMethod: read
      * Construct a request for reading new features.
      *
@@ -148,9 +174,10 @@
         options = OpenLayers.Util.applyDefaults(options, this.options);
         options.params = OpenLayers.Util.applyDefaults(
             options.params, this.options.params);
-        if(options.filter) {
+        if (options.filter && this.filterToParams) {
             options.params = this.filterToParams(
-                options.filter, options.params);
+                options.filter, options.params
+            );
         }
         var readWithPOST = (options.readWithPOST !== undefined) ?
                            options.readWithPOST : this.readWithPOST;
@@ -190,124 +217,6 @@
     },
 
     /**
-     * Method: filterToParams
-     * Convert an <OpenLayers.Filter> object to parameters.
-     *
-     * Parameters:
-     * filter - {OpenLayers.Filter} filter to convert.
-     * params - {Object} The parameters object.
-     *
-     * Returns:
-     * {Object} The resulting parameters object.
-     */
-    filterToParams: function(filter, params) {
-        params = params || {};
-        var className = filter.CLASS_NAME;
-        var filterType = className.substring(className.lastIndexOf(".") + 1);
-        switch(filterType) {
-            case "Spatial":
-                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;
-                        // no break here
-                    case OpenLayers.Filter.Spatial.WITHIN:
-                        params.lon = filter.value.x;
-                        params.lat = filter.value.y;
-                        break;
-                    default:
-                        OpenLayers.Console.warn(
-                            "Unknown spatial filter type " + filter.type);
-                }
-                break;
-            case "Comparison":
-                var op = OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR[filter.type];
-                if(op !== undefined) {
-                    var value = filter.value;
-                    if(filter.type == OpenLayers.Filter.Comparison.LIKE) {
-                        value = this.regex2value(value);
-                        if(this.wildcarded) {
-                            value = "%" + value + "%";
-                        }
-                    }
-                    params[filter.property + "__" + op] = value;
-                    params.queryable = params.queryable || [];
-                    params.queryable.push(filter.property);
-                } else {
-                    OpenLayers.Console.warn(
-                        "Unknown comparison filter type " + filter.type);
-                }
-                break;
-            case "Logical":
-                if(filter.type === OpenLayers.Filter.Logical.AND) {
-                    for(var i=0,len=filter.filters.length; i<len; i++) {
-                        params = this.filterToParams(filter.filters[i], params);
-                    }
-                } else {
-                    OpenLayers.Console.warn(
-                        "Unsupported logical filter type " + filter.type);
-                }
-                break;
-            default:
-                OpenLayers.Console.warn("Unknown filter type " + filterType);
-        }
-        return params;
-    },
-
-    /**
-     * Method: regex2value
-     * Convert the value from a regular expression string to a LIKE/ILIKE
-     * string known to the web service.
-     *
-     * Parameters:
-     * value - {String} The regex string.
-     *
-     * Returns:
-     * {String} The converted string.
-     */
-    regex2value: function(value) {
-
-        // highly sensitive!! Do not change this without running the
-        // Protocol/HTTP.html unit tests
-
-        // convert % to \%
-        value = value.replace(/%/g, "\\%");
-
-        // convert \\. to \\_ (\\.* occurences converted later)
-        value = value.replace(/\\\\\.(\*)?/g, function($0, $1) {
-            return $1 ? $0 : "\\\\_";
-        });
-
-        // convert \\.* to \\%
-        value = value.replace(/\\\\\.\*/g, "\\\\%");
-
-        // convert . to _ (\. and .* occurences converted later)
-        value = value.replace(/(\\)?\.(\*)?/g, function($0, $1, $2) {
-            return $1 || $2 ? $0 : "_";
-        });
-
-        // convert .* to % (\.* occurnces converted later)
-        value = value.replace(/(\\)?\.\*/g, function($0, $1) {
-            return $1 ? $0 : "%";
-        });
-
-        // convert \. to .
-        value = value.replace(/\\\./g, ".");
-
-        // replace \* with * (watching out for \\*)
-        value = value.replace(/(\\)?\\\*/g, function($0, $1) {
-            return $1 ? $0 : "*";
-        });
-
-        return value;
-    },
-
-    /**
      * APIMethod: create
      * Construct a request for writing newly created features.
      *
@@ -648,21 +557,3 @@
 
     CLASS_NAME: "OpenLayers.Protocol.HTTP" 
 });
-
-/**
- * Property: OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR
- * {Object} A private class-level property mapping the
- *     OpenLayers.Filter.Comparison types to the operation
- *     strings of the protocol.
- */
-(function() {
-    var o = OpenLayers.Protocol.HTTP.COMP_TYPE_TO_OP_STR = {};
-    o[OpenLayers.Filter.Comparison.EQUAL_TO]                 = "eq";
-    o[OpenLayers.Filter.Comparison.NOT_EQUAL_TO]             = "ne";
-    o[OpenLayers.Filter.Comparison.LESS_THAN]                = "lt";
-    o[OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO]    = "lte";
-    o[OpenLayers.Filter.Comparison.GREATER_THAN]             = "gt";
-    o[OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO] = "gte";
-    o[OpenLayers.Filter.Comparison.LIKE]                     = "ilike";
-})();
-

Copied: sandbox/august/trunk/lib/OpenLayers/Protocol/Script.js (from rev 11704, trunk/openlayers/lib/OpenLayers/Protocol/Script.js)
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Protocol/Script.js	                        (rev 0)
+++ sandbox/august/trunk/lib/OpenLayers/Protocol/Script.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,363 @@
+/* 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/Protocol.js
+ * @requires OpenLayers/Feature/Vector.js
+ * @requires OpenLayers/Format/GeoJSON.js
+ */
+
+/**
+ * Class: OpenLayers.Protocol.Script
+ * A basic Script protocol for vector layers.  Create a new instance with the
+ *     <OpenLayers.Protocol.Script> constructor.  A script protocol is used to
+ *     get around the same origin policy.  It works with services that return
+ *     JSONP - that is, JSON wrapped in a client-specified callback.  The
+ *     protocol handles fetching and parsing of feature data and sends parsed
+ *     features to the <callback> configured with the protocol.  The protocol
+ *     expects features serialized as GeoJSON by default, but can be configured
+ *     to work with other formats by setting the <format> property.
+ *
+ * Inherits from:
+ *  - <OpenLayers.Protocol>
+ */
+OpenLayers.Protocol.Script = OpenLayers.Class(OpenLayers.Protocol, {
+
+    /**
+     * APIProperty: url
+     * {String} Service URL.  The service is expected to return serialized 
+     *     features wrapped in a named callback (where the callback name is
+     *     generated by this protocol).
+     *     Read-only, set through the options passed to the constructor.
+     */
+    url: null,
+
+    /**
+     * APIProperty: params
+     * {Object} Query string parameters to be appended to the URL.
+     *     Read-only, set through the options passed to the constructor.
+     *     Example: {maxFeatures: 50}
+     */
+    params: null,
+    
+    /**
+     * APIProperty: callback
+     * {Object} Function to be called when the <read> operation completes.
+     */
+    callback: null,
+
+    /**
+     * APIProperty: scope
+     * {Object} Optional ``this`` object for the callback. Read-only, set 
+     *     through the options passed to the constructor.
+     */
+    scope: null,
+
+    /**
+     * APIProperty: format
+     * {<OpenLayers.Format>} Format for parsing features.  Default is an 
+     *     <OpenLayers.Format.GeoJSON> format.  If an alternative is provided,
+     *     the format's read method must take an object and return an array
+     *     of features.
+     */
+    format: null,
+
+    /**
+     * APIProperty: callbackKey
+     * {String} The name of the query string parameter that the service 
+     *     recognizes as the callback identifier.  Default is "callback".
+     *     This key is used to generate the URL for the script.  For example
+     *     setting <callbackKey> to "myCallback" would result in a URL like 
+     *     http://example.com/?myCallback=...
+     */
+    callbackKey: "callback",
+
+    /**
+     * APIProperty: callbackPrefix
+     * {String} Where a service requires that the callback query string 
+     *     parameter value is prefixed by some string, this value may be set.
+     *     For example, setting <callbackPrefix> to "foo:" would result in a
+     *     URL like http://example.com/?callback=foo:...  Default is "".
+     */
+    callbackPrefix: "",
+
+    /**
+     * Property: pendingRequests
+     * {Object} References all pending requests.  Property names are script 
+     *     identifiers and property values are script elements.
+     */
+    pendingRequests: null,
+
+    /**
+     * Constructor: OpenLayers.Protocol.Script
+     * A class for giving layers generic Script protocol.
+     *
+     * Parameters:
+     * options - {Object} Optional object whose properties will be set on the
+     *     instance.
+     *
+     * Valid options include:
+     * url - {String}
+     * params - {Object}
+     * callback - {Function}
+     * scope - {Object}
+     */
+    initialize: function(options) {
+        options = options || {};
+        this.params = {};
+        this.pendingRequests = {};
+        OpenLayers.Protocol.prototype.initialize.apply(this, arguments);
+        if (!this.format) {
+            this.format = new OpenLayers.Format.GeoJSON();
+        }
+
+        if (!this.filterToParams && OpenLayers.Protocol.simpleFilterSerializer) {
+            this.filterToParams = OpenLayers.Function.bind(
+                OpenLayers.Protocol.simpleFilterSerializer, this
+            );
+        }
+    },
+    
+    /**
+     * APIMethod: read
+     * Construct a request for reading new features.
+     *
+     * Parameters:
+     * options - {Object} Optional object for configuring the request.
+     *     This object is modified and should not be reused.
+     *
+     * Valid options:
+     * url - {String} Url for the request.
+     * params - {Object} Parameters to get serialized as a query string.
+     * filter - {<OpenLayers.Filter>} Filter to get serialized as a
+     *     query string.
+     *
+     * Returns:
+     * {<OpenLayers.Protocol.Response>} A response object, whose "priv" property
+     *     references the injected script.  This object is also passed to the
+     *     callback function when the request completes, its "features" property
+     *     is then populated with the features received from the server.
+     */
+    read: function(options) {
+        OpenLayers.Protocol.prototype.read.apply(this, arguments);
+        options = OpenLayers.Util.applyDefaults(options, this.options);
+        options.params = OpenLayers.Util.applyDefaults(
+            options.params, this.options.params
+        );
+        if (options.filter && this.filterToParams) {
+            options.params = this.filterToParams(
+                options.filter, options.params
+            );
+        }
+        var response = new OpenLayers.Protocol.Response({requestType: "read"});
+        var request = this.createRequest(
+            options.url, 
+            options.params, 
+            OpenLayers.Function.bind(function(data) {
+                response.data = data;
+                this.handleRead(response, options);
+            }, this)
+        );
+        response.priv = request;
+        return response;
+    },
+
+    /** 
+     * APIMethod: filterToParams 
+     * Optional method to translate an <OpenLayers.Filter> object into an object 
+     *     that can be serialized as request query string provided.  If a custom 
+     *     method is not provided, any filter will not be serialized. 
+     * 
+     * Parameters: 
+     * filter - {<OpenLayers.Filter>} filter to convert. 
+     * params - {Object} The parameters object. 
+     * 
+     * Returns: 
+     * {Object} The resulting parameters object. 
+     */
+
+    /** 
+     * Method: createRequest
+     * Issues a request for features by creating injecting a script in the 
+     *     document head.
+     *
+     * Parameters:
+     * url - {String} Service URL.
+     * params - {Object} Query string parameters.
+     * callback - {Function} Callback to be called with resulting data.
+     *
+     * Returns:
+     * {HTMLScriptElement} The script pending execution.
+     */
+    createRequest: function(url, params, callback) {
+        var id = OpenLayers.Protocol.Script.register(callback);
+        var name = "OpenLayers.Protocol.Script.getCallback(" + id + ")";
+        params = OpenLayers.Util.extend({}, params);
+        params[this.callbackKey] = this.callbackPrefix + name;
+        url = OpenLayers.Util.urlAppend(
+            url, OpenLayers.Util.getParameterString(params)
+        );
+        var script = document.createElement("script");
+        script.type = "text/javascript";
+        script.src = url;
+        script.id = "OpenLayers_Protocol_Script_" + id;
+        this.pendingRequests[script.id] = script;
+        var head = document.getElementsByTagName("head")[0];
+        head.appendChild(script);
+        return script;
+    },
+    
+    /** 
+     * Method: destroyRequest
+     * Remove a script node associated with a response from the document.  Also
+     *     unregisters the callback and removes the script from the 
+     *     <pendingRequests> object.
+     *
+     * Parameters:
+     * script - {HTMLScriptElement}
+     */
+    destroyRequest: function(script) {
+        OpenLayers.Protocol.Script.unregister(script.id.split("_").pop());
+        delete this.pendingRequests[script.id];
+        if (script.parentNode) {
+            script.parentNode.removeChild(script);
+        }
+    },
+
+    /**
+     * Method: handleRead
+     * Individual callbacks are created for read, create and update, should
+     *     a subclass need to override each one separately.
+     *
+     * Parameters:
+     * response - {<OpenLayers.Protocol.Response>} The response object to pass to
+     *     the user callback.
+     * options - {Object} The user options passed to the read call.
+     */
+    handleRead: function(response, options) {
+        this.handleResponse(response, options);
+    },
+
+    /**
+     * Method: handleResponse
+     * Called by CRUD specific handlers.
+     *
+     * Parameters:
+     * response - {<OpenLayers.Protocol.Response>} The response object to pass to
+     *     any user callback.
+     * options - {Object} The user options passed to the create, read, update,
+     *     or delete call.
+     */
+    handleResponse: function(response, options) {
+        if (options.callback) {
+            if (response.data) {
+                response.features = this.parseFeatures(response.data);
+                response.code = OpenLayers.Protocol.Response.SUCCESS;
+            } else {
+                response.code = OpenLayers.Protocol.Response.FAILURE;
+            }
+            this.destroyRequest(response.priv);
+            options.callback.call(options.scope, response);
+        }
+    },
+
+    /**
+     * Method: parseFeatures
+     * Read Script response body and return features.
+     *
+     * Parameters:
+     * data - {Object} The data sent to the callback function by the server.
+     *
+     * Returns:
+     * {Array({<OpenLayers.Feature.Vector>})} or
+     *     {<OpenLayers.Feature.Vector>} Array of features or a single feature.
+     */
+    parseFeatures: function(data) {
+        return this.format.read(data);
+    },
+
+    /**
+     * APIMethod: abort
+     * Abort an ongoing request.  If no response is provided, all pending 
+     *     requests will be aborted.
+     *
+     * Parameters:
+     * response - {<OpenLayers.Protocol.Response>} The response object returned
+     *     from a <read> request.
+     */
+    abort: function(response) {
+        if (response) {
+            this.destroyRequest(response.priv);
+        } else {
+            for (var key in this.pendingRequests) {
+                this.destroyRequest(this.pendingRequests[key]);
+            }
+        }
+    },
+    
+    /**
+     * APIMethod: destroy
+     * Clean up the protocol.
+     */
+    destroy: function() {
+        this.abort();
+        delete this.params;
+        delete this.format;
+        OpenLayers.Protocol.prototype.destroy.apply(this);
+    },
+
+    CLASS_NAME: "OpenLayers.Protocol.Script" 
+});
+
+(function() {
+    var o = OpenLayers.Protocol.Script;
+    var counter = 0;
+    var registry = {};
+    
+    /**
+     * Function: OpenLayers.Protocol.Script.register
+     * Register a callback for a newly created script.
+     *
+     * Parameters:
+     * callback: {Function} The callback to be executed when the newly added
+     *     script loads.  This callback will be called with a single argument
+     *     that is the JSON returned by the service.
+     *
+     * Returns:
+     * {Number} An identifier for retreiving the registered callback.
+     */
+    o.register = function(callback) {
+        var id = ++counter;
+        registry[id] = callback;
+        return id;
+    };
+    
+    /**
+     * Function: OpenLayers.Protocol.Script.unregister
+     * Unregister a callback previously registered with the register function.
+     *
+     * Parameters:
+     * id: {Number} The identifer returned by the register function.
+     */
+    o.unregister = function(id) {
+        delete registry[id];
+    };
+    
+    /**
+     * Function: OpenLayers.Protocol.Script.getCallback
+     * Retreive and unregister a callback.  A call to this function is the "P" 
+     * in JSONP.  For example, a script may be added with a src attribute 
+     * http://example.com/features.json?callback=OpenLayers.Protocol.Script.getCallback(1)
+     *
+     * Parameters:
+     * id: {Number} The identifer returned by the register function.
+     */
+    o.getCallback = function(id) {
+        var callback = registry[id];
+        o.unregister(id);
+        return callback;
+    };
+})();
+

Copied: sandbox/august/trunk/lib/OpenLayers/Protocol/SimpleFilterSerializer.js (from rev 11704, trunk/openlayers/lib/OpenLayers/Protocol/SimpleFilterSerializer.js)
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Protocol/SimpleFilterSerializer.js	                        (rev 0)
+++ sandbox/august/trunk/lib/OpenLayers/Protocol/SimpleFilterSerializer.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,145 @@
+/* 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/Protocol.js
+ */
+
+/**
+ * Function: OpenLayers.Protocol.simpleFilterSerializer
+ * Serialize an <OpenLayers.Filter> objects using the "simple" filter syntax for 
+ *     query string parameters.  This function must be called as a method of
+ *     a protocol instance.
+ *
+ * Parameters:
+ * filter - {<OpenLayers.Filter>} filter to convert.
+ * params - {Object} The parameters object.
+ *
+ * Returns:
+ * {Object} The resulting parameters object.
+ */
+OpenLayers.Protocol.simpleFilterSerializer = (function() {
+
+    /** 
+     * Map the OpenLayers.Filter.Comparison types to the operation strings of 
+     * the protocol.
+     */
+    var cmpToStr = {};
+    cmpToStr[OpenLayers.Filter.Comparison.EQUAL_TO] = "eq";
+    cmpToStr[OpenLayers.Filter.Comparison.NOT_EQUAL_TO] = "ne";
+    cmpToStr[OpenLayers.Filter.Comparison.LESS_THAN] = "lt";
+    cmpToStr[OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO] = "lte";
+    cmpToStr[OpenLayers.Filter.Comparison.GREATER_THAN] = "gt";
+    cmpToStr[OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO] = "gte";
+    cmpToStr[OpenLayers.Filter.Comparison.LIKE] = "ilike";
+
+    /**
+     * Function: regex2value
+     * Convert the value from a regular expression string to a LIKE/ILIKE
+     * string known to the web service.
+     *
+     * Parameters:
+     * value - {String} The regex string.
+     *
+     * Returns:
+     * {String} The converted string.
+     */
+    function regex2value(value) {
+
+        // highly sensitive!! Do not change this without running the
+        // Protocol/HTTP.html unit tests
+
+        // convert % to \%
+        value = value.replace(/%/g, "\\%");
+
+        // convert \\. to \\_ (\\.* occurences converted later)
+        value = value.replace(/\\\\\.(\*)?/g, function($0, $1) {
+            return $1 ? $0 : "\\\\_";
+        });
+
+        // convert \\.* to \\%
+        value = value.replace(/\\\\\.\*/g, "\\\\%");
+
+        // convert . to _ (\. and .* occurences converted later)
+        value = value.replace(/(\\)?\.(\*)?/g, function($0, $1, $2) {
+            return $1 || $2 ? $0 : "_";
+        });
+
+        // convert .* to % (\.* occurnces converted later)
+        value = value.replace(/(\\)?\.\*/g, function($0, $1) {
+            return $1 ? $0 : "%";
+        });
+
+        // convert \. to .
+        value = value.replace(/\\\./g, ".");
+
+        // replace \* with * (watching out for \\*)
+        value = value.replace(/(\\)?\\\*/g, function($0, $1) {
+            return $1 ? $0 : "*";
+        });
+
+        return value;
+    }
+
+    return function simpleFilterSerializer(filter, params) {
+        params = params || {};
+        var className = filter.CLASS_NAME;
+        var filterType = className.substring(className.lastIndexOf(".") + 1);
+        switch (filterType) {
+            case "Spatial":
+                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;
+                        // no break here
+                    case OpenLayers.Filter.Spatial.WITHIN:
+                        params.lon = filter.value.x;
+                        params.lat = filter.value.y;
+                        break;
+                    default:
+                        OpenLayers.Console.warn(
+                            "Unknown spatial filter type " + filter.type);
+                }
+                break;
+            case "Comparison":
+                var op = cmpToStr[filter.type];
+                if (op !== undefined) {
+                    var value = filter.value;
+                    if (filter.type == OpenLayers.Filter.Comparison.LIKE) {
+                        value = regex2value(value);
+                        if (this.wildcarded) {
+                            value = "%" + value + "%";
+                        }
+                    }
+                    params[filter.property + "__" + op] = value;
+                    params.queryable = params.queryable || [];
+                    params.queryable.push(filter.property);
+                } else {
+                    OpenLayers.Console.warn(
+                        "Unknown comparison filter type " + filter.type);
+                }
+                break;
+            case "Logical":
+                if (filter.type === OpenLayers.Filter.Logical.AND) {
+                    for (var i=0,len=filter.filters.length; i<len; i++) {
+                        params = this.filterToParams(filter.filters[i], params);
+                    }
+                } else {
+                    OpenLayers.Console.warn(
+                        "Unsupported logical filter type " + filter.type);
+                }
+                break;
+            default:
+                OpenLayers.Console.warn("Unknown filter type " + filterType);
+        }
+        return params;
+    };
+    
+})();

Modified: sandbox/august/trunk/lib/OpenLayers/Protocol/WFS/v1.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Protocol/WFS/v1.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Protocol/WFS/v1.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -149,6 +149,10 @@
      *     format's read method (that is only about reading transaction
      *     responses).
      *
+     * Parameters:
+     * options - {Object} Options for the read operation, in addition to the
+     *     options set on the instance (options set here will take precedence).
+     *
      * To use a configured protocol to get e.g. a WFS hit count, applications
      * could do the following:
      *
@@ -162,6 +166,16 @@
      *     }
      * });
      * (end)
+     *
+     * To limit the attributes returned by the GetFeature request, applications
+     * can use the propertyNames option to specify the properties to include in
+     * the response:
+     *
+     * (code)
+     * protocol.read({
+     *     propertyNames: ["DURATION", "INTENSITY"]
+     * });
+     * (end)
      */
     read: function(options) {
         OpenLayers.Protocol.prototype.read.apply(this, arguments);
@@ -183,6 +197,30 @@
 
         return response;
     },
+
+    /**
+     * APIMethod: setFeatureType
+     * Change the feature type on the fly.
+     *
+     * Parameters:
+     * featureType - {String} Local (without prefix) feature typeName.
+     */
+    setFeatureType: function(featureType) {
+        this.featureType = featureType;
+        this.format.featureType = featureType;
+    },
+ 
+    /**
+     * APIMethod: setGeometryName
+     * Sets the geometryName option after instantiation.
+     *
+     * Parameters:
+     * geometryName - {String} Name of geometry attribute.
+     */
+    setGeometryName: function(geometryName) {
+        this.geometryName = geometryName;
+        this.format.geometryName = geometryName;
+    },
     
     /**
      * Method: handleRead
@@ -250,7 +288,7 @@
      *     is used.
      *
      * Parameters:
-     * features - {Array(<OpenLayers.Feature.Vector>}
+     * features - {Array(<OpenLayers.Feature.Vector>)}
      *
      * Returns:
      * {<OpenLayers.Protocol.Response>} A response object with a features

Modified: sandbox/august/trunk/lib/OpenLayers/Renderer/Elements.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Renderer/Elements.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Renderer/Elements.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -390,7 +390,7 @@
     BACKGROUND_ID_SUFFIX: "_background",
     
     /**
-     * Constant: BACKGROUND_ID_SUFFIX
+     * Constant: LABEL_ID_SUFFIX
      * {String}
      */
     LABEL_ID_SUFFIX: "_label",

Copied: sandbox/august/trunk/lib/OpenLayers/Renderer/NG.js (from rev 11704, trunk/openlayers/lib/OpenLayers/Renderer/NG.js)
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Renderer/NG.js	                        (rev 0)
+++ sandbox/august/trunk/lib/OpenLayers/Renderer/NG.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,141 @@
+/* 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/Renderer/Elements.js
+ */
+
+/**
+ * Class: OpenLayers.Renderer.NG
+ * 
+ * Inherits from:
+ *  - <OpenLayers.Renderer.Elements>
+ */
+OpenLayers.Renderer.NG = OpenLayers.Class(OpenLayers.Renderer.Elements, {
+    
+    /**
+     * Constant: labelNodeType
+     * {String} The node type for text label containers. To be defined by
+     * subclasses.
+     */
+    labelNodeType: null,
+    
+    /**
+     * Constructor: OpenLayers.Renderer.NG
+     * 
+     * Parameters:
+     * containerID - {String}
+     * options - {Object} options for this renderer. Supported options are:
+     *     * yOrdering - {Boolean} Whether to use y-ordering
+     *     * zIndexing - {Boolean} Whether to use z-indexing. Will be ignored
+     *         if yOrdering is set to true.
+     */
+    initialize: function(containerID, options) {
+        OpenLayers.Renderer.Elements.prototype.initialize.apply(this, arguments);
+    },
+
+    /**
+     * Method: destroy
+     */
+    destroy: function() {
+        OpenLayers.Renderer.Elements.prototype.destroy.apply(this, arguments);
+    },
+
+    /**
+     * Method: updateDimensions
+     * To be extended by subclasses - here we set positioning related styles
+     * on HTML elements, subclasses have to do the same for renderer specific
+     * elements (e.g. viesBox, width and height of the rendererRoot)
+     */
+    updateDimensions: function() {
+        var mapExtent = this.map.getExtent();
+        var renderExtent = this.map.getMaxExtent();
+        this.setExtent(renderExtent, true);
+        var res = this.getResolution();
+        var div = this.rendererRoot.parentNode;
+        var layerLeft = parseFloat(div.parentNode.style.left);
+        var layerTop = parseFloat(div.parentNode.style.top);
+        div.style.left = ((renderExtent.left - mapExtent.left) / res - layerLeft) + "px";
+        div.style.top = ((mapExtent.top - renderExtent.top) / res - layerTop) + "px";
+    },
+    
+    /**
+     * Method: resize
+     */
+    setSize: function() {
+        this.map.getExtent() && this.updateDimensions();
+    },
+
+    /**
+     * Method: drawFeature
+     * Draw the feature.  The optional style argument can be used
+     * to override the feature's own style.  This method should only
+     * be called from layer.drawFeature().
+     *
+     * Parameters:
+     * feature - {<OpenLayers.Feature.Vector>} 
+     * style - {<Object>}
+     * 
+     * Returns:
+     * {Boolean} true if the feature has been drawn completely, false if not,
+     *     undefined if the feature had no geometry
+     */
+    drawFeature: function(feature, style) {
+        if(style == null) {
+            style = feature.style;
+        }
+        if (feature.geometry) {
+            var rendered = this.drawGeometry(feature.geometry, style, feature.id);
+            if(rendered !== false && style.label) {
+                var location = feature.geometry.getCentroid(); 
+                this.drawText(feature.id, style, location);
+            } else {
+                this.removeText(feature.id);
+            }
+            return rendered;
+        }
+    },
+    
+    /**
+     * Method: drawText
+     * Function for drawing text labels.
+     * This method is only called by the renderer itself.
+     * 
+     * Parameters: 
+     * featureId - {String|DOMElement}
+     * style - {Object}
+     * location - {<OpenLayers.Geometry.Point>}, will be modified inline
+     *
+     * Returns:
+     * {DOMElement} container holding the text label (to be populated by
+     * subclasses)
+     */
+    drawText: function(featureId, style, location) {
+        var label;
+        if (typeof featureId !== "string") {
+            label = featureId;
+        } else {
+            label = this.nodeFactory(featureId + this.LABEL_ID_SUFFIX, this.labelNodeType);
+            label._featureId = featureId;
+        }
+        label._style = style;
+        label._x = location.x;
+        label._y = location.y;
+        if(style.labelXOffset || 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);
+        }
+
+        if(label.parentNode !== this.textRoot) {
+            this.textRoot.appendChild(label);
+        }   
+
+        return label;
+    },
+
+    CLASS_NAME: "OpenLayers.Renderer.NG"
+});

Modified: sandbox/august/trunk/lib/OpenLayers/Renderer/SVG.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Renderer/SVG.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Renderer/SVG.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -260,6 +260,10 @@
                 
                 if (style.graphicTitle) {
                     node.setAttributeNS(null, "title", style.graphicTitle);
+                    //Standards-conformant SVG
+                    var label = this.nodeFactory(null, "title");
+                    label.textContent = style.graphicTitle;
+                    node.appendChild(label);
                 }
                 if (style.graphicWidth && style.graphicHeight) {
                   node.setAttributeNS(null, "preserveAspectRatio", "none");
@@ -281,13 +285,14 @@
                 node.setAttributeNS(null, "height", height);
                 node.setAttributeNS(this.xlinkns, "href", style.externalGraphic);
                 node.setAttributeNS(null, "style", "opacity: "+opacity);
+                node.onclick = OpenLayers.Renderer.SVG.preventDefault;
             } else if (this.isComplexSymbol(style.graphicName)) {
                 // the symbol viewBox is three times as large as the symbol
                 var offset = style.pointRadius * 3;
                 var size = offset * 2;
-                var id = this.importSymbol(style.graphicName);
+                var src = this.importSymbol(style.graphicName);
                 pos = this.getPosition(node);
-                widthFactor = this.symbolMetrics[id][0] * 3 / size;
+                widthFactor = this.symbolMetrics[src.id][0] * 3 / size;
                 
                 // remove the node from the dom before we modify it. This
                 // prevents various rendering issues in Safari and FF
@@ -303,7 +308,6 @@
                 // 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"));
@@ -334,7 +338,7 @@
                         "rotate(" + rotation + " " + pos.x + " " + 
                         pos.y + ")"); 
                 } else {
-                    var metrics = this.symbolMetrics[id];
+                    var metrics = this.symbolMetrics[src.id];
                     node.firstChild.setAttributeNS(null, "transform", "rotate(" 
                         + rotation + " " 
                         + metrics[1] + " "
@@ -795,9 +799,9 @@
      * inside the valid range.
      * 
      * Parameters:
-     * badComponent - {<OpenLayers.Geometry.Point>)} original geometry of the
+     * badComponent - {<OpenLayers.Geometry.Point>} original geometry of the
      *     invalid point
-     * goodComponent - {<OpenLayers.Geometry.Point>)} original geometry of the
+     * goodComponent - {<OpenLayers.Geometry.Point>} original geometry of the
      *     valid point
      * Returns
      * {String} the SVG coordinate pair of the clipped point (like
@@ -876,7 +880,7 @@
      * graphicName - {String} name of the symbol to import
      * 
      * Returns:
-     * {String} - id of the imported symbol
+     * {DOMElement} - the imported symbol
      */      
     importSymbol: function (graphicName)  {
         if (!this.defs) {
@@ -886,8 +890,9 @@
         var id = this.container.id + "-" + graphicName;
         
         // check if symbol already exists in the defs
-        if (document.getElementById(id) != null) {
-            return id;
+        var existing = document.getElementById(id)
+        if (existing != null) {
+            return existing;
         }
         
         var symbol = OpenLayers.Renderer.symbol[graphicName];
@@ -929,7 +934,7 @@
         ];
         
         this.defs.appendChild(symbolNode);
-        return symbolNode.id;
+        return symbolNode;
     },
     
     /**
@@ -979,3 +984,12 @@
     "t": "-70%",
     "b": "0"    
 };
+
+/**
+ * Function: OpenLayers.Renderer.SVG.preventDefault
+ * Used to prevent default events (especially opening images in a new tab on
+ * ctrl-click) from being executed for externalGraphic symbols
+ */
+OpenLayers.Renderer.SVG.preventDefault = function(e) {
+    e.preventDefault && e.preventDefault();
+};

Copied: sandbox/august/trunk/lib/OpenLayers/Renderer/SVG2.js (from rev 11704, trunk/openlayers/lib/OpenLayers/Renderer/SVG2.js)
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Renderer/SVG2.js	                        (rev 0)
+++ sandbox/august/trunk/lib/OpenLayers/Renderer/SVG2.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,793 @@
+/* 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/Renderer/NG.js
+ */
+
+/**
+ * Class: OpenLayers.Renderer.SVG2
+ * 
+ * Inherits from:
+ *  - <OpenLayers.Renderer.NG>
+ */
+OpenLayers.Renderer.SVG2 = OpenLayers.Class(OpenLayers.Renderer.NG, {
+
+    /** 
+     * Property: xmlns
+     * {String}
+     */
+    xmlns: "http://www.w3.org/2000/svg",
+    
+    /**
+     * Property: xlinkns
+     * {String}
+     */
+    xlinkns: "http://www.w3.org/1999/xlink",
+
+    /**
+     * Property: symbolMetrics
+     * {Object} Cache for symbol metrics according to their svg coordinate
+     *     space. This is an object keyed by the symbol's id, and values are
+     *     an object with size, x and y properties.
+     */
+    symbolMetrics: null,
+    
+    /**
+     * Constant: labelNodeType
+     * {String} The node type for text label containers.
+     */
+    labelNodeType: "g",
+
+    /**
+     * Constructor: OpenLayers.Renderer.SVG2
+     * 
+     * Parameters:
+     * containerID - {String}
+     */
+    initialize: function(containerID) {
+        if (!this.supported()) { 
+            return; 
+        }
+        OpenLayers.Renderer.Elements.prototype.initialize.apply(this, 
+                                                                arguments);
+        
+        this.symbolMetrics = {};
+    },
+
+    /**
+     * APIMethod: destroy
+     */
+    destroy: function() {
+        OpenLayers.Renderer.Elements.prototype.destroy.apply(this, arguments);
+    },
+    
+    /**
+     * APIMethod: supported
+     * 
+     * Returns:
+     * {Boolean} Whether or not the browser supports the SVG renderer
+     */
+    supported: function() {
+        var svgFeature = "http://www.w3.org/TR/SVG11/feature#";
+        return (document.implementation && 
+           (document.implementation.hasFeature("org.w3c.svg", "1.0") || 
+            document.implementation.hasFeature(svgFeature + "SVG", "1.1") || 
+            document.implementation.hasFeature(svgFeature + "BasicStructure", "1.1") ));
+    },    
+
+    /**
+     * Method: updateDimensions
+     */
+    updateDimensions: function() {
+        OpenLayers.Renderer.NG.prototype.updateDimensions.apply(this, arguments);
+        
+        var res = this.getResolution();
+        
+        var width = this.extent.getWidth();
+        var height = this.extent.getHeight();
+        
+        var extentString = [
+            this.extent.left,
+            -this.extent.top,
+            width,
+            height
+        ].join(" ");
+        this.rendererRoot.setAttributeNS(null, "viewBox", extentString);
+        this.rendererRoot.setAttributeNS(null, "width", width / res);
+        this.rendererRoot.setAttributeNS(null, "height", height / res);
+
+        // update styles for the new resolution
+        var nodes = this.vectorRoot.childNodes;
+        for (var i=0, len=nodes.length; i<len; ++i) {
+            this.setStyle(nodes[i]);
+        }
+        var textNodes = this.textRoot.childNodes;
+        var label;
+        for (var i=0, len=textNodes.length; i<len; ++i) {
+            var label = textNodes[i];
+            this.drawText(label, label._style,
+                new OpenLayers.Geometry.Point(label._x, label._y)
+            );
+        }
+    },
+    
+    /** 
+     * Method: getNodeType
+     * 
+     * Parameters:
+     * geometry - {<OpenLayers.Geometry>}
+     * style - {Object}
+     * 
+     * Returns:
+     * {String} The corresponding node type for the specified geometry
+     */
+    getNodeType: function(geometry, style) {
+        var nodeType = null;
+        switch (geometry.CLASS_NAME) {
+            case "OpenLayers.Geometry.Point":
+                if (style.externalGraphic) {
+                    nodeType = "image";
+                } else if (this.isComplexSymbol(style.graphicName)) {
+                    nodeType = "svg";
+                } else {
+                    nodeType = "circle";
+                }
+                break;
+            case "OpenLayers.Geometry.Rectangle":
+                nodeType = "rect";
+                break;
+            case "OpenLayers.Geometry.LineString":
+                nodeType = "polyline";
+                break;
+            case "OpenLayers.Geometry.LinearRing":
+                nodeType = "polygon";
+                break;
+            case "OpenLayers.Geometry.Polygon":
+            case "OpenLayers.Geometry.Curve":
+            case "OpenLayers.Geometry.Surface":
+                nodeType = "path";
+                break;
+            default:
+                break;
+        }
+        return nodeType;
+    },
+
+    /** 
+     * Method: setStyle
+     * Use to set all the style attributes to a SVG node.
+     * 
+     * Takes care to adjust stroke width and point radius to be
+     * resolution-relative
+     *
+     * Parameters:
+     * node - {SVGDomElement} An SVG element to decorate
+     * style - {Object}
+     * options - {Object} Currently supported options include 
+     *                              'isFilled' {Boolean} and
+     *                              'isStroked' {Boolean}
+     */
+    setStyle: function(node, style, options) {
+        style = style  || node._style;
+        options = options || node._options;
+        var resolution = this.getResolution();
+        var r = node._radius;
+        var widthFactor = resolution;
+        if (node._geometryClass == "OpenLayers.Geometry.Point" && r) {
+            node.style.visibility = "";
+            if (style.graphic === false) {
+                node.style.visibility = "hidden";
+            } else if (style.externalGraphic) {
+                
+                if (style.graphicTitle) {
+                    node.setAttributeNS(null, "title", style.graphicTitle);
+                    //Standards-conformant SVG 
+                    var label = this.nodeFactory(null, "title"); 
+                    label.textContent = style.graphicTitle; 
+                    node.appendChild(label); 
+                }
+                if (style.graphicWidth && style.graphicHeight) {
+                    node.setAttributeNS(null, "preserveAspectRatio", "none");
+                }
+                var width = style.graphicWidth || style.graphicHeight;
+                var height = style.graphicHeight || style.graphicWidth;
+                width = width ? width : style.pointRadius*2;
+                height = height ? height : style.pointRadius*2;
+                width *= resolution;
+                height *= resolution;
+                
+                var xOffset = (style.graphicXOffset != undefined) ?
+                    style.graphicXOffset * resolution : -(0.5 * width);
+                var yOffset = (style.graphicYOffset != undefined) ?
+                    style.graphicYOffset * resolution : -(0.5 * height);
+
+                var opacity = style.graphicOpacity || style.fillOpacity;
+                
+                node.setAttributeNS(null, "x", node._x + xOffset);
+                node.setAttributeNS(null, "y", node._y + yOffset);
+                node.setAttributeNS(null, "width", width);
+                node.setAttributeNS(null, "height", height);
+                node.setAttributeNS(this.xlinkns, "href", style.externalGraphic);
+                node.setAttributeNS(null, "style", "opacity: "+opacity);
+                node.onclick = OpenLayers.Renderer.SVG2.preventDefault;
+            } else if (this.isComplexSymbol(style.graphicName)) {
+                // the symbol viewBox is three times as large as the symbol
+                var offset = style.pointRadius * 3 * resolution;
+                var size = offset * 2;
+                var src = this.importSymbol(style.graphicName);
+                widthFactor = this.symbolMetrics[src.id].size * 3 / size * resolution;
+                
+                // remove the node from the dom before we modify it. This
+                // prevents various rendering issues in Safari and FF
+                var parent = node.parentNode;
+                var nextSibling = node.nextSibling;
+                if(parent) {
+                    parent.removeChild(node);
+                }
+                
+                // 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 
+                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", node._x - offset);
+                node.setAttributeNS(null, "y", node._y - offset);
+                
+                // now that the node has all its new properties, insert it
+                // back into the dom where it was
+                if(nextSibling) {
+                    parent.insertBefore(node, nextSibling);
+                } else if(parent) {
+                    parent.appendChild(node);
+                }
+            } else {
+                node.setAttributeNS(null, "r", style.pointRadius * resolution);
+            }
+
+            var rotation = style.rotation;
+            if (rotation !== undefined || node._rotation !== undefined) {
+                node._rotation = rotation;
+                rotation |= 0;
+                if (node.nodeName !== "svg") { 
+                    node.setAttributeNS(null, "transform", 
+                        ["rotate(", rotation, node._x, node._y, ")"].join(" ")
+                    ); 
+                } else {
+                    var metrics = this.symbolMetrics[src.id]; 
+                    node.firstChild.setAttributeNS(null, "transform",
+                        ["rotate(", rotation, metrics.x, metrics.y, ")"].join(" ")
+                    );
+                }
+            }
+        }
+        
+        if (options.isFilled) {
+            node.setAttributeNS(null, "fill", style.fillColor);
+            node.setAttributeNS(null, "fill-opacity", style.fillOpacity);
+        } else {
+            node.setAttributeNS(null, "fill", "none");
+        }
+
+        if (options.isStroked) {
+            node.setAttributeNS(null, "stroke", style.strokeColor);
+            node.setAttributeNS(null, "stroke-opacity", style.strokeOpacity);
+            node.setAttributeNS(null, "stroke-width", style.strokeWidth * widthFactor);
+            node.setAttributeNS(null, "stroke-linecap", style.strokeLinecap || "round");
+            // Hard-coded linejoin for now, to make it look the same as in VML.
+            // There is no strokeLinejoin property yet for symbolizers.
+            node.setAttributeNS(null, "stroke-linejoin", "round");
+            style.strokeDashstyle && node.setAttributeNS(null,
+                "stroke-dasharray", this.dashStyle(style, widthFactor));
+        } else {
+            node.setAttributeNS(null, "stroke", "none");
+        }
+        
+        if (style.pointerEvents) {
+            node.setAttributeNS(null, "pointer-events", style.pointerEvents);
+        }
+                
+        if (style.cursor != null) {
+            node.setAttributeNS(null, "cursor", style.cursor);
+        }
+        
+        return node;
+    },
+
+    /** 
+     * Method: dashStyle
+     * 
+     * Parameters:
+     * style - {Object}
+     * widthFactor - {Number}
+     * 
+     * Returns:
+     * {String} A SVG compliant 'stroke-dasharray' value
+     */
+    dashStyle: function(style, widthFactor) {
+        var w = style.strokeWidth * widthFactor;
+        var str = style.strokeDashstyle;
+        switch (str) {
+            case 'solid':
+                return 'none';
+            case 'dot':
+                return [widthFactor, 4 * w].join();
+            case 'dash':
+                return [4 * w, 4 * w].join();
+            case 'dashdot':
+                return [4 * w, 4 * w, widthFactor, 4 * w].join();
+            case 'longdash':
+                return [8 * w, 4 * w].join();
+            case 'longdashdot':
+                return [8 * w, 4 * w, widthFactor, 4 * w].join();
+            default:
+                var parts = OpenLayers.String.trim(str).split(/\s+/g);
+                for (var i=0, ii=parts.length; i<ii; i++) {
+                    parts[i] = parts[i] * widthFactor;
+                }
+                return parts.join();            
+        }
+    },
+    
+    /** 
+     * Method: createNode
+     * 
+     * Parameters:
+     * type - {String} Kind of node to draw
+     * id - {String} Id for node
+     * 
+     * Returns:
+     * {DOMElement} A new node of the given type and id
+     */
+    createNode: function(type, id) {
+        var node = document.createElementNS(this.xmlns, type);
+        if (id) {
+            node.setAttributeNS(null, "id", id);
+        }
+        return node;    
+    },
+    
+    /** 
+     * Method: nodeTypeCompare
+     * 
+     * Parameters:
+     * node - {SVGDomElement} An SVG element
+     * type - {String} Kind of node
+     * 
+     * Returns:
+     * {Boolean} Whether or not the specified node is of the specified type
+     */
+    nodeTypeCompare: function(node, type) {
+        return (type == node.nodeName);
+    },
+   
+    /**
+     * Method: createRenderRoot
+     * 
+     * Returns:
+     * {DOMElement} The specific render engine's root element
+     */
+    createRenderRoot: function() {
+        return this.nodeFactory(this.container.id + "_svgRoot", "svg");
+    },
+
+    /**
+     * Method: createRoot
+     * 
+     * Parameter:
+     * suffix - {String} suffix to append to the id
+     * 
+     * Returns:
+     * {DOMElement}
+     */
+    createRoot: function(suffix) {
+        return this.nodeFactory(this.container.id + suffix, "g");
+    },
+
+    /**
+     * Method: createDefs
+     *
+     * Returns:
+     * {DOMElement} The element to which we'll add the symbol definitions
+     */
+    createDefs: function() {
+        var defs = this.nodeFactory(this.container.id + "_defs", "defs");
+        this.rendererRoot.appendChild(defs);
+        return defs;
+    },
+
+    /**************************************
+     *                                    *
+     *     GEOMETRY DRAWING FUNCTIONS     *
+     *                                    *
+     **************************************/
+
+    /**
+     * Method: drawPoint
+     * This method is only called by the renderer itself.
+     * 
+     * Parameters: 
+     * node - {DOMElement}
+     * geometry - {<OpenLayers.Geometry>}
+     * 
+     * Returns:
+     * {DOMElement} or false if the renderer could not draw the point
+     */ 
+    drawPoint: function(node, geometry) {
+        return this.drawCircle(node, geometry, 1);
+    },
+
+    /**
+     * Method: drawCircle
+     * This method is only called by the renderer itself.
+     * 
+     * Parameters: 
+     * node - {DOMElement}
+     * geometry - {<OpenLayers.Geometry>}
+     * radius - {Float}
+     * 
+     * Returns:
+     * {DOMElement} or false if the renderer could not draw the circle
+     */
+    drawCircle: function(node, geometry, radius) {
+        var x = geometry.x;
+        var y = -geometry.y;
+        node.setAttributeNS(null, "cx", x);
+        node.setAttributeNS(null, "cy", y);
+        node._x = x;
+        node._y = y;
+        node._radius = radius;
+        return node;
+    },
+    
+    /**
+     * Method: drawLineString
+     * This method is only called by the renderer itself.
+     * 
+     * Parameters: 
+     * node - {DOMElement}
+     * geometry - {<OpenLayers.Geometry>}
+     * 
+     * Returns:
+     * {DOMElement} or null if the renderer could not draw all components of
+     *     the linestring, or false if nothing could be drawn
+     */ 
+    drawLineString: function(node, geometry) {
+        var path = this.getComponentsString(geometry.components);
+        node.setAttributeNS(null, "points", path);
+        return node;
+    },
+    
+    /**
+     * Method: drawLinearRing
+     * This method is only called by the renderer itself.
+     * 
+     * Parameters: 
+     * node - {DOMElement}
+     * geometry - {<OpenLayers.Geometry>}
+     * 
+     * Returns:
+     * {DOMElement} or null if the renderer could not draw all components
+     *     of the linear ring, or false if nothing could be drawn
+     */ 
+    drawLinearRing: function(node, geometry) {
+        var path = this.getComponentsString(geometry.components);
+        node.setAttributeNS(null, "points", path);
+        return node;
+    },
+    
+    /**
+     * Method: drawPolygon
+     * This method is only called by the renderer itself.
+     * 
+     * Parameters: 
+     * node - {DOMElement}
+     * geometry - {<OpenLayers.Geometry>}
+     * 
+     * Returns:
+     * {DOMElement} or null if the renderer could not draw all components
+     *     of the polygon, or false if nothing could be drawn
+     */ 
+    drawPolygon: function(node, geometry) {
+        var d = [];
+        var draw = true;
+        var complete = true;
+        var linearRingResult, path;
+        for (var j=0, len=geometry.components.length; j<len; j++) {
+            d.push("M");
+            path = this.getComponentsString(
+                geometry.components[j].components, " ");
+            d.push(path);
+        }
+        d.push("z");
+        node.setAttributeNS(null, "d", d.join(" "));
+        node.setAttributeNS(null, "fill-rule", "evenodd");
+        return node;
+    },
+    
+    /**
+     * Method: drawRectangle
+     * This method is only called by the renderer itself.
+     * 
+     * Parameters: 
+     * node - {DOMElement}
+     * geometry - {<OpenLayers.Geometry>}
+     * 
+     * Returns:
+     * {DOMElement} or false if the renderer could not draw the rectangle
+     */ 
+    drawRectangle: function(node, geometry) {
+        node.setAttributeNS(null, "x", geometry.x);
+        node.setAttributeNS(null, "y", -geometry.y);
+        node.setAttributeNS(null, "width", geometry.width);
+        node.setAttributeNS(null, "height", geometry.height);
+        return node;
+    },
+    
+    /**
+     * Method: drawSurface
+     * This method is only called by the renderer itself.
+     * 
+     * Parameters: 
+     * node - {DOMElement}
+     * geometry - {<OpenLayers.Geometry>}
+     * 
+     * Returns:
+     * {DOMElement} or false if the renderer could not draw the surface
+     */ 
+    drawSurface: function(node, geometry) {
+
+        // create the svg path string representation
+        var d = [];
+        var draw = true;
+        for (var i=0, len=geometry.components.length; i<len; i++) {
+            if ((i%3) == 0 && (i/3) == 0) {
+                var component = this.getShortString(geometry.components[i]);
+                d.push("M", component);
+            } else if ((i%3) == 1) {
+                var component = this.getShortString(geometry.components[i]);
+                d.push("C", component);
+            } else {
+                var component = this.getShortString(geometry.components[i]);
+                d.push(component);
+            }
+        }
+        d.push("Z");
+        node.setAttributeNS(null, "d", d.join(" "));
+        return node;
+    },
+    
+    /**
+     * Method: drawText
+     * Function for drawing text labels.
+     * This method is only called by the renderer itself.
+     * 
+     * Parameters: 
+     * featureId - {String|DOMElement}
+     * style - {Object}
+     * location - {<OpenLayers.Geometry.Point>}, will be modified inline
+     *
+     * Returns:
+     * {DOMElement} container holding the text label
+     */
+    drawText: function(featureId, style, location) {
+        var g = OpenLayers.Renderer.NG.prototype.drawText.apply(this, arguments);
+        var text = g.firstChild ||
+            this.nodeFactory(featureId + this.LABEL_ID_SUFFIX + "_text", "text");
+        var tspan = text.firstChild ||
+            this.nodeFactory(featureId + this.LABEL_ID_SUFFIX + "_tspan", "tspan");
+
+        var res = this.getResolution();
+        text.setAttributeNS(null, "x", location.x / res);
+        text.setAttributeNS(null, "y", - location.y / res);
+        g.setAttributeNS(null, "transform", "scale(" + res + ")");
+        
+        if (style.fontColor) {
+            text.setAttributeNS(null, "fill", style.fontColor);
+        }
+        if (style.fontOpacity) {
+            text.setAttributeNS(null, "opacity", style.fontOpacity);
+        }
+        if (style.fontFamily) {
+            text.setAttributeNS(null, "font-family", style.fontFamily);
+        }
+        if (style.fontSize) {
+            text.setAttributeNS(null, "font-size", style.fontSize);
+        }
+        if (style.fontWeight) {
+            text.setAttributeNS(null, "font-weight", style.fontWeight);
+        }
+        if(style.labelSelect === true) {
+            text.setAttributeNS(null, "pointer-events", "visible");
+            text._featureId = featureId;
+            tspan._featureId = featureId;
+        } else {
+            text.setAttributeNS(null, "pointer-events", "none");
+        }
+        var align = style.labelAlign || "cm";
+        text.setAttributeNS(null, "text-anchor",
+            OpenLayers.Renderer.SVG2.LABEL_ALIGN[align[0]] || "middle");
+
+        if (OpenLayers.IS_GECKO === true) {
+            text.setAttributeNS(null, "dominant-baseline",
+                OpenLayers.Renderer.SVG2.LABEL_ALIGN[align[1]] || "central");
+        } else {
+            tspan.setAttributeNS(null, "baseline-shift",
+                OpenLayers.Renderer.SVG2.LABEL_VSHIFT[align[1]] || "-35%");
+        }
+
+        tspan.textContent = style.label;
+        
+        if(!text.parentNode) {
+            text.appendChild(tspan);
+            g.appendChild(text);
+        }
+        
+        return g;
+    },
+    
+    /** 
+     * Method: getComponentString
+     * 
+     * Parameters:
+     * components - {Array(<OpenLayers.Geometry.Point>)} Array of points
+     * separator - {String} character between coordinate pairs. Defaults to ","
+     * 
+     * Returns:
+     * {Object} hash with properties "path" (the string created from the
+     *     components and "complete" (false if the renderer was unable to
+     *     draw all components)
+     */
+    getComponentsString: function(components, separator) {
+        var len = components.length;
+        var strings = new Array(len);
+        for (var i=0; i<len; i++) {
+            strings[i] = this.getShortString(components[i]);
+        }
+
+        return strings.join(separator || ",");
+    },
+    
+    /** 
+     * Method: getShortString
+     * 
+     * Parameters:
+     * point - {<OpenLayers.Geometry.Point>}
+     * 
+     * Returns:
+     * {String} or false if point is outside the valid range
+     */
+    getShortString: function(point) {
+        return point.x + "," + (-point.y);
+    },
+    
+    /**
+     * Method: importSymbol
+     * add a new symbol definition from the rendererer's symbol hash
+     * 
+     * Parameters:
+     * graphicName - {String} name of the symbol to import
+     * 
+     * Returns:
+     * {DOMElement} - the imported symbol
+     */      
+    importSymbol: function (graphicName)  {
+        if (!this.defs) {
+            // create svg defs tag
+            this.defs = this.createDefs();
+        }
+        var id = this.container.id + "-" + graphicName;
+        
+        // check if symbol already exists in the defs
+        var existing = document.getElementById(id);
+        if (existing != null) {
+            return existing;
+        }
+        
+        var symbol = OpenLayers.Renderer.symbol[graphicName];
+        if (!symbol) {
+            throw new Error(graphicName + ' is not a valid symbol name');
+        }
+
+        var symbolNode = this.nodeFactory(id, "symbol");
+        var node = this.nodeFactory(null, "polygon");
+        symbolNode.appendChild(node);
+        var symbolExtent = new OpenLayers.Bounds(
+                                    Number.MAX_VALUE, Number.MAX_VALUE, 0, 0);
+
+        var points = [];
+        var x,y;
+        for (var i=0, len=symbol.length; i<len; i=i+2) {
+            x = symbol[i];
+            y = symbol[i+1];
+            symbolExtent.left = Math.min(symbolExtent.left, x);
+            symbolExtent.bottom = Math.min(symbolExtent.bottom, y);
+            symbolExtent.right = Math.max(symbolExtent.right, x);
+            symbolExtent.top = Math.max(symbolExtent.top, y);
+            points.push(x, ",", y);
+        }
+        
+        node.setAttributeNS(null, "points", points.join(" "));
+        
+        var width = symbolExtent.getWidth();
+        var height = symbolExtent.getHeight();
+        // create a viewBox three times as large as the symbol itself,
+        // to allow for strokeWidth being displayed correctly at the corners.
+        var viewBox = [symbolExtent.left - width,
+                        symbolExtent.bottom - height, width * 3, height * 3];
+        symbolNode.setAttributeNS(null, "viewBox", viewBox.join(" "));
+        this.symbolMetrics[id] = {
+            size: Math.max(width, height),
+            x: symbolExtent.getCenterLonLat().lon,
+            y: symbolExtent.getCenterLonLat().lat
+        };
+        
+        this.defs.appendChild(symbolNode);
+        return symbolNode;
+    },
+    
+    /**
+     * Method: getFeatureIdFromEvent
+     * 
+     * Parameters:
+     * evt - {Object} An <OpenLayers.Event> object
+     *
+     * Returns:
+     * {<OpenLayers.Geometry>} A geometry from an event that 
+     *     happened on a layer.
+     */
+    getFeatureIdFromEvent: function(evt) {
+        var featureId = OpenLayers.Renderer.Elements.prototype.getFeatureIdFromEvent.apply(this, arguments);
+        if(!featureId) {
+            var target = evt.target;
+            featureId = target.parentNode && target != this.rendererRoot &&
+                target.parentNode._featureId;
+        }
+        return featureId;
+    },
+
+    CLASS_NAME: "OpenLayers.Renderer.SVG2"
+});
+
+/**
+ * Constant: OpenLayers.Renderer.SVG2.LABEL_ALIGN
+ * {Object}
+ */
+OpenLayers.Renderer.SVG2.LABEL_ALIGN = {
+    "l": "start",
+    "r": "end",
+    "b": "bottom",
+    "t": "hanging"
+};
+
+/**
+ * Constant: OpenLayers.Renderer.SVG2.LABEL_VSHIFT
+ * {Object}
+ */
+OpenLayers.Renderer.SVG2.LABEL_VSHIFT = {
+    // according to
+    // http://www.w3.org/Graphics/SVG/Test/20061213/htmlObjectHarness/full-text-align-02-b.html
+    // a baseline-shift of -70% shifts the text exactly from the
+    // bottom to the top of the baseline, so -35% moves the text to
+    // the center of the baseline.
+    "t": "-70%",
+    "b": "0"    
+};
+
+/** 
+ * Function: OpenLayers.Renderer.SVG2.preventDefault 
+ * Used to prevent default events (especially opening images in a new tab on 
+ * ctrl-click) from being executed for externalGraphic and graphicName symbols 
+ */ 
+OpenLayers.Renderer.SVG2.preventDefault = function(e) { 
+    e.preventDefault && e.preventDefault(); 
+};
\ No newline at end of file

Modified: sandbox/august/trunk/lib/OpenLayers/Renderer/VML.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Renderer/VML.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Renderer/VML.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -765,7 +765,7 @@
                 x = (comp.x / resolution - this.offset.x) | 0;
                 y = (comp.y / resolution - this.offset.y) | 0;
                 pathComp = " " + x + "," + y;
-                path.push(pathComp)
+                path.push(pathComp);
                 if (i==0) {
                     path.push(" l");
                 }

Modified: sandbox/august/trunk/lib/OpenLayers/Request.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Request.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Request.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -125,14 +125,8 @@
 
         // 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) {

Modified: sandbox/august/trunk/lib/OpenLayers/Strategy/BBOX.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Strategy/BBOX.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Strategy/BBOX.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -68,9 +68,6 @@
      * options - {Object} Optional object whose properties will be set on the
      *     instance.
      */
-    initialize: function(options) {
-        OpenLayers.Strategy.prototype.initialize.apply(this, [options]);
-    },
     
     /**
      * Method: activate
@@ -90,6 +87,14 @@
                 "refresh": this.update,
                 scope: this
             });
+            if(this.layer.visibility == true) {
+                this.update();
+            } else {
+                this.layer.events.on({
+                    "visibilitychanged": this.update,
+                    scope: this
+                });
+            }
         }
         return activated;
     },
@@ -106,10 +111,8 @@
         if(deactivated) {
             this.layer.events.un({
                 "moveend": this.update,
-                scope: this
-            });
-            this.layer.events.un({
                 "refresh": this.update,
+                "visibilitychanged": this.update,
                 scope: this
             });
         }
@@ -127,7 +130,8 @@
      */
     update: function(options) {
         var mapBounds = this.getMapBounds();
-        if ((options && options.force) || this.invalidBounds(mapBounds)) {
+        if (mapBounds !== null && ((options && options.force) ||
+                                   this.invalidBounds(mapBounds))) {
             this.calculateBounds(mapBounds);
             this.resolution = this.layer.map.getResolution(); 
             this.triggerRead();
@@ -142,8 +146,12 @@
      * {<OpenLayers.Bounds>} Map bounds in the projection of the layer.
      */
     getMapBounds: function() {
+        if (this.layer.map === null) {
+            return null;
+        }
         var bounds = this.layer.map.getExtent();
-        if(!this.layer.projection.equals(this.layer.map.getProjectionObject())) {
+        if(bounds && !this.layer.projection.equals(
+                this.layer.map.getProjectionObject())) {
             bounds = bounds.clone().transform(
                 this.layer.map.getProjectionObject(), this.layer.projection
             );

Modified: sandbox/august/trunk/lib/OpenLayers/Strategy/Cluster.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Strategy/Cluster.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Strategy/Cluster.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -66,9 +66,6 @@
      * options - {Object} Optional object whose properties will be set on the
      *     instance.
      */
-    initialize: function(options) {
-        OpenLayers.Strategy.prototype.initialize.apply(this, [options]);
-    },
     
     /**
      * APIMethod: activate

Modified: sandbox/august/trunk/lib/OpenLayers/Strategy/Filter.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Strategy/Filter.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Strategy/Filter.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -47,9 +47,6 @@
      * options - {Object} Optional object whose properties will be set on the
      *     instance.
      */
-    initialize: function(options) {
-        OpenLayers.Strategy.prototype.initialize.apply(this, [options]);
-    },
 
     /**
      * APIMethod: activate

Modified: sandbox/august/trunk/lib/OpenLayers/Strategy/Fixed.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Strategy/Fixed.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Strategy/Fixed.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -32,19 +32,8 @@
      * options - {Object} Optional object whose properties will be set on the
      *     instance.
      */
-    initialize: function(options) {
-        OpenLayers.Strategy.prototype.initialize.apply(this, [options]);
-    },
 
     /**
-     * APIMethod: destroy
-     * Clean up the strategy.
-     */
-    destroy: function() {
-        OpenLayers.Strategy.prototype.destroy.apply(this, arguments);
-    },
-
-    /**
      * Method: activate
      * Activate the strategy: load data or add listener to load when visible
      *

Modified: sandbox/august/trunk/lib/OpenLayers/Strategy/Paging.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Strategy/Paging.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Strategy/Paging.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -48,9 +48,6 @@
      * options - {Object} Optional object whose properties will be set on the
      *     instance.
      */
-    initialize: function(options) {
-        OpenLayers.Strategy.prototype.initialize.apply(this, [options]);
-    },
     
     /**
      * APIMethod: activate

Modified: sandbox/august/trunk/lib/OpenLayers/Strategy/Refresh.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Strategy/Refresh.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Strategy/Refresh.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -45,9 +45,6 @@
      * options - {Object} Optional object whose properties will be set on the
      *     instance.
      */
-    initialize: function(options) {
-        OpenLayers.Strategy.prototype.initialize.apply(this, [options]);
-    },
    
     /**
      * APIMethod: activate

Modified: sandbox/august/trunk/lib/OpenLayers/Tile/Image/IFrame.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Tile/Image/IFrame.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Tile/Image/IFrame.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -42,7 +42,7 @@
                 delete iFrame;
             }
         } else {
-            OpenLayers.Tile.Image.prototype.clear.apply(this, arguments)
+            OpenLayers.Tile.Image.prototype.clear.apply(this, arguments);
         }
     },
 
@@ -221,4 +221,5 @@
 
         return form;
     }
-}
+};
+

Modified: sandbox/august/trunk/lib/OpenLayers/Util.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers/Util.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers/Util.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -22,6 +22,11 @@
 /** 
  * Function: getElement
  * This is the old $() from prototype
+ *
+ * Parameters:
+ * e - {String or DOMElement or Window}
+ * Return:
+ * {Array(DOMElement)}
  */
 OpenLayers.Util.getElement = function() {
     var elements = [];
@@ -105,7 +110,7 @@
  * 
  * Parameters:
  * array - {Array}
- * obj - {Object}
+ * obj - {*}
  * 
  * Returns:
  * {Integer} The index at, which the first object was found in the array.
@@ -134,6 +139,7 @@
  * null to an individual parameter will avoid setting the attribute.
  *
  * Parameters:
+ * element - {DOMElement} DOM element to modify.
  * id - {String} The element id attribute to set.
  * px - {<OpenLayers.Pixel>} The left and top style position.
  * sz - {<OpenLayers.Size>}  The width and height style attributes.
@@ -404,6 +410,7 @@
 /** 
  * Function: modifyAlphaImageDiv
  * 
+ * Parameters:
  * div - {DOMElement} Div containing Alpha-adjusted Image
  * id - {String}
  * px - {<OpenLayers.Pixel>}
@@ -411,7 +418,7 @@
  * imgURL - {String}
  * position - {String}
  * border - {String}
- * sizing {String} 'crop', 'scale', or 'image'. Default is "scale"
+ * sizing - {String} 'crop', 'scale', or 'image'. Default is "scale"
  * opacity - {Float} Fractional value (0.0 - 1.0)
  */ 
 OpenLayers.Util.modifyAlphaImageDiv = function(div, id, px, sz, imgURL, 
@@ -452,6 +459,7 @@
 /** 
  * Function: createAlphaImageDiv
  * 
+ * Parameters:
  * id - {String}
  * px - {<OpenLayers.Pixel>}
  * sz - {<OpenLayers.Size>}
@@ -938,7 +946,7 @@
  * lonlat  - {<OpenLayers.LonLat>} (or any object with both .lat, .lon
  *     properties) The start point.
  * brng     - {Float} The bearing (degrees).
- * distance - {Float} The ground distance (meters).
+ * dist     - {Float} The ground distance (meters).
  *
  * Returns:
  * {<OpenLayers.LonLat>} The destination point.
@@ -1038,7 +1046,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) {
@@ -1663,6 +1671,8 @@
  *     useful in the case where we have a limit in one dimension and must 
  *     therefore meaure the flow in the other dimension.
  * options - {Object}
+ *
+ * Allowed Options:
  *     displayClass - {String} Optional parameter.  A CSS class name(s) string
  *         to provide the CSS context of the rendered content.
  *     containerElement - {DOMElement} Optional parameter. Insert the HTML to 
@@ -1839,7 +1849,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);
@@ -1849,6 +1859,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/august/trunk/lib/OpenLayers.js
===================================================================
--- sandbox/august/trunk/lib/OpenLayers.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/OpenLayers.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -29,7 +29,28 @@
      * 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
@@ -60,6 +81,7 @@
             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.
@@ -348,13 +370,15 @@
 
         // use "parser-inserted scripts" for guaranteed execution order
         // http://hsivonen.iki.fi/script-execution/
-        var allScriptTags = new Array(jsfiles.length);
-        var host = OpenLayers._getScriptLocation() + "lib/";    
-        for (var i=0, len=jsfiles.length; i<len; i++) {
-            allScriptTags[i] = "<script src='" + host + jsfiles[i] +
+        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>"; 
         }
-        document.write(allScriptTags.join(""));
+        if (scriptTags.length > 0) {
+            document.write(scriptTags.join(""));
+        }
     }
 })();
 

Modified: sandbox/august/trunk/lib/Rico/Color.js
===================================================================
--- sandbox/august/trunk/lib/Rico/Color.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/lib/Rico/Color.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,5 +1,6 @@
 /** 
  * @requires OpenLayers/BaseTypes/Class.js
+ * @requires OpenLayers/BaseTypes/Element.js
  */
 
 
@@ -124,9 +125,8 @@
 OpenLayers.Rico.Color.createColorFromBackground = function(elem) {
 
    var actualColor = 
-      RicoUtil.getElementsComputedStyle(OpenLayers.Util.getElement(elem), 
-                                        "backgroundColor", 
-                                        "background-color");
+      OpenLayers.Element.getStyle(OpenLayers.Util.getElement(elem), 
+                                        "backgroundColor");
 
    if ( actualColor == "transparent" && elem.parentNode ) {
       return OpenLayers.Rico.Color.createColorFromBackground(elem.parentNode);

Modified: sandbox/august/trunk/tests/Ajax.html
===================================================================
--- sandbox/august/trunk/tests/Ajax.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Ajax.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/BaseTypes/Bounds.html
===================================================================
--- sandbox/august/trunk/tests/BaseTypes/Bounds.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/BaseTypes/Bounds.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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) {
@@ -606,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/august/trunk/tests/BaseTypes/Class.html
===================================================================
--- sandbox/august/trunk/tests/BaseTypes/Class.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/BaseTypes/Class.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/BaseTypes/Element.html
===================================================================
--- sandbox/august/trunk/tests/BaseTypes/Element.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/BaseTypes/Element.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,7 +1,7 @@
 <html>
   <head>
   
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
 
     <script type="text/javascript">
 

Modified: sandbox/august/trunk/tests/BaseTypes/LonLat.html
===================================================================
--- sandbox/august/trunk/tests/BaseTypes/LonLat.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/BaseTypes/LonLat.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/BaseTypes/Pixel.html
===================================================================
--- sandbox/august/trunk/tests/BaseTypes/Pixel.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/BaseTypes/Pixel.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var pixel; 
     
@@ -40,11 +40,22 @@
         t.eq( pixel.x, 5, "changing oldPixel.x doesn't change pixel.x");
     }
 
+    function test_Pixel_distanceTo(t) {
+        t.plan( 2 );
+        var px = new OpenLayers.Pixel(0,-2);
+        pixel = new OpenLayers.Pixel(0,0);
+        t.eq( pixel.distanceTo(px), 2, "(0,0) distanceTo (0,-2) = 2");
+
+        px = new OpenLayers.Pixel(-4,6);
+        pixel = new OpenLayers.Pixel(4,6);
+        t.eq( pixel.distanceTo(px), 8, "(4,6) distanceTo (-4,6) = 8");
+    }
+
     function test_Pixel_equals(t) {
         t.plan( 5 );
         pixel = new OpenLayers.Pixel(5,6);
 
-        px = new OpenLayers.Pixel(5,6);
+        var px = new OpenLayers.Pixel(5,6);
         t.eq( pixel.equals(px), true, "(5,6) equals (5,6)");
 
         px = new OpenLayers.Pixel(1,6);
@@ -74,6 +85,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/august/trunk/tests/BaseTypes/Size.html
===================================================================
--- sandbox/august/trunk/tests/BaseTypes/Size.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/BaseTypes/Size.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/BaseTypes.html
===================================================================
--- sandbox/august/trunk/tests/BaseTypes.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/BaseTypes.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Console.html
===================================================================
--- sandbox/august/trunk/tests/Console.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Console.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/ArgParser.html (from rev 11704, trunk/openlayers/tests/Control/ArgParser.html)
===================================================================
--- sandbox/august/trunk/tests/Control/ArgParser.html	                        (rev 0)
+++ sandbox/august/trunk/tests/Control/ArgParser.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/Attribution.html
===================================================================
--- sandbox/august/trunk/tests/Control/Attribution.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/Attribution.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/Button.html
===================================================================
--- sandbox/august/trunk/tests/Control/Button.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/Button.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/DragFeature.html
===================================================================
--- sandbox/august/trunk/tests/Control/DragFeature.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/DragFeature.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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);

Modified: sandbox/august/trunk/tests/Control/DragPan.html
===================================================================
--- sandbox/august/trunk/tests/Control/DragPan.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/DragPan.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/DrawFeature.html
===================================================================
--- sandbox/august/trunk/tests/Control/DrawFeature.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/DrawFeature.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/Geolocate.html (from rev 11704, trunk/openlayers/tests/Control/Geolocate.html)
===================================================================
--- sandbox/august/trunk/tests/Control/Geolocate.html	                        (rev 0)
+++ sandbox/august/trunk/tests/Control/Geolocate.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,141 @@
+<html>
+<head>
+  <script src="../OLLoader.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 test_destroy(t) {
+        t.plan(1);
+        var control = new OpenLayers.Control.Geolocate({
+            geolocation: geolocation,
+            watch: true
+        });
+        control.activate();
+        control.destroy();
+        t.ok(control.active === false, "control deactivated before being destroyed");
+    }
+
+    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/august/trunk/tests/Control/GetFeature.html
===================================================================
--- sandbox/august/trunk/tests/Control/GetFeature.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/GetFeature.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/Graticule.html
===================================================================
--- sandbox/august/trunk/tests/Control/Graticule.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/Graticule.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/KeyboardDefaults.html
===================================================================
--- sandbox/august/trunk/tests/Control/KeyboardDefaults.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/KeyboardDefaults.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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) {
@@ -12,6 +12,18 @@
         t.eq( control.displayClass,  "olControlKeyboardDefaults", "displayClass is correct" );
     }
 
+    function test_Control_KeyboardDefaults_destroy (t) {
+        t.plan(2);
+    
+        map = new OpenLayers.Map('map');
+        var control = new OpenLayers.Control.KeyboardDefaults();
+        map.addControl(control);
+        t.ok(control.handler != null, "control.handler is created");
+        control.destroy();
+        t.ok(control.handler == null, "control.handler is null after destroy");
+        map.destroy();
+    }
+
     function test_Control_KeyboardDefaults_addControl (t) {
         t.plan( 4 );
 

Modified: sandbox/august/trunk/tests/Control/LayerSwitcher.html
===================================================================
--- sandbox/august/trunk/tests/Control/LayerSwitcher.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/LayerSwitcher.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/Measure.html
===================================================================
--- sandbox/august/trunk/tests/Control/Measure.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/Measure.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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();
         
@@ -94,6 +96,10 @@
                     measure: function(evt){
                         log.push(evt);
                     }
+                },
+                handlerOptions: {
+                    pixelTolerance: 0,
+                    dblclickTolerance: 0
                 }
             }
         );
@@ -112,6 +118,7 @@
         var delay = control.partialDelay / 1000;
         
         // establish first point
+        trigger("mousemove", 0, 0);
         trigger("mousedown", 0, 0);
         trigger("mouseup", 0, 0);
 
@@ -128,8 +135,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.eq(log[0] && log[0].type, "measurepartial", "a) event logged");
+                t.eq(log[0] && log[0].measure, 10, "a) correct measure");
                 
                 // b) move 10 pixels and click
                 trigger("mousemove", 0, 20);
@@ -142,8 +149,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.eq(log[1] && log[1].type, "measurepartial", "b) correct type");
+                t.eq(log[1] && log[1].measure, 20, "b) correct measure");
 
                 // c) move 10 pixels and click
                 trigger("mousemove", 0, 30);
@@ -158,8 +165,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.eq(log[2] && log[2].type, "measurepartial", "c) correct type");
+                t.eq(log[2] && log[2].measure, 30, "c) correct measure");
                 
                 // d) move 10 pixels and click
                 trigger("mousemove", 0, 40);
@@ -173,8 +180,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.eq(log[3] && log[3].type, "measure", "e) correct type");
+                t.eq(log[3] && log[3].measure, 40, "e) correct measure");                
             },
             // wait for rest of delay and confirm no measurepartial logged
             delay, function() {
@@ -187,6 +194,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 +202,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.eq(log[0] && log[0].type, "measurepartial", "g) correct type");
+                t.eq(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.eq(log[1] && log[1].type, "measurepartial", "h) correct type");
+                t.eq(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.eq(log[2] && log[2].type, "measure", "i) correct type");
+                t.eq(log[2] && log[2].measure, 20, "i) correct measure");
+
                 // j) clean up
                 log = [];
                 map.destroy();
@@ -224,7 +232,7 @@
     }
 
     function test_immediate(t) {
-        t.plan(29);
+        t.plan(32);
         
         var map = new OpenLayers.Map({
             div: "map",
@@ -237,7 +245,7 @@
             ],
             center: new OpenLayers.LonLat(0, 0)
         });
-        
+
         var log = [];
         var control = new OpenLayers.Control.Measure(
             OpenLayers.Handler.Path, {
@@ -250,12 +258,16 @@
                     measure: function(evt){
                         log.push(evt);
                     }
+                },
+                handlerOptions: {
+                    pixelTolerance: 0,
+                    dblclickTolerance: 0
                 }
             }
         );
         map.addControl(control);
         control.activate();
-        
+
         // convenience function to trigger mouse events
         function trigger(type, x, y) {
             map.events.triggerEvent(type, {
@@ -267,6 +279,7 @@
         var delay = control.partialDelay / 1000;
 
         // a) establish first point
+        trigger("mousemove", 0, 0);
         trigger("mousedown", 0, 0);
         trigger("mouseup", 0, 0);
 
@@ -274,15 +287,15 @@
         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.eq(log[0].type, "measurepartial", "a) correct type");
+                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.eq(log[0].measure, 0, "a) correct measure");
+                t.ok(log[0] && log[0].measure == 0, "a) correct measure");
 
                 // b) move 10 pixels
                 trigger("mousemove", 0, 20);
@@ -291,10 +304,10 @@
 
                 // confirm measurepartial is fired 2 times
                 t.eq(log.length, 3, "b) event logged");
-                t.eq(log[1].type, "measurepartial", "b) correct type");
-                t.eq(log[1].measure, 20, "b) correct measure");
-                t.eq(log[2].type, "measurepartial", "c) correct type");
-                t.eq(log[2].measure, 30, "c) correct measure");
+                t.eq(log[1] && log[1].type, "measurepartial", "b) correct type");
+                t.eq(log[1] && log[1].measure, 20, "b) correct measure");
+                t.eq(log[2] && log[2].type, "measurepartial", "c) correct type");
+                t.eq(log[2] && log[2].measure, 30, "c) correct measure");
 
                 // d) switch immediate measurement off
                 control.setImmediate(false);
@@ -310,8 +323,8 @@
             // wait for delay then confirm event was logged
             delay, function() {
                 t.eq(log.length, 4, "e) event logged")
-                t.eq(log[3].type, "measurepartial", "e) correct type");
-                t.eq(log[3].measure, 40, "e) correct measure");
+                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);
@@ -322,39 +335,42 @@
             },
             delay, function() {
                 t.eq(log.length, 5, "g) event logged");
-                t.eq(log[4].type, "measurepartial", "g) correct type");
-                t.eq(log[4].measure, 50, "g) correct measure");
+                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.eq(log[5].type, "measurepartial", "h) correct type");
-                t.eq(log[5].measure, 60, "h) correct measure");
+                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, 6, "i) no event fired yet");
+                t.eq(log.length, 7, "i) no event fired yet");
             },
             delay, function() {
-                t.eq(log.length, 7, "i) event logged");
-                t.eq(log[6].type, "measurepartial", "i) correct type");
-                t.eq(log[6].measure, 60, "i) correct measure");
-                
+                t.eq(log.length, 8, "j) event logged");
+                t.eq(log[7] && log[7].type, "measurepartial", "j) correct type");
+                t.eq(log[7] && log[7].measure, 60, "j) correct measure");
+
                 trigger("dblclick", 0, 60);
-                t.eq(log.length, 8, "i) event logged");
-                t.eq(log[7].type, "measure", "i) correct type");
-                t.eq(log[7].measure, 60, "i) correct measure");
+                t.eq(log.length, 9, "k) event logged");
+                t.eq(log[8] && log[8].type, "measure", "k) correct type");
+                t.eq(log[8] && log[8].measure, 60, "k) correct measure");
                 // clear log
                 log = [];
 
-                // j) clean up
+                // l) 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");
+                t.eq(log.length, 0, "l) no event fired after destroy");
             }
         );
     }

Modified: sandbox/august/trunk/tests/Control/ModifyFeature.html
===================================================================
--- sandbox/august/trunk/tests/Control/ModifyFeature.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/ModifyFeature.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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) {
@@ -648,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();
         
@@ -673,6 +673,7 @@
         var log = [];
         layer.events.on({
             beforefeaturemodified: function(evt) {
+                layer.events.unregister("beforefeaturemodified", this, arguments.callee);
                 log.push(evt);
             },
             featuremodified: function(evt) {
@@ -690,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/august/trunk/tests/Control/MousePosition.html
===================================================================
--- sandbox/august/trunk/tests/Control/MousePosition.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/MousePosition.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/MouseToolbar.html
===================================================================
--- sandbox/august/trunk/tests/Control/MouseToolbar.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/MouseToolbar.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/NavToolbar.html
===================================================================
--- sandbox/august/trunk/tests/Control/NavToolbar.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/NavToolbar.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/Navigation.html
===================================================================
--- sandbox/august/trunk/tests/Control/Navigation.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/Navigation.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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) {
@@ -118,6 +118,27 @@
         t.eq(nav.zoomWheelEnabled, true, "mouse wheel activated");
         t.eq(wheel.active, true, "mouse wheel handler activated");
     }
+
+    function test_touches_zoom(t) {
+        t.plan(3);
+        var nav = new OpenLayers.Control.Navigation({zoomWheelEnabled: false});
+        var map = new OpenLayers.Map({
+            div: "map",
+            controls: [nav],
+            layers: [
+                new OpenLayers.Layer(null, {isBaseLayer: true})
+            ],
+            center: new OpenLayers.LonLat(0, 0),
+            zoom: 3
+        });
+        t.eq(map.getZoom(), 3, "map zoom starts at 3");
+        nav.handlers.click.callback("click", [{lastTouches: ["foo", "bar"]}]);
+        t.eq(map.getZoom(), 2, "map zooms out with a two touch tap");
+        nav.handlers.click.callback("click", [{}]);
+        t.eq(map.getZoom(), 2, "map doesn't do anything with click");
+        
+        map.destroy();
+    }
     
     function test_documentDrag(t) {
         
@@ -149,5 +170,6 @@
   </script>
 </head>
 <body>
+    <div id="map" style="width: 256px; height: 256px"></div>
 </body>
 </html>

Modified: sandbox/august/trunk/tests/Control/NavigationHistory.html
===================================================================
--- sandbox/august/trunk/tests/Control/NavigationHistory.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/NavigationHistory.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/OverviewMap.html
===================================================================
--- sandbox/august/trunk/tests/Control/OverviewMap.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/OverviewMap.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/PanPanel.html
===================================================================
--- sandbox/august/trunk/tests/Control/PanPanel.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/PanPanel.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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) {
         t.plan(2);

Modified: sandbox/august/trunk/tests/Control/PanZoom.html
===================================================================
--- sandbox/august/trunk/tests/Control/PanZoom.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/PanZoom.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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) {
@@ -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/august/trunk/tests/Control/PanZoomBar.html
===================================================================
--- sandbox/august/trunk/tests/Control/PanZoomBar.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/PanZoomBar.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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,8 +44,9 @@
         control = new OpenLayers.Control.PanZoomBar();
         map.addControl(control);
         control.removeButtons();
-        control._removeZoomBar();
-        t.eq(control.div.childNodes.length, 0, "control's div cleared.");
+        var div = control.div;
+        map.destroy();
+        t.eq(div.childNodes.length, 0, "control's div cleared.");
         t.eq(control.zoombarDiv, null, "zoombar div nullified.")
     }
 
@@ -67,20 +68,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/august/trunk/tests/Control/Panel.html
===================================================================
--- sandbox/august/trunk/tests/Control/Panel.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/Panel.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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 );

Modified: sandbox/august/trunk/tests/Control/Permalink.html
===================================================================
--- sandbox/august/trunk/tests/Control/Permalink.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/Permalink.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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>

Copied: sandbox/august/trunk/tests/Control/PinchZoom.html (from rev 11704, trunk/openlayers/tests/Control/PinchZoom.html)
===================================================================
--- sandbox/august/trunk/tests/Control/PinchZoom.html	                        (rev 0)
+++ sandbox/august/trunk/tests/Control/PinchZoom.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,87 @@
+<html>
+<head>
+  <script src="../OLLoader.js"></script>
+  <script type="text/javascript">
+
+    function test_constructor(t) {
+        t.plan(2);
+        var control = new OpenLayers.Control.PinchZoom();
+        t.ok(control instanceof OpenLayers.Control.PinchZoom, "got an instance");
+        t.ok(control.handler instanceof OpenLayers.Handler.Pinch, "control has pinch handler");
+        control.destroy();
+    }
+
+    function test_destroy(t) {
+        t.plan(1);
+        var control = new OpenLayers.Control.PinchZoom();
+        control.destroy();
+        t.ok(!control.handler, "handler destroyed");
+    }
+    
+    function test_activate(t) {
+        t.plan(3);
+        var control = new OpenLayers.Control.PinchZoom();
+        t.ok(!control.active, "control not activated after construction");
+        
+        var map = new OpenLayers.Map({
+            div: "map",
+            controls: [control]
+        });
+        t.ok(control.active, "control activated after being added to the map");
+        
+        control.deactivate();
+        t.ok(!control.active, "control deactivated");
+        
+        map.destroy();
+    }
+
+    function test_pinchMove(t) {
+
+        var control = new OpenLayers.Control.PinchZoom();
+
+        var map = new OpenLayers.Map({
+            div: "map",
+            controls: [control]
+        });
+        
+        var log = [];
+        control.applyTransform = function(transform) {
+            log.push(transform);
+        }
+        
+        control.containerOrigin = {
+            x: 0, y: 0
+        };
+
+        control.pinchOrigin = {
+            x: 100, y: 50
+        };
+
+        var cases = [
+            {x: 100, y: 60, scale: 1, transform: "translate(0px, 10px) scale(1)"},
+            {x: 150, y: 60, scale: 1, transform: "translate(50px, 10px) scale(1)"},
+            {x: 150, y: 60, scale: 2, transform: "translate(-50px, -40px) scale(2)"},
+            {x: 50, y: 20, scale: 2.5, transform: "translate(-200px, -105px) scale(2.5)"},
+            {x: 150, y: 60, scale: 2, transform: "translate(-50px, -40px) scale(2)"},
+            {x: 50, y: 20, scale: 0.25, transform: "translate(25px, 8px) scale(0.25)"}
+        ];
+        
+        var len = cases.length;
+        t.plan(len*2);
+        
+        var c;
+        for (var i=0; i<len; ++i) {
+            c = cases[i];
+            control.pinchMove({xy: {x: c.x, y: c.y}}, {scale: c.scale});
+            t.eq(log.length, i+1, i + " called once");
+            t.eq(log[i], c.transform, i + " correct transform");
+        }
+        
+    }
+
+  </script>
+</head>
+<body>
+    <div id="map" style="width: 256px; height: 256px;"></div>
+</body>
+</html>

Modified: sandbox/august/trunk/tests/Control/SLDSelect.html
===================================================================
--- sandbox/august/trunk/tests/Control/SLDSelect.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/SLDSelect.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/Scale.html
===================================================================
--- sandbox/august/trunk/tests/Control/Scale.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/Scale.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/ScaleLine.html
===================================================================
--- sandbox/august/trunk/tests/Control/ScaleLine.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/ScaleLine.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/SelectFeature.html
===================================================================
--- sandbox/august/trunk/tests/Control/SelectFeature.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/SelectFeature.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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);
@@ -373,6 +373,114 @@
         map.events.triggerEvent("click", evt);
     }
 
+    // test for http://trac.openlayers.org/ticket/2812
+    function test_highlightOnly_toggle(t) {
+        t.plan(8);
+
+        /*
+         * setup
+         */
+
+        var map, layer, ctrl1, ctrl2, _feature, feature, evt, _style;
+
+        map = new OpenLayers.Map("map");
+        layer = new OpenLayers.Layer.Vector("name", {isBaseLayer: true});
+        map.addLayer(layer);
+
+        ctrl1 = new OpenLayers.Control.SelectFeature(layer, {
+            highlightOnly: false,
+            hover: false,
+            clickout: false,
+            toggle: true
+        });
+        map.addControl(ctrl1);
+
+        ctrl2 = new OpenLayers.Control.SelectFeature(layer, {
+            highlightOnly: true,
+            hover: true
+        });
+        map.addControl(ctrl2);
+
+        ctrl2.activate();
+        ctrl1.activate();
+
+        feature = new OpenLayers.Feature.Vector();
+        feature.layer = layer;
+
+        // override the layer's getFeatureFromEvent func so that it always
+        // returns the feature referenced to by _feature
+        layer.getFeatureFromEvent = function(evt) { return _feature; };
+
+        evt = {xy: new OpenLayers.Pixel(Math.random(), Math.random())};
+
+        map.zoomToMaxExtent();
+
+        /*
+         * tests
+         */
+
+        // with renderIntent
+
+        ctrl1.renderIntent = "select";
+        ctrl2.renderIntent = "temporary";
+
+        // mouse over feature, feature is drawn with "temporary"
+        _feature = feature;
+        evt.type = "mousemove";
+        map.events.triggerEvent("mousemove", evt);
+        t.eq(feature.renderIntent, "temporary",
+             "feature drawn with expected render intent after \"mouseover\"");
+
+        // click in feature, feature is drawn with "select"
+        _feature = feature;
+        evt.type = "click";
+        map.events.triggerEvent("click", evt);
+        t.eq(feature.renderIntent, "select",
+             "feature drawn with expected render intent after \"clickin\"");
+
+        // mouse out of feature, feature is still drawn with "select"
+        _feature = null;
+        evt.type = "mousemove";
+        map.events.triggerEvent("mousemove", evt);
+        t.eq(feature.renderIntent, "select",
+             "feature drawn with expected render intent after \"mouseout\"");
+
+        // mouse over feature again, feature is drawn with "temporary"
+        _feature = feature;
+        evt.type = "mousemove";
+        map.events.triggerEvent("mousemove", evt);
+        t.eq(feature.renderIntent, "temporary",
+             "feature drawn with expected render intent after \"mouseover\"");
+
+        // click in feature again, feature is drawn with "default"
+        _feature = feature;
+        evt.type = "click";
+        map.events.triggerEvent("click", evt);
+        t.eq(feature.renderIntent, "default",
+             "feature drawn with expected render intent after \"clickin\"");
+
+        // mouse out of feature again, feature is still drawn with "default"
+        _feature = null;
+        evt.type = "mousemove";
+        map.events.triggerEvent("mousemove", evt);
+        t.eq(feature.renderIntent, "default",
+             "feature drawn with expected render intent after \"mouseout\"");
+
+        // mouse over feature again, feature is drawn with "temporary"
+        _feature = feature;
+        evt.type = "mousemove";
+        map.events.triggerEvent("mousemove", evt);
+        t.eq(feature.renderIntent, "temporary",
+             "feature drawn with expected render intent after \"mouseover\"");
+
+        // mouse out of feature again, feature is still drawn with "default"
+        _feature = null;
+        evt.type = "mousemove";
+        map.events.triggerEvent("mousemove", evt);
+        t.eq(feature.renderIntent, "default",
+             "feature drawn with expected render intent after \"mouseout\"");
+    }
+
     function test_setLayer(t) {
         t.plan(5);
         var map = new OpenLayers.Map("map");

Modified: sandbox/august/trunk/tests/Control/Snapping.html
===================================================================
--- sandbox/august/trunk/tests/Control/Snapping.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/Snapping.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/Split.html
===================================================================
--- sandbox/august/trunk/tests/Control/Split.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/Split.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/TouchNavigation.html (from rev 11704, trunk/openlayers/tests/Control/TouchNavigation.html)
===================================================================
--- sandbox/august/trunk/tests/Control/TouchNavigation.html	                        (rev 0)
+++ sandbox/august/trunk/tests/Control/TouchNavigation.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,154 @@
+<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_clickHandlerOptions(t) {
+
+        t.plan(3);
+
+         var nav = new OpenLayers.Control.TouchNavigation();
+         t.eq(nav.clickHandlerOptions, null, "clickHandlerOptions null by default");
+
+         var map = new OpenLayers.Map({
+             div: document.body,
+             controls: [
+                 new OpenLayers.Control.TouchNavigation({
+                     clickHandlerOptions: {foo: "bar"}
+                 })
+             ]
+         });
+         nav = map.controls[0];
+
+         t.eq(nav.handlers.click.foo, "bar", "foo property is set on the click handler");
+         t.eq(nav.handlers.click.pixelTolerance, 2, "pixelTolerance is 2 by default");
+         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: new OpenLayers.Pixel(1 ,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/august/trunk/tests/Control/TransformFeature.html
===================================================================
--- sandbox/august/trunk/tests/Control/TransformFeature.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/TransformFeature.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/WMSGetFeatureInfo.html
===================================================================
--- sandbox/august/trunk/tests/Control/WMSGetFeatureInfo.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/WMSGetFeatureInfo.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control/WMTSGetFeatureInfo.html
===================================================================
--- sandbox/august/trunk/tests/Control/WMTSGetFeatureInfo.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control/WMTSGetFeatureInfo.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Control.html
===================================================================
--- sandbox/august/trunk/tests/Control.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Control.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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);
@@ -60,7 +60,7 @@
     }
 
     function test_Control_destroy(t) {
-        t.plan(3);
+        t.plan(4);
     
         var map = new OpenLayers.Map('map');
         var control = new OpenLayers.Control();
@@ -70,6 +70,7 @@
         t.ok(map.controls[map.controls.length - 1] != control, "map.controls doesn't contains control");
 
         t.ok(control.map == null, "Control.map is null");
+        t.ok(control.div == null, "Control.div is null");
         t.ok(control.handler == null, "Control.handler is null");
     }
     

Modified: sandbox/august/trunk/tests/Events.html
===================================================================
--- sandbox/august/trunk/tests/Events.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Events.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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.5, "evt.clientX value is correct");
+        t.eq(evt.clientY, 1.5, "evt.clientY value is correct");
+    }
+
     function test_Events_destroy (t) {
         t.plan(2);
 

Modified: sandbox/august/trunk/tests/Extras.html
===================================================================
--- sandbox/august/trunk/tests/Extras.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Extras.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Feature/Vector.html
===================================================================
--- sandbox/august/trunk/tests/Feature/Vector.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Feature/Vector.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Feature.html
===================================================================
--- sandbox/august/trunk/tests/Feature.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Feature.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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; 

Modified: sandbox/august/trunk/tests/Filter/Comparison.html
===================================================================
--- sandbox/august/trunk/tests/Filter/Comparison.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Filter/Comparison.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Filter/FeatureId.html
===================================================================
--- sandbox/august/trunk/tests/Filter/FeatureId.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Filter/FeatureId.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Filter/Logical.html
===================================================================
--- sandbox/august/trunk/tests/Filter/Logical.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Filter/Logical.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Filter/Spatial.html
===================================================================
--- sandbox/august/trunk/tests/Filter/Spatial.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Filter/Spatial.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Filter.html
===================================================================
--- sandbox/august/trunk/tests/Filter.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Filter.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/ArcXML/Features.html
===================================================================
--- sandbox/august/trunk/tests/Format/ArcXML/Features.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/ArcXML/Features.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/ArcXML.html
===================================================================
--- sandbox/august/trunk/tests/Format/ArcXML.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/ArcXML.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/Atom.html
===================================================================
--- sandbox/august/trunk/tests/Format/Atom.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/Atom.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/CQL.html
===================================================================
--- sandbox/august/trunk/tests/Format/CQL.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/CQL.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,6 +1,6 @@
 <html>
     <head>
-        <script src="../../lib/OpenLayers.js"></script>
+        <script src="../OLLoader.js"></script>
 
         <script type="text/javascript">
 

Modified: sandbox/august/trunk/tests/Format/CSWGetDomain/v2_0_2.html
===================================================================
--- sandbox/august/trunk/tests/Format/CSWGetDomain/v2_0_2.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/CSWGetDomain/v2_0_2.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/CSWGetDomain.html
===================================================================
--- sandbox/august/trunk/tests/Format/CSWGetDomain.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/CSWGetDomain.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/CSWGetRecords/v2_0_2.html
===================================================================
--- sandbox/august/trunk/tests/Format/CSWGetRecords/v2_0_2.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/CSWGetRecords/v2_0_2.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/CSWGetRecords.html
===================================================================
--- sandbox/august/trunk/tests/Format/CSWGetRecords.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/CSWGetRecords.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/Filter/v1.html
===================================================================
--- sandbox/august/trunk/tests/Format/Filter/v1.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/Filter/v1.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/Filter/v1_0_0.html
===================================================================
--- sandbox/august/trunk/tests/Format/Filter/v1_0_0.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/Filter/v1_0_0.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/Filter/v1_1_0.html
===================================================================
--- sandbox/august/trunk/tests/Format/Filter/v1_1_0.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/Filter/v1_1_0.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/Filter.html
===================================================================
--- sandbox/august/trunk/tests/Format/Filter.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/Filter.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/GML/v2.html
===================================================================
--- sandbox/august/trunk/tests/Format/GML/v2.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/GML/v2.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/GML/v3.html
===================================================================
--- sandbox/august/trunk/tests/Format/GML/v3.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/GML/v3.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/GML.html
===================================================================
--- sandbox/august/trunk/tests/Format/GML.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/GML.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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) { 

Modified: sandbox/august/trunk/tests/Format/GPX.html
===================================================================
--- sandbox/august/trunk/tests/Format/GPX.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/GPX.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/GeoJSON.html
===================================================================
--- sandbox/august/trunk/tests/Format/GeoJSON.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/GeoJSON.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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"}}]}'; 
@@ -95,6 +95,19 @@
         t.eq(data.components[1].y, 1, "y of second component is right");    
     }
 
+    function test_Format_GeoJSON_multipoint_projected(t) {
+        t.plan(1);
+        var f = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPoint([
+            new OpenLayers.Geometry.Point(15555162, 4247484)]));
+        var format = new OpenLayers.Format.GeoJSON({
+            internalProjection: new OpenLayers.Projection("EPSG:900913"),
+            externalProjection: new OpenLayers.Projection("EPSG:4326")
+        });
+        var data = format.write(f);
+        var found = (data.search('139.734') != -1);
+        t.ok(found, "Found 139.734 (correct reprojection) in data output.");
+    }        
+
     function test_Format_GeoJSON_multiline(t) {
         t.plan(3);
 

Modified: sandbox/august/trunk/tests/Format/GeoRSS.html
===================================================================
--- sandbox/august/trunk/tests/Format/GeoRSS.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/GeoRSS.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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) { 
@@ -73,6 +73,15 @@
             t.xml_eq(out, expected_result, "Output gave expected value");
         }
     }
+
+    function test_leading_space(t) {
+        t.plan(2);
+        
+        var parser = new OpenLayers.Format.GeoRSS();
+        var items = parser.read('<rss version="2.0" xmlns:georss="http://www.georss.org/georss"><item><description>  <![CDATA[foo]]></description></item></rss>');
+        t.eq(items.length, 1, "item created");
+        t.eq(items[0].attributes.description, "  foo", "description value is ok");
+    }
              
     var shell_start = '<feed xmlns="http://www.w3.org/2005/Atom" \n              xmlns:georss="http://www.georss.org/georss">\n              <title>scribble</title>\n              <id>http://featureserver.org/featureserver.cgi/scribble?format=atom</id>\n              <author><name>FeatureServer</name></author>\n';             
     var shell_end = '</feed>'; 

Modified: sandbox/august/trunk/tests/Format/JSON.html
===================================================================
--- sandbox/august/trunk/tests/Format/JSON.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/JSON.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/KML.html
===================================================================
--- sandbox/august/trunk/tests/Format/KML.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/KML.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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>';
@@ -9,7 +9,6 @@
     var test_style_outline = '<kml xmlns="http://earth.google.com/kml/2.0"> <Placemark>    <Style> <PolyStyle> <outline>0</outline> <color>870000ff</color> <width>10</width> </PolyStyle> </Style>  <LineString> <coordinates> -112,36 -113,37 </coordinates> </LineString> </Placemark></kml>';
     var test_style_font = '<kml xmlns="http://earth.google.com/kml/2.0"> <Placemark><Style><LabelStyle><color>870000ff</color><scale>1.5</scale></LabelStyle></Style><LineString><coordinates> -112,36 -113,37 </coordinates></LineString></Placemark></kml>';
     var test_nl = '<kml xmlns="http://earth.google.com/kml/2.2"> <Document> <NetworkLink> <Link> <href>http://maker.geocommons.com/maps/1717/overlays/0</href> </Link> </NetworkLink> </Document></kml>';
-
     function test_Format_KML_constructor(t) { 
         t.plan(5); 
          
@@ -23,7 +22,20 @@
         t.eq(format.externalProjection.getCode(), "EPSG:4326", 
              "default external projection is EPSG:4326"); 
     }
-
+    function test_Format_KML_multipoint(t) {
+        t.plan(1);
+        var f = new OpenLayers.Feature.Vector(new OpenLayers.Geometry.MultiPoint([
+            new OpenLayers.Geometry.Point(15555162, 4247484)]));
+        var format = new OpenLayers.Format.KML({
+            extractStyles:      true, 
+            extractAttributes:  true,
+            internalProjection: new OpenLayers.Projection("EPSG:900913"),
+            externalProjection: new OpenLayers.Projection("EPSG:4326")
+        });
+        var data = format.write(f);
+        var found = (data.search('139.734') != -1);
+        t.ok(found, "Found 139.734 (correct reprojection) in data output.");
+    }        
     function test_Format_KML_read(t) {
         t.plan(5);
         var features = (new OpenLayers.Format.KML()).read(this.test_content);
@@ -35,6 +47,7 @@
              "read geometry collection");
     }
 
+    
     function test_Format_KML_readCdataAttributes_20(t) {
         t.plan(2);
         var cdata = '<kml xmlns="http://earth.google.com/kml/2.0"><Document><Placemark><name><![CDATA[Pezinok]]> </name><description><![CDATA[Full of text.]]></description><styleUrl>#rel1.0</styleUrl><Point> <coordinates>17.266666, 48.283333</coordinates></Point></Placemark></Document></kml>';

Modified: sandbox/august/trunk/tests/Format/OSM.html
===================================================================
--- sandbox/august/trunk/tests/Format/OSM.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/OSM.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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">
     
@@ -95,6 +95,18 @@
             output = output.replace(/<\?[^>]*\?>/, '');
             t.eq(output, osm_serialized_data[key], key + " serialized correctly");
         }
+    }   
+    function test_Format_OSM_write_reproject(t) {
+        t.plan(1);
+        var f = new OpenLayers.Format.OSM({'internalProjection': new OpenLayers.Projection("EPSG:900913")});
+        var feat = new OpenLayers.Feature.Vector(
+            new OpenLayers.Geometry.Point(100000, 100000)
+            );
+        var data = f.write([feat]);
+        var f = new OpenLayers.Format.OSM();
+        var features = f.read(data);
+
+        t.eq(OpenLayers.Util.toFloat(features[0].geometry.x, 3), .898, "exported to lonlat and re-read as lonlat correctly")
     }    
     </script> 
 </head> 

Modified: sandbox/august/trunk/tests/Format/OWSContext/v0_3_1.html
===================================================================
--- sandbox/august/trunk/tests/Format/OWSContext/v0_3_1.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/OWSContext/v0_3_1.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,10 +1,10 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_read_wmswfs(t) {
-        t.plan(16);
+        t.plan(17);
         // taken from http://www.ogcnetwork.net/schemas/owc/0.3.1/context_nested.xml
         // adapted: add an extra slash (roads/railways) in the Title of the WMS layer to test nesting
         var text = '<?xml version="1.0" encoding="UTF-8"?>' +
@@ -61,6 +61,7 @@
         map.zoomToExtent(new OpenLayers.Bounds(-117, 32, -116, 33));
         var owc = parser.write(map, {id: 'ows-context-ex-1-v3', title: 'OWS Context version 0.3.1 showing nested layers'});
         t.xml_eq(text, owc, "Can we roundtrip this nested OWSContext with a WMS and WFS layer?");
+        t.eq(context.layers[1].metadata.nestingPath[0], "Tiger 2005fe major roads/railways", "Nesting path is preserved even after calling write");
     }
 
     function test_write_wmswfs(t) {

Modified: sandbox/august/trunk/tests/Format/SLD/v1_0_0.html
===================================================================
--- sandbox/august/trunk/tests/Format/SLD/v1_0_0.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/SLD/v1_0_0.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/SLD.html
===================================================================
--- sandbox/august/trunk/tests/Format/SLD.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/SLD.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/SOSCapabilities/v1_0_0.html
===================================================================
--- sandbox/august/trunk/tests/Format/SOSCapabilities/v1_0_0.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/SOSCapabilities/v1_0_0.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/SOSGetFeatureOfInterest.html
===================================================================
--- sandbox/august/trunk/tests/Format/SOSGetFeatureOfInterest.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/SOSGetFeatureOfInterest.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/SOSGetObservation.html
===================================================================
--- sandbox/august/trunk/tests/Format/SOSGetObservation.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/SOSGetObservation.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_read_SOSGetObservation(t) {

Modified: sandbox/august/trunk/tests/Format/Text.html
===================================================================
--- sandbox/august/trunk/tests/Format/Text.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/Text.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/WFS.html
===================================================================
--- sandbox/august/trunk/tests/Format/WFS.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WFS.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/WFSCapabilities/v1.html
===================================================================
--- sandbox/august/trunk/tests/Format/WFSCapabilities/v1.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WFSCapabilities/v1.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,10 +1,10 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_read(t) {
-        t.plan(30);
+        t.plan(33);
        
         var parser = new OpenLayers.Format.WFSCapabilities();
 
@@ -17,6 +17,7 @@
         t.eq(ft[0]["title"], "Manhattan (NY) landmarks", "title of first feature type correct");
         t.eq(ft[0]["name"], "poly_landmarks", "name of first feature type correct");
         t.eq(ft[0]["featureNS"], "http://www.census.gov", "ns of first feature type correct");
+        t.eq(ft[0]["srs"], "urn:x-ogc:def:crs:EPSG:4326", "srs of first feature type correct");
 
         // GeoServer, v1.0.0
         text = '<?xml version="1.0" encoding="UTF-8"?><WFS_Capabilities version="1.0.0" xmlns="http://www.opengis.net/wfs" xmlns:it.geosolutions="http://www.geo-solutions.it" xmlns:cite="http://www.opengeospatial.net/cite" xmlns:tiger="http://www.census.gov" xmlns:sde="http://geoserver.sf.net" xmlns:topp="http://www.openplans.org/topp" xmlns:sf="http://www.openplans.org/spearfish" xmlns:nurc="http://www.nurc.nato.int" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://localhost:80/geoserver/schemas/wfs/1.0.0/WFS-capabilities.xsd"><Service><Name>WFS</Name><Title>GeoServer Web Feature Service</Title><Abstract>This is the reference implementation of WFS 1.0.0 and WFS 1.1.0, supports all WFS operations including Transaction.</Abstract><Keywords>WFS, WMS, GEOSERVER</Keywords><OnlineResource>http://localhost:80/geoserver/wfs</OnlineResource><Fees>NONE</Fees><AccessConstraints>NONE</Acce
 ssConstraints></Service><Capability><Request><GetCapabilities><DCPType><HTTP><Get onlineResource="http://localhost:80/geoserver/wfs?request=GetCapabilities"/></HTTP></DCPType><DCPType><HTTP><Post onlineResource="http://localhost:80/geoserver/wfs?"/></HTTP></DCPType></GetCapabilities><DescribeFeatureType><SchemaDescriptionLanguage><XMLSCHEMA/></SchemaDescriptionLanguage><DCPType><HTTP><Get onlineResource="http://localhost:80/geoserver/wfs?request=DescribeFeatureType"/></HTTP></DCPType><DCPType><HTTP><Post onlineResource="http://localhost:80/geoserver/wfs?"/></HTTP></DCPType></DescribeFeatureType><GetFeature><ResultFormat><GML2/><SHAPE-ZIP/><GEOJSON/><csv/><GML3/></ResultFormat><DCPType><HTTP><Get onlineResource="http://localhost:80/geoserver/wfs?request=GetFeature"/></HTTP></DCPType><DCPType><HTTP><Post onlineResource="http://localhost:80/geoserver/wfs?"/></HTTP></DCPType></GetFeature><Transaction><DCPType><HTTP><Get onlineResource="http://localhost:80/geoserver/wfs?request=T
 ransaction"/></HTTP></DCPType><DCPType><HTTP><Post onlineResource="http://localhost:80/geoserver/wfs?"/></HTTP></DCPType></Transaction><LockFeature><DCPType><HTTP><Get onlineResource="http://localhost:80/geoserver/wfs?request=LockFeature"/></HTTP></DCPType><DCPType><HTTP><Post onlineResource="http://localhost:80/geoserver/wfs?"/></HTTP></DCPType></LockFeature><GetFeatureWithLock><ResultFormat><GML2/></ResultFormat><DCPType><HTTP><Get onlineResource="http://localhost:80/geoserver/wfs?request=GetFeatureWithLock"/></HTTP></DCPType><DCPType><HTTP><Post onlineResource="http://localhost:80/geoserver/wfs?"/></HTTP></DCPType></GetFeatureWithLock></Request></Capability><FeatureTypeList><Operations><Query/><Insert/><Update/><Delete/><Lock/></Operations><FeatureType><Name>tiger:poly_landmarks</Name><Title>Manhattan (NY) landmarks</Title><Abstract>Manhattan landmarks, identifies water, lakes, parks, interesting buildilngs</Abstract><Keywords>DS_poly_landmarks, poly_landmarks, landmarks,
  manhattan</Keywords><SRS>EPSG:4326</SRS><LatLongBoundingBox minx="-74.047185" miny="40.679648" maxx="-73.90782" maxy="40.882078"/></FeatureType><FeatureType><Name>tiger:poi</Name><Title>Manhattan (NY) points of interest</Title><Abstract>Points of interest in New York, New York (on Manhattan). One of the attributes contains the name of a file with a picture of the point of interest.</Abstract><Keywords>poi, DS_poi, points_of_interest, Manhattan</Keywords><SRS>EPSG:4326</SRS><LatLongBoundingBox minx="-74.0118315772888" miny="40.70754683896324" maxx="-74.00857344353275" maxy="40.711945649065406"/></FeatureType><FeatureType><Name>tiger:tiger_roads</Name><Title>Manhattan (NY) roads</Title><Abstract>Highly simplified road layout of Manhattan in New York..</Abstract><Keywords>DS_tiger_roads, tiger_roads, roads</Keywords><SRS>EPSG:4326</SRS><LatLongBoundingBox minx="-74.02722" miny="40.684221" maxx="-73.907005" maxy="40.878178"/></FeatureType><FeatureType><Name>sf:archsites</Name><
 Title>Spearfish archeological sites</Title><Abstract>Sample data from GRASS, archeological sites location, Spearfish, South Dakota, USA</Abstract><Keywords>archsites, sfArchsites, spearfish, archeology</Keywords><SRS>EPSG:26713</SRS><LatLongBoundingBox minx="-103.8725637911543" miny="44.37740330855979" maxx="-103.63794182141925" maxy="44.48804280772808"/></FeatureType><FeatureType><Name>sf:bugsites</Name><Title>Spearfish bug locations</Title><Abstract>Sample data from GRASS, bug sites location, Spearfish, South Dakota, USA</Abstract><Keywords>sfBugsites, bugsites, insects, spearfish, tiger_beetles</Keywords><SRS>EPSG:26713</SRS><LatLongBoundingBox minx="-103.86796131703647" miny="44.373938816704396" maxx="-103.63773523234195" maxy="44.43418821380063"/></FeatureType><FeatureType><Name>sf:restricted</Name><Title>Spearfish restricted areas</Title><Abstract>Sample data from GRASS, restricted areas, Spearfish, South Dakota, USA</Abstract><Keywords>restricted, sfRestricted, spearf
 ish, areas</Keywords><SRS>EPSG:26713</SRS><LatLongBoundingBox minx="-103.85057172920756" miny="44.39436387625042" maxx="-103.74741494853805" maxy="44.48215752041131"/></FeatureType><FeatureType><Name>sf:roads</Name><Title>Spearfish roads</Title><Abstract>Sample data from GRASS, road layout, Spearfish, South Dakota, USA</Abstract><Keywords>sfRoads, roads, spearfish</Keywords><SRS>EPSG:26713</SRS><LatLongBoundingBox minx="-103.87741691493184" miny="44.37087275281798" maxx="-103.62231404880659" maxy="44.50015918338962"/></FeatureType><FeatureType><Name>sf:streams</Name><Title>Spearfish streams</Title><Abstract>Sample data from GRASS, streams, Spearfish, South Dakota, USA</Abstract><Keywords>sfStreams, streams, spearfish</Keywords><SRS>EPSG:26713</SRS><LatLongBoundingBox minx="-103.87789019829768" miny="44.372335260095554" maxx="-103.62287788915457" maxy="44.502218486214815"/></FeatureType><FeatureType><Name>topp:tasmania_cities</Name><Title>Tasmania cities</Title><Abstract>Citi
 es in Tasmania (actually, just the capital)</Abstract><Keywords>cities, Tasmania</Keywords><SRS>EPSG:4326</SRS><LatLongBoundingBox minx="145.19754" miny="-43.423512" maxx="148.27298000000002" maxy="-40.852802"/></FeatureType><FeatureType><Name>topp:tasmania_roads</Name><Title>Tasmania roads</Title><Abstract>Main Tasmania roads</Abstract><Keywords>Roads, Tasmania</Keywords><SRS>EPSG:4326</SRS><LatLongBoundingBox minx="145.19754" miny="-43.423512" maxx="148.27298000000002" maxy="-40.852802"/></FeatureType><FeatureType><Name>topp:tasmania_state_boundaries</Name><Title>Tasmania state boundaries</Title><Abstract>Tasmania state boundaries</Abstract><Keywords>tasmania_state_boundaries, Tasmania, boundaries</Keywords><SRS>EPSG:4326</SRS><LatLongBoundingBox minx="143.83482400000003" miny="-43.648056" maxx="148.47914100000003" maxy="-39.573891"/></FeatureType><FeatureType><Name>topp:tasmania_water_bodies</Name><Title>Tasmania water bodies</Title><Abstract>Tasmania water bodies</Abstra
 ct><Keywords>Lakes, Bodies, Australia, Water, Tasmania</Keywords><SRS>EPSG:4326</SRS><LatLongBoundingBox minx="145.97161899999998" miny="-43.031944" maxx="147.219696" maxy="-41.775558"/></FeatureType><FeatureType><Name>topp:states</Name><Title>USA Population</Title><Abstract>This is some census data on the states.</Abstract><Keywords>census, united, boundaries, state, states</Keywords><SRS>EPSG:4326</SRS><LatLongBoundingBox minx="-124.731422" miny="24.955967" maxx="-66.969849" maxy="49.371735"/></FeatureType><FeatureType><Name>tiger:giant_polygon</Name><Title>World rectangle</Title><Abstract>A simple rectangular polygon covering most of the world, it\'s only used for the purpose of providing a background (WMS bgcolor could be used instead)</Abstract><Keywords>DS_giant_polygon, giant_polygon</Keywords><SRS>EPSG:4326</SRS><LatLongBoundingBox minx="-180.0" miny="-90.0" maxx="180.0" maxy="90.0"/></FeatureType></FeatureTypeList><ogc:Filter_Capabilities><ogc:Spatial_Capabilities><
 ogc:Spatial_Operators><ogc:Disjoint/><ogc:Equals/><ogc:DWithin/><ogc:Beyond/><ogc:Intersect/><ogc:Touches/><ogc:Crosses/><ogc:Within/><ogc:Contains/><ogc:Overlaps/><ogc:BBOX/></ogc:Spatial_Operators></ogc:Spatial_Capabilities><ogc:Scalar_Capabilities><ogc:Logical_Operators/><ogc:Comparison_Operators><ogc:Simple_Comparisons/><ogc:Between/><ogc:Like/><ogc:NullCheck/></ogc:Comparison_Operators><ogc:Arithmetic_Operators><ogc:Simple_Arithmetic/><ogc:Functions><ogc:Function_Names><ogc:Function_Name nArgs="1">abs</ogc:Function_Name><ogc:Function_Name nArgs="1">abs_2</ogc:Function_Name><ogc:Function_Name nArgs="1">abs_3</ogc:Function_Name><ogc:Function_Name nArgs="1">abs_4</ogc:Function_Name><ogc:Function_Name nArgs="1">acos</ogc:Function_Name><ogc:Function_Name nArgs="1">Area</ogc:Function_Name><ogc:Function_Name nArgs="1">asin</ogc:Function_Name><ogc:Function_Name nArgs="1">atan</ogc:Function_Name><ogc:Function_Name nArgs="2">atan2</ogc:Function_Name><ogc:Function_Name nArgs="3">b
 etween</ogc:Function_Name><ogc:Function_Name nArgs="1">boundary</ogc:Function_Name><ogc:Function_Name nArgs="1">boundaryDimension</ogc:Function_Name><ogc:Function_Name nArgs="2">buffer</ogc:Function_Name><ogc:Function_Name nArgs="3">bufferWithSegments</ogc:Function_Name><ogc:Function_Name nArgs="1">ceil</ogc:Function_Name><ogc:Function_Name nArgs="1">centroid</ogc:Function_Name><ogc:Function_Name nArgs="2">classify</ogc:Function_Name><ogc:Function_Name nArgs="1">Collection_Average</ogc:Function_Name><ogc:Function_Name nArgs="1">Collection_Bounds</ogc:Function_Name><ogc:Function_Name nArgs="1">Collection_Count</ogc:Function_Name><ogc:Function_Name nArgs="1">Collection_Max</ogc:Function_Name><ogc:Function_Name nArgs="1">Collection_Median</ogc:Function_Name><ogc:Function_Name nArgs="1">Collection_Min</ogc:Function_Name><ogc:Function_Name nArgs="1">Collection_Sum</ogc:Function_Name><ogc:Function_Name nArgs="1">Collection_Unique</ogc:Function_Name><ogc:Function_Name nArgs="2">Con
 catenate</ogc:Function_Name><ogc:Function_Name nArgs="2">contains</ogc:Function_Name><ogc:Function_Name nArgs="1">convexHull</ogc:Function_Name><ogc:Function_Name nArgs="1">cos</ogc:Function_Name><ogc:Function_Name nArgs="2">crosses</ogc:Function_Name><ogc:Function_Name nArgs="2">dateFormat</ogc:Function_Name><ogc:Function_Name nArgs="2">dateParse</ogc:Function_Name><ogc:Function_Name nArgs="2">difference</ogc:Function_Name><ogc:Function_Name nArgs="1">dimension</ogc:Function_Name><ogc:Function_Name nArgs="2">disjoint</ogc:Function_Name><ogc:Function_Name nArgs="2">distance</ogc:Function_Name><ogc:Function_Name nArgs="1">double2bool</ogc:Function_Name><ogc:Function_Name nArgs="1">endPoint</ogc:Function_Name><ogc:Function_Name nArgs="1">envelope</ogc:Function_Name><ogc:Function_Name nArgs="2">EqualInterval</ogc:Function_Name><ogc:Function_Name nArgs="2">equalsExact</ogc:Function_Name><ogc:Function_Name nArgs="3">equalsExactTolerance</ogc:Function_Name><ogc:Function_Name nArgs
 ="2">equalTo</ogc:Function_Name><ogc:Function_Name nArgs="1">exp</ogc:Function_Name><ogc:Function_Name nArgs="1">exteriorRing</ogc:Function_Name><ogc:Function_Name nArgs="1">floor</ogc:Function_Name><ogc:Function_Name nArgs="1">geometryType</ogc:Function_Name><ogc:Function_Name nArgs="1">geomFromWKT</ogc:Function_Name><ogc:Function_Name nArgs="1">geomLength</ogc:Function_Name><ogc:Function_Name nArgs="2">getGeometryN</ogc:Function_Name><ogc:Function_Name nArgs="1">getX</ogc:Function_Name><ogc:Function_Name nArgs="1">getY</ogc:Function_Name><ogc:Function_Name nArgs="1">getZ</ogc:Function_Name><ogc:Function_Name nArgs="2">greaterEqualThan</ogc:Function_Name><ogc:Function_Name nArgs="2">greaterThan</ogc:Function_Name><ogc:Function_Name nArgs="0">id</ogc:Function_Name><ogc:Function_Name nArgs="2">IEEEremainder</ogc:Function_Name><ogc:Function_Name nArgs="3">if_then_else</ogc:Function_Name><ogc:Function_Name nArgs="11">in10</ogc:Function_Name><ogc:Function_Name nArgs="3">in2</ogc
 :Function_Name><ogc:Function_Name nArgs="4">in3</ogc:Function_Name><ogc:Function_Name nArgs="5">in4</ogc:Function_Name><ogc:Function_Name nArgs="6">in5</ogc:Function_Name><ogc:Function_Name nArgs="7">in6</ogc:Function_Name><ogc:Function_Name nArgs="8">in7</ogc:Function_Name><ogc:Function_Name nArgs="9">in8</ogc:Function_Name><ogc:Function_Name nArgs="10">in9</ogc:Function_Name><ogc:Function_Name nArgs="1">int2bbool</ogc:Function_Name><ogc:Function_Name nArgs="1">int2ddouble</ogc:Function_Name><ogc:Function_Name nArgs="1">interiorPoint</ogc:Function_Name><ogc:Function_Name nArgs="2">interiorRingN</ogc:Function_Name><ogc:Function_Name nArgs="2">intersection</ogc:Function_Name><ogc:Function_Name nArgs="2">intersects</ogc:Function_Name><ogc:Function_Name nArgs="1">isClosed</ogc:Function_Name><ogc:Function_Name nArgs="1">isEmpty</ogc:Function_Name><ogc:Function_Name nArgs="2">isLike</ogc:Function_Name><ogc:Function_Name nArgs="1">isNull</ogc:Function_Name><ogc:Function_Name nArgs
 ="1">isRing</ogc:Function_Name><ogc:Function_Name nArgs="1">isSimple</ogc:Function_Name><ogc:Function_Name nArgs="1">isValid</ogc:Function_Name><ogc:Function_Name nArgs="3">isWithinDistance</ogc:Function_Name><ogc:Function_Name nArgs="1">length</ogc:Function_Name><ogc:Function_Name nArgs="2">lessEqualThan</ogc:Function_Name><ogc:Function_Name nArgs="2">lessThan</ogc:Function_Name><ogc:Function_Name nArgs="1">log</ogc:Function_Name><ogc:Function_Name nArgs="2">max</ogc:Function_Name><ogc:Function_Name nArgs="2">max_2</ogc:Function_Name><ogc:Function_Name nArgs="2">max_3</ogc:Function_Name><ogc:Function_Name nArgs="2">max_4</ogc:Function_Name><ogc:Function_Name nArgs="2">min</ogc:Function_Name><ogc:Function_Name nArgs="2">min_2</ogc:Function_Name><ogc:Function_Name nArgs="2">min_3</ogc:Function_Name><ogc:Function_Name nArgs="2">min_4</ogc:Function_Name><ogc:Function_Name nArgs="1">not</ogc:Function_Name><ogc:Function_Name nArgs="2">notEqualTo</ogc:Function_Name><ogc:Function_N
 ame nArgs="1">numGeometries</ogc:Function_Name><ogc:Function_Name nArgs="1">numInteriorRing</ogc:Function_Name><ogc:Function_Name nArgs="1">numPoints</ogc:Function_Name><ogc:Function_Name nArgs="2">overlaps</ogc:Function_Name><ogc:Function_Name nArgs="1">parseBoolean</ogc:Function_Name><ogc:Function_Name nArgs="1">parseDouble</ogc:Function_Name><ogc:Function_Name nArgs="1">parseInt</ogc:Function_Name><ogc:Function_Name nArgs="0">pi</ogc:Function_Name><ogc:Function_Name nArgs="2">pointN</ogc:Function_Name><ogc:Function_Name nArgs="2">pow</ogc:Function_Name><ogc:Function_Name nArgs="1">PropertyExists</ogc:Function_Name><ogc:Function_Name nArgs="2">Quantile</ogc:Function_Name><ogc:Function_Name nArgs="0">random</ogc:Function_Name><ogc:Function_Name nArgs="2">relate</ogc:Function_Name><ogc:Function_Name nArgs="3">relatePattern</ogc:Function_Name><ogc:Function_Name nArgs="1">rint</ogc:Function_Name><ogc:Function_Name nArgs="1">round</ogc:Function_Name><ogc:Function_Name nArgs="1"
 >round_2</ogc:Function_Name><ogc:Function_Name nArgs="1">roundDouble</ogc:Function_Name><ogc:Function_Name nArgs="1">sin</ogc:Function_Name><ogc:Function_Name nArgs="1">sqrt</ogc:Function_Name><ogc:Function_Name nArgs="2">StandardDeviation</ogc:Function_Name><ogc:Function_Name nArgs="1">startPoint</ogc:Function_Name><ogc:Function_Name nArgs="2">strConcat</ogc:Function_Name><ogc:Function_Name nArgs="2">strEndsWith</ogc:Function_Name><ogc:Function_Name nArgs="2">strEqualsIgnoreCase</ogc:Function_Name><ogc:Function_Name nArgs="2">strIndexOf</ogc:Function_Name><ogc:Function_Name nArgs="2">strLastIndexOf</ogc:Function_Name><ogc:Function_Name nArgs="1">strLength</ogc:Function_Name><ogc:Function_Name nArgs="2">strMatches</ogc:Function_Name><ogc:Function_Name nArgs="4">strReplace</ogc:Function_Name><ogc:Function_Name nArgs="2">strStartsWith</ogc:Function_Name><ogc:Function_Name nArgs="3">strSubstring</ogc:Function_Name><ogc:Function_Name nArgs="2">strSubstringStart</ogc:Function_Nam
 e><ogc:Function_Name nArgs="1">strToLowerCase</ogc:Function_Name><ogc:Function_Name nArgs="1">strToUpperCase</ogc:Function_Name><ogc:Function_Name nArgs="1">strTrim</ogc:Function_Name><ogc:Function_Name nArgs="2">symDifference</ogc:Function_Name><ogc:Function_Name nArgs="1">tan</ogc:Function_Name><ogc:Function_Name nArgs="1">toDegrees</ogc:Function_Name><ogc:Function_Name nArgs="1">toRadians</ogc:Function_Name><ogc:Function_Name nArgs="2">touches</ogc:Function_Name><ogc:Function_Name nArgs="1">toWKT</ogc:Function_Name><ogc:Function_Name nArgs="2">union</ogc:Function_Name><ogc:Function_Name nArgs="2">UniqueInterval</ogc:Function_Name><ogc:Function_Name nArgs="2">within</ogc:Function_Name></ogc:Function_Names></ogc:Functions></ogc:Arithmetic_Operators></ogc:Scalar_Capabilities></ogc:Filter_Capabilities></WFS_Capabilities>';
@@ -27,6 +28,7 @@
         t.eq(ft[0]["title"], "Manhattan (NY) landmarks", "title of first feature type correct");
         t.eq(ft[0]["name"], "poly_landmarks", "name of first feature type correct");
         t.eq(ft[0]["featureNS"], "http://www.census.gov", "ns of first feature type correct");
+        t.eq(ft[0]["srs"], "EPSG:4326", "srs of first feature type correct");
 
         var service = res.service;
         t.eq(service.name, 'WFS', "service name correct");
@@ -137,6 +139,7 @@
         t.eq(ft.length, 2, "number of feature types correct");
         t.eq(ft[0]["title"], "Parks", "title of first feature type correct");
         t.eq(ft[0]["name"], "park", "name of first feature type correct");
+        t.eq(ft[0]["srs"], "EPSG:42304", "srs of first feature type correct");
         
         var service = res.service;
         t.eq(service.name, 'MapServer WFS', "service name correct");

Modified: sandbox/august/trunk/tests/Format/WFSCapabilities.html
===================================================================
--- sandbox/august/trunk/tests/Format/WFSCapabilities.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WFSCapabilities.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/WFSDescribeFeatureType.html
===================================================================
--- sandbox/august/trunk/tests/Format/WFSDescribeFeatureType.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WFSDescribeFeatureType.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/WFST/v1.html
===================================================================
--- sandbox/august/trunk/tests/Format/WFST/v1.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WFST/v1.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/WFST/v1_0_0.html
===================================================================
--- sandbox/august/trunk/tests/Format/WFST/v1_0_0.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WFST/v1_0_0.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/WFST/v1_1_0.html
===================================================================
--- sandbox/august/trunk/tests/Format/WFST/v1_1_0.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WFST/v1_1_0.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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,6 +34,21 @@
         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({
@@ -135,5 +150,55 @@
     </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/august/trunk/tests/Format/WFST.html
===================================================================
--- sandbox/august/trunk/tests/Format/WFST.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WFST.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/WKT.html
===================================================================
--- sandbox/august/trunk/tests/Format/WKT.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WKT.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
      
     var points = []; 

Modified: sandbox/august/trunk/tests/Format/WMC/v1.html
===================================================================
--- sandbox/august/trunk/tests/Format/WMC/v1.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WMC/v1.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/WMC/v1_1_0.html
===================================================================
--- sandbox/august/trunk/tests/Format/WMC/v1_1_0.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WMC/v1_1_0.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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_Layer(t) {

Modified: sandbox/august/trunk/tests/Format/WMC.html
===================================================================
--- sandbox/august/trunk/tests/Format/WMC.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WMC.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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>';

Modified: sandbox/august/trunk/tests/Format/WMSCapabilities/v1_1_1.html
===================================================================
--- sandbox/august/trunk/tests/Format/WMSCapabilities/v1_1_1.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WMSCapabilities/v1_1_1.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/WMSCapabilities/v1_1_1_WMSC.html
===================================================================
--- sandbox/august/trunk/tests/Format/WMSCapabilities/v1_1_1_WMSC.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WMSCapabilities/v1_1_1_WMSC.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/WMSCapabilities/v1_3_0.html
===================================================================
--- sandbox/august/trunk/tests/Format/WMSCapabilities/v1_3_0.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WMSCapabilities/v1_3_0.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/WMSCapabilities.html
===================================================================
--- sandbox/august/trunk/tests/Format/WMSCapabilities.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WMSCapabilities.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/WMSDescribeLayer.html
===================================================================
--- sandbox/august/trunk/tests/Format/WMSDescribeLayer.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WMSDescribeLayer.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/WMSGetFeatureInfo.html
===================================================================
--- sandbox/august/trunk/tests/Format/WMSGetFeatureInfo.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WMSGetFeatureInfo.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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) {
@@ -52,7 +52,7 @@
     }
 
     function test_read_msGMLOutput(t) {
-        t.plan(12);
+        t.plan(13);
         
         var parser = new OpenLayers.Format.WMSGetFeatureInfo();
 
@@ -69,6 +69,28 @@
         t.eq(features.length, 0,
              "Parsing empty msGMLOutput response succesfull");
 
+        // read empty attribute
+        text =
+            '<?xml version="1.0" encoding="ISO-8859-1"?>' +
+            '<msGMLOutput ' +
+            '    xmlns:gml="http://www.opengis.net/gml"' +
+            '    xmlns:xlink="http://www.w3.org/1999/xlink"' +
+            '    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">' +
+            '   <AAA64_layer>' +
+            '           <AAA64_feature>' +
+            '                   <gml:boundedBy>' +
+            '                           <gml:Box srsName="EPSG:28992">' +
+            '                                   <gml:coordinates>107397.266000,460681.063000 116568.188000,480609.250000</gml:coordinates>' +
+            '                           </gml:Box>' +
+            '                   </gml:boundedBy>' +
+            '                   <FOO>bar</FOO>' +
+            '                   <EMPTY></EMPTY>' +
+            '           </AAA64_feature>' +
+            '   </AAA64_layer>' +
+            '</msGMLOutput>';
+        features = parser.read(text);
+        t.eq((features[0].attributes.EMPTY === null), true, "Empty attribute is parsed as null");
+
         // read 1 feature from 1 layer
         text = 
             '<?xml version="1.0" encoding="ISO-8859-1"?>' +

Modified: sandbox/august/trunk/tests/Format/WMTSCapabilities/v1_0_0.html
===================================================================
--- sandbox/august/trunk/tests/Format/WMTSCapabilities/v1_0_0.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WMTSCapabilities/v1_0_0.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/WMTSCapabilities.html
===================================================================
--- sandbox/august/trunk/tests/Format/WMTSCapabilities.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/WMTSCapabilities.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format/XML.html
===================================================================
--- sandbox/august/trunk/tests/Format/XML.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format/XML.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Format.html
===================================================================
--- sandbox/august/trunk/tests/Format.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Format.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Geometry/Collection.html
===================================================================
--- sandbox/august/trunk/tests/Geometry/Collection.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Geometry/Collection.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var coll;
         

Modified: sandbox/august/trunk/tests/Geometry/Curve.html
===================================================================
--- sandbox/august/trunk/tests/Geometry/Curve.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Geometry/Curve.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Geometry/LineString.html
===================================================================
--- sandbox/august/trunk/tests/Geometry/LineString.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Geometry/LineString.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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), 

Modified: sandbox/august/trunk/tests/Geometry/LinearRing.html
===================================================================
--- sandbox/august/trunk/tests/Geometry/LinearRing.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Geometry/LinearRing.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Geometry/MultiLineString.html
===================================================================
--- sandbox/august/trunk/tests/Geometry/MultiLineString.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Geometry/MultiLineString.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Geometry/MultiPoint.html
===================================================================
--- sandbox/august/trunk/tests/Geometry/MultiPoint.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Geometry/MultiPoint.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Geometry/MultiPolygon.html
===================================================================
--- sandbox/august/trunk/tests/Geometry/MultiPolygon.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Geometry/MultiPolygon.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Geometry/Point.html
===================================================================
--- sandbox/august/trunk/tests/Geometry/Point.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Geometry/Point.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Geometry/Polygon.html
===================================================================
--- sandbox/august/trunk/tests/Geometry/Polygon.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Geometry/Polygon.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Geometry/Rectangle.html
===================================================================
--- sandbox/august/trunk/tests/Geometry/Rectangle.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Geometry/Rectangle.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Geometry/Surface.html
===================================================================
--- sandbox/august/trunk/tests/Geometry/Surface.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Geometry/Surface.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Geometry.html
===================================================================
--- sandbox/august/trunk/tests/Geometry.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Geometry.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Handler/Box.html (from rev 11704, trunk/openlayers/tests/Handler/Box.html)
===================================================================
--- sandbox/august/trunk/tests/Handler/Box.html	                        (rev 0)
+++ sandbox/august/trunk/tests/Handler/Box.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Handler/Click.html
===================================================================
--- sandbox/august/trunk/tests/Handler/Click.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Handler/Click.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,7 +1,12 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
+  
+    function px(x, y) {
+        return new OpenLayers.Pixel(x, y);
+    }
+  
     function test_Handler_Click_constructor(t) {
         t.plan(3);
         var control = new OpenLayers.Control();
@@ -43,14 +48,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 +78,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 +88,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
@@ -93,140 +99,314 @@
         handler.activate();
 
     }
+    
+    var callbackMap;
+    function callbackSetup(log, options) {
+        callbackMap = new OpenLayers.Map({
+            div: "map",
+            controls: [], // no controls here because these tests use a custom setTimeout and we only want setTimeout calls from a single handler 
+            layers: [new OpenLayers.Layer(null, {isBaseLayer: true})],
+            center: new OpenLayers.LonLat(0, 0),
+            zoom: 1
+        });
+        var control = new OpenLayers.Control();
+        callbackMap.addControl(control);
 
-    function test_Handler_Click_callbacks(t) {
-        t.plan(13);
-        
-        var map = new OpenLayers.Map('map', {controls: []});
-
-        var control = {
-            map: map
+        var callbacks = {
+            "click": function(evt) {
+                log.push({callback: "click", evt: evt});
+            },
+            "dblclick": function(evt) {
+                log.push({callback: "dblclick", evt: evt});
+            }
         };
-
-        var handler = new OpenLayers.Handler.Click(control, {});
+        var handler = new OpenLayers.Handler.Click(control, callbacks, options);
         handler.activate();
         
         
-        // set up for single click - three tests here
         var timers = {};
-        var sto = window.setTimeout;
+        window._setTimeout = window.setTimeout;
         window.setTimeout = function(func, delay) {
-            var key = Math.random();
+            log.push({method: "setTimeout", func: func, delay: delay});
+            var key = (new Date).getTime() + "-" + Math.random();
             timers[key] = true;
-            t.ok(typeof func == "function",
-                 "setTimeout called with a function");
-            t.eq(delay, handler.delay,
-                 "setTimeout called with proper delay");
             // execute function that is supposed to be delayed
             func();
             return key;
         }
-        var cto = window.clearTimeout;
+        window._clearTimeout = window.clearTimeout;
         window.clearTimeout = function(key) {
-            if(timers[key] === true) {
-                delete timers[key];
-            } else {
-                t.fail("clearTimeout called with non-existent timerId");
-            }
+            log.push({
+                method: "clearTimeout",
+                keyExists: (key in timers)
+            });
+            delete timers[key];
         }
+        return handler;    
+    }
+    
+    function callbackTeardown() {
+        window.setTimeout = window._setTimeout;
+        window.clearTimeout = window._clearTimeout;
+        callbackMap.destroy();
+        callbackMap = null;
+    }
+
+    function test_callbacks_click_default(t) {
+        t.plan(6);
+
+        var log = [];
+        var handler = callbackSetup(log);
+        
+        // set up for single click - three tests here
         var testEvt = {id: Math.random()};
-        handler.callbacks = {
-            "click": function(evt) {
-                t.eq(evt.id, testEvt.id,
-                     "(click w/ single true) click callback called with correct evt");
-            },
-            "dblclick": function(evt) {
-                t.fail("(click w/ single true) dblclick should not be called here");
-            }
+        handler.map.events.triggerEvent("click", testEvt);
+        t.eq(log.length, 2, "(click w/ single true) two items logged");
+
+        // first item logged is setTimeout call
+        t.eq(log[0].method, "setTimeout", "setTimeout called");
+        t.eq(typeof log[0].func, "function", "setTimeout called with a function");
+        t.eq(log[0].delay, handler.delay, "setTimeout called with proper delay");
+        
+        // second item logged is from click callback
+        t.eq(log[1].callback, "click", "click callback called");
+        t.eq(log[1].evt.id, testEvt.id, "got correct event");
+        
+        callbackTeardown();
+    }
+    
+    function test_callbacks_dblclick_default(t) {
+        t.plan(1);
+
+        var log = [];
+        var handler = callbackSetup(log);
+        var testEvt = {id: Math.random()};
+        handler.map.events.triggerEvent("dblclick", testEvt);
+        
+        t.eq(log.length, 0, "nothing happens by default with dblclick (double is false)");
+        
+        callbackTeardown();
+        
+    }
+
+    function test_callbacks_dblclick_double(t) {
+        t.plan(3);
+
+        var log = [];
+        var handler = callbackSetup(log, {"double": true});
+        var testEvt = {id: Math.random()};
+        handler.map.events.triggerEvent("dblclick", testEvt);
+        
+        t.eq(log.length, 1, "one item logged");
+        t.eq(log[0].callback, "dblclick", "dblclick callback called")
+        t.eq(log[0].evt.id, testEvt.id, "dblclick callback called with event");
+        
+        callbackTeardown();
+        
+    }
+
+    function test_callbacks_dblclick_sequence(t) {
+        t.plan(8);
+
+        var log = [];
+        var handler = callbackSetup(log, {"double": true});
+        var testEvt = {id: Math.random()};
+
+        // first click - set timer for next
+        handler.map.events.triggerEvent("click", testEvt);
+        t.ok(handler.timerId != null, "timer is set");
+        log.pop(); // because the test setTimeout is synchronous we get the click callback immediately
+        t.eq(log.length, 1, "one item logged (after pop due to synchronous setTimeout call in our tests");
+        t.eq(log[0].method, "setTimeout", "setTimeout called first");
+
+        // second click - timer cleared
+        handler.map.events.triggerEvent("click", testEvt);
+        t.ok(handler.timerId == null, "timer is cleared");
+        t.eq(log.length, 2, "two items logged after second click");
+        t.eq(log[1].method, "clearTimeout", "clearTimeout called second");
+
+        // dblclick event - callback called
+        handler.map.events.triggerEvent("dblclick", testEvt);        
+        t.eq(log.length, 3, "three items logged");
+        t.eq(log[2].callback, "dblclick", "dblclick callback called third");
+        
+        callbackTeardown();
+        
+    }
+
+    function test_callbacks_within_pixelTolerance(t) {
+        t.plan(1);
+
+        var log = [];
+        var handler = callbackSetup(log, {"double": true, pixelTolerance: 2});
+
+        var down = {
+            xy: px(0, 0)
         };
-        map.events.triggerEvent("click", testEvt);
+        var up = {
+            xy: px(0, 1)
+        };
+
+        handler.map.events.triggerEvent("mousedown", down);
+        handler.map.events.triggerEvent("mouseup", up);
+        handler.map.events.triggerEvent("click", up);
         
-        // set up for double click with double false - no tests here (only failures)
-        handler.callbacks = {
-            "click": function(evt) {
-                t.fail("(dblclick w/ double false) click should not be called here");
-            },
-            "dblclick": function(evt) {
-                t.fail("(dblclick w/ double false) dblclick should not be called here");
-            }
+        t.eq(log[log.length-1].callback, "click", "click callback called");
+        
+        callbackTeardown();
+        
+    }
+
+    function test_callbacks_outside_pixelTolerance(t) {
+        t.plan(2);
+
+        var log = [];
+        var handler = callbackSetup(log, {pixelTolerance: 2});
+
+        var down = {
+            xy: px(0, 0)
         };
-        testEvt = Math.random();
-        map.events.triggerEvent("dblclick", testEvt);
+        var up = {
+            xy: px(2, 3)
+        };
 
-        // set up for double click with double true - one test here
-        handler.double = true;
-        handler.callbacks = {
-            "click": function(evt) {
-                t.fail("(dblclick w/ double true) click should not be called here");
-            },
-            "dblclick": function(evt) {
-                t.eq(evt, testEvt,
-                     "(dblclick w/ double true) dblclick called with correct evt");
-            }
-        };
-        testEvt = Math.random();
-        map.events.triggerEvent("dblclick", testEvt);
+        handler.map.events.triggerEvent("mousedown", down);
+        t.ok(handler.down && handler.down.xy.equals(down.xy), "down position set");
+
+        handler.map.events.triggerEvent("mouseup", up);
+        handler.map.events.triggerEvent("click", up);
+        t.eq(log.length, 0, "nothing logged - event outside tolerance");
         
-        // set up for two clicks with double true - 6 tests here (with timeout ones from above)
-        handler.double = true;
-        handler.callbacks = {
-            "click": function(evt) {
-                t.ok(evt != null, "(two clicks w/ double true) click will not be called here if next three tests pass");
-            },
-            "dblclick": function(evt) {
-                t.eq(evt, testEvt,
-                     "(two clicks w/ double true) dblclick called with correct evt");
-            }
+        callbackTeardown();
+        
+    }
+
+    function test_callbacks_within_dblclickTolerance(t) {
+        t.plan(6);
+
+        var log = [];
+        var handler = callbackSetup(log, {single: false, "double": true, dblclickTolerance: 8});
+
+        var first = {
+            xy: px(0, 0)
         };
-        testEvt = Math.random();
-        map.events.triggerEvent("click", testEvt);
-        t.ok(handler.timerId != null,
-             "(two clicks w/ double true) timer is set to call click");
-        map.events.triggerEvent("click", testEvt);
-        t.ok(handler.timerId == null,
-             "(two clicks w/ double true) timer is cleared to call click");
-        map.events.triggerEvent("dblclick", testEvt);
-        handler.destroy();
+        var second = {
+            xy: px(0, 5)
+        };
+
+        handler.map.events.triggerEvent("mousedown", first);
+        handler.map.events.triggerEvent("mouseup", first);
+        handler.map.events.triggerEvent("click", first);
+        t.eq(log.length, 1, "one item logged");
+        t.eq(log[0] && log[0].method, "setTimeout", "setTimeout called");
         
-        // set up to tests pixelTolerance - three tests here (2 from setTimeout above)
-        handler = new OpenLayers.Handler.Click(control, {}, {
-            pixelTolerance: 2
-        });
-        handler.activate();
-        var downEvt = {
-            xy: new OpenLayers.Pixel(0, 0)
+        handler.map.events.triggerEvent("mousedown", second);
+        handler.map.events.triggerEvent("mouseup", second);
+        handler.map.events.triggerEvent("click", second);
+        t.eq(log.length, 2, "two events logged");
+        t.eq(log[1] && log[1].method, "clearTimeout", "clearTimeout called");
+        
+        handler.map.events.triggerEvent("dblclick", second);
+        t.eq(log.length, 3, "three items logged");
+        t.eq(log[2] && log[2].callback, "dblclick", "dblclick callback called");
+        
+        callbackTeardown();        
+    }
+
+    function test_callbacks_outside_dblclickTolerance(t) {
+        t.plan(5);
+
+        var log = [];
+        // default dblclickTolerance is 13
+        var handler = callbackSetup(log, {single: false, "double": true});
+
+        var first = {
+            xy: px(0, 0)
         };
-        map.events.triggerEvent("mousedown", downEvt);
-        var clickEvt = {
-            xy: new OpenLayers.Pixel(0, 1)
+        var second = {
+            xy: px(13.5, 0)
         };
-        // mouse moves one pixel, click should be called
-        handler.callbacks = {
-            "click": function(evt) {
-                t.ok(evt.xy == clickEvt.xy, "(pixelTolerance met) click called");
+
+        handler.map.events.triggerEvent("mousedown", first);
+        handler.map.events.triggerEvent("mouseup", first);
+        handler.map.events.triggerEvent("click", first);
+        t.eq(log.length, 1, "one item logged");
+        t.eq(log[0] && log[0].method, "setTimeout", "setTimeout called");
+
+        handler.map.events.triggerEvent("mousedown", second);
+        handler.map.events.triggerEvent("mouseup", second);
+        handler.map.events.triggerEvent("click", second);
+        t.eq(log.length, 2, "two items logged");
+        t.eq(log[1] && log[1].method, "clearTimeout", "clearTimeout called");
+
+        handler.map.events.triggerEvent("dblclick", second);
+        t.eq(log.length, 2, "still two items logged - dblclick callback is not called");
+        
+        callbackTeardown();
+    }
+
+    function test_callbacks_multitouch_single(t) {
+
+        t.plan(2);
+
+        var log = [];
+
+        var callbacks = {
+            click: function(evt) {
+                log.push({callback: "click", type: evt.type});
+            },
+            dblclick: function(evt) {
+                log.push({callback: "dblclick", type: evt.type});
             }
         };
-        map.events.triggerEvent("click", clickEvt);
-        handler.clearTimer();
+
+        var map = new OpenLayers.Map("map");
+        var layer = new OpenLayers.Layer(null, {isBaseLayer: true});
+        map.addLayer(layer);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 1);
+        var control = new OpenLayers.Control();
+        map.addControl(control);
+        var handler = new OpenLayers.Handler.Click(
+            control, callbacks,
+            {"double": true, single: true, pixelTolerance: 2}
+        );
+
+        // we override here so we don't have to wait for the timeout
+        handler.queuePotentialClick = function(evt) {
+            log.push({potential: true, evt: evt});
+            OpenLayers.Handler.Click.prototype.queuePotentialClick.call(this, evt);
+        }
         
-        // mouse moves 3x3 pixels, click should not be called
-        map.events.triggerEvent("mousedown", downEvt);
-        var clickEvt = {
-            xy: new OpenLayers.Pixel(3, 3)
-        };
-        // mouse moves one pixel, click should be called
-        handler.callbacks = {
-            "click": function(evt) {
-                t.fail("(pixelTolerance not met) click should not be called");
+        handler.activate();
+        
+        function handle(o) {
+            var touches = [];
+            if (("x0" in o) && ("y0" in o)) {
+                touches.push({
+                    clientX: o.x0, clientY: o.y0
+                });
             }
-        };
-        map.events.triggerEvent("click", clickEvt); // no test run
-        handler.clearTimer();
+            if (("x1" in o) && ("y1" in o)) {
+                touches.push({
+                    clientX: o.x1, clientY: o.y1
+                });
+            }
+            handler.map.events.handleBrowserEvent({
+                type: o.type, touches: touches
+            });
+        }
+
+        // a typical multitouch sequence goes like this:
+        // touchstart, touchstart, touchend, touchend
+        handle({type: "touchstart", x0: 10, y0: 10});
+        handle({type: "touchstart", x0: 10, y0: 10, x1: 30, y1: 15});
+        handle({type: "touchend"});
+        handle({type: "touchend"});
         
-        window.setTimeout = sto;
-        window.clearTimeout = cto;
+        t.eq(log.length, 1, "one item logged");
+        t.eq(log[0] && log[0].potential, true, "click in queue - no dblclick called");
         
-
+        map.destroy();
     }
 
     function test_Handler_Click_deactivate(t) {
@@ -252,45 +432,224 @@
     }
 
     function test_Handler_Click_mouseup(t) {
-        t.plan(4);
-        g_Propagate = {};
-        g_evt = {};
-                
-      //no modifiers, no handlerightclicks, no isrightclick        
+        t.plan(11);
+
+        var map = new OpenLayers.Map("map");
+        var control = new OpenLayers.Control();
+        map.addControl(control);
+        var handler = new OpenLayers.Handler.Click(control);
+
+        var testEvent = {id: Math.random()};
+        var propagate = true;
+        var log, got, modMatch, rightClick;
+
+        // override methods to log what is called
         var temp = OpenLayers.Event.isRightClick;
         OpenLayers.Event.isRightClick = function(e) { 
-            t.ok(e == g_evt, 'correct event passed in to checkModifiers');
-            return false; 
+            log.push({method: "isRightClick", evt: e});
+            return rightClick; 
         };
+        handler.checkModifiers = function(e) {
+            log.push({method: "checkModifiers", evt: e});
+            return modMatch;
+        };
+        handler.rightclick = function(e) {
+            log.push({method: "rightclick", evt: e});
+            return propagate;
+        };
 
-        var h = {
-            'checkModifiers': function(e) {
-                t.ok(e == g_evt, 'correct event passed in to checkModifiers');
-                return false;
+        
+        // simulate an event with non-matching modifiers
+        log = [];
+        modMatch = false;
+        rightClick = false;
+        got = handler.mouseup(testEvent);
+        t.eq(log.length, 1, "one item logged");
+        t.eq(log[0] && log[0].method, "checkModifiers", "a) checkModifiers called first");
+        t.eq(log[0] && log[0].evt, testEvent, "a) first method called with correct event");
+
+
+        // modifiers, handlerightclicks, and isrightclick
+        log = [];
+        rightClick = true;
+        modMatch = true;
+        handler.control.handleRightClicks = true;
+        got = handler.mouseup(testEvent);
+        t.eq(log.length, 3, "three items logged");
+        t.eq(log[0] && log[0].method, "checkModifiers", "b) checkModifiers called first");
+        t.eq(log[0] && log[0].evt, testEvent, "b) first method called with correct event");
+        t.eq(log[1] && log[1].method, "isRightClick", "b) isRightClick called second");
+        t.eq(log[1] && log[1].evt, testEvent, "b) second method called with correct event");
+        t.eq(log[2] && log[2].method, "rightclick", "b) rightclick called third");
+        t.eq(log[2] && log[2].evt, testEvent, "b) third method called with correct event");
+        t.eq(got, propagate, "b) return from handler's rightclick returned from mouseup");
+
+        OpenLayers.Event.isRightClick = temp;
+        map.destroy();
+    }
+
+    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: px(1, 1), touches: ["foo"]});
+        handler.touchend({touches: ["foo"]});
+
+        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.ok(log.lastTouches, "evt.lastTouches as expected");
+            }
+            // tear down
+            map.destroy();
+        });
+    }
+
+    function test_touch_within_dblclickTolerance(t) {
+        t.plan(4);
+
+        var log;
+
+        var callbacks = {
+            click: function(evt) {
+                log.push({callback: "click", type: evt.type});
             },
-            'control': {
-                'handleRightClicks': false
+            dblclick: function(evt) {
+                log.push({callback: "dblclick", type: evt.type});
+            }
+        };
+
+        var map = new OpenLayers.Map("map");
+        var layer = new OpenLayers.Layer(null, {isBaseLayer: true});
+        map.addLayer(layer);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 1);
+        var control = new OpenLayers.Control();
+        map.addControl(control);
+        var handler = new OpenLayers.Handler.Click(
+            control, callbacks,
+            {"double": true, single: true, pixelTolerance: 2}
+        );
+        handler.activate();
+        
+        function handle(type, x, y) {
+            map.events.handleBrowserEvent({
+                type: type,
+                touches: [
+                    {clientX: x, clientY: y}
+                ]
+            });
+        }
+
+        // test
+        log = [];
+        // sequence of two clicks on a touch device
+        // click 1
+        handle("touchstart", 10, 10);
+        handle("touchend", 11, 10);
+        handle("mousemove", 11, 10);
+        handle("mousedown", 10, 10);
+        handle("mouseup", 11, 10);
+        handle("click", 11, 10);
+        // click 2
+        handle("touchstart", 12, 10);
+        handle("touchend", 12, 10);
+        handle("mousedown", 12, 10);
+        handle("mouseup", 12, 10);
+        handle("click", 12, 10);
+
+        t.eq(log.length, 1, "one callback called");
+        t.eq(log[0] && log[0].callback, "dblclick", "click callback called");
+        t.eq(log[0] && log[0].type, "touchend", "click callback called with touchend event");
+        t.ok(!handler.timerId, "handler doesn't have a timerId waiting for click")
+
+        // tear down
+        map.destroy();
+    }
+
+    function test_touch_outside_dblclickTolerance(t) {
+        t.plan(2);
+
+        var log;
+
+        var callbacks = {
+            click: function(evt) {
+                log.push({callback: "click", type: evt.type});
             },
-            'rightclick': function(e) {
-                t.ok(e == g_evt, 'correct event passed in to checkModifiers');
-                return g_Propagate;
+            dblclick: function(evt) {
+                log.push({callback: "dblclick", type: evt.type});
             }
         };
-        var propagate = OpenLayers.Handler.Click.prototype.mouseup.apply(h, [g_evt]);
-        t.ok(propagate, "default propagate is true when no modifiers, no handlerightclicks, no isrightclick")
 
-      //modifiers, handlerightclicks, and isrightclick
-        h.checkModifiers = function() { return true; };
-        h.control.handleRightClicks = true;        
-        OpenLayers.Event.isRightClick = function(e) { return true; };
-        propagate = OpenLayers.Handler.Click.prototype.mouseup.apply(h, [g_evt]);
+        var map = new OpenLayers.Map("map");
+        var layer = new OpenLayers.Layer(null, {isBaseLayer: true});
+        map.addLayer(layer);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 1);
+        var control = new OpenLayers.Control();
+        map.addControl(control);
+        var handler = new OpenLayers.Handler.Click(
+            control, callbacks,
+            {"double": true, single: true, pixelTolerance: 2, dblclickTolerance: 8}
+        );
+        handler.activate();
+        
+        function handle(type, x, y) {
+            var touches = [];
+            if (x !== undefined && y !== undefined) {
+                touches.push({
+                    clientX: x, clientY: y
+                });
+            }
+            map.events.handleBrowserEvent({
+                type: type, touches: touches
+            });
+        }
 
-        t.ok(propagate == g_Propagate, "return from handler's rightClick() returned from mouseup");
+        // test
+        log = [];
+        // sequence of two clicks on a touch device
+        // click 1
+        handle("touchstart", 10, 10);
+        handle("touchend");
+        handle("mousemove", 11, 10);
+        handle("mousedown", 10, 10);
+        handle("mouseup", 11, 10);
+        handle("click", 11, 10);
+        // click 2
+        handle("touchstart", 20, 10);
+        handle("touchend");
+        handle("mousedown", 20, 10);
+        handle("mouseup", 20, 10);
+        handle("click", 20, 10);
 
-        OpenLayers.Event.isRightClick = temp;
+        t.eq(log.length, 0, "no callbacks called");
+        t.ok(!handler.timerId, "handler doesn't have a timerId waiting for click")
+
+        // tear down
+        map.destroy();
     }
 
-
   </script>
 </head>
 <body>

Modified: sandbox/august/trunk/tests/Handler/Drag.html
===================================================================
--- sandbox/august/trunk/tests/Handler/Drag.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Handler/Drag.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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();
@@ -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);
         
@@ -381,7 +440,159 @@
              "deactivate sets start to null");
     }
 
+    function test_interval_timer_after_mouseup(t) {
+        t.plan(5);
 
+        // set up
+
+        var map = new OpenLayers.Map('map');
+
+        var control = new OpenLayers.Control();
+        map.addControl(control);
+
+        var moveCnt;
+
+        var handler = new OpenLayers.Handler.Drag(control, {}, {
+            interval: 1,
+            move: function() {
+                moveCnt++;
+            }
+        });
+        handler.activate();
+
+        handler.checkModifiers = function() { return true; };
+
+        var ilc = OpenLayers.Event.isLeftClick;
+        OpenLayers.Event.isLeftClick = function() { return true; };
+
+        // test
+
+        moveCnt = 0;
+
+        var xy1 = new OpenLayers.Pixel(1, 2);
+        handler.mousedown({xy: xy1});
+        t.ok(handler.last == xy1, "[mousedown] last is as expected");
+        var xy2 = new OpenLayers.Pixel(2, 3);
+        handler.mousemove({xy: xy2});
+        t.ok(handler.last == xy2, "[mousemove 1] last is as expected");
+        t.ok(handler.timeoutId != null, "[mousemove 1] timeoutId is set");
+        var xy3 = new OpenLayers.Pixel(3, 4);
+        handler.mousemove({xy: xy3});
+        t.ok(handler.last == xy2, "[mousemove 2] last is as expected");
+        var xy4 = new OpenLayers.Pixel(4, 5);
+        handler.mouseup({xy: xy4});
+
+        t.delay_call(3, function() {
+            // the timer should not cause a move
+            t.eq(moveCnt, 1, "move called once");
+            // tear down
+            OpenLayers.Event.isLeftClick = ilc;
+        });
+    }
+
+    function test_interval_timer_after_mousedown(t) {
+        t.plan(5);
+
+        // set up
+
+        var map = new OpenLayers.Map('map');
+
+        var control = new OpenLayers.Control();
+        map.addControl(control);
+
+        var moveCnt;
+
+        var handler = new OpenLayers.Handler.Drag(control, {}, {
+            interval: 1,
+            move: function() {
+                moveCnt++;
+            }
+        });
+        handler.activate();
+
+        handler.checkModifiers = function() { return true; };
+
+        var ilc = OpenLayers.Event.isLeftClick;
+        OpenLayers.Event.isLeftClick = function() { return true; };
+
+        // test
+
+        moveCnt = 0;
+
+        var xy1 = new OpenLayers.Pixel(1, 2);
+        handler.mousedown({xy: xy1});
+        t.ok(handler.last == xy1, "[mousedown] last is as expected");
+        var xy2 = new OpenLayers.Pixel(2, 3);
+        handler.mousemove({xy: xy2});
+        t.ok(handler.last == xy2, "[mousemove 1] last is as expected");
+        t.ok(handler.timeoutId != null, "[mousemove 1] timeoutId is set");
+        var xy3 = new OpenLayers.Pixel(3, 4);
+        handler.mousemove({xy: xy3});
+        t.ok(handler.last == xy2, "[mousemove 2] last is as expected");
+        var xy4 = new OpenLayers.Pixel(4, 5);
+        handler.mouseup({xy: xy4});
+        var xy5 = new OpenLayers.Pixel(5, 6);
+        handler.mousedown({xy: xy4});
+
+        t.delay_call(3, function() {
+            // the timer should not cause a move
+            t.eq(moveCnt, 1, "move called once");
+            // tear down
+            OpenLayers.Event.isLeftClick = ilc;
+        });
+    }
+
+    function test_interval_timer_before_mouseup(t) {
+        t.plan(5);
+
+        // set up
+
+        var map = new OpenLayers.Map('map');
+
+        var control = new OpenLayers.Control();
+        map.addControl(control);
+
+        var moveCnt;
+
+        var handler = new OpenLayers.Handler.Drag(control, {}, {
+            interval: 1,
+            move: function() {
+                moveCnt++;
+            }
+        });
+        handler.activate();
+
+        handler.checkModifiers = function() { return true; };
+
+        var ilc = OpenLayers.Event.isLeftClick;
+        OpenLayers.Event.isLeftClick = function() { return true; };
+
+        // test
+
+        moveCnt = 0;
+
+        var xy1 = new OpenLayers.Pixel(1, 2);
+        handler.mousedown({xy: xy1});
+        t.ok(handler.last == xy1, "[mousedown] last is as expected");
+        var xy2 = new OpenLayers.Pixel(2, 3);
+        handler.mousemove({xy: xy2});
+        t.ok(handler.last == xy2, "[mousemove 1] last is as expected");
+        t.ok(handler.timeoutId != null, "[mousemove 1] timeoutId is set");
+        var xy3 = new OpenLayers.Pixel(3, 4);
+        handler.mousemove({xy: xy3});
+        t.ok(handler.last == xy2, "[mousemove 2] last is as expected");
+
+        t.delay_call(3, function() {
+            // the timer should cause a move
+            t.eq(moveCnt, 2, "move called twice");
+            var xy4 = new OpenLayers.Pixel(4, 5);
+            handler.mouseup({xy: xy4});
+            // tear down
+            OpenLayers.Event.isLeftClick = ilc;
+        });
+    }
+
+
   </script>
 </head>
 <body>

Modified: sandbox/august/trunk/tests/Handler/Feature.html
===================================================================
--- sandbox/august/trunk/tests/Handler/Feature.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Handler/Feature.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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);
@@ -53,7 +53,7 @@
         
     }
     function test_events(t) {
-        t.plan(25);
+        t.plan(30);
         
         var map = new OpenLayers.Map('map');
         var control = new OpenLayers.Control();
@@ -64,7 +64,7 @@
  
         // list below events that should be handled (events) and those
         // that should not be handled (nonevents) by the handler
-        var events = ["mousedown", "mouseup", "mousemove", "click", "dblclick"];
+        var events = ["mousedown", "mouseup", "mousemove", "click", "dblclick", "touchstart"];
         var nonevents = ["mouseout", "resize", "focus", "blur"];
         map.events.registerPriority = function(type, obj, func) {
             var output = func();
@@ -123,7 +123,7 @@
     }
 
     function test_callbacks(t) {
-        t.plan(9);
+        t.plan(13);
         
         var map = new OpenLayers.Map('map', {controls: []});
         var control = new OpenLayers.Control();
@@ -223,6 +223,36 @@
         callbacks['dblclick'] = getCallback('dblclick', newFeature);
         evtPx.type = "dblclick";
         map.events.triggerEvent('dblclick', evtPx);
+
+        // test touchstart on a feature
+        // 'click' callback should be called
+        handler.feature = null;
+        lastFeature = null;
+        newFeature = new OpenLayers.Feature.Vector();
+        newFeature.layer = layer;
+        callbacks['click'] = getCallback('click (touch)', newFeature);
+        callbacks['clickout'] = getCallback('clickout (touch)', lastFeature);
+        evtPx.type = "touchstart";
+        map.events.triggerEvent('touchstart', evtPx);
+
+        // test touchstart in new feature and out of last feature
+        // both 'click' and 'clickout' callbacks should be called
+        lastFeature = newFeature;
+        newFeature = new OpenLayers.Feature.Vector();
+        newFeature.layer = layer;
+        callbacks['click'] = getCallback('click (touch)', newFeature);
+        callbacks['clickout'] = getCallback('clickout (touch)', lastFeature);
+        evtPx.type = "touchstart";
+        map.events.triggerEvent('touchstart', evtPx);
+
+        // test touchstart out of last feature
+        // only 'clickout' callback should be called
+        lastFeature = newFeature;
+        newFeature = null;
+        callbacks['click'] = getCallback('click (touch)', newFeature);
+        callbacks['clickout'] = getCallback('clickout (touch)', lastFeature);
+        evtPx.type = "touchstart";
+        map.events.triggerEvent('touchstart', evtPx);
     }
 
     function test_deactivate(t) {

Modified: sandbox/august/trunk/tests/Handler/Hover.html
===================================================================
--- sandbox/august/trunk/tests/Handler/Hover.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Handler/Hover.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Handler/Keyboard.html
===================================================================
--- sandbox/august/trunk/tests/Handler/Keyboard.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Handler/Keyboard.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Handler/MouseWheel.html
===================================================================
--- sandbox/august/trunk/tests/Handler/MouseWheel.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Handler/MouseWheel.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Handler/Path.html
===================================================================
--- sandbox/august/trunk/tests/Handler/Path.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Handler/Path.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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,351 @@
             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});
             }
+        },
+        {
+            pixelTolerance: 0,
+            dblclickTolerance: 0
         });
         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 +500,346 @@
              "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, {},
+        {
+            pixelTolerance: 0,
+            dblclickTolerance: 0
+        });
+        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");
+    }
+
+    function test_sequence_touch_1(t) {
+        t.plan(19);
+        
+        log = [];
+        var map = new OpenLayers.Map("map", { // 300 x 150
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-100, -100, 100, 100),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
+        var control = new OpenLayers.Control({});
+        var handler = new OpenLayers.Handler.Path(control, {
+            "done": function(g, f) {
+                log.push({geometry: g, feature: f});
+            }
+        });
+        control.handler = handler;
+        map.addControl(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 5);
+        handler.activate();
+
+        handler.touchstart({type: "touchstart", xy: new OpenLayers.Pixel(49, 75)});
+        t.eq(log.length, 0, "touch start 1");
+
+        handler.touchmove({type: "touchmove", xy: new OpenLayers.Pixel(50, 75)});
+        t.eq(log.length, 0, "touch move");
+
+        handler.touchend({type: "touchend"});
+        t.eq(log.length, 0, "touch end");
+        t.geom_eq(handler.line.geometry,
+            new OpenLayers.Geometry.LineString([
+                new OpenLayers.Geometry.Point(-100, 0),
+                new OpenLayers.Geometry.Point(-100, 0)
+            ]), "geometry is correct");
+
+        handler.touchstart({type: "touchstart", xy: new OpenLayers.Pixel(100, 75)});
+        t.eq(log.length, 0, "touch start 2");
+
+        handler.touchmove({type: "touchmove", xy: new OpenLayers.Pixel(250, 75)});
+        t.eq(log.length, 0, "touch move");
+
+        handler.touchend({type: "touchend"});
+        t.eq(log.length, 0, "touch end");
+        t.geom_eq(handler.line.geometry,
+            new OpenLayers.Geometry.LineString([
+                new OpenLayers.Geometry.Point(-100, 0),
+                new OpenLayers.Geometry.Point(-100, 0)
+            ]), "geometry is correct");
+            
+        handler.touchstart({type: "touchstart", xy: new OpenLayers.Pixel(100, 75)});
+        t.eq(log.length, 0, "touch start 3");
+
+        handler.touchmove({type: "touchmove", xy: new OpenLayers.Pixel(100, 75)});
+        t.eq(log.length, 0, "touch move");
+
+        handler.touchend({type: "touchend"});
+        t.eq(log.length, 0, "touch end");
+        t.geom_eq(handler.line.geometry,
+            new OpenLayers.Geometry.LineString([
+                new OpenLayers.Geometry.Point(-100, 0),
+                new OpenLayers.Geometry.Point(-50, 0),
+                new OpenLayers.Geometry.Point(-50, 0)
+            ]), "geometry is correct");
+            
+        handler.touchstart({type: "touchstart", xy: new OpenLayers.Pixel(252, 100)});
+        t.eq(log.length, 0, "touch start 4");
+
+        handler.touchmove({type: "touchmove", xy: new OpenLayers.Pixel(252, 100)});
+        t.eq(log.length, 0, "touch move");
+
+        handler.touchend({type: "touchend"});
+        t.eq(log.length, 0, "touch end");
+            
+        handler.touchstart({type: "touchstart", xy: new OpenLayers.Pixel(250, 100)});
+        t.eq(log.length, 1, "touch start");
+
+        handler.touchmove({type: "touchmove", xy: new OpenLayers.Pixel(250, 100)});
+        t.eq(log.length, 1, "touch move");
+
+        handler.touchend({type: "touchend"});
+        t.eq(log.length, 1, "touch end");
+        t.geom_eq(log[0].geometry,
+            new OpenLayers.Geometry.LineString([
+                new OpenLayers.Geometry.Point(-100, 0),
+                new OpenLayers.Geometry.Point(-50, 0),
+                new OpenLayers.Geometry.Point(102, -25)
+            ]), "geometry is correct");
+    }
+
   </script>
 </head>
 <body>

Copied: sandbox/august/trunk/tests/Handler/Pinch.html (from rev 11704, trunk/openlayers/tests/Handler/Pinch.html)
===================================================================
--- sandbox/august/trunk/tests/Handler/Pinch.html	                        (rev 0)
+++ sandbox/august/trunk/tests/Handler/Pinch.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Handler/Point.html
===================================================================
--- sandbox/august/trunk/tests/Handler/Point.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Handler/Point.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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(11);
+        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,60 @@
         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");
+        var failed = false;
+        try {
+            handler.finalize();
+            msg = "finalizing after deactivation does not throw an error";
+        } catch (err) {
+            failed = true;
+            msg = "finalizing after deactivation throws an error";
+        }
+        t.ok(!failed, msg);
+        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(49);
+        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", "touchstart", "touchmove", "touchend"];
+        var nonevents = ["resize", "focus", "blur"];
         map.events.registerPriority = function(type, obj, func) {
             var r = func();
             if(typeof r == "string") {
@@ -99,7 +150,7 @@
     }
     
     function test_callbacks(t) {
-        t.plan(10);
+        t.plan(28);
         var map = new OpenLayers.Map("map", {
             resolutions: [1]
         });
@@ -108,68 +159,193 @@
             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});
             }
+        },
+        {
+            pixelTolerance: 0,
+            dblclickTolerance: 0
         });
         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 +359,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 +379,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");
@@ -217,8 +391,49 @@
              "handler.point is null after destroy");
     }
     
+    function test_sequence_touch_1(t) {
+        t.plan(7);
 
+        log = [];
+        var map = new OpenLayers.Map("map", { // 300 x 150
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-100, -100, 100, 100),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
+        var control = new OpenLayers.Control();
+        var handler = new OpenLayers.Handler.Point(control, {
+            "done": function(g, f) {
+                log.push({geometry: g, feature: f});
+            }
+        });
+        control.handler = handler;
+        map.addControl(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 5);
+        handler.activate();
+        
+        handler.touchstart({type: "touchstart", xy: new OpenLayers.Pixel(50, 75)});
+        t.eq(log.length, 0, "touch start 1");
+        
+        handler.touchmove({type: "touchmove", xy: new OpenLayers.Pixel(250, 75)});
+        t.eq(log.length, 0, "touch move");
 
+        handler.touchend({type: "touchend"});
+        t.eq(log.length, 0, "touch end");
+        
+        handler.touchstart({type: "touchstart", xy: new OpenLayers.Pixel(99, 75)});
+        t.eq(log.length, 0, "touch start 2");
+
+        handler.touchmove({type: "touchmove", xy: new OpenLayers.Pixel(100, 75)});
+        t.eq(log.length, 0, "touch move");
+
+        handler.touchend({type: "touchend"});
+        t.eq(log.length, 1, "touch end");
+        t.geom_eq(log[0].geometry, new OpenLayers.Geometry.Point(-50, 0), "geometry is correct");
+    }
+
   </script>
 </head>
 <body>

Modified: sandbox/august/trunk/tests/Handler/Polygon.html
===================================================================
--- sandbox/august/trunk/tests/Handler/Polygon.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Handler/Polygon.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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,145 @@
         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});
             }
+        },
+        {
+            pixelTolerance: 0,
+            dblclickTolerance: 0
         });
         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,17 +277,232 @@
             ]),
             "[dblclick] correct polygon"
         );
-        
-        // 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.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);
 
@@ -190,7 +535,11 @@
         var draw = new OpenLayers.Control.DrawFeature(
             map.layers[0],
             OpenLayers.Handler.Polygon,
-            {handlerOptions: {holeModifier: "altKey"}}
+            {handlerOptions: {
+                holeModifier: "altKey",
+                pixelTolerance: 0,
+                dblclickTolerance: 0
+            }}
         );
         map.addControl(draw);
         draw.activate();
@@ -204,6 +553,7 @@
         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
@@ -228,7 +578,7 @@
         trigger("dblclick", event);
         
         // make assertions
-        t.eq(log.length, 9, "a) correct number of events");
+        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");
 
@@ -236,6 +586,7 @@
         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
@@ -260,7 +611,7 @@
         trigger("dblclick", event);
         
         // make assertions
-        t.eq(log.length, 8, "b) correct number of events");
+        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");
         
@@ -269,6 +620,7 @@
         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
@@ -293,7 +645,7 @@
         trigger("dblclick", event);
         
         // make assertions
-        t.eq(log.length, 9, "c) correct number of events");
+        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");
 
@@ -301,6 +653,7 @@
         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
@@ -330,7 +683,7 @@
         trigger("dblclick", event);
         
         // make assertions
-        t.eq(log.length, 11, "d) correct number of events");
+        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");
         
@@ -338,7 +691,6 @@
         map.destroy();
     }        
 
-
     function test_Handler_Polygon_destroy(t) {
         t.plan(8);
         var map = new OpenLayers.Map('map');
@@ -372,8 +724,259 @@
         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,
+            pixelTolerance: 0, dblclickTolerance: 0}
+        );
+        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,
+            pixelTolerance: 0, dblclickTolerance: 0}
+        );
+        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");
+    }
+
+
+    function test_sequence_touch_1(t) {
+        t.plan(19);
+        
+        log = [];
+        var map = new OpenLayers.Map("map", { // 300 x 150
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-100, -100, 100, 100),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
+        var control = new OpenLayers.Control({});
+        var handler = new OpenLayers.Handler.Polygon(control, {
+            "done": function(g, f) {
+                log.push({geometry: g, feature: f});
+            }
+        });
+        control.handler = handler;
+        control.layer = layer;
+        map.addControl(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 5);
+        handler.activate();
+        
+        handler.touchstart({type: "touchstart", xy: new OpenLayers.Pixel(49, 75)});
+        t.eq(log.length, 0, "touch start 1");
+        var expectedRing = new OpenLayers.Geometry.LinearRing([
+            new OpenLayers.Geometry.Point(-100, 0),
+            new OpenLayers.Geometry.Point(-100, 0)
+        ]);
+
+        handler.touchmove({type: "touchmove", xy: new OpenLayers.Pixel(50, 75)});
+        t.eq(log.length, 0, "touch move");
+        
+        handler.touchend({type: "touchend"});
+        t.eq(log.length, 0, "touch end");
+        expectedRing.addComponent(new OpenLayers.Geometry.Point(-100,0), 1);
+
+        t.geom_eq(handler.polygon.geometry.components[0], expectedRing, "geometry is correct");
+
+        handler.touchstart({type: "touchstart", xy: new OpenLayers.Pixel(100, 75)});
+        t.eq(log.length, 0, "touch start 2");
+        var expectedRing = new OpenLayers.Geometry.LinearRing([
+            new OpenLayers.Geometry.Point(-100, 0),
+            new OpenLayers.Geometry.Point(-100, 0)
+        ]);
+
+        handler.touchmove({type: "touchmove", xy: new OpenLayers.Pixel(250, 75)});
+        t.eq(log.length, 0, "touch move");
+
+        handler.touchend({type: "touchend"});
+        t.eq(log.length, 0, "touch end");
+        expectedRing.addComponent(new OpenLayers.Geometry.Point(-100,0), 1);
+        
+        t.geom_eq(handler.polygon.geometry.components[0], expectedRing, "geometry is correct");
+            
+        handler.touchstart({type: "touchstart", xy: new OpenLayers.Pixel(100, 75)});
+        t.eq(log.length, 0, "touch start 3");
+
+        handler.touchmove({type: "touchmove", xy: new OpenLayers.Pixel(100, 75)});
+        t.eq(log.length, 0, "touch move");
+
+        handler.touchend({type: "touchend"});
+        t.eq(log.length, 0, "touch end");
+        t.geom_eq(handler.polygon.geometry,
+            new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([
+                new OpenLayers.Geometry.Point(-100, 0),
+                new OpenLayers.Geometry.Point(-50, 0),
+                new OpenLayers.Geometry.Point(-50, 0),
+                new OpenLayers.Geometry.Point(-100, 0)
+            ])]), "geometry is correct");
+            
+        handler.touchstart({type: "touchstart", xy: new OpenLayers.Pixel(252, 100)});
+        t.eq(log.length, 0, "touch start 4");
+
+        handler.touchmove({type: "touchmove", xy: new OpenLayers.Pixel(252, 100)});
+        t.eq(log.length, 0, "touch move");
+
+        handler.touchend({type: "touchend"});
+        t.eq(log.length, 0, "touch end");
+            
+        handler.touchstart({type: "touchstart", xy: new OpenLayers.Pixel(250, 100)});
+        t.eq(log.length, 1, "touch start");
+
+        handler.touchmove({type: "touchmove", xy: new OpenLayers.Pixel(250, 100)});
+        t.eq(log.length, 1, "touch move");
+
+        handler.touchend({type: "touchend"});
+        t.eq(log.length, 1, "touch end");
+        t.geom_eq(log[0].geometry,
+            new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing([
+                new OpenLayers.Geometry.Point(-100, 0),
+                new OpenLayers.Geometry.Point(-50, 0),
+                new OpenLayers.Geometry.Point(102, -25),
+                new OpenLayers.Geometry.Point(-100, 0)
+            ])]), "geometry is correct");
+    }
+
   </script>
 </head>
 <body>

Modified: sandbox/august/trunk/tests/Handler/RegularPolygon.html
===================================================================
--- sandbox/august/trunk/tests/Handler/RegularPolygon.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Handler/RegularPolygon.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Handler.html
===================================================================
--- sandbox/august/trunk/tests/Handler.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Handler.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Icon.html
===================================================================
--- sandbox/august/trunk/tests/Icon.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Icon.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Kinetic.html (from rev 11704, trunk/openlayers/tests/Kinetic.html)
===================================================================
--- sandbox/august/trunk/tests/Kinetic.html	                        (rev 0)
+++ sandbox/august/trunk/tests/Kinetic.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Lang.html
===================================================================
--- sandbox/august/trunk/tests/Lang.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Lang.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Layer/ArcGIS93Rest.html
===================================================================
--- sandbox/august/trunk/tests/Layer/ArcGIS93Rest.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/ArcGIS93Rest.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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; 
@@ -94,7 +94,7 @@
         var params = {layers: "show:0,2"};
         t.plan( 2 );
         var map = new OpenLayers.Map('map');
-        layer = new OpenLayers.Layer.ArcGIS93Rest(name, url, params);
+        layer = new OpenLayers.Layer.ArcGIS93Rest(name, url, params, {buffer: 2});
         map.addLayer(layer);
         map.setCenter(new OpenLayers.LonLat(0,0),5);
         t.eq( layer.grid.length, 7, "Grid rows is correct." );

Copied: sandbox/august/trunk/tests/Layer/ArcGISCache.html (from rev 11704, trunk/openlayers/tests/Layer/ArcGISCache.html)
===================================================================
--- sandbox/august/trunk/tests/Layer/ArcGISCache.html	                        (rev 0)
+++ sandbox/august/trunk/tests/Layer/ArcGISCache.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,227 @@
+<html>
+<head>
+  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../../lib/OpenLayers/Layer/ArcGISCache.js" type="text/javascript"></script>
+  <script src="ArcGISCache.json" type="text/javascript"></script>
+  <script type="text/javascript">
+    var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
+    var layer; 
+
+    var name = 'Test Layer';
+    var url = "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer";
+    var options = { }; 
+
+    function test_Layer_ARCGISCACHE_constructor (t) {
+        t.plan( 1 );
+                       
+        var layer = new OpenLayers.Layer.ArcGISCache(name, url, options);
+        t.ok( layer instanceof OpenLayers.Layer.ArcGISCache, "returns OpenLayers.Layer.ArcGISCache object" );
+    }
+    
+    function test_Layer_ARCGISCACHE_autoConfigure (t) {
+        t.plan( 5 );
+        var layerInfo = capabilitiesObject;
+        
+        //initialize the layer using the JSON object from an arcgis server
+        //SEE: ArcGISCache.json
+        var layer = new OpenLayers.Layer.ArcGISCache(name, url, {
+            layerInfo: layerInfo
+        });
+        t.ok( layer instanceof OpenLayers.Layer.ArcGISCache, "returns OpenLayers.Layer.ArcGISCache object" );        
+        t.ok( layer.projection = 'EPSG:' + layerInfo.spatialReference.wkid, "projection is set correctly");
+        t.ok( layer.units = 'm', "map units are set correctly");
+        t.ok( layer.resolutions && layer.resolutions.length == 20, "resolutions are initialized from LOD objects properly");
+        
+        if (layerInfo.tileInfo) {
+            if (layerInfo.tileInfo.width && layerInfo.tileInfo.height) {
+                var tileSize = new OpenLayers.Size(layerInfo.tileInfo.width, layerInfo.tileInfo.height);
+                t.ok((layer.tileSize.width == tileSize.width) && (layer.tileSize.height == tileSize.height), "tile size is set properly");
+            }
+            else {
+                var tileSize = new OpenLayers.Size(layerInfo.tileInfo.cols, layerInfo.tileInfo.rows);
+                t.ok((layer.tileSize.width == tileSize.width) && (layer.tileSize.height == tileSize.height), "tile size is set properly");
+            }
+        }        
+    }
+    
+    /**
+     * lets make sure we're getting the correct urls back with a basic auto-configure setup 
+     */
+    function test_Layer_ARCGISCACHE_autoConfigure_URLS(t) {
+        var layerInfo = capabilitiesObject;
+        
+        //initialize the layer using the JSON object from an arcgis server
+        //SEE: ArcGISCache.json
+        var layer = new OpenLayers.Layer.ArcGISCache(name, url, {
+            layerInfo: layerInfo
+        });
+        var map = new OpenLayers.Map('map', { 
+            maxExtent: layer.maxExtent,
+            units: layer.units,
+            resolutions: layer.resolutions,
+            numZoomLevels: layer.numZoomLevels,
+            tileSize: layer.tileSize,
+            projection: layer.displayProjection,
+            StartBounds: layer.initialExtent    
+        });
+        map.addLayers([layer]);
+    
+        //this set represents a few edge cases, and some more specific cases, it is by no means exhaustive,
+        var urlSets = [
+            { 
+                bounds: new OpenLayers.Bounds(-36787612.973083,-22463925.368666, 43362420.398053,17611091.316902),
+                url: "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/0/0/0" 
+            },            
+            { 
+                bounds: new OpenLayers.Bounds(-31793889.951914,4589319.785415, 8281126.733654,24626828.128199),
+                url: "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/1/0/0"
+            },            
+            { 
+                bounds: new OpenLayers.Bounds(-24639873.181971,12676071.933457, -4602364.839187,22694826.104849),
+                url: "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/2/0/0" 
+            },
+            { 
+                bounds: new OpenLayers.Bounds(-15521241.455665,11580270.695961, 4516266.887119,21599024.867353),
+                url: "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/2/0/1" 
+            },                    
+            { 
+                bounds: new OpenLayers.Bounds(-9265879.5435993,2870892.9335638, -8639707.4078873,3183979.0014198) ,
+                url: "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/7/54/35" 
+            },
+            { 
+                bounds: new OpenLayers.Bounds(-10741909.131798,4684560.1640365, -10585366.09787,4762831.6810005),
+                url: "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/9/195/119" 
+            },
+            { 
+                bounds: new OpenLayers.Bounds(-13668958.106938,4456961.2611504, -13512415.07301,4535232.7781144),
+                url: "http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer/tile/9/198/82" 
+            }
+        ];
+        
+        t.plan( urlSets.length );        
+        for(var i=0;i<urlSets.length;i++) 
+        {
+            var o = urlSets[i];            
+            map.zoomToExtent(o.bounds, true);
+            
+            var resultUrl = layer.getURL(o.bounds);            
+            t.ok( resultUrl == o.url, "correct tile returned for " + o.bounds);        
+        }
+    }    
+    
+    /**
+     * Test the formatting for the 'direct' urls, especially when not auto-configuring the layer
+     */
+    function test_Layer_ARCGISCACHE_direct(t) {
+        var roadsUrl = 'http://serverx.esri.com/arcgiscache/DG_County_roads_yesA_backgroundDark/Layers/_alllayers';
+        var urlSets = [
+            { 
+                bounds: new OpenLayers.Bounds(289244.67443386,4317153.7421985, 306178.04163392,4325620.4257985),
+                url: roadsUrl + "/L00/R0000029e/C0000027f.png" 
+            },            
+            { 
+                bounds: new OpenLayers.Bounds(308658.51534463,4303230.0164352, 325591.88254469,4311696.7000352),
+                url: roadsUrl + "/L00/R000002a0/C00000282.png"
+            },            
+            { 
+                bounds: new OpenLayers.Bounds(311136.39626998,4318933.8711555, 311678.26402038,4319204.8050307) ,
+                url: roadsUrl + "/L05/R000051e0/C00004e52.png" 
+            }
+        ];
+        t.plan( urlSets.length );
+    
+    
+        //perform the exact setup from the arcgiscache_direct example
+            
+        // First 4 variables extracted from conf.xml file        
+        // Tile layers & map MUST have same projection 
+        var proj='EPSG:26915';
+            
+        // Layer can also accept serverResolutions array
+        // to deal with situation in which layer resolution array & map resolution
+        // array are out of sync
+        var mapResolutions = [33.0729828126323,16.9333672000677,8.46668360003387,4.23334180001693,2.11667090000847,1.05833545000423];
+
+        // For this example this next line is not really needed, 256x256 is default.
+        // However, you would need to change this if your layer had different tile sizes 
+        var tileSize = new OpenLayers.Size(256,256);
+        
+        // Tile Origin is required unless it is the same as the implicit map origin
+        // which can be effected by several variables including maxExtent for map or base layer 
+        var agsTileOrigin = new OpenLayers.LonLat(-5120900,9998100);
+        
+        // This can really be any valid bounds that the map would reasonably be within 
+        var mapExtent = new OpenLayers.Bounds(289310.8204,4300021.937,314710.8712,4325421.988);
+        
+
+        var map = new OpenLayers.Map('map', {
+            maxExtent:mapExtent,
+            controls: [
+                new OpenLayers.Control.Navigation(),
+                new OpenLayers.Control.LayerSwitcher(), 
+                new OpenLayers.Control.PanZoomBar(),
+                new OpenLayers.Control.MousePosition()]
+        });
+
+        var layer = new OpenLayers.Layer.ArcGISCache('Roads', roadsUrl, {
+            tileOrigin: agsTileOrigin,
+            resolutions: mapResolutions,
+            sphericalMercator: true,
+            maxExtent: mapExtent,
+            useArcGISServer: false,
+            isBaseLayer: true,
+            projection: proj
+        });
+        
+        map.addLayers([layer]);
+        map.zoomToExtent(new OpenLayers.Bounds(-8341644, 4711236, -8339198, 4712459));
+
+        for(var i=0;i<urlSets.length;i++) 
+        {
+            var o = urlSets[i];            
+            map.zoomToExtent(o.bounds, true);
+            var resultUrl = layer.getURL(o.bounds);
+            t.ok( resultUrl == o.url, "correct tile returned for " + o.bounds);        
+        }
+    }
+        
+    /**
+     * Check our utility function for generating tile indexes against a file cache
+     */
+    function test_Layer_ARCGISCACHE_zeroPad(t) {
+        t.plan(4);
+    
+        var layer = new OpenLayers.Layer.ArcGISCache('test', null, { });
+
+        //some tile examples
+        t.ok('00000001' == layer.zeroPad(1, 8, 16), 'zeroPad should generate tile indexes properly ');
+        t.ok('00000020' == layer.zeroPad(32, 8, 16), 'zeroPad should generate tile indexes properly ');
+        t.ok('00000100' == layer.zeroPad(256, 8, 16), 'zeroPad should generate tile indexes properly ');
+        t.ok('00001000' == layer.zeroPad(4096, 8, 16), 'zeroPad should generate tile indexes properly ');        
+    }
+    
+    /**
+     * Check to ensure our LOD calculation will correctly avoid returning tile indexes less than zero
+     * (see http://trac.osgeo.org/openlayers/ticket/3169)
+     */
+    function test_Layer_ARCGISCACHE_tileBounds(t) {
+        t.plan(1);
+    
+        var layer = new OpenLayers.Layer.ArcGISCache('test', null, { });
+        var res = 264.583862501058;
+        layer.tileOrigin = new OpenLayers.LonLat(0.0, 650000.0);
+        layer.tileSize = new OpenLayers.Size(512, 512);
+        
+        // pick a point off the left of our tile origin  (would be a negative tile index)
+        var point = new OpenLayers.Geometry.Point(-123308.94829, 393128.85817);
+        
+        var tile = layer.getContainingTileCoords(point, res);
+        t.ok((tile.x >= 0 && tile.y >= 0), 'layer should not generate negative tile ranges for level of detail');
+    }
+
+  </script>
+</head>
+<body>
+<div id="map" style="width:500px;height:550px;"></div>
+</body>
+</html>

Copied: sandbox/august/trunk/tests/Layer/ArcGISCache.json (from rev 11704, trunk/openlayers/tests/Layer/ArcGISCache.json)
===================================================================
--- sandbox/august/trunk/tests/Layer/ArcGISCache.json	                        (rev 0)
+++ sandbox/august/trunk/tests/Layer/ArcGISCache.json	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,334 @@
+var capabilitiesObject = {
+  "currentVersion" : 10.01, 
+  "serviceDescription" : "This map is designed to be used as a base map by GIS professionals and as a reference map by anyone.  The base map includes administrative boundaries, cities, water features, physiographic features, parks, landmarks, highways, roads, railways, airports, and buildings overlaid on land cover and shaded relief imagery for added context. The map was compiled from a variety of best available sources from several data providers, including the U.S. Geological Survey, Food and Agriculture Organization of the United Nations, National Park Service, Tele Atlas, AND, and ESRI. The base map currently provides coverage for the world down to a scale of ~1:1m and coverage for the continental United States and Hawaii to a scale of ~1:20k.  The base map also includes detailed maps for selected cities in the United States including Portland, Oregon and Philadephia, Pennsylvania. The base map was designed and developed by ESRI based on the topographic map templates tha
 t are available through the ArcGIS Resource Centers. For more information on this map, visit us \u003ca href=\"http://goto.arcgisonline.com/maps/World_Topo_Map \" target=\"_new\"\u003eonline\u003c/a\u003e.", 
+  "mapName" : "Layers", 
+  "description" : "This map is designed to be used as a base map by GIS professionals and as a reference map by anyone.  The base map includes administrative boundaries, cities, water features, physiographic features, parks, landmarks, highways, roads, railways, airports, and buildings overlaid on land cover and shaded relief imagery for added context. The map was compiled from a variety of best available sources from several data providers, including the U.S. Geological Survey, Food and Agriculture Organization of the United Nations, National Park Service, Tele Atlas, AND, and ESRI. The base map currently provides coverage for the world down to a scale of ~1:1m and coverage for the continental United States and Hawaii to a scale of ~1:20k.  The base map also includes detailed maps for selected cities in the United States including Portland, Oregon and Philadephia, Pennsylvania. The base map was designed and developed by ESRI based on the topographic map templates that are a
 vailable through the ArcGIS Resource Centers. For more information on this map, visit us online at http://goto.arcgisonline.com/maps/World_Topo_Map", 
+  "copyrightText" : "Sources: USGS, FAO, NPS, EPA, ESRI, DeLorme, TANA, other suppliers", 
+  "layers" : [
+    {
+      "id" : 0, 
+      "name" : "Topographic Info", 
+      "parentLayerId" : -1, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : [1, 2, 3, 4], 
+      "minScale" : 0, 
+      "maxScale" : 0
+    }, 
+    {
+      "id" : 1, 
+      "name" : "Elevation (m)", 
+      "parentLayerId" : 0, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 0, 
+      "maxScale" : 0
+    }, 
+    {
+      "id" : 2, 
+      "name" : "Elevation (ft)", 
+      "parentLayerId" : 0, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 0, 
+      "maxScale" : 0
+    }, 
+    {
+      "id" : 3, 
+      "name" : "Slope", 
+      "parentLayerId" : 0, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 0, 
+      "maxScale" : 0
+    }, 
+    {
+      "id" : 4, 
+      "name" : "Aspect", 
+      "parentLayerId" : 0, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 0, 
+      "maxScale" : 0
+    }, 
+    {
+      "id" : 5, 
+      "name" : "Places Info", 
+      "parentLayerId" : -1, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : [6, 7, 8, 9], 
+      "minScale" : 0, 
+      "maxScale" : 0
+    }, 
+    {
+      "id" : 6, 
+      "name" : "Place Names (Country Level)", 
+      "parentLayerId" : 5, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 0, 
+      "maxScale" : 80000000
+    }, 
+    {
+      "id" : 7, 
+      "name" : "Place Names (State Level)", 
+      "parentLayerId" : 5, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 80000001, 
+      "maxScale" : 1500000
+    }, 
+    {
+      "id" : 8, 
+      "name" : "Place Names (County Level)", 
+      "parentLayerId" : 5, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 1500001, 
+      "maxScale" : 400000
+    }, 
+    {
+      "id" : 9, 
+      "name" : "Place Names (City Level)", 
+      "parentLayerId" : 5, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 399999, 
+      "maxScale" : 0
+    }, 
+    {
+      "id" : 10, 
+      "name" : "Scale Descriptions", 
+      "parentLayerId" : -1, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : [11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26], 
+      "minScale" : 0, 
+      "maxScale" : 0
+    }, 
+    {
+      "id" : 11, 
+      "name" : "Level 15  ~1:18K", 
+      "parentLayerId" : 10, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 25000, 
+      "maxScale" : 15001
+    }, 
+    {
+      "id" : 12, 
+      "name" : "Level 14  ~1:36K", 
+      "parentLayerId" : 10, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 50000, 
+      "maxScale" : 25001
+    }, 
+    {
+      "id" : 13, 
+      "name" : "Level 13  ~1:72K", 
+      "parentLayerId" : 10, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 100000, 
+      "maxScale" : 50001
+    }, 
+    {
+      "id" : 14, 
+      "name" : "Level 12  ~1:144K", 
+      "parentLayerId" : 10, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 288000, 
+      "maxScale" : 100000
+    }, 
+    {
+      "id" : 15, 
+      "name" : "Level 11  ~1:288K", 
+      "parentLayerId" : 10, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 575000, 
+      "maxScale" : 288000
+    }, 
+    {
+      "id" : 16, 
+      "name" : "Level 10  ~1:577K", 
+      "parentLayerId" : 10, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 1150000, 
+      "maxScale" : 575000
+    }, 
+    {
+      "id" : 17, 
+      "name" : "Level 9    ~1:1.15M", 
+      "parentLayerId" : 10, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 2200000, 
+      "maxScale" : 1150000
+    }, 
+    {
+      "id" : 18, 
+      "name" : "Level 8    ~1:2.3M", 
+      "parentLayerId" : 10, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 4500000, 
+      "maxScale" : 2200000
+    }, 
+    {
+      "id" : 19, 
+      "name" : "Level 7    ~1:4.5M", 
+      "parentLayerId" : 10, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 9000000, 
+      "maxScale" : 4500000
+    }, 
+    {
+      "id" : 20, 
+      "name" : "Level 6    ~1:9.2M", 
+      "parentLayerId" : 10, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 18000000, 
+      "maxScale" : 9000000
+    }, 
+    {
+      "id" : 21, 
+      "name" : "Level 5    ~1:18M ", 
+      "parentLayerId" : 10, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 36000000, 
+      "maxScale" : 18000000
+    }, 
+    {
+      "id" : 22, 
+      "name" : "Level 4    ~1:36M", 
+      "parentLayerId" : 10, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 72000000, 
+      "maxScale" : 36000000
+    }, 
+    {
+      "id" : 23, 
+      "name" : "Level 3    ~1:72M", 
+      "parentLayerId" : 10, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 75500000, 
+      "maxScale" : 70000000
+    }, 
+    {
+      "id" : 24, 
+      "name" : "Level 2    ~1:147M", 
+      "parentLayerId" : 10, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 290000000, 
+      "maxScale" : 147000000
+    }, 
+    {
+      "id" : 25, 
+      "name" : "Level 1    ~1:292M", 
+      "parentLayerId" : 10, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 295000000, 
+      "maxScale" : 150000000
+    }, 
+    {
+      "id" : 26, 
+      "name" : "Level 0     ~1:584M", 
+      "parentLayerId" : 10, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 0, 
+      "maxScale" : 295000000
+    }, 
+    {
+      "id" : 27, 
+      "name" : "Citations", 
+      "parentLayerId" : -1, 
+      "defaultVisibility" : true, 
+      "subLayerIds" : null, 
+      "minScale" : 0, 
+      "maxScale" : 0
+    }
+  ], 
+  "tables" : [
+    
+  ], 
+  "spatialReference" : {
+    "wkid" : 102100
+  }, 
+  "singleFusedMapCache" : true, 
+  "tileInfo" : {
+    "rows" : 256, 
+    "cols" : 256, 
+    "dpi" : 96, 
+    "format" : "JPEG", 
+    "compressionQuality" : 90, 
+    "origin" : {
+      "x" : -20037508.342787, 
+      "y" : 20037508.342787
+    }, 
+    "spatialReference" : {
+      "wkid" : 102100
+    }, 
+    "lods" : [
+      {"level" : 0, "resolution" : 156543.033928, "scale" : 591657527.591555}, 
+      {"level" : 1, "resolution" : 78271.5169639999, "scale" : 295828763.795777}, 
+      {"level" : 2, "resolution" : 39135.7584820001, "scale" : 147914381.897889}, 
+      {"level" : 3, "resolution" : 19567.8792409999, "scale" : 73957190.948944}, 
+      {"level" : 4, "resolution" : 9783.93962049996, "scale" : 36978595.474472}, 
+      {"level" : 5, "resolution" : 4891.96981024998, "scale" : 18489297.737236}, 
+      {"level" : 6, "resolution" : 2445.98490512499, "scale" : 9244648.868618}, 
+      {"level" : 7, "resolution" : 1222.99245256249, "scale" : 4622324.434309}, 
+      {"level" : 8, "resolution" : 611.49622628138, "scale" : 2311162.217155}, 
+      {"level" : 9, "resolution" : 305.748113140558, "scale" : 1155581.108577}, 
+      {"level" : 10, "resolution" : 152.874056570411, "scale" : 577790.554289}, 
+      {"level" : 11, "resolution" : 76.4370282850732, "scale" : 288895.277144}, 
+      {"level" : 12, "resolution" : 38.2185141425366, "scale" : 144447.638572}, 
+      {"level" : 13, "resolution" : 19.1092570712683, "scale" : 72223.819286}, 
+      {"level" : 14, "resolution" : 9.55462853563415, "scale" : 36111.909643}, 
+      {"level" : 15, "resolution" : 4.77731426794937, "scale" : 18055.954822}, 
+      {"level" : 16, "resolution" : 2.38865713397468, "scale" : 9027.977411}, 
+      {"level" : 17, "resolution" : 1.19432856685505, "scale" : 4513.988705}, 
+      {"level" : 18, "resolution" : 0.597164283559817, "scale" : 2256.994353}, 
+      {"level" : 19, "resolution" : 0.298582141647617, "scale" : 1128.497176}
+    ]
+  }, 
+  "initialExtent" : {
+    "xmin" : -45223792.233066, 
+    "ymin" : -22882589.2065154, 
+    "xmax" : 45223792.233066, 
+    "ymax" : 22882589.2065155, 
+    "spatialReference" : {
+      "wkid" : 102100
+    }
+  }, 
+  "fullExtent" : {
+    "xmin" : -20037507.0671618, 
+    "ymin" : -19971868.8804086, 
+    "xmax" : 20037507.0671618, 
+    "ymax" : 19971868.8804086, 
+    "spatialReference" : {
+      "wkid" : 102100
+    }
+  }, 
+  "units" : "esriMeters", 
+  "supportedImageFormatTypes" : "PNG24,PNG,JPG,DIB,TIFF,EMF,PS,PDF,GIF,SVG,SVGZ,AI,BMP", 
+  "documentInfo" : {
+    "Title" : "World Topo Map", 
+    "Author" : "ESRI", 
+    "Comments" : "", 
+    "Subject" : "", 
+    "Category" : "", 
+    "Keywords" : "", 
+    "Credits" : ""
+  }, 
+  "capabilities" : "Map,Query,Data"
+};
\ No newline at end of file

Modified: sandbox/august/trunk/tests/Layer/ArcIMS.html
===================================================================
--- sandbox/august/trunk/tests/Layer/ArcIMS.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/ArcIMS.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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

Modified: sandbox/august/trunk/tests/Layer/Bing.html
===================================================================
--- sandbox/august/trunk/tests/Layer/Bing.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/Bing.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map, layer; 
 

Modified: sandbox/august/trunk/tests/Layer/EventPane.html
===================================================================
--- sandbox/august/trunk/tests/Layer/EventPane.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/EventPane.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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);
@@ -58,11 +58,11 @@
 //         t.plan( 2 );    
 
         if (OpenLayers.BROWSER_NAME != "firefox" && OpenLayers.BROWSER_NAME != "mozilla") {
-          t.plan(4);
+            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/august/trunk/tests/Layer/FixedZoomLevels.html
===================================================================
--- sandbox/august/trunk/tests/Layer/FixedZoomLevels.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/FixedZoomLevels.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Layer/GML.html
===================================================================
--- sandbox/august/trunk/tests/Layer/GML.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/GML.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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";
@@ -37,8 +37,8 @@
         var map = new OpenLayers.Map("map");
         map.addLayer(layer);
         map.zoomToMaxExtent();
-        t.delay_call(1, function() { 
-            t.ok(true, "waited for 1s"); 
+        t.delay_call(3, function() { 
+            t.ok(true, "waited for 3s"); 
         });
 
     }

Modified: sandbox/august/trunk/tests/Layer/GeoRSS.html
===================================================================
--- sandbox/august/trunk/tests/Layer/GeoRSS.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/GeoRSS.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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);

Modified: sandbox/august/trunk/tests/Layer/Google/v3.html
===================================================================
--- sandbox/august/trunk/tests/Layer/Google/v3.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/Google/v3.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Layer/Google.html
===================================================================
--- sandbox/august/trunk/tests/Layer/Google.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/Google.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Layer/Grid.html
===================================================================
--- sandbox/august/trunk/tests/Layer/Grid.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/Grid.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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; 
@@ -27,7 +27,7 @@
                        
         layer = new OpenLayers.Layer.Grid(name, url, params, null);
         t.ok( layer instanceof OpenLayers.Layer.Grid, "returns OpenLayers.Layer.Grid object" );
-        t.eq( layer.buffer, 2, "buffer default is 2");
+        t.eq( layer.buffer, 0, "buffer default is 0");
         t.eq( layer.ratio, 1.5, "ratio default is 1.5");
         t.eq( layer.numLoadingTiles, 0, "numLoadingTiles starts at 0");
         t.ok( layer.events.listeners["tileloaded"] != null, "'tileloaded' event added to layer's event types");
@@ -47,7 +47,7 @@
     function test_Layer_Grid_inittiles (t) {
         t.plan( 2 );
         var map = new OpenLayers.Map('map');
-        layer = new OpenLayers.Layer.WMS(name, url, params);
+        layer = new OpenLayers.Layer.WMS(name, url, params, {buffer:2});
         map.addLayer(layer);
         map.setCenter(new OpenLayers.LonLat(0,0),5);
         t.eq( layer.grid.length, 7, "Grid rows is correct." );
@@ -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 
@@ -595,7 +593,7 @@
 
     function test_Layer_Grid_destroy (t) {
 
-        t.plan( 7 );
+        t.plan( 8 );
 
         var map = new OpenLayers.Map('map');
         layer = new OpenLayers.Layer.Grid(name, url, params);
@@ -610,6 +608,7 @@
         map.addLayer(layer);
 
         map.setCenter(new OpenLayers.LonLat(0,0), 10);
+        map.setCenter(new OpenLayers.LonLat(1,1));
 
          
         //grab a reference to one of the tiles
@@ -618,6 +617,7 @@
 
         layer.destroy();
         t.eq( tile.imgDiv, null, "Tile destroyed" ); 
+        t.eq( layer.timerId, null, "Tile loading timeout cleared");
         
         t.ok( layer.grid == null, "tiles appropriately destroyed")
 

Modified: sandbox/august/trunk/tests/Layer/HTTPRequest.html
===================================================================
--- sandbox/august/trunk/tests/Layer/HTTPRequest.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/HTTPRequest.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Layer/Image.html
===================================================================
--- sandbox/august/trunk/tests/Layer/Image.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/Image.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var layer; 
 
@@ -146,7 +146,7 @@
             delay = true;
         });
 
-        t.delay_call(0.4,function() {
+        t.delay_call(5, function() {
             t.eq(delay, true, "registered for loadend");
             t.eq(layer.tile.isLoading, false, "loadend triggered after tile is loaded");
             map.destroy(); //tear down

Modified: sandbox/august/trunk/tests/Layer/KaMap.html
===================================================================
--- sandbox/august/trunk/tests/Layer/KaMap.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/KaMap.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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; 
@@ -65,8 +65,8 @@
         layer = new OpenLayers.Layer.KaMap(name, url, params, units);
         map.addLayer(layer);
         map.setCenter(new OpenLayers.LonLat(0,0),5);
-        t.eq( layer.grid.length, 8, "KaMap rows is correct." );
-        t.eq( layer.grid[0].length, 6, "KaMap cols is correct." );
+        t.eq( layer.grid.length, 4, "KaMap rows is correct." );
+        t.eq( layer.grid[0].length, 3, "KaMap cols is correct." );
         map.destroy();
         
     }

Modified: sandbox/august/trunk/tests/Layer/MapGuide.html
===================================================================
--- sandbox/august/trunk/tests/Layer/MapGuide.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/MapGuide.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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; 
@@ -69,7 +69,7 @@
         layer = new OpenLayers.Layer.MapGuide(name, url, paramsTiled);
         map.addLayer(layer);
         map.setCenter(new OpenLayers.LonLat(0,400000),5);
-        t.eq( layer.grid.length, 6, "Grid rows is correct." );
+        t.eq( layer.grid.length, 3, "Grid rows is correct." );
         // t.eq( layer.grid[0].length, 6, "Grid cols is correct." );
         map.destroy();
     }

Modified: sandbox/august/trunk/tests/Layer/MapServer.html
===================================================================
--- sandbox/august/trunk/tests/Layer/MapServer.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/MapServer.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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; 
@@ -74,11 +74,11 @@
     function test_Layer_MapServer_inittiles (t) {
         t.plan( 2 );
         var map = new OpenLayers.Map('map');
-        layer = new OpenLayers.Layer.MapServer(name, url, params);
+        layer = new OpenLayers.Layer.MapServer(name, url, params, {buffer: 0});
         map.addLayer(layer);
         map.setCenter(new OpenLayers.LonLat(0,0),5);
-        t.eq( layer.grid.length, 7, "Grid rows is correct." );
-        t.eq( layer.grid[0].length, 6, "Grid cols is correct." );
+        t.eq( layer.grid.length, 4, "Grid rows is correct." );
+        t.eq( layer.grid[0].length, 3, "Grid cols is correct." );
         map.destroy();
         
     }
@@ -234,7 +234,7 @@
             var map = new OpenLayers.Map('map');
             var layer = new OpenLayers.Layer.Google("Google");
             map.addLayer(layer);
-            layer = new OpenLayers.Layer.MapServer(name, url, params, {isBaseLayer: false, reproject: true});
+            layer = new OpenLayers.Layer.MapServer(name, url, params, {isBaseLayer: false, reproject: true, buffer: 2});
             layer.isBaseLayer=false;
             map.addLayer(layer);
             map.setCenter(new OpenLayers.LonLat(0,0), 5);
@@ -251,7 +251,7 @@
         }
         
         var map = new OpenLayers.Map('map');
-        layer = new OpenLayers.Layer.MapServer(name, url, params);
+        layer = new OpenLayers.Layer.MapServer(name, url, params, {buffer:2});
         map.addLayer(layer);
         map.setCenter(new OpenLayers.LonLat(0,0), 5);
         var tile = layer.grid[0][0];

Modified: sandbox/august/trunk/tests/Layer/Markers.html
===================================================================
--- sandbox/august/trunk/tests/Layer/Markers.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/Markers.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Layer/MultiMap.html
===================================================================
--- sandbox/august/trunk/tests/Layer/MultiMap.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/MultiMap.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Layer/PointTrack.html
===================================================================
--- sandbox/august/trunk/tests/Layer/PointTrack.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/PointTrack.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Layer/SphericalMercator.html
===================================================================
--- sandbox/august/trunk/tests/Layer/SphericalMercator.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/SphericalMercator.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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);

Modified: sandbox/august/trunk/tests/Layer/TMS.html
===================================================================
--- sandbox/august/trunk/tests/Layer/TMS.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/TMS.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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; 
@@ -134,7 +134,7 @@
         t.plan(1);
             m = new OpenLayers.Map("map", {'maxExtent':new OpenLayers.Bounds(-122.6579,37.4901,-122.0738,37.8795)});
             layer = new OpenLayers.Layer.TMS( "TMS", 
-                    "http://labs.metacarta.com/wms-c/Basic.py/", {layername: 'basic', type:'png', resolutions:[0.000634956337608418]} );
+                    "http://labs.metacarta.com/wms-c/Basic.py/", {layername: 'basic', type:'png', resolutions:[0.000634956337608418], buffer: 2} );
             m.addLayer(layer);
             m.zoomToMaxExtent();
             t.eq(layer.getURL(layer.grid[3][3].bounds), "http://labs.metacarta.com/wms-c/Basic.py/1.0.0/basic/0/1/1.png", "TMS tiles around rounded properly.");

Modified: sandbox/august/trunk/tests/Layer/Text.html
===================================================================
--- sandbox/august/trunk/tests/Layer/Text.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/Text.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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);

Modified: sandbox/august/trunk/tests/Layer/TileCache.html
===================================================================
--- sandbox/august/trunk/tests/Layer/TileCache.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/TileCache.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
 

Modified: sandbox/august/trunk/tests/Layer/Vector/RootContainer.html
===================================================================
--- sandbox/august/trunk/tests/Layer/Vector/RootContainer.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/Vector/RootContainer.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Layer/Vector.html
===================================================================
--- sandbox/august/trunk/tests/Layer/Vector.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/Vector.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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";
@@ -458,9 +458,7 @@
         t.plan(9);
         
         var map = new OpenLayers.Map("map");
-        var layer = new OpenLayers.Layer.Vector(null, {
-            drawn: true
-        });
+        var layer = new OpenLayers.Layer.Vector();
         map.addLayer(layer);
         var feature = new OpenLayers.Feature.Vector(
             new OpenLayers.Geometry.Point(10, 10)
@@ -477,6 +475,7 @@
         };
         
         // draw feature with no state
+        layer.drawn = true;
         layer.drawFeature(feature);
         t.ok(log.feature === feature, "[no state] drawFeature called with correct feature");
         t.ok(log.style.display !== "none", "[no state] drawFeature called with style display not none");
@@ -707,6 +706,54 @@
                         (-y + customStyle6.graphicYOffset).toFixed().toString(),
                         "graphicYOffset correctly set");
         }
+        if (layer.renderer.CLASS_NAME == 'OpenLayers.Renderer.SVG2') {
+                feature.style = customStyle1;
+                layer.drawFeature(feature);
+                var resolution = map.getResolution();
+                t.eq(root.firstChild.getAttributeNS(null, 'width'),
+                             (2*customStyle1.pointRadius*resolution).toString(),
+                             "given a pointRadius, width equals 2*pointRadius");
+                t.eq(root.firstChild.getAttributeNS(null, 'height'),
+                             (2*customStyle1.pointRadius*resolution).toString(),
+                             "given a pointRadius, height equals 2*pointRadius");
+                feature.style = customStyle2;
+                layer.drawFeature(feature);
+                t.eq(root.firstChild.getAttributeNS(null, 'width'),
+                             root.firstChild.getAttributeNS(null, 'height'),
+                             "given a graphicWidth, width equals height");
+                t.eq(root.firstChild.getAttributeNS(null, 'width'),
+                             (customStyle2.graphicWidth*resolution).toString(),
+                             "width is set correctly");
+                feature.style = customStyle3;
+                layer.drawFeature(feature);
+                t.eq(root.firstChild.getAttributeNS(null, 'height'),
+                             root.firstChild.getAttributeNS(null, 'width'),
+                             "given a graphicHeight, height equals width");
+                t.eq(root.firstChild.getAttributeNS(null, 'height'),
+                             (customStyle3.graphicHeight*resolution).toString(),
+                             "height is set correctly");
+                feature.style = customStyle4;
+                layer.drawFeature(feature);
+                t.eq(root.firstChild.getAttributeNS(null, 'height'),
+                             (customStyle4.graphicHeight*resolution).toString(),
+                             "given graphicHeight and graphicWidth, both are set: height");
+                t.eq(root.firstChild.getAttributeNS(null, 'width'),
+                             (customStyle4.graphicWidth*resolution).toString(),
+                             "given graphicHeight and graphicWidth, both are set: width");
+                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") ? "" : ';'),
+                             "graphicOpacity correctly set");
+                feature.style = customStyle6;
+                layer.drawFeature(feature);
+                t.eq(root.firstChild.getAttributeNS(null, 'x'),
+                        (geometryX + customStyle6.graphicXOffset*resolution).toString(),
+                        "graphicXOffset correctly set");
+                t.eq(root.firstChild.getAttributeNS(null, 'y'),
+                        (-geometryY + customStyle6.graphicYOffset*resolution).toString(),
+                        "graphicYOffset correctly set");
+        }
         if (layer.renderer.CLASS_NAME == 'OpenLayers.Renderer.VML') {
                 feature.style = customStyle1;
                 layer.drawFeature(feature);

Modified: sandbox/august/trunk/tests/Layer/WFS.html
===================================================================
--- sandbox/august/trunk/tests/Layer/WFS.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/WFS.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Layer/WMS/Post.html
===================================================================
--- sandbox/august/trunk/tests/Layer/WMS/Post.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/WMS/Post.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Layer/WMS.html
===================================================================
--- sandbox/august/trunk/tests/Layer/WMS.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/WMS.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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;
@@ -146,7 +146,7 @@
     function test_Layer_WMS_inittiles (t) {
         t.plan( 2 );
         var map = new OpenLayers.Map('map');
-        layer = new OpenLayers.Layer.WMS(name, url, params);
+        layer = new OpenLayers.Layer.WMS(name, url, params, {buffer:2});
         map.addLayer(layer);
         map.setCenter(new OpenLayers.LonLat(0,0),5);
         t.eq( layer.grid.length, 7, "Grid rows is correct." );
@@ -312,7 +312,7 @@
             var layer = new OpenLayers.Layer.Google("Google");
             map.addLayer(layer);
             var wmslayer = new OpenLayers.Layer.WMS(name, url, params,
-                                                    {isBaseLayer: false, reproject:true});
+                                                    {isBaseLayer: false, reproject:true, buffer: 2});
             wmslayer.isBaseLayer=false;
             map.addLayer(wmslayer);
             map.setCenter(new OpenLayers.LonLat(0,0), 5);
@@ -329,7 +329,7 @@
         }
 
         var map = new OpenLayers.Map('map');
-        layer = new OpenLayers.Layer.WMS(name, url, params);
+        layer = new OpenLayers.Layer.WMS(name, url, params, {buffer: 2});
         map.addLayer(layer);
         map.setCenter(new OpenLayers.LonLat(0,0), 5);
         var tile = layer.grid[0][0];

Modified: sandbox/august/trunk/tests/Layer/WMTS.html
===================================================================
--- sandbox/august/trunk/tests/Layer/WMTS.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/WMTS.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Layer/WrapDateLine.html
===================================================================
--- sandbox/august/trunk/tests/Layer/WrapDateLine.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/WrapDateLine.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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; 
@@ -130,7 +130,7 @@
         t.plan( 3 );
 
         var url = "http://octo.metacarta.com/cgi-bin/mapserv";
-        layer = new OpenLayers.Layer.WMS(name, url, params, {'wrapDateLine':true,encodeBBOX:true});
+        layer = new OpenLayers.Layer.WMS(name, url, params, {'wrapDateLine':true,encodeBBOX:true, buffer: 2});
         var m = new OpenLayers.Map('map');
         m.addLayer(layer);
         m.zoomToMaxExtent();
@@ -146,7 +146,7 @@
         var layer = new OpenLayers.Layer.KaMap( "Blue Marble NG",
              "http://www.openlayers.org/world/index.php",
              {g: "satellite", map: "world"},
-             {wrapDateLine: true} ); 
+             {wrapDateLine: true, buffer: 2} ); 
         var m = new OpenLayers.Map('map');
         m.addLayer(layer);
         m.zoomToMaxExtent();
@@ -158,13 +158,13 @@
     function test_Layer_WrapDateLine_WMS_Overlay (t) {
         t.plan( 3 );
         var url = "http://octo.metacarta.com/cgi-bin/mapserv";
-        baselayer = new OpenLayers.Layer.WMS(name, url, params, {'wrapDateLine':true});
+        baselayer = new OpenLayers.Layer.WMS(name, url, params, {'wrapDateLine':true, buffer: 2});
         var layer = 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"},
-            {wrapDateLine: true, reproject: false,encodeBBOX:true});
+            {wrapDateLine: true, reproject: false,encodeBBOX:true, buffer:2});
         var m = new OpenLayers.Map('map');
         m.addLayers([baselayer,layer]);
         m.zoomToMaxExtent();

Modified: sandbox/august/trunk/tests/Layer/XYZ.html
===================================================================
--- sandbox/august/trunk/tests/Layer/XYZ.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/XYZ.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var layer; 
 
@@ -126,7 +126,7 @@
         t.plan(1);
             m = new OpenLayers.Map("map", {'maxExtent':new OpenLayers.Bounds(-122.6579,37.4901,-122.0738,37.8795)});
             layer = new OpenLayers.Layer.XYZ( "XYZ", 
-                    url, {layername: 'basic', type:'png', resolutions:[0.000634956337608418]} );
+                    url, {layername: 'basic', type:'png', resolutions:[0.000634956337608418], buffer: 2} );
             m.addLayer(layer);
             m.zoomToMaxExtent()
             t.eq(layer.getURL(layer.grid[3][3].bounds), "http://labs.metacarta.com/wms-c/Basic.py/1.0.0/basic/0/1/0.png", "XYZ tiles around rounded properly.");

Modified: sandbox/august/trunk/tests/Layer/Yahoo.html
===================================================================
--- sandbox/august/trunk/tests/Layer/Yahoo.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer/Yahoo.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Layer.html
===================================================================
--- sandbox/august/trunk/tests/Layer.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Layer.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Map.html
===================================================================
--- sandbox/august/trunk/tests/Map.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Map.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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);
@@ -163,8 +163,15 @@
     }
 
     function test_Map_center(t) {
-        t.plan(8);
-        map = new OpenLayers.Map('map');
+        t.plan(11);
+        var log = [];
+        map = new OpenLayers.Map('map', {
+            eventListeners: {
+                "movestart": function() {log.push("movestart");},
+                "move": function() {log.push("move");},
+                "moveend": function() {log.push("moveend");}
+            }            
+        });
         var baseLayer = new OpenLayers.Layer.WMS("Test Layer", 
             "http://octo.metacarta.com/cgi-bin/mapserv?",
             {map: "/mapdata/vmap_wms.map", layers: "basic"} );
@@ -180,7 +187,11 @@
         map.zoomOut();
         t.eq( map.getZoom(), 0, "map.zoom is correct after calling setCenter,zoom in, zoom out");
 
+        log = [];
         map.zoomTo(5);
+        t.eq(log[0], "movestart", "zoomTo fires movestart event");
+        t.eq(log[1], "move", "zoomTo fires move event");
+        t.eq(log[2], "moveend", "zoomTo fires moveend event");
         t.eq( map.getZoom(), 5, "map.zoom is correct after calling zoomTo" );
 
     /**
@@ -352,6 +363,8 @@
 
         valid = OpenLayers.Map.prototype.isValidZoomLevel.apply(map, [19]);
         t.eq(valid, false, "19 is not a valid zoomLevel when baseLayer has restrictedMinZoom of 1");
+
+        map.destroy();
     }
     
     function test_Map_isValidLonLat(t) {
@@ -977,6 +990,8 @@
         map.addControls(controls2, pixels2);
         t.eq(map.controls.length, 5, "three additional controls were added by map.addControls with a px-array");
         t.eq(map.controls[3].position.toString(), pixels2[1].toString(), "control 'fourthctrl' has position set to given px");
+
+        map.destroy();
     }
 
     function test_Map_getControl(t) {
@@ -1048,7 +1063,7 @@
     }
 
     function test_Map_restrictedExtent(t) {
-        t.plan(24);
+        t.plan(25);
         var extent = new OpenLayers.Bounds(-180, -90, 180, 90);
         var options = {
             maxResolution: "auto"
@@ -1143,8 +1158,28 @@
              "map extent not restricted with null restrictedExtent for se");
 
         map.destroy();
+
+        extent = new OpenLayers.Bounds(8, 44.5, 19, 50);
+        var options = {
+            restrictedExtent: extent
+        };
+        map = new OpenLayers.Map('map', options);
+
+        var wms = new OpenLayers.Layer.WMS(
+            "OpenLayers WMS", 
+            "http://vmap0.tiles.osgeo.org/wms/vmap0?",
+            {layers: 'basic'}
+        ); 
+
+        map.addLayers([wms]);
+        map.zoomToExtent(extent);
+        map.zoomIn();
+        map.setOptions({restrictedExtent: null});
+        map.pan(-250, -250);
+        t.ok((map.getExtent().bottom == 48.3486328125 && map.getExtent().left == 7.45751953125), "Expected extent when toggling restrictedExtent");
+        map.destroy();
     }
-    
+
     function test_Map_getResolutionForZoom(t) {
         t.plan(2);
         var map = new OpenLayers.Map("map");
@@ -1319,7 +1354,7 @@
         var m = {
             'baseLayer': { 'units': {} },
             'getSize': function() { return {'w': 10, 'h': 15}; },
-            'getCenter': function() { return {'lon': -5, 'lat': -25}; },
+            'getCachedCenter': function() { return {'lon': -5, 'lat': -25}; },
             'zoomToExtent': function(extent, closest) {
                 t.ok(extent.equals(g_ExpectedExtent), "extent correctly calculated for zoomToExtent()");
                 t.ok(closest == g_Closest, "closest correctly passed on to zoomToExtent()");
@@ -1503,20 +1538,60 @@
     
     function test_panTo(t) {
         
-        t.plan(2);
+        t.plan(6);
         
-        var map = new OpenLayers.Map("map");
+        var log = [];
+        var map = new OpenLayers.Map("map", {
+            eventListeners: {
+                "movestart": function() {log.push("movestart");},
+                "move": function() {log.push("move");},
+                "moveend": function() {log.push("moveend");}
+            }            
+        });
         map.addLayer(
             new OpenLayers.Layer(null, {isBaseLayer: true})
         );
         map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+        t.eq(log[log.length-1], "moveend", "moveend fired when map center is set");
+        log = [];
         
         map.panTo(new OpenLayers.LonLat(1, 0));
         t.eq(map.panTween.playing, true, "the map pan tween is playing before destroy");
         
-        map.destroy();
-        t.ok(!map.panTween || !map.panTween.playing, "the map pan tween is not playing after destroy");
+        t.delay_call(2, function() {
+            t.eq(log[0], "movestart", "panTo starts with movestart event");
+            t.eq(log[1], "move", "move events fired while panning");
+            t.eq(log[log.length-1], "moveend", "panTo finishes with moveend event");
+            map.destroy();
+            t.ok(!map.panTween || !map.panTween.playing, "the map pan tween is not playing after destroy");
+        });
     }
+    
+    function test_pan(t) {
+        t.plan(4);
+        
+        var map = new OpenLayers.Map("map");
+        map.addLayer(
+            new OpenLayers.Layer(null, {isBaseLayer: true})
+        );
+        map.setCenter(new OpenLayers.LonLat(0, 0), 5);
+        var log = [];
+        map.events.on({
+            "movestart": function() {log.push("movestart");},
+            "move": function() {log.push("move");},
+            "moveend": function() {log.push("moveend");}
+        });
+        
+        // simulate the drag sequence of the DragPan control;
+        map.pan(5,5, {animate: false, dragging: true});
+        map.pan(1,1, {animate: false, dragging: false});
+        
+        t.eq(log[0], "movestart", "pan sequence starts with movestart");
+        t.eq(log[1], "move", "followed by move,");
+        t.eq(log[log.length-2], "move", "move again before we stop panning,");
+        t.eq(log[log.length-1], "moveend", "and moveend when we're done.");
+        
+    }
 
     function test_updateSize(t) {
         t.plan(2);
@@ -1598,11 +1673,13 @@
         
         t.eq(map.layers.length, 2, "multiple layers added from options");
         t.ok(map.baseLayer, "map has a base layer");
+
+        map.destroy();
         
     }
     
     function test_center_option(t) {
-        t.plan(6);
+        t.plan(7);
         
         var map, msg;
         
@@ -1625,6 +1702,12 @@
             map.destroy();
         }
         
+        var log = [];
+        var meth = OpenLayers.Layer.prototype.moveTo;
+        OpenLayers.Layer.prototype.moveTo = function() {
+            log.push(arguments);
+            meth.apply(this, arguments);
+        };
         
         // set center without zoom
         var center = new OpenLayers.LonLat(1, 2);
@@ -1635,8 +1718,10 @@
         });
         
         t.ok(center.equals(map.getCenter()), "map center set without zoom");
+        t.eq(log.length, 1, "moveTo called once");
         
         map.destroy();
+        OpenLayers.Layer.prototype.moveTo = meth;
         
         // set center and zoom
         var zoom = 3;
@@ -1667,7 +1752,61 @@
         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();
+    }    
+
+    function test_moveByPx(t) {
+        t.plan(8);
+
+        var map = new OpenLayers.Map({
+            div: 'map',
+            maxExtent: new OpenLayers.Bounds(-50, -50, 50, 50),
+            restrictedExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            layers: [
+                new OpenLayers.Layer('name', {isBaseLayer: true})
+            ]
+        });
+        map.zoomToExtent(new OpenLayers.Bounds(-1, -1, 1, 1));
+
+        // check initial state
+        t.eq(map.layerContainerDiv.style.left, '0px', 'layer container left correct');
+        t.eq(map.layerContainerDiv.style.top, '0px', 'layer container top correct');
+
+        // move to a valid position
+        map.moveByPx(-455, 455);
+        t.eq(map.layerContainerDiv.style.left, '455px', 'layer container left correct');
+        t.eq(map.layerContainerDiv.style.top, '-455px', 'layer container top correct');
+
+        // move outside the max extent
+        map.moveByPx(-4500, 4500);
+        t.eq(map.layerContainerDiv.style.left, '455px', 'layer container left correct');
+        t.eq(map.layerContainerDiv.style.top, '-455px', 'layer container top correct');
+
+        // move outside the restricted extent
+        map.moveByPx(-500, 500);
+        t.eq(map.layerContainerDiv.style.left, '455px', 'layer container left correct');
+        t.eq(map.layerContainerDiv.style.top, '-455px', 'layer container top correct');
+
+        map.destroy();
+    }
+
   </script>
 </head>
 <body>

Modified: sandbox/august/trunk/tests/Marker/Box.html
===================================================================
--- sandbox/august/trunk/tests/Marker/Box.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Marker/Box.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var box; 
     

Modified: sandbox/august/trunk/tests/Marker.html
===================================================================
--- sandbox/august/trunk/tests/Marker.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Marker.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/OLLoader.js (from rev 11704, trunk/openlayers/tests/OLLoader.js)
===================================================================
--- sandbox/august/trunk/tests/OLLoader.js	                        (rev 0)
+++ sandbox/august/trunk/tests/OLLoader.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/OpenLayers4.html
===================================================================
--- sandbox/august/trunk/tests/OpenLayers4.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/OpenLayers4.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,7 +1,7 @@
 <html>
 <head>
     <script type="text/javascript">
-	OpenLayers = {singleFile: true}; // just to make the test run faster
+        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>

Copied: sandbox/august/trunk/tests/OpenLayersJsFiles.html (from rev 11704, trunk/openlayers/tests/OpenLayersJsFiles.html)
===================================================================
--- sandbox/august/trunk/tests/OpenLayersJsFiles.html	                        (rev 0)
+++ sandbox/august/trunk/tests/OpenLayersJsFiles.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Popup/Anchored.html
===================================================================
--- sandbox/august/trunk/tests/Popup/Anchored.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Popup/Anchored.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     var popup;

Modified: sandbox/august/trunk/tests/Popup/AnchoredBubble.html
===================================================================
--- sandbox/august/trunk/tests/Popup/AnchoredBubble.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Popup/AnchoredBubble.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Popup/FramedCloud.html
===================================================================
--- sandbox/august/trunk/tests/Popup/FramedCloud.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Popup/FramedCloud.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Popup.html
===================================================================
--- sandbox/august/trunk/tests/Popup.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Popup.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     var popup;

Modified: sandbox/august/trunk/tests/Projection.html
===================================================================
--- sandbox/august/trunk/tests/Projection.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Projection.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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); 

Modified: sandbox/august/trunk/tests/Protocol/HTTP.html
===================================================================
--- sandbox/august/trunk/tests/Protocol/HTTP.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Protocol/HTTP.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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) {
@@ -287,291 +287,6 @@
         t.eq(ret, null, 'parseFeatures returns expected value');
     }
 
-    function test_filterToParams(t) {
-        t.plan(30);
-
-        // setup
-
-        var protocol, filter, params;
-
-        protocol = new OpenLayers.Protocol.HTTP();
-
-        // 1 test
-        var filter = new OpenLayers.Filter.Spatial({
-            type: OpenLayers.Filter.Spatial.BBOX,
-            value: new OpenLayers.Bounds(0, 1, 2, 3)
-        });
-        params = protocol.filterToParams(filter);
-        t.eq(params.bbox, [0, 1, 2, 3],
-             "filterToParams sets correct bbox param if passed a BBOX filter");
-
-        // 3 tests
-        var lon = 100, lat = 200, tolerance = 10;
-        filter = new OpenLayers.Filter.Spatial({
-            type: OpenLayers.Filter.Spatial.DWITHIN,
-            value: new OpenLayers.Geometry.Point(lon, lat),
-            distance: tolerance
-        });
-        params = protocol.filterToParams(filter);
-        t.eq(params.lon, lon,
-             "filterToParams sets correct lon param if passed a DWITHIN filter");
-        t.eq(params.lat, lat,
-             "filterToParams sets correct lat param if passed a DWITHIN filter");
-        t.eq(params.tolerance, tolerance,
-             "filterToParams sets correct tolerance param if passed a DWITHIN filter");
-
-        // 2 tests
-        filter = new OpenLayers.Filter.Spatial({
-            type: OpenLayers.Filter.Spatial.WITHIN,
-            value: new OpenLayers.Geometry.Point(lon, lat)
-        });
-        params = protocol.filterToParams(filter);
-        t.eq(params.lon, lon,
-             "filterToParams sets correct lon param if passed a WITHIN filter");
-        t.eq(params.lat, lat,
-             "filterToParams sets correct lat param if passed a WITHIN filter");
-
-        // Some bbox filters used in the next tests.
-
-        var bboxFilter1 = new OpenLayers.Filter.Spatial({
-            type: OpenLayers.Filter.Spatial.BBOX,
-            value:  new OpenLayers.Bounds(0, 0, 10, 10)
-        });
-
-        var bboxFilter2 = new OpenLayers.Filter.Spatial({
-            type: OpenLayers.Filter.Spatial.BBOX,
-            value:  new OpenLayers.Bounds(0, 0, 20, 20)
-        });
-
-        // 1 test
-        filter = new OpenLayers.Filter.Logical({
-            type: OpenLayers.Filter.Logical.AND,
-            filters: []
-        });
-        params = protocol.filterToParams(filter);
-        t.eq(params, {},
-             "filterToParams returns empty object if given empty AND Logical filter");
-
-        // 1 test
-        filter = new OpenLayers.Filter.Logical({
-            type: OpenLayers.Filter.Logical.OR,
-            filters: [
-                bboxFilter1
-            ]
-        });
-        params = protocol.filterToParams(filter);
-        t.eq(params, {},
-             "filterToParams does not support OR Logical filter");
-
-        // 1 test
-        filter = new OpenLayers.Filter.Logical({
-            type: OpenLayers.Filter.Logical.AND,
-            filters: [
-                bboxFilter1
-            ]
-        });
-        params = protocol.filterToParams(filter);
-        t.eq(params.bbox, [0, 0, 10, 10],
-             "filterToParams sets correct bbox param if passed " +
-             "a Logical filter containing a BBOX");
-
-        // 1 test
-        filter = new OpenLayers.Filter.Logical({
-            type: OpenLayers.Filter.Logical.AND,
-            filters: [
-                bboxFilter1, bboxFilter2
-            ]
-        });
-        params = protocol.filterToParams(filter);
-        t.eq(params.bbox, [0, 0, 20, 20],
-             "filterToParams sets correct bbox param if passed " +
-             "multiple BBOX filter in a Logical filter");
-
-        // 2 tests
-        filter = new OpenLayers.Filter.Comparison({
-            type: OpenLayers.Filter.Comparison.EQUAL_TO,
-            property: "foo",
-            value: "bar"
-        });
-        params = protocol.filterToParams(filter);
-        t.eq(params.queryable[0], "foo",
-             "filterToParams sets correct queryable param if passed an EQUAL_TO filter");
-        t.eq(params["foo__eq"], "bar",
-             "filterToParams sets correct param key and value if passed an EQUAL_TO filter");
-
-        // 2 tests
-        filter = new OpenLayers.Filter.Comparison({
-            type: OpenLayers.Filter.Comparison.NOT_EQUAL_TO,
-            property: "foo",
-            value: "bar"
-        });
-        params = protocol.filterToParams(filter);
-        t.eq(params.queryable[0], "foo",
-             "filterToParams sets correct queryable param if passed an NOT_EQUAL_TO filter");
-        t.eq(params["foo__ne"], "bar",
-             "filterToParams sets correct param key and value if passed an NOT_EQUAL_TO filter");
-
-        // 2 tests
-        filter = new OpenLayers.Filter.Comparison({
-            type: OpenLayers.Filter.Comparison.LESS_THAN,
-            property: "foo",
-            value: "bar"
-        });
-        var params = protocol.filterToParams(filter);
-        t.eq(params.queryable[0], "foo",
-             "filterToParams sets correct queryable param if passed an LESS_THAN filter");
-        t.eq(params["foo__lt"], "bar",
-             "filterToParams sets correct param key and value if passed an LESS_THAN filter");
-
-        // 2 tests
-        filter = new OpenLayers.Filter.Comparison({
-            type: OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO,
-            property: "foo",
-            value: "bar"
-        });
-        var params = protocol.filterToParams(filter);
-        t.eq(params.queryable[0], "foo",
-             "filterToParams sets correct queryable param if passed an LESS_THAN_OR_EQUAL_TO filter");
-        t.eq(params["foo__lte"], "bar",
-             "filterToParams sets correct param key and value if passed an LESS_THAN_OR_EQUAL_TO filter");
-
-        // 2 tests
-        filter = new OpenLayers.Filter.Comparison({
-            type: OpenLayers.Filter.Comparison.GREATER_THAN,
-            property: "foo",
-            value: "bar"
-        });
-        params = protocol.filterToParams(filter);
-        t.eq(params.queryable[0], "foo",
-             "filterToParams sets correct queryable param if passed an GREATER_THAN filter");
-        t.eq(params["foo__gt"], "bar",
-             "filterToParams sets correct param key and value if passed an GREATER_THAN filter");
-
-        // 2 tests
-        filter = new OpenLayers.Filter.Comparison({
-            type: OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO,
-            property: "foo",
-            value: "bar"
-        });
-        params = protocol.filterToParams(filter);
-        t.eq(params.queryable[0], "foo",
-             "filterToParams sets correct queryable param if passed an GREATER_THAN_OR_EQUAL_TO filter");
-        t.eq(params["foo__gte"], "bar",
-             "filterToParams sets correct param key and value if passed an GREATER_THAN_OR_EQUAL_TO filter");
-
-        // 2 tests
-        filter = new OpenLayers.Filter.Comparison({
-            type: OpenLayers.Filter.Comparison.LIKE,
-            property: "foo",
-            value: "bar"
-        });
-        params = protocol.filterToParams(filter);
-        t.eq(params.queryable[0], "foo",
-             "filterToParams sets correct queryable param if passed a LIKE filter");
-        t.eq(params["foo__ilike"], "bar",
-             "filterToParams sets correct param key and value if passed an LIKE filter");
-
-        // 4 tests
-        filter = new OpenLayers.Filter.Logical({
-            type: OpenLayers.Filter.Logical.AND,
-            filters: [
-                new OpenLayers.Filter.Comparison({
-                    type: OpenLayers.Filter.Comparison.EQUAL_TO,
-                    property: "foo",
-                    value: "bar"
-                }),
-                new OpenLayers.Filter.Comparison({
-                    type: OpenLayers.Filter.Comparison.LESS_THAN,
-                    property: "foo2",
-                    value: "baz"
-                })
-            ]
-        });
-        params = protocol.filterToParams(filter);
-        t.eq(params.queryable[0], "foo",
-             "filterToParams sets correct queryable param if passed an EQUAL_TO filter within a AND filter");
-        t.eq(params["foo__eq"], "bar",
-             "filterToParams sets correct param key and value if passed an EQUAL_TO filter within a AND filter");
-        t.eq(params.queryable[1], "foo2",
-             "filterToParams sets correct queryable param if passed a LESS_THAN filter within a AND filter");
-        t.eq(params["foo2__lt"], "baz",
-             "filterToParams sets correct param key and value if passed a LESS_THAN filter within a AND filter");
-
-        // 2 tests
-        protocol = new OpenLayers.Protocol.HTTP({wildcarded: true});
-        filter = new OpenLayers.Filter.Comparison({
-            type: OpenLayers.Filter.Comparison.LIKE,
-            property: "foo",
-            value: "bar"
-        });
-        params = protocol.filterToParams(filter);
-        t.eq(params.queryable[0], "foo",
-             "filterToParams sets correct queryable param if passed a LIKE filter (wildcarded true)");
-        t.eq(params["foo__ilike"], "%bar%",
-             "filterToParams sets correct param key and value if passed an LIKE filter (wildcarded true)");
-    }
-
-    function test_regex2value(t) {
-        t.plan(16);
-
-        // setup
-
-        var protocol = new OpenLayers.Protocol.HTTP();
-        var value;
-
-        // test
-
-        value = protocol.regex2value("foo");
-        t.eq(value, "foo", 'regex2value converts "foo" to "foo"');
-
-        value = protocol.regex2value("foo%");
-        t.eq(value, "foo\\%", 'regex2value converts "foo%" to "foo\\%"');
-
-        value = protocol.regex2value("foo.*");
-        t.eq(value, "foo%", 'regex2value converts "foo.*" to "foo%"');
-
-        value = protocol.regex2value("f.*oo.*");
-        t.eq(value, "f%oo%", 'regex2value converts "f.*oo.*" to "f%oo%"');
-
-        value = protocol.regex2value("foo.");
-        t.eq(value, "foo_", 'regex2value converts "foo." to "foo_"');
-
-        value = protocol.regex2value("f.oo.");
-        t.eq(value, "f_oo_", 'regex2value converts "f.oo." to "f_oo_"');
-
-        value = protocol.regex2value("f.oo.*");
-        t.eq(value, "f_oo%", 'regex2value converts "f.oo.*" to "f_oo%"');
-
-        value = protocol.regex2value("foo\\\\");
-        t.eq(value, "foo\\\\", 'regex2value converts "foo\\\\" to "foo\\\\"');
-
-        value = protocol.regex2value("foo\\.");
-        t.eq(value, "foo.", 'regex2value converts "foo\\." to "foo."');
-
-        value = protocol.regex2value("foo\\\\.");
-        t.eq(value, "foo\\\\_", 'regex2value converts "foo\\\\." to "foo\\\\_"');
-
-        value = protocol.regex2value("foo\\*");
-        t.eq(value, "foo*", 'regex2value converts "foo\\*" to "foo*"');
-
-        value = protocol.regex2value("foo\\\\*");
-        t.eq(value, "foo\\\\*", 'regex2value converts "foo\\\\*" to "foo\\\\*"');
-
-        value = protocol.regex2value("foo\\\\.*");
-        t.eq(value, "foo\\\\%", 'regex2value converts "foo\\\\.*" to "foo\\\\%"');
-
-        value = protocol.regex2value("fo\\.o.*");
-        t.eq(value, "fo.o%", 'regex2value converts from "fo\\.o.*" to "fo.o%"');
-
-        value = protocol.regex2value("fo.*o\\.");
-        t.eq(value, "fo%o.", 'regex2value converts from "fo.*o\\." to "to%o."');
-
-        value = protocol.regex2value("\\*\\..*.\\\\.*\\\\.%");
-        t.eq(value, "*.%_\\\\%\\\\_\\%",
-             'regex2value converts from "\\*\\..*.\\\\.*\\\\.%" ' +
-             'to "*.%_\\\\%\\\\_\\%"');
-   }
-
     function test_create(t) {
         t.plan(10);
         var protocol = new OpenLayers.Protocol.HTTP({

Modified: sandbox/august/trunk/tests/Protocol/SOS.html
===================================================================
--- sandbox/august/trunk/tests/Protocol/SOS.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Protocol/SOS.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Protocol/SQL/Gears.html
===================================================================
--- sandbox/august/trunk/tests/Protocol/SQL/Gears.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Protocol/SQL/Gears.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Protocol/SQL.html
===================================================================
--- sandbox/august/trunk/tests/Protocol/SQL.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Protocol/SQL.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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) {

Copied: sandbox/august/trunk/tests/Protocol/Script.html (from rev 11704, trunk/openlayers/tests/Protocol/Script.html)
===================================================================
--- sandbox/august/trunk/tests/Protocol/Script.html	                        (rev 0)
+++ sandbox/august/trunk/tests/Protocol/Script.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,271 @@
+<html>
+<head>
+  <script src="../../lib/OpenLayers.js"></script>
+  <script type="text/javascript">
+
+    function test_constructor(t) {
+        t.plan(11);
+        var a = new OpenLayers.Protocol.Script({
+            url: "foo"
+        });
+
+        // 7 tests
+        t.eq(a.url, "foo", "constructor sets url");
+        t.eq(a.options.url, a.url, "constructor copies url to options.url");
+        t.eq(a.params, {}, "constructor sets params");
+        t.eq(a.options.params, undefined, "constructor does not copy params to options.params");
+        t.ok(a.format instanceof OpenLayers.Format.GeoJSON,
+                "constructor sets a GeoJSON format by default");
+        t.eq(a.callbackKey, 'callback',
+                "callbackKey is set to 'callback' by default");
+        t.eq(a.callbackPrefix, '',
+                "callbackPrefix is set to '' by default");
+
+        var params = {hello: "world"};
+        var b = new OpenLayers.Protocol.Script({
+            url: "bar",
+            params: params,
+            callbackKey: 'cb_key',
+            callbackPrefix: 'cb_prefix'
+        });
+
+        // 6 tests
+        t.eq(b.params, params, "constructor sets params");
+        t.eq(b.options.params, b.params, "constructor copies params to options.params");
+        t.eq(b.callbackKey, 'cb_key',
+                "callbackKey is set to 'cb_key'");
+        t.eq(b.callbackPrefix, 'cb_prefix',
+                "callbackPrefix is set to 'cb_prefix'");
+    }
+
+    function test_destroy(t) {
+        t.plan(3);
+        var aborted = false;
+        var protocol = new OpenLayers.Protocol.Script({
+            url: "bar",
+            params: {hello: "world"},
+            abort: function() {
+                aborted = true;
+            }
+        });
+        protocol.destroy();
+        t.ok(aborted, "destroy aborts request");
+        t.eq(protocol.params, null, "destroy nullifies params");
+        t.eq(protocol.format, null, "destroy nullifies format");
+    }
+
+    function test_read(t) {
+        t.plan(5);
+        var protocol = new OpenLayers.Protocol.Script({
+            'url': 'foo_url',
+            'params': {'k': 'foo_param'}
+        });
+
+        // fake XHR request object
+        var request = {'status': 200};
+
+        // options to pass to read
+        var readOptions = {
+            'url': 'bar_url',
+            'params': {'k': 'bar_param'}
+        };
+
+        var response;
+
+        protocol.createRequest = function(url, params, callback) {
+            // 4 tests
+            t.ok(this == protocol,
+                'createRequest called with correct scope');
+            t.ok(url == readOptions.url,
+                'createRequest called with correct url');
+            t.ok(params == readOptions.params,
+                'createRequest called with correct params');
+            t.ok(callback instanceof Function,
+                'createRequest called with a function as callback');
+
+            return 'foo_request';
+       };
+
+        var resp = protocol.read(readOptions);
+
+        t.eq(resp.priv, 'foo_request',
+            'response priv property set to what the createRequest method returns');
+    }
+
+    function test_read_bbox(t) {
+        t.plan(6);
+
+        var _createRequest = OpenLayers.Protocol.Script.prototype.createRequest;
+
+        var bounds = new OpenLayers.Bounds(1, 2, 3, 4);
+        var filter = new OpenLayers.Filter.Spatial({
+            type: OpenLayers.Filter.Spatial.BBOX,
+            value: bounds,
+            projection: new OpenLayers.Projection("foo")
+        });
+
+        // log requests
+        var log, exp;
+        OpenLayers.Protocol.Script.prototype.createRequest = function(url, params,
+                                                               callback) {
+            log.push(params.bbox);
+            return null;
+        };
+
+        // 1) issue request with default protocol
+        log = [];
+        new OpenLayers.Protocol.Script().read({filter: filter});
+
+        t.eq(log.length, 1, "1) createRequest 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.Script({srsInBBOX: true}).read({filter: filter});
+
+        t.eq(log.length, 1, "2) createRequest 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.Protocol.Script.prototype.createRequest = _createRequest;
+    }
+
+    function test_createRequest(t) {
+        t.plan(3);
+        var protocol = new OpenLayers.Protocol.Script({
+            callbackKey: 'cb_key',
+            callbackPrefix: 'cb_prefix:'
+        });
+
+        var _register = OpenLayers.Protocol.Script.register;
+        OpenLayers.Protocol.Script.register = function() {
+            return 'bar';
+        };
+
+        var script = protocol.createRequest('http://bar_url/', {'k': 'bar_param'}, 'bar_callback');
+
+        t.eq(script.type, 'text/javascript',
+            'created script has a correct type');
+        t.eq(script.src, 'http://bar_url/?k=bar_param&cb_key=cb_prefix%3AOpenLayers.Protocol.Script.getCallback(bar)',
+            'created script has a correct url');
+        t.eq(script.id, 'OpenLayers_Protocol_Script_bar',
+            'created script has a correct id');
+
+        OpenLayers.Protocol.Script.register = _register;
+    }
+
+    function test_destroyRequest(t) {
+        t.plan(2);
+
+        var protocol = new OpenLayers.Protocol.Script({});
+
+        var _unregister = OpenLayers.Protocol.Script.unregister;
+        OpenLayers.Protocol.Script.unregister = function(id) {
+            t.eq(id, 'foo', "destroyRequest calls unregister with correct id");
+        };
+        var script = {
+            id: 'script_foo'
+        };
+        protocol.destroyRequest(script);
+        t.eq(protocol.pendingRequests[script.id], null, 
+            "destroyRequest nullifies the pending request");
+
+        OpenLayers.Protocol.Script.unregister = _unregister;
+    }
+
+    function test_handleResponse(t) {
+        t.plan(8);
+
+        var protocol = new OpenLayers.Protocol.Script();
+
+        // 2 tests (should be called only twive)
+        protocol.destroyRequest = function(priv) {
+            t.eq(priv, 'foo_priv', 'destroyRequest called with correct argument');
+        }
+
+        // 1 test (should be called only once)
+        protocol.parseFeatures = function(data) {
+            t.eq(data, 'foo_data', 'parseFeatures called with correct argument');
+            return 'foo_features';
+        }
+
+        var response = {
+            priv: 'foo_priv',
+            data: 'foo_data'
+        }
+        var options = {
+            // 2 tests (should be called twice)
+            scope: 'foo_scope',
+            callback: function(resp) {
+                t.eq(this, 'foo_scope', 'callback called with correct scope');
+            }
+        }
+        protocol.handleResponse(response, options);
+        // 2 tests
+        t.eq(response.code, OpenLayers.Protocol.Response.SUCCESS,
+                'response code correctly set');
+        t.eq(response.features, 'foo_features', 
+                'response features takes a correct value');
+
+        response = {
+            priv: 'foo_priv'
+        }
+        protocol.handleResponse(response, options);
+        // 1 test
+        t.eq(response.code, OpenLayers.Protocol.Response.FAILURE,
+                'response code correctly set');
+    }
+
+    function test_parseFeatures(t) {
+        t.plan(1);
+
+        var protocol = new OpenLayers.Protocol.Script();
+
+        protocol.format = {
+            'read': function(data) {
+                t.ok(true, 'format.read called');
+            }
+        };
+
+        var ret = protocol.parseFeatures({foo: 'bar'});
+    }
+
+    function test_abort(t) {
+        t.plan(2);
+
+        var protocol = new OpenLayers.Protocol.Script();
+
+        // 1 test
+        protocol.destroyRequest = function(priv) {
+            t.eq(priv, 'foo_priv', 'destroyRequest called with correct argument');
+        }
+
+        var response = {
+            priv: 'foo_priv'
+        }
+
+        protocol.abort(response);
+
+        var calls = [];
+        protocol.pendingRequests = {
+            'foo': 'foo_request',
+            'bar': 'bar_request'
+        }
+        protocol.destroyRequest = function(priv) {
+            calls.push(priv);
+        }
+        protocol.abort();
+        // 1 test
+        t.eq(calls, ['foo_request', 'bar_request'],
+                'destroyRequest called for each pending requests');
+    }
+
+  </script>
+</head>
+<body>
+</body>
+</html>

Copied: sandbox/august/trunk/tests/Protocol/SimpleFilterSerializer.html (from rev 11704, trunk/openlayers/tests/Protocol/SimpleFilterSerializer.html)
===================================================================
--- sandbox/august/trunk/tests/Protocol/SimpleFilterSerializer.html	                        (rev 0)
+++ sandbox/august/trunk/tests/Protocol/SimpleFilterSerializer.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,310 @@
+<html>
+<head>
+  <script src="../../lib/OpenLayers.js"></script>
+  <script type="text/javascript">
+
+
+    function test_filterToParams(t) {
+        t.plan(30);
+
+        // setup
+
+        var protocol, filter, params;
+
+        protocol = new OpenLayers.Protocol.HTTP({
+            filterToParams: OpenLayers.Protocol.simpleFilterSerializer
+        });
+
+        // 1 test
+        var filter = new OpenLayers.Filter.Spatial({
+            type: OpenLayers.Filter.Spatial.BBOX,
+            value: new OpenLayers.Bounds(0, 1, 2, 3)
+        });
+        params = protocol.filterToParams(filter);
+        t.eq(params.bbox, [0, 1, 2, 3],
+             "filterToParams sets correct bbox param if passed a BBOX filter");
+
+        // 3 tests
+        var lon = 100, lat = 200, tolerance = 10;
+        filter = new OpenLayers.Filter.Spatial({
+            type: OpenLayers.Filter.Spatial.DWITHIN,
+            value: new OpenLayers.Geometry.Point(lon, lat),
+            distance: tolerance
+        });
+        params = protocol.filterToParams(filter);
+        t.eq(params.lon, lon,
+             "filterToParams sets correct lon param if passed a DWITHIN filter");
+        t.eq(params.lat, lat,
+             "filterToParams sets correct lat param if passed a DWITHIN filter");
+        t.eq(params.tolerance, tolerance,
+             "filterToParams sets correct tolerance param if passed a DWITHIN filter");
+
+        // 2 tests
+        filter = new OpenLayers.Filter.Spatial({
+            type: OpenLayers.Filter.Spatial.WITHIN,
+            value: new OpenLayers.Geometry.Point(lon, lat)
+        });
+        params = protocol.filterToParams(filter);
+        t.eq(params.lon, lon,
+             "filterToParams sets correct lon param if passed a WITHIN filter");
+        t.eq(params.lat, lat,
+             "filterToParams sets correct lat param if passed a WITHIN filter");
+
+        // Some bbox filters used in the next tests.
+
+        var bboxFilter1 = new OpenLayers.Filter.Spatial({
+            type: OpenLayers.Filter.Spatial.BBOX,
+            value:  new OpenLayers.Bounds(0, 0, 10, 10)
+        });
+
+        var bboxFilter2 = new OpenLayers.Filter.Spatial({
+            type: OpenLayers.Filter.Spatial.BBOX,
+            value:  new OpenLayers.Bounds(0, 0, 20, 20)
+        });
+
+        // 1 test
+        filter = new OpenLayers.Filter.Logical({
+            type: OpenLayers.Filter.Logical.AND,
+            filters: []
+        });
+        params = protocol.filterToParams(filter);
+        t.eq(params, {},
+             "filterToParams returns empty object if given empty AND Logical filter");
+
+        // 1 test
+        filter = new OpenLayers.Filter.Logical({
+            type: OpenLayers.Filter.Logical.OR,
+            filters: [
+                bboxFilter1
+            ]
+        });
+        params = protocol.filterToParams(filter);
+        t.eq(params, {},
+             "filterToParams does not support OR Logical filter");
+
+        // 1 test
+        filter = new OpenLayers.Filter.Logical({
+            type: OpenLayers.Filter.Logical.AND,
+            filters: [
+                bboxFilter1
+            ]
+        });
+        params = protocol.filterToParams(filter);
+        t.eq(params.bbox, [0, 0, 10, 10],
+             "filterToParams sets correct bbox param if passed " +
+             "a Logical filter containing a BBOX");
+
+        // 1 test
+        filter = new OpenLayers.Filter.Logical({
+            type: OpenLayers.Filter.Logical.AND,
+            filters: [
+                bboxFilter1, bboxFilter2
+            ]
+        });
+        params = protocol.filterToParams(filter);
+        t.eq(params.bbox, [0, 0, 20, 20],
+             "filterToParams sets correct bbox param if passed " +
+             "multiple BBOX filter in a Logical filter");
+
+        // 2 tests
+        filter = new OpenLayers.Filter.Comparison({
+            type: OpenLayers.Filter.Comparison.EQUAL_TO,
+            property: "foo",
+            value: "bar"
+        });
+        params = protocol.filterToParams(filter);
+        t.eq(params.queryable[0], "foo",
+             "filterToParams sets correct queryable param if passed an EQUAL_TO filter");
+        t.eq(params["foo__eq"], "bar",
+             "filterToParams sets correct param key and value if passed an EQUAL_TO filter");
+
+        // 2 tests
+        filter = new OpenLayers.Filter.Comparison({
+            type: OpenLayers.Filter.Comparison.NOT_EQUAL_TO,
+            property: "foo",
+            value: "bar"
+        });
+        params = protocol.filterToParams(filter);
+        t.eq(params.queryable[0], "foo",
+             "filterToParams sets correct queryable param if passed an NOT_EQUAL_TO filter");
+        t.eq(params["foo__ne"], "bar",
+             "filterToParams sets correct param key and value if passed an NOT_EQUAL_TO filter");
+
+        // 2 tests
+        filter = new OpenLayers.Filter.Comparison({
+            type: OpenLayers.Filter.Comparison.LESS_THAN,
+            property: "foo",
+            value: "bar"
+        });
+        var params = protocol.filterToParams(filter);
+        t.eq(params.queryable[0], "foo",
+             "filterToParams sets correct queryable param if passed an LESS_THAN filter");
+        t.eq(params["foo__lt"], "bar",
+             "filterToParams sets correct param key and value if passed an LESS_THAN filter");
+
+        // 2 tests
+        filter = new OpenLayers.Filter.Comparison({
+            type: OpenLayers.Filter.Comparison.LESS_THAN_OR_EQUAL_TO,
+            property: "foo",
+            value: "bar"
+        });
+        var params = protocol.filterToParams(filter);
+        t.eq(params.queryable[0], "foo",
+             "filterToParams sets correct queryable param if passed an LESS_THAN_OR_EQUAL_TO filter");
+        t.eq(params["foo__lte"], "bar",
+             "filterToParams sets correct param key and value if passed an LESS_THAN_OR_EQUAL_TO filter");
+
+        // 2 tests
+        filter = new OpenLayers.Filter.Comparison({
+            type: OpenLayers.Filter.Comparison.GREATER_THAN,
+            property: "foo",
+            value: "bar"
+        });
+        params = protocol.filterToParams(filter);
+        t.eq(params.queryable[0], "foo",
+             "filterToParams sets correct queryable param if passed an GREATER_THAN filter");
+        t.eq(params["foo__gt"], "bar",
+             "filterToParams sets correct param key and value if passed an GREATER_THAN filter");
+
+        // 2 tests
+        filter = new OpenLayers.Filter.Comparison({
+            type: OpenLayers.Filter.Comparison.GREATER_THAN_OR_EQUAL_TO,
+            property: "foo",
+            value: "bar"
+        });
+        params = protocol.filterToParams(filter);
+        t.eq(params.queryable[0], "foo",
+             "filterToParams sets correct queryable param if passed an GREATER_THAN_OR_EQUAL_TO filter");
+        t.eq(params["foo__gte"], "bar",
+             "filterToParams sets correct param key and value if passed an GREATER_THAN_OR_EQUAL_TO filter");
+
+        // 2 tests
+        filter = new OpenLayers.Filter.Comparison({
+            type: OpenLayers.Filter.Comparison.LIKE,
+            property: "foo",
+            value: "bar"
+        });
+        params = protocol.filterToParams(filter);
+        t.eq(params.queryable[0], "foo",
+             "filterToParams sets correct queryable param if passed a LIKE filter");
+        t.eq(params["foo__ilike"], "bar",
+             "filterToParams sets correct param key and value if passed an LIKE filter");
+
+        // 4 tests
+        filter = new OpenLayers.Filter.Logical({
+            type: OpenLayers.Filter.Logical.AND,
+            filters: [
+                new OpenLayers.Filter.Comparison({
+                    type: OpenLayers.Filter.Comparison.EQUAL_TO,
+                    property: "foo",
+                    value: "bar"
+                }),
+                new OpenLayers.Filter.Comparison({
+                    type: OpenLayers.Filter.Comparison.LESS_THAN,
+                    property: "foo2",
+                    value: "baz"
+                })
+            ]
+        });
+        params = protocol.filterToParams(filter);
+        t.eq(params.queryable[0], "foo",
+             "filterToParams sets correct queryable param if passed an EQUAL_TO filter within a AND filter");
+        t.eq(params["foo__eq"], "bar",
+             "filterToParams sets correct param key and value if passed an EQUAL_TO filter within a AND filter");
+        t.eq(params.queryable[1], "foo2",
+             "filterToParams sets correct queryable param if passed a LESS_THAN filter within a AND filter");
+        t.eq(params["foo2__lt"], "baz",
+             "filterToParams sets correct param key and value if passed a LESS_THAN filter within a AND filter");
+
+        // 2 tests
+        protocol = new OpenLayers.Protocol.HTTP({wildcarded: true});
+        filter = new OpenLayers.Filter.Comparison({
+            type: OpenLayers.Filter.Comparison.LIKE,
+            property: "foo",
+            value: "bar"
+        });
+        params = protocol.filterToParams(filter);
+        t.eq(params.queryable[0], "foo",
+             "filterToParams sets correct queryable param if passed a LIKE filter (wildcarded true)");
+        t.eq(params["foo__ilike"], "%bar%",
+             "filterToParams sets correct param key and value if passed an LIKE filter (wildcarded true)");
+    }
+
+    function test_regex2value(t) {
+        t.plan(16);
+
+        // setup
+
+        var protocol = new OpenLayers.Protocol.HTTP({
+            filterToParams: OpenLayers.Protocol.simpleFilterSerializer
+        });
+
+        var value;
+        var filter = new OpenLayers.Filter.Comparison({
+            type: OpenLayers.Filter.Comparison.LIKE,
+            property: "prop"
+        });
+        
+        function serialize(value) {
+            filter.value = value;
+            return protocol.filterToParams(filter).prop__ilike;
+        }
+
+        // test
+
+        value = serialize("foo");
+        t.eq(value, "foo", 'regex2value converts "foo" to "foo"');
+
+        value = serialize("foo%");
+        t.eq(value, "foo\\%", 'regex2value converts "foo%" to "foo\\%"');
+
+        value = serialize("foo.*");
+        t.eq(value, "foo%", 'regex2value converts "foo.*" to "foo%"');
+
+        value = serialize("f.*oo.*");
+        t.eq(value, "f%oo%", 'regex2value converts "f.*oo.*" to "f%oo%"');
+
+        value = serialize("foo.");
+        t.eq(value, "foo_", 'regex2value converts "foo." to "foo_"');
+
+        value = serialize("f.oo.");
+        t.eq(value, "f_oo_", 'regex2value converts "f.oo." to "f_oo_"');
+
+        value = serialize("f.oo.*");
+        t.eq(value, "f_oo%", 'regex2value converts "f.oo.*" to "f_oo%"');
+
+        value = serialize("foo\\\\");
+        t.eq(value, "foo\\\\", 'regex2value converts "foo\\\\" to "foo\\\\"');
+
+        value = serialize("foo\\.");
+        t.eq(value, "foo.", 'regex2value converts "foo\\." to "foo."');
+
+        value = serialize("foo\\\\.");
+        t.eq(value, "foo\\\\_", 'regex2value converts "foo\\\\." to "foo\\\\_"');
+
+        value = serialize("foo\\*");
+        t.eq(value, "foo*", 'regex2value converts "foo\\*" to "foo*"');
+
+        value = serialize("foo\\\\*");
+        t.eq(value, "foo\\\\*", 'regex2value converts "foo\\\\*" to "foo\\\\*"');
+
+        value = serialize("foo\\\\.*");
+        t.eq(value, "foo\\\\%", 'regex2value converts "foo\\\\.*" to "foo\\\\%"');
+
+        value = serialize("fo\\.o.*");
+        t.eq(value, "fo.o%", 'regex2value converts from "fo\\.o.*" to "fo.o%"');
+
+        value = serialize("fo.*o\\.");
+        t.eq(value, "fo%o.", 'regex2value converts from "fo.*o\\." to "to%o."');
+
+        value = serialize("\\*\\..*.\\\\.*\\\\.%");
+        t.eq(value, "*.%_\\\\%\\\\_\\%",
+             'regex2value converts from "\\*\\..*.\\\\.*\\\\.%" ' +
+             'to "*.%_\\\\%\\\\_\\%"');
+    }
+
+  </script>
+</head>
+<body>
+</body>
+</html>

Modified: sandbox/august/trunk/tests/Protocol/WFS.html
===================================================================
--- sandbox/august/trunk/tests/Protocol/WFS.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Protocol/WFS.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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) {
@@ -24,6 +24,39 @@
              "initialize returns instance of custom versioned protocol")
     }
 
+    function test_setGeometryName(t) {
+        t.plan(4);
+        var protocol = new OpenLayers.Protocol.WFS({
+            url: "http://some.url.org",
+            featureNS: "http://namespace.org",
+            featureType: "type",
+            geometryName: "geom"
+        });
+        t.eq(protocol.geometryName, "geom", "geometryName set correctly by constructor");
+        t.eq(protocol.format.geometryName, "geom", "geometryName correctly set on format by constructor");
+        // change the geometryName on the fly
+        protocol.setGeometryName("SHAPE");
+        t.eq(protocol.geometryName, "SHAPE", "geometryName changed correctly by setGeometryName");
+        t.eq(protocol.format.geometryName, "SHAPE", "geometryName correctly changed on format by setGeometryName");
+        protocol.destroy();
+    }
+
+    function test_setFeatureType(t) {
+        t.plan(4);
+        var protocol = new OpenLayers.Protocol.WFS({
+            url: "http://some.url.org",
+            featureNS: "http://namespace.org",
+            featureType: "type"
+        });
+        t.eq(protocol.featureType, "type", "featureType set correctly by constructor");
+        t.eq(protocol.format.featureType, "type", "featureType correctly set on format by constructor");
+        // change the feature type on the fly
+        protocol.setFeatureType("foo");
+        t.eq(protocol.featureType, "foo", "featureType changed correctly by setFeatureType");
+        t.eq(protocol.format.featureType, "foo", "featureType correctly changed on format by setFeatureType");
+        protocol.destroy();
+    }
+
     function test_read(t) {
         t.plan(7);
 

Modified: sandbox/august/trunk/tests/Protocol.html
===================================================================
--- sandbox/august/trunk/tests/Protocol.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Protocol.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Renderer/Canvas.html
===================================================================
--- sandbox/august/trunk/tests/Renderer/Canvas.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Renderer/Canvas.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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) {

Modified: sandbox/august/trunk/tests/Renderer/Elements.html
===================================================================
--- sandbox/august/trunk/tests/Renderer/Elements.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Renderer/Elements.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function setUp() {

Modified: sandbox/august/trunk/tests/Renderer/SVG.html
===================================================================
--- sandbox/august/trunk/tests/Renderer/SVG.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Renderer/SVG.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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;

Copied: sandbox/august/trunk/tests/Renderer/SVG2.html (from rev 11704, trunk/openlayers/tests/Renderer/SVG2.html)
===================================================================
--- sandbox/august/trunk/tests/Renderer/SVG2.html	                        (rev 0)
+++ sandbox/august/trunk/tests/Renderer/SVG2.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,424 @@
+<html>
+<head>
+<script src="../OLLoader.js"></script>
+  <script type="text/javascript">
+
+    var geometry = null, node = null;
+    
+    function test_SVG_constructor(t) {
+        if (!OpenLayers.Renderer.SVG2.prototype.supported()) {
+            t.plan(0);
+            return;
+        }
+        
+        t.plan(1);
+        var r = new OpenLayers.Renderer.SVG2(document.body);
+        t.ok(r instanceof OpenLayers.Renderer.SVG2, "new OpenLayers.Renderer.SVG2 returns SVG object" );
+    }
+    
+    function test_SVG_destroy(t) {
+        if (!OpenLayers.Renderer.SVG2.prototype.supported()) {
+            t.plan(0);
+            return;
+        }
+        
+        t.plan(1);
+        
+        var g_Destroy = false;
+        
+        OpenLayers.Renderer.Elements.prototype._destroy = 
+            OpenLayers.Renderer.Elements.prototype.destroy;
+            
+        OpenLayers.Renderer.prototype.destroy = function() {
+            g_Destroy = true;
+        }
+        
+        var r = new OpenLayers.Renderer.SVG2(document.body);
+        r.destroy();
+        
+        t.eq(g_Destroy, true, "OpenLayers.Renderer.Elements.destroy() called");
+        
+        OpenLayers.Renderer.prototype.destroy = 
+            OpenLayers.Renderer.prototype._destroy;
+    }
+    
+    function test_SVG_updateDimensions(t) {
+        if (!OpenLayers.Renderer.SVG2.prototype.supported()) {
+            t.plan(0);
+            return;
+        }
+        
+        t.plan(5);
+        
+        OpenLayers.Renderer.SVG2.prototype._setExtent =
+            OpenLayers.Renderer.SVG2.prototype.setExtent;
+        
+        var g_SetExtent = false;
+        OpenLayers.Renderer.SVG2.prototype.setExtent = function() {
+            g_SetExtent = true;
+            OpenLayers.Renderer.SVG2.prototype._setExtent.apply(this, arguments);
+        }
+                
+        var r = new OpenLayers.Renderer.SVG2(document.body);
+        var extent = new OpenLayers.Bounds(1,2,3,4);
+        r.map = {
+            getResolution: function() {
+                return 0.5;
+            },
+            getExtent: function() {
+                return extent;
+            },
+            getMaxExtent: function() {
+                return extent;
+            }
+        }
+        r.updateDimensions();
+        
+        t.eq(g_SetExtent, true, "Elements.setExtent() called");
+        
+        t.eq(r.rendererRoot.getAttributeNS(null, "width"), "4", "width is correct");
+        t.eq(r.rendererRoot.getAttributeNS(null, "height"), "4", "height is correct");
+        t.eq(r.rendererRoot.getAttributeNS(null, "viewBox"), "1 -4 2 2", "rendererRoot viewBox is correct");
+        
+        // test extent changes
+        extent = new OpenLayers.Bounds(2,3,5,6);
+        r.updateDimensions();
+        t.eq(r.rendererRoot.getAttributeNS(null, "viewBox"), "2 -6 3 3", "rendererRoot viewBox is correct after a new setExtent");
+
+        OpenLayers.Renderer.SVG2.prototype.setExtent =
+            OpenLayers.Renderer.SVG2.prototype._setExtent;
+    }
+    
+    function test_SVG_drawpoint(t) {
+        if (!OpenLayers.Renderer.SVG2.prototype.supported()) {
+            t.plan(0);
+            return;
+        }
+    
+        t.plan(1);
+
+        var r = new OpenLayers.Renderer.SVG2(document.body);
+        
+        var properDraw = false;
+        var g_Radius = null;
+        r.drawCircle = function(n, g, r) {
+            properDraw = true;
+            g_Radius = 1;
+        }
+        r.drawPoint();
+        
+        t.ok(properDraw && g_Radius == 1, "drawPoint called drawCircle with radius set to 1");
+    }
+    
+    function test_SVG_drawcircle(t) {
+        if (!OpenLayers.Renderer.SVG2.prototype.supported()) {
+            t.plan(0);
+            return;
+        }
+        
+        t.plan(5);
+        
+        var r = new OpenLayers.Renderer.SVG2(document.body);
+        r.resolution = 0.5;
+        r.left = 0;
+        r.top = 0;
+        
+        var node = document.createElement('div');
+        
+        var geometry = {
+            x: 1,
+            y: 2
+        }
+        
+        r.drawCircle(node, geometry, 3);
+        
+        t.eq(node.getAttributeNS(null, 'cx'), '1', "cx is correct");
+        t.eq(node.getAttributeNS(null, 'cy'), '-2', "cy is correct");
+        t.eq(node._radius, 3, "radius preset is correct");
+       
+        // #1274: out of bound node fails when first added
+        var geometry = {
+            x: 10000000,
+            y: 200000000,
+            CLASS_NAME: "OpenLayers.Geometry.Point",
+            id: "foo",
+            getBounds: function() {return {bottom: 0}}
+        }
+        node.id = geometry.id;
+        r.root.appendChild(node);
+
+        var drawCircleCalled = false;
+        r.drawCircle = function() {
+            drawCircleCalled = true;
+            return OpenLayers.Renderer.SVG2.prototype.drawCircle.apply(r, arguments);
+        }
+        
+        r.drawGeometry(geometry, {pointRadius: 3}, "blah_4000");
+        t.eq(drawCircleCalled, true, "drawCircle called on drawGeometry for a point geometry.")
+        t.ok(node.parentNode != r.root, "circle will not be drawn when coordinates are outside the valid range");
+    }
+    
+    function test_SVG_drawlinestring(t) {
+        if (!OpenLayers.Renderer.SVG2.prototype.supported()) {
+            t.plan(0);
+            return;
+        }
+        
+        t.plan(2);
+        
+        var r = new OpenLayers.Renderer.SVG2(document.body);
+        
+        var node = document.createElement('div');
+        
+        var geometry = {
+            components: "foo"
+        }
+        g_GetString = false;
+        g_Components = null;
+        r.getComponentsString = function(c) {
+            g_GetString = true;
+            g_Components = c;
+            return "bar";
+        }
+        
+        r.drawLineString(node, geometry);
+        
+        t.ok(g_GetString && g_Components == "foo", "getComponentString is called with valid arguments");
+        t.eq(node.getAttributeNS(null, "points"), "bar", "points attribute is correct");
+    }
+    
+    function test_SVG_drawlinearring(t) {
+        if (!OpenLayers.Renderer.SVG2.prototype.supported()) {
+            t.plan(0);
+            return;
+        }
+        
+        t.plan(2);
+        
+        var r = new OpenLayers.Renderer.SVG2(document.body);
+        
+        var node = document.createElement('div');
+        
+        var geometry = {
+            components: "foo"
+        }
+        g_GetString = false;
+        g_Components = null;
+        r.getComponentsString = function(c) {
+            g_GetString = true;
+            g_Components = c;
+            return "bar";
+        }
+        
+        r.drawLinearRing(node, geometry);
+        
+        t.ok(g_GetString, "getComponentString is called with valid arguments");
+        t.eq(node.getAttributeNS(null, "points"), "bar", "points attribute is correct");
+    }
+
+    function test_SVG_drawpolygon(t) {
+        if (!OpenLayers.Renderer.SVG2.prototype.supported()) {
+            t.plan(0);
+            return;
+        }
+        
+        t.plan(3);
+        
+        var r = new OpenLayers.Renderer.SVG2(document.body);
+        
+        var node = document.createElement('div');
+        
+        var linearRings = [{
+            components: ["foo"]
+        },{
+            components: ["bar"]
+        }]
+        
+        var geometry = {
+            components: linearRings
+        }
+        g_GetString = false;
+        r.getShortString = function(c) {
+            g_GetString = true;
+            return c;
+        }
+        
+        r.drawPolygon(node, geometry);
+        
+        t.ok(g_GetString, "getShortString is called");
+        t.eq(node.getAttributeNS(null, "d"), "M foo M bar z", "d attribute is correctly set");
+        t.eq(node.getAttributeNS(null, "fill-rule"), "evenodd", "fill-rule attribute is correctly set");
+    }
+
+    function test_SVG_drawrectangle(t) {
+        if (!OpenLayers.Renderer.SVG2.prototype.supported()) {
+            t.plan(0);
+            return;
+        }
+        
+        t.plan(4);
+        
+        var r = new OpenLayers.Renderer.SVG2(document.body);
+        r.resolution = 0.5;
+        r.left = 0;
+        r.top = 0;
+        
+        var node = document.createElement('div');
+        
+        var geometry = {
+            x: 1,
+            y: 2,
+            width: 3,
+            height: 4
+        }
+        
+        r.drawRectangle(node, geometry);
+        
+        t.eq(node.getAttributeNS(null, "x"), "1", "x attribute is correctly set");
+        t.eq(node.getAttributeNS(null, "y"), "-2", "y attribute is correctly set");
+        t.eq(node.getAttributeNS(null, "width"), "3", "width attribute is correctly set");
+        t.eq(node.getAttributeNS(null, "height"), "4", "height attribute is correctly set");
+    }
+    
+    function test_SVG_drawsurface(t) {
+        if (!OpenLayers.Renderer.SVG2.prototype.supported()) {
+            t.plan(0);
+            return;
+        }
+        
+        t.plan(2);
+        
+        var r = new OpenLayers.Renderer.SVG2(document.body);
+        
+        var node = document.createElement('div');
+        
+        var geometry = {
+            components: ['foo', 'bar', 'dude']
+        }
+        g_GetString = false;
+        r.getShortString = function(c) {
+            g_GetString = true;
+            return c;
+        }
+        
+        r.drawSurface(node, geometry);
+        
+        t.ok(g_GetString, "getShortString is called");
+        
+        t.eq(node.getAttributeNS(null, "d"), "M foo C bar dude Z", "d attribute is correctly set");
+    }
+    
+    function test_SVG_getcomponentsstring(t) {
+        if (!OpenLayers.Renderer.SVG2.prototype.supported()) {
+            t.plan(0);
+            return;
+        }
+        
+        t.plan(1);
+        
+        var components = ['foo', 'bar'];
+        
+        OpenLayers.Renderer.SVG2.prototype._getShortString = 
+            OpenLayers.Renderer.SVG2.prototype.getShortString;
+            
+        OpenLayers.Renderer.SVG2.prototype.getShortString = function(p) {
+            return p;
+        };
+        
+        var string = OpenLayers.Renderer.SVG2.prototype.getComponentsString(components);
+        t.eq(string, "foo,bar", "returned string is correct");
+        
+        OpenLayers.Renderer.SVG2.prototype.getShortString = 
+            OpenLayers.Renderer.SVG2.prototype._getShortString;
+    }
+    
+    
+    
+    function test_SVG_getshortstring(t) {
+        if (!OpenLayers.Renderer.SVG2.prototype.supported()) {
+            t.plan(0);
+            return;
+        }
+        
+        t.plan(1);
+        
+        var r = new OpenLayers.Renderer.SVG2(document.body);
+        r.resolution = 0.5;
+        r.left = 0;
+        r.top = 0;
+        
+        var point = {
+            x: 1,
+            y: 2
+        };
+        
+        var string = r.getShortString(point);
+        t.eq(string, "1,-2", "returned string is correct");
+    }
+    
+    function test_svg_getnodetype(t) {
+        if (!OpenLayers.Renderer.SVG2.prototype.supported()) {
+            t.plan(0);
+            return;
+        }
+
+        t.plan(1);
+         
+        var r = new OpenLayers.Renderer.SVG2(document.body);
+
+        var g = {CLASS_NAME: "OpenLayers.Geometry.Point"}
+        var s = {graphicName: "square"};
+        
+        t.eq(r.getNodeType(g, s), "svg", "Correct node type for well known symbols");
+    }
+        
+    function test_svg_importsymbol(t) {
+        if (!OpenLayers.Renderer.SVG2.prototype.supported()) {
+            t.plan(0);
+            return;
+        }
+
+        t.plan(2);
+        
+        var r = new OpenLayers.Renderer.SVG2(document.body);
+
+        r.importSymbol("square");
+
+        var polygon = document.getElementById(r.container.id + "_defs").firstChild.firstChild;
+        
+        var pass = false;
+        for (var i = 0; i < polygon.points.numberOfItems; i++) {
+            var p = polygon.points.getItem(i);
+            pass = p.x === OpenLayers.Renderer.symbol.square[2*i] && 
+                   p.y === OpenLayers.Renderer.symbol.square[2*i+1];
+            if (!pass) {
+                break;
+            }
+        }
+        t.ok(pass, "Square symbol rendered correctly");
+        t.ok(r.symbolMetrics["-square"], "Symbol metrics cached correctly.");
+    }
+        
+    function test_svg_dashstyle(t) {
+        if (!OpenLayers.Renderer.SVG2.prototype.supported()) {
+            t.plan(0);
+            return;
+        }
+
+        t.plan(5);
+        
+        var r = new OpenLayers.Renderer.SVG2(document.body);
+
+        t.eq(r.dashStyle({strokeWidth: 1, strokeDashstyle: "dot"}, 1), "1,4", "dot dasharray created correctly");
+        t.eq(r.dashStyle({strokeWidth: 1, strokeDashstyle: "dash"}, 1), "4,4", "dash dasharray created correctly");
+        t.eq(r.dashStyle({strokeWidth: 1, strokeDashstyle: "longdash"}, 1), "8,4", "longdash dasharray created correctly");
+        t.eq(r.dashStyle({strokeWidth: 1, strokeDashstyle: "dashdot"}, 1), "4,4,1,4", "dashdot dasharray created correctly");
+        t.eq(r.dashStyle({strokeWidth: 1, strokeDashstyle: "longdashdot"}, 1), "8,4,1,4", "dashdot dasharray created correctly");
+    }
+
+  </script>
+</head>
+<body>
+<div id="map" style="width:500px;height:550px"></div>
+</body>
+</html>

Modified: sandbox/august/trunk/tests/Renderer/VML.html
===================================================================
--- sandbox/august/trunk/tests/Renderer/VML.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Renderer/VML.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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;

Modified: sandbox/august/trunk/tests/Renderer.html
===================================================================
--- sandbox/august/trunk/tests/Renderer.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Renderer.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Request/XMLHttpRequest.html
===================================================================
--- sandbox/august/trunk/tests/Request/XMLHttpRequest.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Request/XMLHttpRequest.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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) {
             t.plan(1);

Modified: sandbox/august/trunk/tests/Request.html
===================================================================
--- sandbox/august/trunk/tests/Request.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Request.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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;
         

Modified: sandbox/august/trunk/tests/Rule.html
===================================================================
--- sandbox/august/trunk/tests/Rule.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Rule.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Strategy/BBOX.html
===================================================================
--- sandbox/august/trunk/tests/Strategy/BBOX.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Strategy/BBOX.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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) {
@@ -270,6 +270,38 @@
         
     }
 
+    // Test fix for Ticket #3142
+    function test_layerLoadedAfterBeingAdded(t) {
+        t.plan(1);
+
+        var dummy = new OpenLayers.Layer(null, {isBaseLayer: true});
+
+        var strategy = new OpenLayers.Strategy.BBOX({
+            ratio: 1 // makes for easier comparison to map bounds
+        });
+        var layer = new OpenLayers.Layer.Vector(null, {
+            protocol: new OpenLayers.Protocol(),
+            strategies: [strategy]
+        });
+
+        // Make sure to test the case of a vector layer needing to be 
+        // reprojected while the map is not yet centered
+        var layerReproject = new OpenLayers.Layer.Vector(null, {
+            protocol: new OpenLayers.Protocol(),
+            strategies: [new OpenLayers.Strategy.BBOX()],
+            projection: 'EPSG:900913'
+        });
+
+        var map = new OpenLayers.Map("map");
+        map.addLayer(dummy);
+        map.addLayer(layerReproject);
+        map.setCenter(new OpenLayers.LonLat(0, 0));
+        map.addLayer(layer);
+
+        // test that the strategy bounds were set
+        t.ok(map.getExtent().equals(strategy.bounds), "[set center] bounds set to map extent");
+    }
+
   </script>
 </head>
 <body>

Modified: sandbox/august/trunk/tests/Strategy/Cluster.html
===================================================================
--- sandbox/august/trunk/tests/Strategy/Cluster.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Strategy/Cluster.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Strategy/Filter.html
===================================================================
--- sandbox/august/trunk/tests/Strategy/Filter.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Strategy/Filter.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
 <script>
 
 var features = [];

Modified: sandbox/august/trunk/tests/Strategy/Fixed.html
===================================================================
--- sandbox/august/trunk/tests/Strategy/Fixed.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Strategy/Fixed.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Strategy/Paging.html
===================================================================
--- sandbox/august/trunk/tests/Strategy/Paging.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Strategy/Paging.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Strategy/Refresh.html
===================================================================
--- sandbox/august/trunk/tests/Strategy/Refresh.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Strategy/Refresh.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Strategy/Save.html
===================================================================
--- sandbox/august/trunk/tests/Strategy/Save.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Strategy/Save.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Strategy.html
===================================================================
--- sandbox/august/trunk/tests/Strategy.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Strategy.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Style.html
===================================================================
--- sandbox/august/trunk/tests/Style.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Style.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Style2.html
===================================================================
--- sandbox/august/trunk/tests/Style2.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Style2.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/StyleMap.html
===================================================================
--- sandbox/august/trunk/tests/StyleMap.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/StyleMap.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Symbolizer/Line.html
===================================================================
--- sandbox/august/trunk/tests/Symbolizer/Line.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Symbolizer/Line.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Symbolizer/Point.html
===================================================================
--- sandbox/august/trunk/tests/Symbolizer/Point.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Symbolizer/Point.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Symbolizer/Polygon.html
===================================================================
--- sandbox/august/trunk/tests/Symbolizer/Polygon.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Symbolizer/Polygon.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Symbolizer/Raster.html
===================================================================
--- sandbox/august/trunk/tests/Symbolizer/Raster.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Symbolizer/Raster.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Symbolizer/Text.html
===================================================================
--- sandbox/august/trunk/tests/Symbolizer/Text.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Symbolizer/Text.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Symbolizer.html
===================================================================
--- sandbox/august/trunk/tests/Symbolizer.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Symbolizer.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Tile/Image/IFrame.html
===================================================================
--- sandbox/august/trunk/tests/Tile/Image/IFrame.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Tile/Image/IFrame.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Tile/Image.html
===================================================================
--- sandbox/august/trunk/tests/Tile/Image.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Tile/Image.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Tile/WFS.html
===================================================================
--- sandbox/august/trunk/tests/Tile/WFS.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Tile/WFS.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Tile.html
===================================================================
--- sandbox/august/trunk/tests/Tile.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Tile.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Tween.html
===================================================================
--- sandbox/august/trunk/tests/Tween.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Tween.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tests/Util.html
===================================================================
--- sandbox/august/trunk/tests/Util.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/Util.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -5,16 +5,20 @@
     var custom$ = function() {};
     window.$ = custom$;
   </script>
-  <script src="../lib/OpenLayers/SingleFile.js"></script>
-  <script src="../lib/OpenLayers/BaseTypes/Class.js"></script>
-  <script src="../lib/OpenLayers/Util.js"></script>
-  <script src="../lib/OpenLayers/BaseTypes.js"></script>
-  <script src="../lib/OpenLayers/BaseTypes/Element.js"></script>
-  <script src="../lib/OpenLayers/BaseTypes/LonLat.js"></script>
-  <script src="../lib/OpenLayers/BaseTypes/Pixel.js"></script>
-  <script src="../lib/OpenLayers/BaseTypes/Size.js"></script>
-  <script src="../lib/OpenLayers/Lang.js"></script>
-  <script src="../lib/OpenLayers/Console.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; 
@@ -1097,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/august/trunk/tests/list-tests.html
===================================================================
--- sandbox/august/trunk/tests/list-tests.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/list-tests.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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>
@@ -30,11 +32,13 @@
     <li>Control/PanZoom.html</li>
     <li>Control/PanZoomBar.html</li>
     <li>Control/Permalink.html</li>
+    <li>Control/PinchZoom.html</li>
     <li>Control/Scale.html</li>
     <li>Control/ScaleLine.html</li>
     <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>
@@ -112,8 +116,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>
@@ -127,6 +133,7 @@
     <li>Layer.html</li>
     <li>Layer/ArcIMS.html</li> 
     <li>Layer/ArcGIS93Rest.html</li>
+    <li>Layer/ArcGISCache.html</li>
     <li>Layer/Bing.html</li>
     <li>Layer/EventPane.html</li>
     <li>Layer/FixedZoomLevels.html</li>
@@ -163,6 +170,7 @@
     <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>
@@ -170,6 +178,8 @@
     <li>Projection.html</li>
     <li>Protocol.html</li>
     <li>Protocol/HTTP.html</li>
+    <li>Protocol/Script.html</li>
+    <li>Protocol/SimpleFilterSerializer.html</li>
     <li>Protocol/SQL.html</li>
     <li>Protocol/SQL/Gears.html</li>
     <li>Protocol/WFS.html</li>
@@ -178,6 +188,7 @@
     <li>Renderer/Canvas.html</li>
     <li>Renderer/Elements.html</li>
     <li>Renderer/SVG.html</li>
+    <li>Renderer/SVG2.html</li>
     <li>Renderer/VML.html</li>
     <li>Request.html</li>
     <li>Request/XMLHttpRequest.html</li>
@@ -204,5 +215,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>

Deleted: sandbox/august/trunk/tests/node.js/mockdom.js
===================================================================
--- trunk/openlayers/tests/node.js/mockdom.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/node.js/mockdom.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,106 +0,0 @@
-XMLHttpRequest = function() { 
-    return { 
-    'open': function() {  },
-    'send': function() {  }
-    }
-};
-
-alert = print;
-
-navigator = {
-  'appName': 'mockdom',
-  'userAgent': 'mockdom',
-  'appVersion': '0.1',
-  'language': 'en',
-  'userLanguage': 'en'
-}  
-
-element = function(type) {
-    type = type || "";
-
-    return {
-        'childNodes': [],
-        'className': '',
-        'tagName': type.toUpperCase(),
-        'style': {},
-        'setAttribute': function(attr, value) {
-            this[attr] = value;
-        },    
-        'appendChild': function(element) {
-            if (this.childNodes.length) {
-                this.childNodes[this.childNodes.length - 1].nextSibling = element;
-            }  else {
-                this.firstChild = element;
-            }    
-            element.parentNode = this;
-            this.childNodes.push(element);
-
-        }, 
-        'removeChild': function(element) {
-            var i = this.childNodes.indexOf(element);
-            this.childNodes.splice(i, 1);
-        },    
-        'addEventListener': function() {
-        },
-        'removeEventListener': function() {
-        },
-        'getElementsByTagName': function(name, externalList) {
-            var uc = name.toUpperCase();
-            var list = externalList || [];
-            for(var i = 0; i < this.childNodes.length; i++) {
-                if (this.childNodes[i].tagName == uc) {
-                    list.push(this.childNodes[i]);
-                }
-                this.childNodes[i].getElementsByTagName(name, list);
-            }
-            return list;
-        },
-        'getElementById': function(id) {
-            for(var i = 0; i < this.childNodes.length; i++) {
-                if (this.childNodes[i].id == id) {
-                    return this.childNodes[i];
-                } else {
-                    var elem = this.childNodes[i].getElementById(id);
-                    if (elem) { 
-                        return elem
-                    }
-                }
-            }
-        }
-    }
-};
-
-document = element();
-document.createElement = function(type) {
-     return element(type);
-};
-document.createTextNode = function(text) {
-    var e = element("Text");
-    e.innerHTML = text;
-}
-
-document.appendChild(element("head"));
-document.body = element("body");
-document.appendChild(document.body);
-
-window = {
-    'addEventListener': function() {
-    },
-    'getSelection': function() {
-        return {
-            collapseToStart: function() {}
-        }
-    },
-    document: document,
-    navigator: navigator,
-    location: {
-        href: '#',
-        port: '',
-        hostname: 'openlayers.org',
-        host: 'openlayers.org',
-        proto: 'https'
-    }    
-};
-document.location = window.location;
-
-window.Function = Function;

Copied: sandbox/august/trunk/tests/node.js/mockdom.js (from rev 11704, trunk/openlayers/tests/node.js/mockdom.js)
===================================================================
--- sandbox/august/trunk/tests/node.js/mockdom.js	                        (rev 0)
+++ sandbox/august/trunk/tests/node.js/mockdom.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,106 @@
+XMLHttpRequest = function() { 
+    return { 
+    'open': function() {  },
+    'send': function() {  }
+    }
+};
+
+alert = print;
+
+navigator = {
+  'appName': 'mockdom',
+  'userAgent': 'mockdom',
+  'appVersion': '0.1',
+  'language': 'en',
+  'userLanguage': 'en'
+}  
+
+element = function(type) {
+    type = type || "";
+
+    return {
+        'childNodes': [],
+        'className': '',
+        'tagName': type.toUpperCase(),
+        'style': {},
+        'setAttribute': function(attr, value) {
+            this[attr] = value;
+        },    
+        'appendChild': function(element) {
+            if (this.childNodes.length) {
+                this.childNodes[this.childNodes.length - 1].nextSibling = element;
+            }  else {
+                this.firstChild = element;
+            }    
+            element.parentNode = this;
+            this.childNodes.push(element);
+
+        }, 
+        'removeChild': function(element) {
+            var i = this.childNodes.indexOf(element);
+            this.childNodes.splice(i, 1);
+        },    
+        'addEventListener': function() {
+        },
+        'removeEventListener': function() {
+        },
+        'getElementsByTagName': function(name, externalList) {
+            var uc = name.toUpperCase();
+            var list = externalList || [];
+            for(var i = 0; i < this.childNodes.length; i++) {
+                if (this.childNodes[i].tagName == uc) {
+                    list.push(this.childNodes[i]);
+                }
+                this.childNodes[i].getElementsByTagName(name, list);
+            }
+            return list;
+        },
+        'getElementById': function(id) {
+            for(var i = 0; i < this.childNodes.length; i++) {
+                if (this.childNodes[i].id == id) {
+                    return this.childNodes[i];
+                } else {
+                    var elem = this.childNodes[i].getElementById(id);
+                    if (elem) { 
+                        return elem
+                    }
+                }
+            }
+        }
+    }
+};
+
+document = element();
+document.createElement = function(type) {
+     return element(type);
+};
+document.createTextNode = function(text) {
+    var e = element("Text");
+    e.innerHTML = text;
+}
+
+document.appendChild(element("head"));
+document.body = element("body");
+document.appendChild(document.body);
+
+window = {
+    'addEventListener': function() {
+    },
+    'getSelection': function() {
+        return {
+            collapseToStart: function() {}
+        }
+    },
+    document: document,
+    navigator: navigator,
+    location: {
+        href: '#',
+        port: '',
+        hostname: 'openlayers.org',
+        host: 'openlayers.org',
+        proto: 'https'
+    }    
+};
+document.location = window.location;
+
+window.Function = Function;

Deleted: sandbox/august/trunk/tests/node.js/node-tests.cfg
===================================================================
--- trunk/openlayers/tests/node.js/node-tests.cfg	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/node.js/node-tests.cfg	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,12 +0,0 @@
-# This build config is supposed to be used for the units tests with "mode=build"
-
-[first]
-mockdom.js
-[last]
-node.js
-
-[include]
-
-[exclude]
-OpenLayers.js
-Firebug/firebug.js

Copied: sandbox/august/trunk/tests/node.js/node-tests.cfg (from rev 11704, trunk/openlayers/tests/node.js/node-tests.cfg)
===================================================================
--- sandbox/august/trunk/tests/node.js/node-tests.cfg	                        (rev 0)
+++ sandbox/august/trunk/tests/node.js/node-tests.cfg	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,12 @@
+# This build config is supposed to be used for the units tests with "mode=build"
+
+[first]
+mockdom.js
+[last]
+node.js
+
+[include]
+
+[exclude]
+OpenLayers.js
+Firebug/firebug.js

Deleted: sandbox/august/trunk/tests/node.js/node.js
===================================================================
--- trunk/openlayers/tests/node.js/node.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/node.js/node.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1 +0,0 @@
-exports.OpenLayers = OpenLayers;

Copied: sandbox/august/trunk/tests/node.js/node.js (from rev 11704, trunk/openlayers/tests/node.js/node.js)
===================================================================
--- sandbox/august/trunk/tests/node.js/node.js	                        (rev 0)
+++ sandbox/august/trunk/tests/node.js/node.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1 @@
+exports.OpenLayers = OpenLayers;

Deleted: sandbox/august/trunk/tests/node.js/run-test.js
===================================================================
--- trunk/openlayers/tests/node.js/run-test.js	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/node.js/run-test.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,26 +0,0 @@
-// Requires:
-/// 0. nodejs
-//  1. jsdom installed (npm install jsdom)
-//  2. A build profile with mockdom.js included in [first], and node.js 
-//     inclded in [last], at ../../build/OpenLayers.js , like node-tests.js.
-//  3. Run with node run-tests.js
-//
-//  Missing: integration with a solid node.js testrunner.
-var jsdom = require('jsdom'); 
-jsdom.env('<html><body></body></html>', function(errors, window) { 
-    for (var i in window) { 
-        if (i == "console") {
-            continue;
-        }    
-        eval(i+"=window['"+i+"'];"); 
-    }
-    OpenLayers = require("../../build/OpenLayers.js")['OpenLayers'];
-    var map = new OpenLayers.Map(document.createElement("map"));
-    map.addLayer(new OpenLayers.Layer("", {isBaseLayer:true}));
-    map.setCenter(new OpenLayers.LonLat(-71,42), 10);
-    var px = map.getPixelFromLonLat(map.getLonLatFromPixel(new OpenLayers.Pixel(100,100)));
-    console.log(px);
-    var px = map.getLonLatFromPixel(map.getPixelFromLonLat(new OpenLayers.LonLat(10,10)));
-    console.log(px);
-    
-});

Copied: sandbox/august/trunk/tests/node.js/run-test.js (from rev 11704, trunk/openlayers/tests/node.js/run-test.js)
===================================================================
--- sandbox/august/trunk/tests/node.js/run-test.js	                        (rev 0)
+++ sandbox/august/trunk/tests/node.js/run-test.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,26 @@
+// Requires:
+/// 0. nodejs
+//  1. jsdom installed (npm install jsdom)
+//  2. A build profile with mockdom.js included in [first], and node.js 
+//     inclded in [last], at ../../build/OpenLayers.js , like node-tests.js.
+//  3. Run with node run-tests.js
+//
+//  Missing: integration with a solid node.js testrunner.
+var jsdom = require('jsdom'); 
+jsdom.env('<html><body></body></html>', function(errors, window) { 
+    for (var i in window) { 
+        if (i == "console") {
+            continue;
+        }    
+        eval(i+"=window['"+i+"'];"); 
+    }
+    OpenLayers = require("../../build/OpenLayers.js")['OpenLayers'];
+    var map = new OpenLayers.Map(document.createElement("map"));
+    map.addLayer(new OpenLayers.Layer("", {isBaseLayer:true}));
+    map.setCenter(new OpenLayers.LonLat(-71,42), 10);
+    var px = map.getPixelFromLonLat(map.getLonLatFromPixel(new OpenLayers.Pixel(100,100)));
+    console.log(px);
+    var px = map.getLonLatFromPixel(map.getPixelFromLonLat(new OpenLayers.LonLat(10,10)));
+    console.log(px);
+    
+});

Deleted: sandbox/august/trunk/tests/node.js/run.sh
===================================================================
--- trunk/openlayers/tests/node.js/run.sh	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/node.js/run.sh	2011-03-14 21:05:59 UTC (rev 11705)
@@ -1,10 +0,0 @@
-#!/bin/sh
-cp mockdom.js node.js ../../lib
-cp node-tests.cfg ../../build
-cd ../../build
-python build.py -c none node-tests
-cd ../tests/node.js/
-
-node run-test.js
-rm ../../lib/mockdom.js
-rm ../../lib/node.js

Copied: sandbox/august/trunk/tests/node.js/run.sh (from rev 11704, trunk/openlayers/tests/node.js/run.sh)
===================================================================
--- sandbox/august/trunk/tests/node.js/run.sh	                        (rev 0)
+++ sandbox/august/trunk/tests/node.js/run.sh	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,10 @@
+#!/bin/sh
+cp mockdom.js node.js ../../lib
+cp node-tests.cfg ../../build
+cd ../../build
+python build.py -c none node-tests
+cd ../tests/node.js/
+
+node run-test.js
+rm ../../lib/mockdom.js
+rm ../../lib/node.js

Modified: sandbox/august/trunk/tests/run-tests.html
===================================================================
--- sandbox/august/trunk/tests/run-tests.html	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tests/run-tests.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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>

Copied: sandbox/august/trunk/tests/speed/vector-renderers.html (from rev 11704, trunk/openlayers/tests/speed/vector-renderers.html)
===================================================================
--- sandbox/august/trunk/tests/speed/vector-renderers.html	                        (rev 0)
+++ sandbox/august/trunk/tests/speed/vector-renderers.html	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <title>Vector Features Performance Test</title>
+    <script type="text/javascript" src="https://getfirebug.com/firebug-lite.js#startOpened=true"></script>
+    <link rel="stylesheet" href="../../theme/default/style.css" type="text/css" />
+    <link rel="stylesheet" href="../../examples/style.css" type="text/css" />
+  </head>
+  <body>
+    <h1 id="title">Vector Rendering Performance</h1>
+    <div id="map" class="smallmap"></div>
+    <p>
+    This is a benchmark for vector rendering performance. Test results are
+    written to the debug console.
+    Select a renderer here:
+    <br/>
+    <select id="renderers"></select>
+    </p><p>
+    The benchmark shows the time needed to render the features, and how long a
+    move (drag or zoom) takes. Drag and zoom around to produce move results.
+    </p>
+    <script src="../../lib/OpenLayers.js"></script>
+    <script src="vector-renderers.js"></script>
+  </body>
+</html>
\ No newline at end of file

Copied: sandbox/august/trunk/tests/speed/vector-renderers.js (from rev 11704, trunk/openlayers/tests/speed/vector-renderers.js)
===================================================================
--- sandbox/august/trunk/tests/speed/vector-renderers.js	                        (rev 0)
+++ sandbox/august/trunk/tests/speed/vector-renderers.js	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,70 @@
+var map, vectorLayer, drawFeature, features
+
+map = new OpenLayers.Map('map', {
+    eventListeners: {
+        movestart: function() {
+            console.time("move");
+        },
+        moveend: function() {
+            console.timeEnd("move");
+        }
+    }
+});
+
+// allow testing of specific renderers via "?renderer=Canvas", etc
+var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
+renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
+
+vectorLayer = new OpenLayers.Layer.Vector("Vector Layer", {
+    isBaseLayer: true,
+    renderers: renderer,
+    eventListeners: {
+        beforefeaturesadded: function() {
+            console.time("addFeatures");
+        },
+        featuresadded: function() {
+            console.timeEnd("addFeatures");
+        }
+    }
+});
+
+map.addLayers([vectorLayer]);
+map.addControl(new OpenLayers.Control.MousePosition());
+map.setCenter(new OpenLayers.LonLat(0, 0), 2);
+
+features = new Array(500);
+var x, y, points
+for (var i = 0; i < 500; i++) {
+    x = 90-Math.random()*180;
+    y = 45-Math.random()*90;
+    var pointList = [];
+    for(var p=0; p<19; ++p) {
+        var a = p * (2 * Math.PI) / 20;
+        var r = Math.random() * 3 + 1;
+        var newPoint = new OpenLayers.Geometry.Point(x + (r * Math.cos(a)),
+                                                     y + (r * Math.sin(a)));
+        pointList.push(newPoint);
+    }
+    pointList.push(pointList[0]);
+    features[i] = new OpenLayers.Feature.Vector(
+        new OpenLayers.Geometry.LinearRing(pointList));
+        
+}
+vectorLayer.addFeatures(features);
+
+var select = document.getElementById("renderers");
+var renderers = OpenLayers.Layer.Vector.prototype.renderers;
+var option;
+for (var i=0, len=renderers.length; i<len; i++) {
+    if (OpenLayers.Renderer[renderers[i]].prototype.supported()) {
+        option = document.createElement("option");
+        option.textContent = renderers[i];
+        option.value = renderers[i];
+        option.selected = renderers[i] == vectorLayer.renderer.CLASS_NAME.split(".").pop();
+        select.appendChild(option);
+    }
+}
+select.onchange = function() {
+    window.location.href = window.location.href.split("?")[0] +
+        "?renderer=" + select.options[select.selectedIndex].value;
+}

Modified: sandbox/august/trunk/theme/default/img/add_point_off.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/drag-rectangle-off.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/drag-rectangle-on.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/draw_line_off.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/draw_line_on.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/draw_point_off.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/draw_point_on.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/draw_polygon_off.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/draw_polygon_on.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/editing_tool_bar.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/move_feature_off.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/move_feature_on.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/navigation_history.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/pan-panel-NOALPHA.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/pan-panel.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/pan_on.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/panning-hand-off.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/panning-hand-on.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/remove_point_on.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/save_features_off.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/save_features_on.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/view_next_off.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/view_previous_off.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/img/zoom-panel.png
===================================================================
(Binary files differ)

Modified: sandbox/august/trunk/theme/default/style.css
===================================================================
--- sandbox/august/trunk/theme/default/style.css	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/theme/default/style.css	2011-03-14 21:05:59 UTC (rev 11705)
@@ -93,11 +93,13 @@
 .olControlOverviewMapMinimizeButton {
     right: 0px;
     bottom: 80px;
+    cursor: pointer;
 }    
 
 .olControlOverviewMapMaximizeButton {
     right: 0px;
     bottom: 80px;
+    cursor: pointer;
 }
 
 .olControlOverviewMapExtentRectangle {
@@ -186,7 +188,7 @@
   background-repeat: no-repeat;
 }
 .olControlEditingToolbar  {
-    float:right;
+    top: 0px;
     right: 0px;
     height: 30px; 
     width: 200px;
@@ -402,6 +404,7 @@
 .olControlLayerSwitcher .minimizeDiv {
     top: 5px;
     right: 0px;
+    cursor: pointer;
 }
 
 .olBingAttribution {


Property changes on: sandbox/august/trunk/tools
___________________________________________________________________
Modified: svn:ignore
   - *.pyc

   + *.pyc
closure-compiler.jar



Copied: sandbox/august/trunk/tools/closure.py (from rev 11704, trunk/openlayers/tools/closure.py)
===================================================================
--- sandbox/august/trunk/tools/closure.py	                        (rev 0)
+++ sandbox/august/trunk/tools/closure.py	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,21 @@
+import sys
+import os
+import tempfile
+
+path = os.path.abspath(os.path.join(os.path.dirname(__file__), "closure-compiler.jar"))
+if not os.path.exists(path):
+    raise Exception("No closure-compiler.jar at %s; read README.txt!" % path)
+
+def minimize(code):
+    ntf = tempfile.NamedTemporaryFile()
+    ntf.write(code)
+    ntf.flush()
+
+    ntf2 = tempfile.NamedTemporaryFile()
+
+    os.system("java -jar %s --js %s --js_output_file %s" % (path, ntf.name, ntf2.name))
+    ntf2.seek(0)
+    data = ntf2.read()
+    ntf.close()
+    ntf2.close()
+    return data

Copied: sandbox/august/trunk/tools/closure_ws.py (from rev 11704, trunk/openlayers/tools/closure_ws.py)
===================================================================
--- sandbox/august/trunk/tools/closure_ws.py	                        (rev 0)
+++ sandbox/august/trunk/tools/closure_ws.py	2011-03-14 21:05:59 UTC (rev 11705)
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+
+import httplib, urllib, sys
+import time
+# Define the parameters for the POST request and encode them in
+# a URL-safe format.
+
+def minimize(code):
+
+    params = urllib.urlencode([
+        ('js_code', code),
+        ('compilation_level', 'SIMPLE_OPTIMIZATIONS'),
+        ('output_format', 'text'),
+        ('output_info', 'compiled_code'),
+      ])
+    
+    t = time.time()
+    # Always use the following value for the Content-type header.
+    headers = { "Content-type": "application/x-www-form-urlencoded" }
+    conn = httplib.HTTPConnection('closure-compiler.appspot.com')
+    conn.request('POST', '/compile', params, headers)
+    response = conn.getresponse()
+    data = response.read()
+    conn.close()
+    if data.startswith("Error"):
+        raise Exception(data)
+    print "%.3f seconds to compile" % (time.time() - t) 
+    return data

Modified: sandbox/august/trunk/tools/exampleparser.py
===================================================================
--- sandbox/august/trunk/tools/exampleparser.py	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tools/exampleparser.py	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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/august/trunk/tools/release.sh
===================================================================
--- sandbox/august/trunk/tools/release.sh	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tools/release.sh	2011-03-14 21:05:59 UTC (rev 11705)
@@ -2,12 +2,23 @@
 
 VERSION=$1
 
+wget -c http://closure-compiler.googlecode.com/files/compiler-latest.zip
+unzip compiler-latest.zip 
+
 svn export http://svn.openlayers.org/tags/openlayers/release-$VERSION OpenLayers-$VERSION
 cd OpenLayers-$VERSION/build
-./build.py full
+mv ../../compiler.jar ../tools/closure-compiler.jar
+./build.py -c closure full
 cp OpenLayers.js ..
+rm ../tools/closure-compiler.jar
 
 cd ..
+cd tools
+python exampleparser.py
+cd ..
+for i in google ie6-style style; do
+    csstidy theme/default/$i.css --template=highest theme/default/$i.tidy.css
+done    
 
 mkdir doc/devdocs
 mkdir doc/apidocs

Modified: sandbox/august/trunk/tools/update_dev_dir.sh
===================================================================
--- sandbox/august/trunk/tools/update_dev_dir.sh	2011-03-14 20:46:26 UTC (rev 11704)
+++ sandbox/august/trunk/tools/update_dev_dir.sh	2011-03-14 21:05:59 UTC (rev 11705)
@@ -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,15 +12,25 @@
 
 # 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 -c closure tests.cfg
+    ./build.py -c closure mobile.cfg OpenLayers.mobile.js
     
     cp OpenLayers.js ..
+    cp OpenLayers.mobile.js ..
+
     cd ..
-    
+    for i in google ie6-style style; do
+        csstidy theme/default/$i.css --template=highest theme/default/$i.tidy.css
+        cp theme/default/$i.tidy.css theme/default/$i.css
+    done
+
+    sed -i -e 's!../lib/OpenLayers.js?mobile!../OpenLayers.mobile.js!' examples/*.html
     sed -i -e 's!../lib/OpenLayers.js!../OpenLayers.js!' examples/*.html
     naturaldocs -i /osgeo/openlayers/docs/dev/lib -o HTML /osgeo/openlayers/dev/apidocs -p /osgeo/openlayers/docs/dev/apidoc_config -s Default OL >/dev/null
     naturaldocs -i /osgeo/openlayers/docs/dev/lib -o HTML /osgeo/openlayers/dev/docs -p /osgeo/openlayers/docs/dev/doc_config -s Default OL >/dev/null



More information about the Commits mailing list