[OpenLayers-Commits] r11674 - in sandbox/tschaub/xdomain: . 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/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/Handler tests/Layer tests/Layer/Google t ests/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
Tue Mar 8 11:09:25 EST 2011


Author: tschaub
Date: 2011-03-08 08:09:24 -0800 (Tue, 08 Mar 2011)
New Revision: 11674

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


Property changes on: sandbox/tschaub/xdomain
___________________________________________________________________
Modified: svn:mergeinfo
   - /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:10940-11028,11030-11062
   + /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:10940-11028,11030-11062,11064-11673

Modified: sandbox/tschaub/xdomain/build/README.txt
===================================================================
--- sandbox/tschaub/xdomain/build/README.txt	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/build/README.txt	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/build/build.py
===================================================================
--- sandbox/tschaub/xdomain/build/build.py	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/build/build.py	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/build/mobile.cfg (from rev 11673, trunk/openlayers/build/mobile.cfg)
===================================================================
--- sandbox/tschaub/xdomain/build/mobile.cfg	                        (rev 0)
+++ sandbox/tschaub/xdomain/build/mobile.cfg	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/build/tests.cfg (from rev 11673, trunk/openlayers/build/tests.cfg)
===================================================================
--- sandbox/tschaub/xdomain/build/tests.cfg	                        (rev 0)
+++ sandbox/tschaub/xdomain/build/tests.cfg	2011-03-08 16:09:24 UTC (rev 11674)
@@ -0,0 +1,10 @@
+# This build config is supposed to be used for the units tests with "mode=build"
+
+[first]
+
+[last]
+
+[include]
+
+[exclude]
+OpenLayers.js

Modified: sandbox/tschaub/xdomain/doc/authors.txt
===================================================================
--- sandbox/tschaub/xdomain/doc/authors.txt	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/doc/authors.txt	2011-03-08 16:09:24 UTC (rev 11674)
@@ -15,6 +15,7 @@
 John Frank
 Sean Gilles
 Pierre Giraud
+Ivan Grcic
 Andreas Hocevar
 Ian Johnson
 Eric Lemoine

Modified: sandbox/tschaub/xdomain/examples/GMLParser.html
===================================================================
--- sandbox/tschaub/xdomain/examples/GMLParser.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/GMLParser.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers GML Parser</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

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

Modified: sandbox/tschaub/xdomain/examples/SLDSelect.html
===================================================================
--- sandbox/tschaub/xdomain/examples/SLDSelect.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/SLDSelect.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers SLD based selection control</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

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

Modified: sandbox/tschaub/xdomain/examples/WMSPost.html
===================================================================
--- sandbox/tschaub/xdomain/examples/WMSPost.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/WMSPost.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/accelerometer.html (from rev 11673, trunk/openlayers/examples/accelerometer.html)
===================================================================
--- sandbox/tschaub/xdomain/examples/accelerometer.html	                        (rev 0)
+++ sandbox/tschaub/xdomain/examples/accelerometer.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/accessible.html
===================================================================
--- sandbox/tschaub/xdomain/examples/accessible.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/accessible.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Accessible Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/all-overlays-google.html
===================================================================
--- sandbox/tschaub/xdomain/examples/all-overlays-google.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/all-overlays-google.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers All Overlays with Google and OSM</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="../theme/default/google.css" type="text/css">

Modified: sandbox/tschaub/xdomain/examples/all-overlays.html
===================================================================
--- sandbox/tschaub/xdomain/examples/all-overlays.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/all-overlays.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>All Overlays Example</title>
         
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

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

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

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

Modified: sandbox/tschaub/xdomain/examples/arcgis93rest.html
===================================================================
--- sandbox/tschaub/xdomain/examples/arcgis93rest.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/arcgis93rest.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/xdomain/examples/arcims-thematic.html
===================================================================
--- sandbox/tschaub/xdomain/examples/arcims-thematic.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/arcims-thematic.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>ArcIMS Thematic Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/arcims.html
===================================================================
--- sandbox/tschaub/xdomain/examples/arcims.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/arcims.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>ArcIMS Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/attribution.html
===================================================================
--- sandbox/tschaub/xdomain/examples/attribution.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/attribution.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Attribution Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/baseLayers.html
===================================================================
--- sandbox/tschaub/xdomain/examples/baseLayers.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/baseLayers.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Base Layers Example</title>
         
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

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

Modified: sandbox/tschaub/xdomain/examples/bing-tiles.html
===================================================================
--- sandbox/tschaub/xdomain/examples/bing-tiles.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/bing-tiles.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/bing.html
===================================================================
--- sandbox/tschaub/xdomain/examples/bing.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/bing.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/boxes-vector.html
===================================================================
--- sandbox/tschaub/xdomain/examples/boxes-vector.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/boxes-vector.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Boxes Vector Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/boxes.html
===================================================================
--- sandbox/tschaub/xdomain/examples/boxes.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/boxes.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Boxes Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/browser-name.html
===================================================================
--- sandbox/tschaub/xdomain/examples/browser-name.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/browser-name.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Copied: sandbox/tschaub/xdomain/examples/browser.html (from rev 11673, trunk/openlayers/examples/browser.html)
===================================================================
--- sandbox/tschaub/xdomain/examples/browser.html	                        (rev 0)
+++ sandbox/tschaub/xdomain/examples/browser.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/browser.js (from rev 11673, trunk/openlayers/examples/browser.js)
===================================================================
--- sandbox/tschaub/xdomain/examples/browser.js	                        (rev 0)
+++ sandbox/tschaub/xdomain/examples/browser.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/buffer.html
===================================================================
--- sandbox/tschaub/xdomain/examples/buffer.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/buffer.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Buffer Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

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

Modified: sandbox/tschaub/xdomain/examples/canvas.js
===================================================================
--- sandbox/tschaub/xdomain/examples/canvas.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/canvas.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/click-handler.html
===================================================================
--- sandbox/tschaub/xdomain/examples/click-handler.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/click-handler.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Click Handler Example</title>
         
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/click.html
===================================================================
--- sandbox/tschaub/xdomain/examples/click.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/click.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Click Event Example</title>
         
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/controls.html
===================================================================
--- sandbox/tschaub/xdomain/examples/controls.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/controls.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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>

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

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

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

Modified: sandbox/tschaub/xdomain/examples/custom-control.html
===================================================================
--- sandbox/tschaub/xdomain/examples/custom-control.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/custom-control.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>Custom Control Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/custom-style.html
===================================================================
--- sandbox/tschaub/xdomain/examples/custom-style.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/custom-style.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>Custom Style Example</title>
         
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

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

Modified: sandbox/tschaub/xdomain/examples/document-drag.html
===================================================================
--- sandbox/tschaub/xdomain/examples/document-drag.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/document-drag.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/donut.html
===================================================================
--- sandbox/tschaub/xdomain/examples/donut.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/donut.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/doubleSetCenter.html
===================================================================
--- sandbox/tschaub/xdomain/examples/doubleSetCenter.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/doubleSetCenter.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Double Set Center Example</title>
        
         <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/xdomain/examples/drag-feature.html
===================================================================
--- sandbox/tschaub/xdomain/examples/drag-feature.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/drag-feature.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>Drag Feature Example</title>
         
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

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

Modified: sandbox/tschaub/xdomain/examples/dynamic-text-layer.html
===================================================================
--- sandbox/tschaub/xdomain/examples/dynamic-text-layer.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/dynamic-text-layer.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Vector Behavior Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

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

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

Modified: sandbox/tschaub/xdomain/examples/events.html
===================================================================
--- sandbox/tschaub/xdomain/examples/events.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/events.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Event Handling</title>
         <link rel="stylesheet" href="style.css" type="text/css" />
         <style type="text/css">

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

Modified: sandbox/tschaub/xdomain/examples/example.html
===================================================================
--- sandbox/tschaub/xdomain/examples/example.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/example.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="style.css" type="text/css">

Modified: sandbox/tschaub/xdomain/examples/filter-strategy.html
===================================================================
--- sandbox/tschaub/xdomain/examples/filter-strategy.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/filter-strategy.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Filter Strategy Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="../theme/default/google.css" type="text/css">

Modified: sandbox/tschaub/xdomain/examples/filter.html
===================================================================
--- sandbox/tschaub/xdomain/examples/filter.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/filter.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <style>

Modified: sandbox/tschaub/xdomain/examples/fractional-zoom.html
===================================================================
--- sandbox/tschaub/xdomain/examples/fractional-zoom.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/fractional-zoom.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

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

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

Copied: sandbox/tschaub/xdomain/examples/game-accel-ball.html (from rev 11673, trunk/openlayers/examples/game-accel-ball.html)
===================================================================
--- sandbox/tschaub/xdomain/examples/game-accel-ball.html	                        (rev 0)
+++ sandbox/tschaub/xdomain/examples/game-accel-ball.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/geojson.html
===================================================================
--- sandbox/tschaub/xdomain/examples/geojson.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/geojson.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

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

Copied: sandbox/tschaub/xdomain/examples/geolocation.js (from rev 11673, trunk/openlayers/examples/geolocation.js)
===================================================================
--- sandbox/tschaub/xdomain/examples/geolocation.js	                        (rev 0)
+++ sandbox/tschaub/xdomain/examples/geolocation.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/georss-flickr.html
===================================================================
--- sandbox/tschaub/xdomain/examples/georss-flickr.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/georss-flickr.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <style type="text/css">

Modified: sandbox/tschaub/xdomain/examples/georss-markers.html
===================================================================
--- sandbox/tschaub/xdomain/examples/georss-markers.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/georss-markers.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers GeoRSS Marker Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/georss.html
===================================================================
--- sandbox/tschaub/xdomain/examples/georss.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/georss.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers GeoRSS Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/getfeature-wfs.html
===================================================================
--- sandbox/tschaub/xdomain/examples/getfeature-wfs.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/getfeature-wfs.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/getfeatureinfo-control.html
===================================================================
--- sandbox/tschaub/xdomain/examples/getfeatureinfo-control.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/getfeatureinfo-control.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html>
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers WMS Feature Info Example (GeoServer)</title>
     <script src="../lib/OpenLayers.js"></script>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/getfeatureinfo-popup.html
===================================================================
--- sandbox/tschaub/xdomain/examples/getfeatureinfo-popup.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/getfeatureinfo-popup.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html>
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>GetFeatureInfo Popup</title>
     <script src="../lib/OpenLayers.js"></script>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/getfeatureinfo.html
===================================================================
--- sandbox/tschaub/xdomain/examples/getfeatureinfo.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/getfeatureinfo.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html>
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Feature Info Example</title>
     <script src="../lib/OpenLayers.js"></script>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/gml-layer.html
===================================================================
--- sandbox/tschaub/xdomain/examples/gml-layer.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/gml-layer.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
       <title>OpenLayers GML Layer Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

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

Modified: sandbox/tschaub/xdomain/examples/google-v3-alloverlays.html
===================================================================
--- sandbox/tschaub/xdomain/examples/google-v3-alloverlays.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/google-v3-alloverlays.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Google (v3) Layer Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="../theme/default/google.css" type="text/css">

Modified: sandbox/tschaub/xdomain/examples/google-v3.html
===================================================================
--- sandbox/tschaub/xdomain/examples/google-v3.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/google-v3.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Google (v3) Layer Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="../theme/default/google.css" type="text/css">

Modified: sandbox/tschaub/xdomain/examples/google.html
===================================================================
--- sandbox/tschaub/xdomain/examples/google.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/google.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Google Layer Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="../theme/default/google.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/graphic-name.html
===================================================================
--- sandbox/tschaub/xdomain/examples/graphic-name.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/graphic-name.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/graticule.html
===================================================================
--- sandbox/tschaub/xdomain/examples/graticule.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/graticule.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Graticule Example</title>
 
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/gutter.html
===================================================================
--- sandbox/tschaub/xdomain/examples/gutter.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/gutter.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html>
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
       <title>OpenLayers Gutter Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

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

Modified: sandbox/tschaub/xdomain/examples/hover-handler.html
===================================================================
--- sandbox/tschaub/xdomain/examples/hover-handler.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/hover-handler.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Hover Handler Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />        

Modified: sandbox/tschaub/xdomain/examples/image-layer.html
===================================================================
--- sandbox/tschaub/xdomain/examples/image-layer.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/image-layer.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
       <title>OpenLayers Image Layer Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Deleted: sandbox/tschaub/xdomain/examples/img/check-round-green.png
===================================================================
(Binary files differ)

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

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

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

Deleted: sandbox/tschaub/xdomain/examples/img/list.png
===================================================================
(Binary files differ)

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

Deleted: sandbox/tschaub/xdomain/examples/img/locate.png
===================================================================
(Binary files differ)

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

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

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

Deleted: sandbox/tschaub/xdomain/examples/img/minus1.png
===================================================================
(Binary files differ)

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

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

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

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

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

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

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

Deleted: sandbox/tschaub/xdomain/examples/img/openlayers.png
===================================================================
(Binary files differ)

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

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

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

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

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

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

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

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

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

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

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

Modified: sandbox/tschaub/xdomain/examples/intersects.html
===================================================================
--- sandbox/tschaub/xdomain/examples/intersects.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/intersects.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Geometry Intersections</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/kamap.html
===================================================================
--- sandbox/tschaub/xdomain/examples/kamap.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/kamap.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers KaMap Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

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

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

Modified: sandbox/tschaub/xdomain/examples/kml-layer.html
===================================================================
--- sandbox/tschaub/xdomain/examples/kml-layer.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/kml-layer.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/kml-track.html
===================================================================
--- sandbox/tschaub/xdomain/examples/kml-track.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/kml-track.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers KLM Track Parsing Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="../theme/default/google.css" type="text/css">

Modified: sandbox/tschaub/xdomain/examples/late-render.html
===================================================================
--- sandbox/tschaub/xdomain/examples/late-render.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/late-render.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Late Rendering Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/layer-opacity.html
===================================================================
--- sandbox/tschaub/xdomain/examples/layer-opacity.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/layer-opacity.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
       <title>OpenLayers Layer Opacity Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/layerLoadMonitoring.html
===================================================================
--- sandbox/tschaub/xdomain/examples/layerLoadMonitoring.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/layerLoadMonitoring.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Layer Load Monitoring Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/layerswitcher.html
===================================================================
--- sandbox/tschaub/xdomain/examples/layerswitcher.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/layerswitcher.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
       <title>OpenLayers Layer Switcher Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/lite.html
===================================================================
--- sandbox/tschaub/xdomain/examples/lite.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/lite.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Basic Single WMS Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/mapguide.html
===================================================================
--- sandbox/tschaub/xdomain/examples/mapguide.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/mapguide.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers MapGuide Layer Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/mapserver.html
===================================================================
--- sandbox/tschaub/xdomain/examples/mapserver.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/mapserver.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>MapServer Layer</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/mapserver_untiled.html
===================================================================
--- sandbox/tschaub/xdomain/examples/mapserver_untiled.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/mapserver_untiled.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>MapServer Single Tile Mode</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/marker-shadow.html
===================================================================
--- sandbox/tschaub/xdomain/examples/marker-shadow.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/marker-shadow.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/markerResize.html
===================================================================
--- sandbox/tschaub/xdomain/examples/markerResize.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/markerResize.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Resize a Marker</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

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

Modified: sandbox/tschaub/xdomain/examples/markers.html
===================================================================
--- sandbox/tschaub/xdomain/examples/markers.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/markers.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Markers Layer Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

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

Modified: sandbox/tschaub/xdomain/examples/measure.html
===================================================================
--- sandbox/tschaub/xdomain/examples/measure.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/measure.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <style type="text/css">

Modified: sandbox/tschaub/xdomain/examples/mm.html
===================================================================
--- sandbox/tschaub/xdomain/examples/mm.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/mm.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>MultiMap</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

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

Copied: sandbox/tschaub/xdomain/examples/mobile-navigation.js (from rev 11673, trunk/openlayers/examples/mobile-navigation.js)
===================================================================
--- sandbox/tschaub/xdomain/examples/mobile-navigation.js	                        (rev 0)
+++ sandbox/tschaub/xdomain/examples/mobile-navigation.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/mobile-sencha.html (from rev 11673, trunk/openlayers/examples/mobile-sencha.html)
===================================================================
--- sandbox/tschaub/xdomain/examples/mobile-sencha.html	                        (rev 0)
+++ sandbox/tschaub/xdomain/examples/mobile-sencha.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/mobile-sencha.js (from rev 11673, trunk/openlayers/examples/mobile-sencha.js)
===================================================================
--- sandbox/tschaub/xdomain/examples/mobile-sencha.js	                        (rev 0)
+++ sandbox/tschaub/xdomain/examples/mobile-sencha.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/mobile.html (from rev 11673, trunk/openlayers/examples/mobile.html)
===================================================================
--- sandbox/tschaub/xdomain/examples/mobile.html	                        (rev 0)
+++ sandbox/tschaub/xdomain/examples/mobile.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/mobile.js (from rev 11673, trunk/openlayers/examples/mobile.js)
===================================================================
--- sandbox/tschaub/xdomain/examples/mobile.js	                        (rev 0)
+++ sandbox/tschaub/xdomain/examples/mobile.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/modify-feature.html
===================================================================
--- sandbox/tschaub/xdomain/examples/modify-feature.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/modify-feature.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Modify Feature</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

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

Modified: sandbox/tschaub/xdomain/examples/mousewheel-interval.html
===================================================================
--- sandbox/tschaub/xdomain/examples/mousewheel-interval.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/mousewheel-interval.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Mousewheel Interval Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/multimap-mercator.html
===================================================================
--- sandbox/tschaub/xdomain/examples/multimap-mercator.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/multimap-mercator.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>MultiMap SphericalMercator</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/multiserver.html
===================================================================
--- sandbox/tschaub/xdomain/examples/multiserver.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/multiserver.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/multitouch.html (from rev 11673, trunk/openlayers/examples/multitouch.html)
===================================================================
--- sandbox/tschaub/xdomain/examples/multitouch.html	                        (rev 0)
+++ sandbox/tschaub/xdomain/examples/multitouch.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/mvs.html
===================================================================
--- sandbox/tschaub/xdomain/examples/mvs.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/mvs.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -5,6 +5,8 @@
      directory it is in.
 -->
 <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
 
     <!-- this gmaps key generated for http://openlayers.org/dev/ -->
     <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA9XNhd8q0UdwNC7YSO4YZghSPUCi5aRYVveCcVYxzezM4iaj_gxQ9t-UajFL70jfcpquH5l1IJ-Zyyw'></script>

Modified: sandbox/tschaub/xdomain/examples/navigation-control.html
===================================================================
--- sandbox/tschaub/xdomain/examples/navigation-control.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/navigation-control.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Navigation Control</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/navigation-history.html
===================================================================
--- sandbox/tschaub/xdomain/examples/navigation-history.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/navigation-history.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Navigation History Example</title>
         <link rel="stylesheet" href="style.css" type="text/css" />
         <style>

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

Modified: sandbox/tschaub/xdomain/examples/navtoolbar-outsidemap.html
===================================================================
--- sandbox/tschaub/xdomain/examples/navtoolbar-outsidemap.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/navtoolbar-outsidemap.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Custom Navigation Toolbar</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/navtoolbar.html
===================================================================
--- sandbox/tschaub/xdomain/examples/navtoolbar.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/navtoolbar.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/ordering.html
===================================================================
--- sandbox/tschaub/xdomain/examples/ordering.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/ordering.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/osm-google.html
===================================================================
--- sandbox/tschaub/xdomain/examples/osm-google.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/osm-google.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/osm-layer.html
===================================================================
--- sandbox/tschaub/xdomain/examples/osm-layer.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/osm-layer.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: OSM Layer</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/osm.html
===================================================================
--- sandbox/tschaub/xdomain/examples/osm.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/osm.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Basic Single WMS Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/outOfRangeMarkers.html
===================================================================
--- sandbox/tschaub/xdomain/examples/outOfRangeMarkers.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/outOfRangeMarkers.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Using maxResolution to control overlays</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/overviewmap.html
===================================================================
--- sandbox/tschaub/xdomain/examples/overviewmap.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/overviewmap.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>Overview Map Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/pan-zoom-panels.html
===================================================================
--- sandbox/tschaub/xdomain/examples/pan-zoom-panels.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/pan-zoom-panels.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html>
 <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Pan and Zoom Panels</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
 

Modified: sandbox/tschaub/xdomain/examples/panel.html
===================================================================
--- sandbox/tschaub/xdomain/examples/panel.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/panel.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Control Panel</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

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

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

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

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

Modified: sandbox/tschaub/xdomain/examples/projected-map.html
===================================================================
--- sandbox/tschaub/xdomain/examples/projected-map.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/projected-map.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Non-Geographic Projection</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/protocol-gears.html
===================================================================
--- sandbox/tschaub/xdomain/examples/protocol-gears.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/protocol-gears.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <style type="text/css">

Modified: sandbox/tschaub/xdomain/examples/regular-polygons.html
===================================================================
--- sandbox/tschaub/xdomain/examples/regular-polygons.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/regular-polygons.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Regular Polygon Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/resize-features.html
===================================================================
--- sandbox/tschaub/xdomain/examples/resize-features.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/resize-features.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Resize Features Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/restricted-extent.html
===================================================================
--- sandbox/tschaub/xdomain/examples/restricted-extent.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/restricted-extent.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/rotate-features.html
===================================================================
--- sandbox/tschaub/xdomain/examples/rotate-features.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/rotate-features.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Rotate Features Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

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

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

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

Modified: sandbox/tschaub/xdomain/examples/setextent.html
===================================================================
--- sandbox/tschaub/xdomain/examples/setextent.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/setextent.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/simplify-linestring.html
===================================================================
--- sandbox/tschaub/xdomain/examples/simplify-linestring.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/simplify-linestring.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/single-tile.html
===================================================================
--- sandbox/tschaub/xdomain/examples/single-tile.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/single-tile.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/sld-parser.html
===================================================================
--- sandbox/tschaub/xdomain/examples/sld-parser.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/sld-parser.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers SLD Parser</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/sld.html
===================================================================
--- sandbox/tschaub/xdomain/examples/sld.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/sld.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/Firebug/firebug.js"></script>

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

Modified: sandbox/tschaub/xdomain/examples/snap-split.html
===================================================================
--- sandbox/tschaub/xdomain/examples/snap-split.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/snap-split.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/snapping.html
===================================================================
--- sandbox/tschaub/xdomain/examples/snapping.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/snapping.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/sos.html
===================================================================
--- sandbox/tschaub/xdomain/examples/sos.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/sos.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/spherical-mercator.html
===================================================================
--- sandbox/tschaub/xdomain/examples/spherical-mercator.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/spherical-mercator.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/split-feature.html
===================================================================
--- sandbox/tschaub/xdomain/examples/split-feature.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/split-feature.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/strategy-bbox.html
===================================================================
--- sandbox/tschaub/xdomain/examples/strategy-bbox.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/strategy-bbox.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers BBOX Strategy Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/strategy-cluster-extended.html
===================================================================
--- sandbox/tschaub/xdomain/examples/strategy-cluster-extended.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/strategy-cluster-extended.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>Extended clustering example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="style.css" type="text/css">

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

Modified: sandbox/tschaub/xdomain/examples/strategy-cluster.html
===================================================================
--- sandbox/tschaub/xdomain/examples/strategy-cluster.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/strategy-cluster.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Cluster Strategy Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/strategy-paging.html
===================================================================
--- sandbox/tschaub/xdomain/examples/strategy-paging.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/strategy-paging.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Paging Strategy Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/style-rules.html
===================================================================
--- sandbox/tschaub/xdomain/examples/style-rules.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/style-rules.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Rule Based Style</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

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

Copied: sandbox/tschaub/xdomain/examples/style.mobile-jq.css (from rev 11673, trunk/openlayers/examples/style.mobile-jq.css)
===================================================================
--- sandbox/tschaub/xdomain/examples/style.mobile-jq.css	                        (rev 0)
+++ sandbox/tschaub/xdomain/examples/style.mobile-jq.css	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/style.mobile.css (from rev 11673, trunk/openlayers/examples/style.mobile.css)
===================================================================
--- sandbox/tschaub/xdomain/examples/style.mobile.css	                        (rev 0)
+++ sandbox/tschaub/xdomain/examples/style.mobile.css	2011-03-08 16:09:24 UTC (rev 11674)
@@ -0,0 +1,25 @@
+div.olControlZoomPanel {
+    height: 108px
+    width: 36px;
+    position: absolute;
+    top: 20px;
+    left: 20px;
+}
+div.olControlZoomPanel div {
+    width: 36px;
+    height: 36px;
+    background-image: url(img/mobile-zoombar.png);
+    left: 0;
+}
+div.olControlZoomPanel .olControlZoomInItemInactive {
+    top: 0;
+    background-position: 0 0;
+}
+div.olControlZoomPanel .olControlZoomToMaxExtentItemInactive {
+    top: 36px;
+    background-position: 0 -36px;
+}
+div.olControlZoomPanel .olControlZoomOutItemInactive {
+    top: 72px;
+    background-position: 0 -72px;
+}

Modified: sandbox/tschaub/xdomain/examples/stylemap.html
===================================================================
--- sandbox/tschaub/xdomain/examples/stylemap.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/stylemap.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers StyleMap</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/styles-context.html
===================================================================
--- sandbox/tschaub/xdomain/examples/styles-context.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/styles-context.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Vector Styles</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/styles-rotation.html
===================================================================
--- sandbox/tschaub/xdomain/examples/styles-rotation.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/styles-rotation.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Styles Rotation Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

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

Modified: sandbox/tschaub/xdomain/examples/sundials-spherical-mercator.html
===================================================================
--- sandbox/tschaub/xdomain/examples/sundials-spherical-mercator.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/sundials-spherical-mercator.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/sundials.html
===================================================================
--- sandbox/tschaub/xdomain/examples/sundials.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/sundials.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
 

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

Modified: sandbox/tschaub/xdomain/examples/teleportation.html
===================================================================
--- sandbox/tschaub/xdomain/examples/teleportation.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/teleportation.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Teleporter Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

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

Modified: sandbox/tschaub/xdomain/examples/tile-origin.html
===================================================================
--- sandbox/tschaub/xdomain/examples/tile-origin.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/tile-origin.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/tilecache.html
===================================================================
--- sandbox/tschaub/xdomain/examples/tilecache.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/tilecache.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers TileCache Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/tms.html
===================================================================
--- sandbox/tschaub/xdomain/examples/tms.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/tms.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Tiled Map Service Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/transform-feature.html
===================================================================
--- sandbox/tschaub/xdomain/examples/transform-feature.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/transform-feature.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Transformation Box</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/transition.html
===================================================================
--- sandbox/tschaub/xdomain/examples/transition.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/transition.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Transitions Example</title>
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/xdomain/examples/urban.html
===================================================================
--- sandbox/tschaub/xdomain/examples/urban.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/urban.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
       <title>OpenLayers WorldWind Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/ve-novibrate.html
===================================================================
--- sandbox/tschaub/xdomain/examples/ve-novibrate.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/ve-novibrate.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml"> 
-  <head> 
+  <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" /> 
       <title>OpenLayers Virtual Earth Example</title> 
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" /> 
     <link rel="stylesheet" href="style.css" type="text/css" /> 

Modified: sandbox/tschaub/xdomain/examples/ve.html
===================================================================
--- sandbox/tschaub/xdomain/examples/ve.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/ve.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
       <title>OpenLayers Virtual Earth Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

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

Modified: sandbox/tschaub/xdomain/examples/vector-features.html
===================================================================
--- sandbox/tschaub/xdomain/examples/vector-features.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/vector-features.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/vector-formats.html
===================================================================
--- sandbox/tschaub/xdomain/examples/vector-formats.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/vector-formats.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Vector Formats</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/web-mercator.html
===================================================================
--- sandbox/tschaub/xdomain/examples/web-mercator.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/web-mercator.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,8 @@
 <!DOCTYPE HTML>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers: Web Mercator</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/wfs-filter.html
===================================================================
--- sandbox/tschaub/xdomain/examples/wfs-filter.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/wfs-filter.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers WFS Protocol with Filter</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="../theme/default/google.css" type="text/css">

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

Modified: sandbox/tschaub/xdomain/examples/wfs-protocol.html
===================================================================
--- sandbox/tschaub/xdomain/examples/wfs-protocol.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/wfs-protocol.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Vector Behavior Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/wfs-reprojection.html
===================================================================
--- sandbox/tschaub/xdomain/examples/wfs-reprojection.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/wfs-reprojection.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>WFS Reprojection Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/wfs-snap-split.html
===================================================================
--- sandbox/tschaub/xdomain/examples/wfs-snap-split.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/wfs-snap-split.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html>
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/xdomain/examples/wfs-states.html
===================================================================
--- sandbox/tschaub/xdomain/examples/wfs-states.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/wfs-states.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/wfs-states.js
===================================================================
--- sandbox/tschaub/xdomain/examples/wfs-states.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/wfs-states.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/examples/widelong.jpg
===================================================================
(Binary files differ)

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

Modified: sandbox/tschaub/xdomain/examples/wmc.html
===================================================================
--- sandbox/tschaub/xdomain/examples/wmc.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/wmc.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <style type="text/css">

Modified: sandbox/tschaub/xdomain/examples/wms-long-url.html
===================================================================
--- sandbox/tschaub/xdomain/examples/wms-long-url.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/wms-long-url.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>WMS with POST Requests to Avoid Long URLs</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/wms-untiled.html
===================================================================
--- sandbox/tschaub/xdomain/examples/wms-untiled.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/wms-untiled.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/xdomain/examples/wms-v13.html
===================================================================
--- sandbox/tschaub/xdomain/examples/wms-v13.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/wms-v13.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/xdomain/examples/wms.html
===================================================================
--- sandbox/tschaub/xdomain/examples/wms.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/wms.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/xdomain/examples/wmst.html
===================================================================
--- sandbox/tschaub/xdomain/examples/wmst.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/wmst.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: WMS + Time</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/wmts-capabilities.html
===================================================================
--- sandbox/tschaub/xdomain/examples/wmts-capabilities.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/wmts-capabilities.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers WMTS Capabilities Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css"/>
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/wmts-getfeatureinfo.html
===================================================================
--- sandbox/tschaub/xdomain/examples/wmts-getfeatureinfo.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/wmts-getfeatureinfo.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers WMTS GetFeatureInfo Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css"/>
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/wmts.html
===================================================================
--- sandbox/tschaub/xdomain/examples/wmts.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/wmts.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers WMTS Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css"/>
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/worldwind.html
===================================================================
--- sandbox/tschaub/xdomain/examples/worldwind.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/worldwind.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/xdomain/examples/wrapDateLine.html
===================================================================
--- sandbox/tschaub/xdomain/examples/wrapDateLine.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/wrapDateLine.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Wrap Date Line</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

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

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

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

Modified: sandbox/tschaub/xdomain/examples/xyz-offset.html
===================================================================
--- sandbox/tschaub/xdomain/examples/xyz-offset.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/xyz-offset.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,8 @@
 <!DOCTYPE HTML>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers XYZ with Offset</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/yahoo.html
===================================================================
--- sandbox/tschaub/xdomain/examples/yahoo.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/yahoo.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Yahoo Layer</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/examples/zoomLevels.html
===================================================================
--- sandbox/tschaub/xdomain/examples/zoomLevels.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/zoomLevels.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />
     <script src="../lib/OpenLayers.js"></script>

Modified: sandbox/tschaub/xdomain/examples/zoomify.html
===================================================================
--- sandbox/tschaub/xdomain/examples/zoomify.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/examples/zoomify.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Zoomify Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/tschaub/xdomain/img/cloud-popup-relative.png
===================================================================
(Binary files differ)

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

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

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

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

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

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

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

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

Modified: sandbox/tschaub/xdomain/img/marker.png
===================================================================
(Binary files differ)

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

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

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

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

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

Modified: sandbox/tschaub/xdomain/img/slider.png
===================================================================
(Binary files differ)

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

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

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

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

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

Modified: sandbox/tschaub/xdomain/img/zoombar.png
===================================================================
(Binary files differ)

Modified: sandbox/tschaub/xdomain/lib/Firebug/firebugx.js
===================================================================
--- sandbox/tschaub/xdomain/lib/Firebug/firebugx.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/Firebug/firebugx.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/BaseTypes/Bounds.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/BaseTypes/Bounds.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/BaseTypes/Bounds.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/BaseTypes/Element.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/BaseTypes/Element.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/BaseTypes/Element.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/BaseTypes/Pixel.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/BaseTypes/Pixel.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/BaseTypes/Pixel.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/BaseTypes.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/BaseTypes.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/BaseTypes.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Console.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Console.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Console.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -101,7 +101,7 @@
      * Expects a single error message
      * 
      * Parameters:
-     * object - {Object}
+     * error - {Object}
      */
     userError: function(error) {
         alert(error);

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Control/ArgParser.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/ArgParser.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/ArgParser.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Control/Attribution.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/Attribution.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/Attribution.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -30,9 +30,6 @@
      * Parameters:
      * options - {Object} Options for control.
      */
-    initialize: function(options) {
-        OpenLayers.Control.prototype.initialize.apply(this, arguments);
-    },
 
     /** 
      * Method: destroy

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Control/DragFeature.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/DragFeature.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/DragFeature.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -66,6 +66,28 @@
     onComplete: function(feature, pixel) {},
 
     /**
+     * APIProperty: onEnter
+     * {Function} Define this function if you want to know when the mouse
+     *     goes over a feature and thereby makes this feature a candidate
+     *     for dragging.
+     *
+     * Parameters:
+     * feature - {<OpenLayers.Feature.Vector>} The feature that is ready
+     *     to be dragged.
+     */
+    onEnter: function(feature) {},
+
+    /**
+     * APIProperty: onLeave
+     * {Function} Define this function if you want to know when the mouse
+     *     goes out of the feature that was dragged.
+     *
+     * Parameters:
+     * feature - {<OpenLayers.Feature.Vector>} The feature that was dragged.
+     */
+    onLeave: function(feature) {},
+
+    /**
      * APIProperty: documentDrag
      * {Boolean} If set to true, mouse dragging will continue even if the
      *     mouse cursor leaves the map viewport. Default is false.
@@ -192,6 +214,7 @@
             this.handlers.drag.activate();
             this.over = true;
             OpenLayers.Element.addClass(this.map.viewPortDiv, this.displayClass + "Over");
+            this.onEnter(feature);
         } else {
             if(this.feature.id == feature.id) {
                 this.over = true;
@@ -269,6 +292,7 @@
             OpenLayers.Element.removeClass(
                 this.map.viewPortDiv, this.displayClass + "Over"
             );
+            this.onLeave(feature);
             this.feature = null;
         } else {
             if(this.feature.id == feature.id) {

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Control/DragPan.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/DragPan.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/DragPan.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Control/Geolocate.js (from rev 11673, trunk/openlayers/lib/OpenLayers/Control/Geolocate.js)
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/Geolocate.js	                        (rev 0)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/Geolocate.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Control/KeyboardDefaults.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/KeyboardDefaults.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/KeyboardDefaults.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -37,9 +37,6 @@
     /**
      * Constructor: OpenLayers.Control.KeyboardDefaults
      */
-    initialize: function() {
-        OpenLayers.Control.prototype.initialize.apply(this, arguments);
-    },
     
     /**
      * APIMethod: destroy

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Control/LayerSwitcher.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/LayerSwitcher.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/LayerSwitcher.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Control/Measure.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/Measure.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/Measure.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Control/ModifyFeature.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/ModifyFeature.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/ModifyFeature.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Control/MouseDefaults.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/MouseDefaults.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/MouseDefaults.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Control/MousePosition.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/MousePosition.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/MousePosition.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -87,9 +87,6 @@
      * Parameters:
      * options - {Object} Options for control.
      */
-    initialize: function(options) {
-        OpenLayers.Control.prototype.initialize.apply(this, arguments);
-    },
 
     /**
      * Method: destroy

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Control/MouseToolbar.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/MouseToolbar.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/MouseToolbar.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Control/Navigation.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/Navigation.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/Navigation.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Control/OverviewMap.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/OverviewMap.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/OverviewMap.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Control/Pan.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/Pan.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/Pan.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -20,11 +20,21 @@
     /** 
      * APIProperty: slideFactor
      * {Integer} Number of pixels by which we'll pan the map in any direction 
-     *     on clicking the arrow buttons, defaults to 50.
+     *     on clicking the arrow buttons, defaults to 50.  If you want to pan
+     *     by some ratio of the map dimensions, use <slideRatio> instead.
      */
     slideFactor: 50,
 
     /** 
+     * APIProperty: slideRatio
+     * {Number} The fraction of map width/height by which we'll pan the map            
+     *     on clicking the arrow buttons.  Default is null.  If set, will
+     *     override <slideFactor>. E.g. if slideRatio is .5, then Pan Up will
+     *     pan up half the map height. 
+     */
+    slideRatio: null,
+
+    /** 
      * Property: direction
      * {String} in {'North', 'South', 'East', 'West'}
      */
@@ -61,18 +71,24 @@
      */
     trigger: function(){
     
+        var getSlideFactor = OpenLayers.Function.bind(function (dim) {
+            return this.slideRatio ?
+                this.map.getSize()[dim] * this.slideRatio :
+                this.slideFactor;
+        }, this);
+
         switch (this.direction) {
             case OpenLayers.Control.Pan.NORTH: 
-                this.map.pan(0, -this.slideFactor);
+                this.map.pan(0, -getSlideFactor("h"));
                 break;
             case OpenLayers.Control.Pan.SOUTH: 
-                this.map.pan(0, this.slideFactor);
+                this.map.pan(0, getSlideFactor("h"));
                 break;
             case OpenLayers.Control.Pan.WEST: 
-                this.map.pan(-this.slideFactor, 0);
+                this.map.pan(-getSlideFactor("w"), 0);
                 break;
             case OpenLayers.Control.Pan.EAST: 
-                this.map.pan(this.slideFactor, 0);
+                this.map.pan(getSlideFactor("w"), 0);
                 break;
         }
     },

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Control/PanPanel.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/PanPanel.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/PanPanel.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -33,10 +33,20 @@
     /** 
      * APIProperty: slideFactor
      * {Integer} Number of pixels by which we'll pan the map in any direction 
-     *     on clicking the arrow buttons, defaults to 50.
+     *     on clicking the arrow buttons, defaults to 50.  If you want to pan
+     *     by some ratio of the map dimensions, use <slideRatio> instead.
      */
     slideFactor: 50,
 
+    /** 
+     * APIProperty: slideRatio
+     * {Number} The fraction of map width/height by which we'll pan the map            
+     *     on clicking the arrow buttons.  Default is null.  If set, will
+     *     override <slideFactor>. E.g. if slideRatio is .5, then Pan Up will
+     *     pan up half the map height. 
+     */
+    slideRatio: null,
+
     /**
      * Constructor: OpenLayers.Control.PanPanel 
      * Add the four directional pan buttons.
@@ -47,15 +57,15 @@
      */
     initialize: function(options) {
         OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
+        var options = {
+            slideFactor: this.slideFactor,
+            slideRatio: this.slideRatio
+        };
         this.addControls([
-            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH,
-                                       {slideFactor: this.slideFactor}),
-            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH,
-                                       {slideFactor: this.slideFactor}),
-            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST,
-                                       {slideFactor: this.slideFactor}),
-            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST,
-                                       {slideFactor: this.slideFactor})
+            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH, options),
+            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH, options),
+            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST, options),
+            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST, options)
         ]);
     },
 

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Control/PanZoom.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/PanZoom.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/PanZoom.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Control/PanZoomBar.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/PanZoomBar.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/PanZoomBar.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Control/Permalink.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/Permalink.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/Permalink.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Control/PinchZoom.js (from rev 11673, trunk/openlayers/lib/OpenLayers/Control/PinchZoom.js)
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/PinchZoom.js	                        (rev 0)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/PinchZoom.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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;
+    },
+    
+    /**
+     * 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) {
+        var zoom = this.map.getZoomForResolution(this.map.getResolution() / last.scale, true);
+        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);
+
+        var style = this.map.layerContainerDiv.style;
+        style['-webkit-transform'] = "";
+        style['-moz-transform'] = "";
+    },
+
+    CLASS_NAME: "OpenLayers.Control.PinchZoom"
+
+});

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Control/ScaleLine.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/ScaleLine.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/ScaleLine.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Control/SelectFeature.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/SelectFeature.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/SelectFeature.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Control/Snapping.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/Snapping.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/Snapping.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Control/Split.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/Split.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/Split.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Control/TouchNavigation.js (from rev 11673, trunk/openlayers/lib/OpenLayers/Control/TouchNavigation.js)
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control/TouchNavigation.js	                        (rev 0)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control/TouchNavigation.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -0,0 +1,170 @@
+/* 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: 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 = {
+            'double': true,
+            'stopDouble': true
+        };
+        this.handlers.click = new OpenLayers.Handler.Click(
+            this, clickCallbacks, clickOptions
+        );
+        this.dragPan = new OpenLayers.Control.DragPan(
+            OpenLayers.Util.extend({
+                map: this.map,
+                documentDrag: this.documentDrag
+            }, this.dragPanOptions)
+        );
+        this.dragPan.draw();
+        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/tschaub/xdomain/lib/OpenLayers/Control.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Control.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Control.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Events.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Events.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Events.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/Atom.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/Atom.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/Atom.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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

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

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -133,7 +133,7 @@
             },
             "Value": function(node, obj) {
                 var attrs = node.attributes;
-                var value = {}
+                var value = {};
                 for(var i=0, len=attrs.length; i<len; ++i) {
                     value[attrs[i].name] = attrs[i].nodeValue;
                 }
@@ -159,7 +159,7 @@
             },
             "MinValue": function(node, obj) {
                 var attrs = node.attributes;
-                var value = {}
+                var value = {};
                 for(var i=0, len=attrs.length; i<len; ++i) {
                     value[attrs[i].name] = attrs[i].nodeValue;
                 }
@@ -168,7 +168,7 @@
             },
             "MaxValue": function(node, obj) {
                 var attrs = node.attributes;
-                var value = {}
+                var value = {};
                 for(var i=0, len=attrs.length; i<len; ++i) {
                     value[attrs[i].name] = attrs[i].nodeValue;
                 }

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Format/Filter.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/Filter.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/Filter.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/GML.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/GML.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/GML.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -582,7 +582,7 @@
      * Method: parseAttributes
      *
      * Parameters:
-     * node - {<DOMElement>}
+     * node - {DOMElement}
      *
      * Returns:
      * {Object} An attributes object.

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Format/GPX.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/GPX.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/GPX.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/GeoJSON.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/GeoJSON.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/GeoJSON.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/GeoRSS.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/GeoRSS.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/GeoRSS.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/JSON.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/JSON.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/JSON.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/KML.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/KML.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/KML.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/OSM.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/OSM.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/OSM.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/OWSContext/v0_3_1.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/OWSContext/v0_3_1.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/OWSContext/v0_3_1.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/OWSContext.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/OWSContext.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/OWSContext.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/SLD.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/SLD.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/SLD.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/SOSCapabilities.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/SOSCapabilities.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/SOSCapabilities.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/SOSGetObservation.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/SOSGetObservation.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/SOSGetObservation.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/WFSCapabilities.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/WFSCapabilities.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/WFSCapabilities.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/WFSDescribeFeatureType.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/WFSDescribeFeatureType.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/WFSDescribeFeatureType.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/WFST/v1.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/WFST/v1.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/WFST/v1.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/WMC.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/WMC.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/WMC.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/WMSCapabilities.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/WMSCapabilities.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/WMSCapabilities.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/WMSDescribeLayer.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/WMSDescribeLayer.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/WMSDescribeLayer.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Format/WMSGetFeatureInfo.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/WMSGetFeatureInfo.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/WMSGetFeatureInfo.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -191,7 +191,14 @@
             },
             "MatrixHeight": function(node, obj) {
                 obj.matrixHeight = parseInt(this.getChildValue(node)); 
-            },        
+            },
+            "ResourceURL": function(node, obj) {
+                obj.resourceUrl = obj.resourceUrl || {};
+                obj.resourceUrl[node.getAttribute("resourceType")] = {
+                    format: node.getAttribute("format"),
+                    template: node.getAttribute("template")
+                };
+            },
             // not used for now, can be added in the future though
             /*"Themes": function(node, obj) {
                 obj.themes = [];

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Format/WMTSCapabilities.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Format/WMTSCapabilities.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Format/WMTSCapabilities.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Geometry/Rectangle.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Geometry/Rectangle.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Geometry/Rectangle.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Handler/Box.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Handler/Box.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Handler/Box.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Handler/Click.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Handler/Click.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Handler/Click.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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
@@ -86,10 +85,22 @@
     
     /**
      * 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
+     *     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: rightclickTimerId
      * {Number} The id of the right mouse timeout waiting to clear the 
@@ -115,10 +126,10 @@
      */
     initialize: function(control, callbacks, options) {
         OpenLayers.Handler.prototype.initialize.apply(this, arguments);
-        // optionally register for mouseup and mousedown
+        // optionally register for mousedown
         if(this.pixelTolerance != null) {
             this.mousedown = function(evt) {
-                this.down = evt.xy;
+                this.down = this.getEventInfo(evt);
                 return true;
             };
         }
@@ -135,22 +146,35 @@
     mousedown: null,
 
     /**
+     * Method: touchstart
+     * Handle touchstart.
+     *
+     * Returns:
+     * {Boolean} Continue propagating this event.
+     */
+    touchstart: function(evt) {
+        this.down = this.getEventInfo(evt);
+        this.last = null;
+        return true;
+    },
+
+    /**
      * Method: mouseup
      * Handle mouseup.  Installed to support collection of right mouse events.
      * 
      * Returns:
      * {Boolean} Continue propagating this event.
      */
-    mouseup:  function (evt) {
+    mouseup: function (evt) {
         var propagate = true;
 
         // Collect right mouse clicks from the mouseup
         //  IE - ignores the second right click in mousedown so using
         //  mouseup instead
-        if (this.checkModifiers(evt) && 
-            this.control.handleRightClicks && 
-            OpenLayers.Event.isRightClick(evt)) {
-          propagate = this.rightclick(evt);
+        if(this.checkModifiers(evt) &&
+           this.control.handleRightClicks &&
+           OpenLayers.Event.isRightClick(evt)) {
+            propagate = this.rightclick(evt);
         }
 
         return propagate;
@@ -216,7 +240,11 @@
      * {Boolean} Continue propagating this event.
      */
     dblclick: function(evt) {
-        if(this.passesTolerance(evt)) {
+        // for touch devices trigger dblclick only for
+        // "one finger" touch
+        var last = this.down || this.last;
+        if (this.passesTolerance(evt) &&
+            (!last || !last.touches || last.touches.length == 1)) {
             if(this["double"]) {
                 this.callback('dblclick', [evt]);
             }
@@ -226,6 +254,30 @@
     },
     
     /**
+     * Method: touchmove
+     *    Store position of last move, because touchend event can have
+     *    an empty "touches" property.
+     */
+    touchmove: function(evt) {
+        this.last = this.getEventInfo(evt);
+    },
+
+    /**
+     * Method: touchend
+     *   Correctly set event xy property, and add lastTouches to have
+     *   touches property from last touchstart or touchmove
+     */
+    touchend: function(evt) {
+        var last = this.last || this.down;
+        if (!evt || !last) {
+            return false;
+        }
+        evt.xy = last.xy;
+        evt.lastTouches = last.touches;
+        return evt.xy ? this.click(evt) : false;
+    },
+
+    /**
      * Method: click
      * Handle click.
      *
@@ -233,10 +285,20 @@
      * {Boolean} Continue propagating this event.
      */
     click: function(evt) {
+        // Sencha Touch emulates click events, see ticket 3079 for more info
+        if (this.down && this.down.touches && evt.type === "click") {
+            return !this.stopSingle;
+        }
         if(this.passesTolerance(evt)) {
             if(this.timerId != null) {
                 // already received a click
-                this.clearTimer();
+                var last = this.down || this.last;
+                if (last && last.touches && last.touches.length > 0) {
+                    // touch device - we may trigger dblclick
+                    this.dblclick(evt);
+                } else {
+                    this.clearTimer();
+                }
             } else {
                 // set the timer, send evt only if single is true
                 //use a clone of the event object because it will no longer 
@@ -246,7 +308,7 @@
                 this.timerId = window.setTimeout(
                     OpenLayers.Function.bind(this.delayedCall, this, clickEvent),
                     this.delay
-                );
+               );
             }
         }
         return !this.stopSingle;
@@ -265,10 +327,10 @@
      */
     passesTolerance: function(evt) {
         var passes = true;
-        if(this.pixelTolerance != null && this.down) {
+        if(this.pixelTolerance != null && this.down && this.down.xy) {
             var dpx = Math.sqrt(
-                Math.pow(this.down.x - evt.xy.x, 2) +
-                Math.pow(this.down.y - evt.xy.y, 2)
+                Math.pow(this.down.xy.x - evt.xy.x, 2) +
+                Math.pow(this.down.xy.y - evt.xy.y, 2)
             );
             if(dpx > this.pixelTolerance) {
                 passes = false;
@@ -305,6 +367,35 @@
     },
 
     /**
+     * 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 +407,7 @@
         if(OpenLayers.Handler.prototype.deactivate.apply(this, arguments)) {
             this.clearTimer();
             this.down = null;
+            this.last = null;
             deactivated = true;
         }
         return deactivated;

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

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

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Layer/ArcGIS93Rest.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/ArcGIS93Rest.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/ArcGIS93Rest.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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"
 });

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Layer/ArcIMS.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/ArcIMS.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/ArcIMS.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Layer/Bing.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/Bing.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/Bing.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Layer/EventPane.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/EventPane.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/EventPane.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Layer/Google/v3.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/Google/v3.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/Google/v3.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Layer/Grid.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/Grid.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/Grid.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Layer/HTTPRequest.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/HTTPRequest.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/HTTPRequest.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -38,7 +38,7 @@
     
     /** 
      * APIProperty: reproject
-     * *Deprecated*. See http://trac.openlayers.org/wiki/SpatialMercator
+     * *Deprecated*. See http://docs.openlayers.org/library/spherical_mercator.html
      * for information on the replacement for this functionality. 
      * {Boolean} Whether layer should reproject itself based on base layer 
      *           locations. This allows reprojection onto commercial layers. 

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Layer/KaMap.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/KaMap.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/KaMap.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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 

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Layer/MapGuide.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/MapGuide.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/MapGuide.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -234,22 +234,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
      *

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Layer/MapServer.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/MapServer.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/MapServer.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Layer/MultiMap.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/MultiMap.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/MultiMap.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Layer/SphericalMercator.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/SphericalMercator.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/SphericalMercator.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Layer/TMS.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/TMS.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/TMS.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Layer/TileCache.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/TileCache.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/TileCache.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Layer/Vector.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/Vector.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/Vector.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Layer/VirtualEarth.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/VirtualEarth.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/VirtualEarth.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Layer/WMS.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/WMS.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/WMS.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -203,22 +203,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, this.tileOptions);
-    },
-
-    /**
      * APIMethod: mergeNewParams
      * Catch changeParams and uppercase the new params to be merged in
      *     before calling changeParams on the super class.
@@ -256,7 +240,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 = value;
         } else {

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Layer/WMTS.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/WMTS.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/WMTS.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Layer/WorldWind.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/WorldWind.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/WorldWind.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Layer/XYZ.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/XYZ.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/XYZ.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Layer/Zoomify.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer/Zoomify.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer/Zoomify.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -105,7 +105,7 @@
      */
     initializeZoomify: function( size ) {
 
-        var imageSize = size.clone()
+        var imageSize = size.clone();
         var tiles = new OpenLayers.Size(
             Math.ceil( imageSize.w / this.standardTileSize ),
             Math.ceil( imageSize.h / this.standardTileSize )
@@ -151,9 +151,9 @@
         OpenLayers.Layer.Grid.prototype.destroy.apply(this, arguments);
 
         // Remove from memory the Zoomify pyramid - is that enough?
-        this.tileCountUpToTier.length = 0
-        this.tierSizeInTiles.length = 0
-        this.tierImageSize.length = 0
+        this.tileCountUpToTier.length = 0;
+        this.tierSizeInTiles.length = 0;
+        this.tierImageSize.length = 0;
 
     },
 
@@ -239,22 +239,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.)

Modified: sandbox/tschaub/xdomain/lib/OpenLayers/Layer.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Layer.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Layer.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Map.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Map.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Map.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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.
@@ -493,6 +510,12 @@
             this.div = document.createElement("div");
             this.div.style.height = "1px";
             this.div.style.width = "1px";
+            
+            // Adding this to the DOM is a fix for Safari SVG rendering bugs;
+            // See #2392. On initial render(), it is removed from the dom,
+            // and a new div is added.
+            this.div.style.display = "none";
+            document.body.appendChild(this.div);
         }
         
         OpenLayers.Element.addClass(this.div, 'olMap');
@@ -507,18 +530,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 +623,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) {
@@ -610,6 +650,11 @@
      *     will be moved from the current to the new container.
      */
     render: function(div) {
+        // Fix for Safari SVG rendering bugs; See #2392
+        if(this.div && this.div.parentNode) {
+            this.div.parentNode.removeChild(this.div);
+        }
+
         this.div = OpenLayers.Util.getElement(div);
         OpenLayers.Element.addClass(this.div, 'olMap');
         this.viewPortDiv.parentNode.removeChild(this.viewPortDiv);
@@ -634,7 +679,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 +750,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 +1002,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 +1077,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 +1174,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 +1436,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 +1487,7 @@
         var extent = null;
         
         if (center == null) {
-            center = this.getCenter();
+            center = this.getCachedCenter();
         }                
         if (resolution == null) {
             resolution = this.getResolution();
@@ -1468,12 +1527,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 +1576,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 +1607,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 +1662,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 +1758,18 @@
             }
         }
         // 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();
         }
 
         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 +1807,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 +1820,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 +1851,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 +1877,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 +1906,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 +2241,6 @@
     /**
      * APIMethod: zoomIn
      * 
-     * Parameters:
-     * zoom - {int}
      */
     zoomIn: function() {
         this.zoomTo(this.getZoom() + 1);
@@ -2115,8 +2249,6 @@
     /**
      * APIMethod: zoomOut
      * 
-     * Parameters:
-     * zoom - {int}
      */
     zoomOut: function() {
         this.zoomTo(this.getZoom() - 1);
@@ -2200,7 +2332,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 +2444,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/tschaub/xdomain/lib/OpenLayers/Popup.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Popup.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Popup.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Projection.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Projection.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Projection.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Protocol/HTTP.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Protocol/HTTP.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Protocol/HTTP.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Protocol/SimpleFilterSerializer.js (from rev 11673, trunk/openlayers/lib/OpenLayers/Protocol/SimpleFilterSerializer.js)
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Protocol/SimpleFilterSerializer.js	                        (rev 0)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Protocol/SimpleFilterSerializer.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Protocol/WFS/v1.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Protocol/WFS/v1.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Protocol/WFS/v1.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -183,6 +183,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 +274,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/tschaub/xdomain/lib/OpenLayers/Renderer/Elements.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Renderer/Elements.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Renderer/Elements.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -390,7 +390,7 @@
     BACKGROUND_ID_SUFFIX: "_background",
     
     /**
-     * Constant: BACKGROUND_ID_SUFFIX
+     * Constant: LABEL_ID_SUFFIX
      * {String}
      */
     LABEL_ID_SUFFIX: "_label",

Copied: sandbox/tschaub/xdomain/lib/OpenLayers/Renderer/NG.js (from rev 11673, trunk/openlayers/lib/OpenLayers/Renderer/NG.js)
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Renderer/NG.js	                        (rev 0)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Renderer/NG.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Renderer/SVG.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Renderer/SVG.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Renderer/SVG.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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,6 +285,7 @@
                 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;
@@ -795,9 +800,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
@@ -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/tschaub/xdomain/lib/OpenLayers/Renderer/SVG2.js (from rev 11673, trunk/openlayers/lib/OpenLayers/Renderer/SVG2.js)
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Renderer/SVG2.js	                        (rev 0)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Renderer/SVG2.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -0,0 +1,768 @@
+/* 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.SVG
+     * 
+     * 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 id = this.importSymbol(style.graphicName);
+                widthFactor = this.symbolMetrics[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 
+                var src = document.getElementById(id); 
+                node.firstChild && node.removeChild(node.firstChild); 
+                node.appendChild(src.firstChild.cloneNode(true)); 
+                node.setAttributeNS(null, "viewBox", src.getAttributeNS(null, "viewBox")); 
+
+                node.setAttributeNS(null, "width", size);
+                node.setAttributeNS(null, "height", size);
+                node.setAttributeNS(null, "x", 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[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.SVG.LABEL_ALIGN[align[0]] || "middle");
+
+        if (OpenLayers.IS_GECKO === true) {
+            text.setAttributeNS(null, "dominant-baseline",
+                OpenLayers.Renderer.SVG.LABEL_ALIGN[align[1]] || "central");
+        } else {
+            tspan.setAttributeNS(null, "baseline-shift",
+                OpenLayers.Renderer.SVG.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:
+     * {String} - id of 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
+        if (document.getElementById(id) != null) {
+            return id;
+        }
+        
+        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.id;
+    },
+    
+    /**
+     * 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"
+});
+
+/** 
+ * 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/tschaub/xdomain/lib/OpenLayers/Renderer/VML.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Renderer/VML.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Renderer/VML.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Request.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Request.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Request.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Strategy/BBOX.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Strategy/BBOX.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Strategy/BBOX.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Strategy/Cluster.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Strategy/Cluster.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Strategy/Cluster.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Strategy/Filter.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Strategy/Filter.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Strategy/Filter.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Strategy/Fixed.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Strategy/Fixed.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Strategy/Fixed.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Strategy/Paging.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Strategy/Paging.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Strategy/Paging.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Strategy/Refresh.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Strategy/Refresh.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Strategy/Refresh.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Tile/Image/IFrame.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Tile/Image/IFrame.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Tile/Image/IFrame.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers/Util.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers/Util.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers/Util.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/lib/OpenLayers.js
===================================================================
--- sandbox/tschaub/xdomain/lib/OpenLayers.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/OpenLayers.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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.
@@ -71,260 +93,273 @@
      * OpenLayers library code as it will be appended at the end of this file.
      */
     if(!singleFile) {
-        var jsfiles = new Array(
-            "OpenLayers/BaseTypes/Class.js",
-            "OpenLayers/Util.js",
-            "OpenLayers/BaseTypes.js",
-            "OpenLayers/BaseTypes/Bounds.js",
-            "OpenLayers/BaseTypes/Element.js",
-            "OpenLayers/BaseTypes/LonLat.js",
-            "OpenLayers/BaseTypes/Pixel.js",
-            "OpenLayers/BaseTypes/Size.js",
-            "OpenLayers/Console.js",
-            "OpenLayers/Tween.js",
-            "Rico/Corner.js",
-            "Rico/Color.js",
-            "OpenLayers/Ajax.js",
-            "OpenLayers/Events.js",
-            "OpenLayers/Request.js",
-            "OpenLayers/Request/XMLHttpRequest.js",
-            "OpenLayers/Projection.js",
-            "OpenLayers/Map.js",
-            "OpenLayers/Layer.js",
-            "OpenLayers/Icon.js",
-            "OpenLayers/Marker.js",
-            "OpenLayers/Marker/Box.js",
-            "OpenLayers/Popup.js",
-            "OpenLayers/Tile.js",
-            "OpenLayers/Tile/Image.js",
-            "OpenLayers/Tile/Image/IFrame.js",
-            "OpenLayers/Tile/WFS.js",
-            "OpenLayers/Layer/Image.js",
-            "OpenLayers/Layer/SphericalMercator.js",
-            "OpenLayers/Layer/EventPane.js",
-            "OpenLayers/Layer/FixedZoomLevels.js",
-            "OpenLayers/Layer/Google.js",
-            "OpenLayers/Layer/Google/v3.js",
-            "OpenLayers/Layer/VirtualEarth.js",
-            "OpenLayers/Layer/Yahoo.js",
-            "OpenLayers/Layer/HTTPRequest.js",
-            "OpenLayers/Layer/Grid.js",
-            "OpenLayers/Layer/MapGuide.js",
-            "OpenLayers/Layer/MapServer.js",
-            "OpenLayers/Layer/MapServer/Untiled.js",
-            "OpenLayers/Layer/KaMap.js",
-            "OpenLayers/Layer/KaMapCache.js",
-            "OpenLayers/Layer/MultiMap.js",
-            "OpenLayers/Layer/Markers.js",
-            "OpenLayers/Layer/Text.js",
-            "OpenLayers/Layer/WorldWind.js",
-            "OpenLayers/Layer/ArcGIS93Rest.js",
-            "OpenLayers/Layer/WMS.js",
-            "OpenLayers/Layer/WMS/Untiled.js",
-            "OpenLayers/Layer/WMS/Post.js",
-            "OpenLayers/Layer/WMTS.js",
-            "OpenLayers/Layer/ArcIMS.js",
-            "OpenLayers/Layer/GeoRSS.js",
-            "OpenLayers/Layer/Boxes.js",
-            "OpenLayers/Layer/XYZ.js",
-            "OpenLayers/Layer/Bing.js",
-            "OpenLayers/Layer/TMS.js",
-            "OpenLayers/Layer/TileCache.js",
-            "OpenLayers/Layer/Zoomify.js",
-            "OpenLayers/Popup/Anchored.js",
-            "OpenLayers/Popup/AnchoredBubble.js",
-            "OpenLayers/Popup/Framed.js",
-            "OpenLayers/Popup/FramedCloud.js",
-            "OpenLayers/Feature.js",
-            "OpenLayers/Feature/Vector.js",
-            "OpenLayers/Feature/WFS.js",
-            "OpenLayers/Handler.js",
-            "OpenLayers/Handler/Click.js",
-            "OpenLayers/Handler/Hover.js",
-            "OpenLayers/Handler/Point.js",
-            "OpenLayers/Handler/Path.js",
-            "OpenLayers/Handler/Polygon.js",
-            "OpenLayers/Handler/Feature.js",
-            "OpenLayers/Handler/Drag.js",
-            "OpenLayers/Handler/RegularPolygon.js",
-            "OpenLayers/Handler/Box.js",
-            "OpenLayers/Handler/MouseWheel.js",
-            "OpenLayers/Handler/Keyboard.js",
-            "OpenLayers/Control.js",
-            "OpenLayers/Control/Attribution.js",
-            "OpenLayers/Control/Button.js",
-            "OpenLayers/Control/ZoomBox.js",
-            "OpenLayers/Control/ZoomToMaxExtent.js",
-            "OpenLayers/Control/DragPan.js",
-            "OpenLayers/Control/Navigation.js",
-            "OpenLayers/Control/MouseDefaults.js",
-            "OpenLayers/Control/MousePosition.js",
-            "OpenLayers/Control/OverviewMap.js",
-            "OpenLayers/Control/KeyboardDefaults.js",
-            "OpenLayers/Control/PanZoom.js",
-            "OpenLayers/Control/PanZoomBar.js",
-            "OpenLayers/Control/ArgParser.js",
-            "OpenLayers/Control/Permalink.js",
-            "OpenLayers/Control/Scale.js",
-            "OpenLayers/Control/ScaleLine.js",
-            "OpenLayers/Control/Snapping.js",
-            "OpenLayers/Control/Split.js",
-            "OpenLayers/Control/LayerSwitcher.js",
-            "OpenLayers/Control/DrawFeature.js",
-            "OpenLayers/Control/DragFeature.js",
-            "OpenLayers/Control/ModifyFeature.js",
-            "OpenLayers/Control/Panel.js",
-            "OpenLayers/Control/SelectFeature.js",
-            "OpenLayers/Control/NavigationHistory.js",
-            "OpenLayers/Control/Measure.js",
-            "OpenLayers/Control/WMSGetFeatureInfo.js",
-            "OpenLayers/Control/WMTSGetFeatureInfo.js",
-            "OpenLayers/Control/Graticule.js",
-            "OpenLayers/Control/TransformFeature.js",
-            "OpenLayers/Control/SLDSelect.js",
-            "OpenLayers/Geometry.js",
-            "OpenLayers/Geometry/Rectangle.js",
-            "OpenLayers/Geometry/Collection.js",
-            "OpenLayers/Geometry/Point.js",
-            "OpenLayers/Geometry/MultiPoint.js",
-            "OpenLayers/Geometry/Curve.js",
-            "OpenLayers/Geometry/LineString.js",
-            "OpenLayers/Geometry/LinearRing.js",        
-            "OpenLayers/Geometry/Polygon.js",
-            "OpenLayers/Geometry/MultiLineString.js",
-            "OpenLayers/Geometry/MultiPolygon.js",
-            "OpenLayers/Geometry/Surface.js",
-            "OpenLayers/Renderer.js",
-            "OpenLayers/Renderer/Elements.js",
-            "OpenLayers/Renderer/SVG.js",
-            "OpenLayers/Renderer/Canvas.js",
-            "OpenLayers/Renderer/VML.js",
-            "OpenLayers/Layer/Vector.js",
-            "OpenLayers/Layer/Vector/RootContainer.js",
-            "OpenLayers/Strategy.js",
-            "OpenLayers/Strategy/Filter.js",
-            "OpenLayers/Strategy/Fixed.js",
-            "OpenLayers/Strategy/Cluster.js",
-            "OpenLayers/Strategy/Paging.js",
-            "OpenLayers/Strategy/BBOX.js",
-            "OpenLayers/Strategy/Save.js",
-            "OpenLayers/Strategy/Refresh.js",
-            "OpenLayers/Filter.js",
-            "OpenLayers/Filter/FeatureId.js",
-            "OpenLayers/Filter/Logical.js",
-            "OpenLayers/Filter/Comparison.js",
-            "OpenLayers/Filter/Spatial.js",
-            "OpenLayers/Protocol.js",
-            "OpenLayers/Protocol/HTTP.js",
-            "OpenLayers/Protocol/Script.js",
-            "OpenLayers/Protocol/SQL.js",
-            "OpenLayers/Protocol/SQL/Gears.js",
-            "OpenLayers/Protocol/WFS.js",
-            "OpenLayers/Protocol/WFS/v1.js",
-            "OpenLayers/Protocol/WFS/v1_0_0.js",
-            "OpenLayers/Protocol/WFS/v1_1_0.js",
-            "OpenLayers/Protocol/SOS.js",
-            "OpenLayers/Protocol/SOS/v1_0_0.js",
-            "OpenLayers/Layer/PointTrack.js",
-            "OpenLayers/Layer/GML.js",
-            "OpenLayers/Style.js",
-            "OpenLayers/Style2.js",
-            "OpenLayers/StyleMap.js",
-            "OpenLayers/Rule.js",
-            "OpenLayers/Format.js",
-            "OpenLayers/Format/XML.js",
-            "OpenLayers/Format/Context.js",
-            "OpenLayers/Format/ArcXML.js",
-            "OpenLayers/Format/ArcXML/Features.js",
-            "OpenLayers/Format/GML.js",
-            "OpenLayers/Format/GML/Base.js",
-            "OpenLayers/Format/GML/v2.js",
-            "OpenLayers/Format/GML/v3.js",
-            "OpenLayers/Format/Atom.js",
-            "OpenLayers/Format/KML.js",
-            "OpenLayers/Format/GeoRSS.js",
-            "OpenLayers/Format/WFS.js",
-            "OpenLayers/Format/WFSCapabilities.js",
-            "OpenLayers/Format/WFSCapabilities/v1.js",
-            "OpenLayers/Format/WFSCapabilities/v1_0_0.js",
-            "OpenLayers/Format/WFSCapabilities/v1_1_0.js",
-            "OpenLayers/Format/WFSDescribeFeatureType.js",
-            "OpenLayers/Format/WMSDescribeLayer.js",
-            "OpenLayers/Format/WMSDescribeLayer/v1_1.js",
-            "OpenLayers/Format/WKT.js",
-            "OpenLayers/Format/OSM.js",
-            "OpenLayers/Format/GPX.js",
-            "OpenLayers/Format/Filter.js",
-            "OpenLayers/Format/Filter/v1.js",
-            "OpenLayers/Format/Filter/v1_0_0.js",
-            "OpenLayers/Format/Filter/v1_1_0.js",
-            "OpenLayers/Format/SLD.js",
-            "OpenLayers/Format/SLD/v1.js",
-            "OpenLayers/Format/SLD/v1_0_0.js",
-            "OpenLayers/Format/OWSCommon/v1.js",
-            "OpenLayers/Format/OWSCommon/v1_0_0.js",
-            "OpenLayers/Format/OWSCommon/v1_1_0.js",
-            "OpenLayers/Format/CSWGetDomain.js",
-            "OpenLayers/Format/CSWGetDomain/v2_0_2.js",
-            "OpenLayers/Format/CSWGetRecords.js",
-            "OpenLayers/Format/CSWGetRecords/v2_0_2.js",
-            "OpenLayers/Format/WFST.js",
-            "OpenLayers/Format/WFST/v1.js",
-            "OpenLayers/Format/WFST/v1_0_0.js",
-            "OpenLayers/Format/WFST/v1_1_0.js",
-            "OpenLayers/Format/Text.js",
-            "OpenLayers/Format/JSON.js",
-            "OpenLayers/Format/GeoJSON.js",
-            "OpenLayers/Format/WMC.js",
-            "OpenLayers/Format/WMC/v1.js",
-            "OpenLayers/Format/WMC/v1_0_0.js",
-            "OpenLayers/Format/WMC/v1_1_0.js",
-            "OpenLayers/Format/WMSCapabilities.js",
-            "OpenLayers/Format/WMSCapabilities/v1.js",
-            "OpenLayers/Format/WMSCapabilities/v1_1.js",
-            "OpenLayers/Format/WMSCapabilities/v1_1_0.js",
-            "OpenLayers/Format/WMSCapabilities/v1_1_1.js",
-            "OpenLayers/Format/WMSCapabilities/v1_3.js",
-            "OpenLayers/Format/WMSCapabilities/v1_3_0.js",
-            "OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js",
-            "OpenLayers/Format/WMSGetFeatureInfo.js",
-            "OpenLayers/Format/SOSCapabilities.js",
-            "OpenLayers/Format/SOSCapabilities/v1_0_0.js",
-            "OpenLayers/Format/SOSGetFeatureOfInterest.js",
-            "OpenLayers/Format/SOSGetObservation.js",
-            "OpenLayers/Format/OWSContext.js",
-            "OpenLayers/Format/OWSContext/v0_3_1.js",
-            "OpenLayers/Format/WMTSCapabilities.js",
-            "OpenLayers/Format/WMTSCapabilities/v1_0_0.js",
-            "OpenLayers/Layer/WFS.js",
-            "OpenLayers/Control/GetFeature.js",
-            "OpenLayers/Control/MouseToolbar.js",
-            "OpenLayers/Control/NavToolbar.js",
-            "OpenLayers/Control/PanPanel.js",
-            "OpenLayers/Control/Pan.js",
-            "OpenLayers/Control/ZoomIn.js",
-            "OpenLayers/Control/ZoomOut.js",
-            "OpenLayers/Control/ZoomPanel.js",
-            "OpenLayers/Control/EditingToolbar.js",
-            "OpenLayers/Symbolizer.js",
-            "OpenLayers/Symbolizer/Point.js",
-            "OpenLayers/Symbolizer/Line.js",
-            "OpenLayers/Symbolizer/Polygon.js",
-            "OpenLayers/Symbolizer/Text.js",
-            "OpenLayers/Symbolizer/Raster.js",
-            "OpenLayers/Lang.js",
-            "OpenLayers/Lang/en.js"
-        ); // etc.
+        if (!jsFiles) {
+            jsFiles = [
+                "OpenLayers/BaseTypes/Class.js",
+                "OpenLayers/Util.js",
+                "OpenLayers/BaseTypes.js",
+                "OpenLayers/BaseTypes/Bounds.js",
+                "OpenLayers/BaseTypes/Element.js",
+                "OpenLayers/BaseTypes/LonLat.js",
+                "OpenLayers/BaseTypes/Pixel.js",
+                "OpenLayers/BaseTypes/Size.js",
+                "OpenLayers/Console.js",
+                "OpenLayers/Tween.js",
+                "OpenLayers/Kinetic.js",
+                "Rico/Corner.js",
+                "Rico/Color.js",
+                "OpenLayers/Ajax.js",
+                "OpenLayers/Events.js",
+                "OpenLayers/Request.js",
+                "OpenLayers/Request/XMLHttpRequest.js",
+                "OpenLayers/Projection.js",
+                "OpenLayers/Map.js",
+                "OpenLayers/Layer.js",
+                "OpenLayers/Icon.js",
+                "OpenLayers/Marker.js",
+                "OpenLayers/Marker/Box.js",
+                "OpenLayers/Popup.js",
+                "OpenLayers/Tile.js",
+                "OpenLayers/Tile/Image.js",
+                "OpenLayers/Tile/Image/IFrame.js",
+                "OpenLayers/Tile/WFS.js",
+                "OpenLayers/Layer/Image.js",
+                "OpenLayers/Layer/SphericalMercator.js",
+                "OpenLayers/Layer/EventPane.js",
+                "OpenLayers/Layer/FixedZoomLevels.js",
+                "OpenLayers/Layer/Google.js",
+                "OpenLayers/Layer/Google/v3.js",
+                "OpenLayers/Layer/VirtualEarth.js",
+                "OpenLayers/Layer/Yahoo.js",
+                "OpenLayers/Layer/HTTPRequest.js",
+                "OpenLayers/Layer/Grid.js",
+                "OpenLayers/Layer/MapGuide.js",
+                "OpenLayers/Layer/MapServer.js",
+                "OpenLayers/Layer/MapServer/Untiled.js",
+                "OpenLayers/Layer/KaMap.js",
+                "OpenLayers/Layer/KaMapCache.js",
+                "OpenLayers/Layer/MultiMap.js",
+                "OpenLayers/Layer/Markers.js",
+                "OpenLayers/Layer/Text.js",
+                "OpenLayers/Layer/WorldWind.js",
+                "OpenLayers/Layer/ArcGIS93Rest.js",
+                "OpenLayers/Layer/WMS.js",
+                "OpenLayers/Layer/WMS/Untiled.js",
+                "OpenLayers/Layer/WMS/Post.js",
+                "OpenLayers/Layer/WMTS.js",
+                "OpenLayers/Layer/ArcIMS.js",
+                "OpenLayers/Layer/GeoRSS.js",
+                "OpenLayers/Layer/Boxes.js",
+                "OpenLayers/Layer/XYZ.js",
+                "OpenLayers/Layer/Bing.js",
+                "OpenLayers/Layer/TMS.js",
+                "OpenLayers/Layer/TileCache.js",
+                "OpenLayers/Layer/Zoomify.js",
+                "OpenLayers/Popup/Anchored.js",
+                "OpenLayers/Popup/AnchoredBubble.js",
+                "OpenLayers/Popup/Framed.js",
+                "OpenLayers/Popup/FramedCloud.js",
+                "OpenLayers/Feature.js",
+                "OpenLayers/Feature/Vector.js",
+                "OpenLayers/Feature/WFS.js",
+                "OpenLayers/Handler.js",
+                "OpenLayers/Handler/Click.js",
+                "OpenLayers/Handler/Hover.js",
+                "OpenLayers/Handler/Point.js",
+                "OpenLayers/Handler/Path.js",
+                "OpenLayers/Handler/Polygon.js",
+                "OpenLayers/Handler/Feature.js",
+                "OpenLayers/Handler/Drag.js",
+                "OpenLayers/Handler/Pinch.js",
+                "OpenLayers/Handler/RegularPolygon.js",
+                "OpenLayers/Handler/Box.js",
+                "OpenLayers/Handler/MouseWheel.js",
+                "OpenLayers/Handler/Keyboard.js",
+                "OpenLayers/Control.js",
+                "OpenLayers/Control/Attribution.js",
+                "OpenLayers/Control/Button.js",
+                "OpenLayers/Control/ZoomBox.js",
+                "OpenLayers/Control/ZoomToMaxExtent.js",
+                "OpenLayers/Control/DragPan.js",
+                "OpenLayers/Control/Navigation.js",
+                "OpenLayers/Control/PinchZoom.js",
+                "OpenLayers/Control/TouchNavigation.js",
+                "OpenLayers/Control/MouseDefaults.js",
+                "OpenLayers/Control/MousePosition.js",
+                "OpenLayers/Control/OverviewMap.js",
+                "OpenLayers/Control/KeyboardDefaults.js",
+                "OpenLayers/Control/PanZoom.js",
+                "OpenLayers/Control/PanZoomBar.js",
+                "OpenLayers/Control/ArgParser.js",
+                "OpenLayers/Control/Permalink.js",
+                "OpenLayers/Control/Scale.js",
+                "OpenLayers/Control/ScaleLine.js",
+                "OpenLayers/Control/Snapping.js",
+                "OpenLayers/Control/Split.js",
+                "OpenLayers/Control/LayerSwitcher.js",
+                "OpenLayers/Control/DrawFeature.js",
+                "OpenLayers/Control/DragFeature.js",
+                "OpenLayers/Control/ModifyFeature.js",
+                "OpenLayers/Control/Panel.js",
+                "OpenLayers/Control/SelectFeature.js",
+                "OpenLayers/Control/NavigationHistory.js",
+                "OpenLayers/Control/Measure.js",
+                "OpenLayers/Control/WMSGetFeatureInfo.js",
+                "OpenLayers/Control/WMTSGetFeatureInfo.js",
+                "OpenLayers/Control/Graticule.js",
+                "OpenLayers/Control/TransformFeature.js",
+                "OpenLayers/Control/SLDSelect.js",
+                "OpenLayers/Geometry.js",
+                "OpenLayers/Geometry/Rectangle.js",
+                "OpenLayers/Geometry/Collection.js",
+                "OpenLayers/Geometry/Point.js",
+                "OpenLayers/Geometry/MultiPoint.js",
+                "OpenLayers/Geometry/Curve.js",
+                "OpenLayers/Geometry/LineString.js",
+                "OpenLayers/Geometry/LinearRing.js",
+                "OpenLayers/Geometry/Polygon.js",
+                "OpenLayers/Geometry/MultiLineString.js",
+                "OpenLayers/Geometry/MultiPolygon.js",
+                "OpenLayers/Geometry/Surface.js",
+                "OpenLayers/Renderer.js",
+                "OpenLayers/Renderer/Elements.js",
+                "OpenLayers/Renderer/NG.js",
+                "OpenLayers/Renderer/SVG.js",
+                "OpenLayers/Renderer/SVG2.js",
+                "OpenLayers/Renderer/Canvas.js",
+                "OpenLayers/Renderer/VML.js",
+                "OpenLayers/Layer/Vector.js",
+                "OpenLayers/Layer/Vector/RootContainer.js",
+                "OpenLayers/Strategy.js",
+                "OpenLayers/Strategy/Filter.js",
+                "OpenLayers/Strategy/Fixed.js",
+                "OpenLayers/Strategy/Cluster.js",
+                "OpenLayers/Strategy/Paging.js",
+                "OpenLayers/Strategy/BBOX.js",
+                "OpenLayers/Strategy/Save.js",
+                "OpenLayers/Strategy/Refresh.js",
+                "OpenLayers/Filter.js",
+                "OpenLayers/Filter/FeatureId.js",
+                "OpenLayers/Filter/Logical.js",
+                "OpenLayers/Filter/Comparison.js",
+                "OpenLayers/Filter/Spatial.js",
+                "OpenLayers/Protocol.js",
+                "OpenLayers/Protocol/HTTP.js",
+                "OpenLayers/Protocol/SimpleFilterSerializer.js",
+                "OpenLayers/Protocol/SQL.js",
+                "OpenLayers/Protocol/SQL/Gears.js",
+                "OpenLayers/Protocol/WFS.js",
+                "OpenLayers/Protocol/WFS/v1.js",
+                "OpenLayers/Protocol/WFS/v1_0_0.js",
+                "OpenLayers/Protocol/WFS/v1_1_0.js",
+                "OpenLayers/Protocol/Script.js",
+                "OpenLayers/Protocol/SOS.js",
+                "OpenLayers/Protocol/SOS/v1_0_0.js",
+                "OpenLayers/Layer/PointTrack.js",
+                "OpenLayers/Layer/GML.js",
+                "OpenLayers/Style.js",
+                "OpenLayers/Style2.js",
+                "OpenLayers/StyleMap.js",
+                "OpenLayers/Rule.js",
+                "OpenLayers/Format.js",
+                "OpenLayers/Format/XML.js",
+                "OpenLayers/Format/Context.js",
+                "OpenLayers/Format/ArcXML.js",
+                "OpenLayers/Format/ArcXML/Features.js",
+                "OpenLayers/Format/GML.js",
+                "OpenLayers/Format/GML/Base.js",
+                "OpenLayers/Format/GML/v2.js",
+                "OpenLayers/Format/GML/v3.js",
+                "OpenLayers/Format/Atom.js",
+                "OpenLayers/Format/KML.js",
+                "OpenLayers/Format/GeoRSS.js",
+                "OpenLayers/Format/WFS.js",
+                "OpenLayers/Format/WFSCapabilities.js",
+                "OpenLayers/Format/WFSCapabilities/v1.js",
+                "OpenLayers/Format/WFSCapabilities/v1_0_0.js",
+                "OpenLayers/Format/WFSCapabilities/v1_1_0.js",
+                "OpenLayers/Format/WFSDescribeFeatureType.js",
+                "OpenLayers/Format/WMSDescribeLayer.js",
+                "OpenLayers/Format/WMSDescribeLayer/v1_1.js",
+                "OpenLayers/Format/WKT.js",
+                "OpenLayers/Format/CQL.js",
+                "OpenLayers/Format/OSM.js",
+                "OpenLayers/Format/GPX.js",
+                "OpenLayers/Format/Filter.js",
+                "OpenLayers/Format/Filter/v1.js",
+                "OpenLayers/Format/Filter/v1_0_0.js",
+                "OpenLayers/Format/Filter/v1_1_0.js",
+                "OpenLayers/Format/SLD.js",
+                "OpenLayers/Format/SLD/v1.js",
+                "OpenLayers/Format/SLD/v1_0_0.js",
+                "OpenLayers/Format/OWSCommon/v1.js",
+                "OpenLayers/Format/OWSCommon/v1_0_0.js",
+                "OpenLayers/Format/OWSCommon/v1_1_0.js",
+                "OpenLayers/Format/CSWGetDomain.js",
+                "OpenLayers/Format/CSWGetDomain/v2_0_2.js",
+                "OpenLayers/Format/CSWGetRecords.js",
+                "OpenLayers/Format/CSWGetRecords/v2_0_2.js",
+                "OpenLayers/Format/WFST.js",
+                "OpenLayers/Format/WFST/v1.js",
+                "OpenLayers/Format/WFST/v1_0_0.js",
+                "OpenLayers/Format/WFST/v1_1_0.js",
+                "OpenLayers/Format/Text.js",
+                "OpenLayers/Format/JSON.js",
+                "OpenLayers/Format/GeoJSON.js",
+                "OpenLayers/Format/WMC.js",
+                "OpenLayers/Format/WMC/v1.js",
+                "OpenLayers/Format/WMC/v1_0_0.js",
+                "OpenLayers/Format/WMC/v1_1_0.js",
+                "OpenLayers/Format/WMSCapabilities.js",
+                "OpenLayers/Format/WMSCapabilities/v1.js",
+                "OpenLayers/Format/WMSCapabilities/v1_1.js",
+                "OpenLayers/Format/WMSCapabilities/v1_1_0.js",
+                "OpenLayers/Format/WMSCapabilities/v1_1_1.js",
+                "OpenLayers/Format/WMSCapabilities/v1_3.js",
+                "OpenLayers/Format/WMSCapabilities/v1_3_0.js",
+                "OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js",
+                "OpenLayers/Format/WMSGetFeatureInfo.js",
+                "OpenLayers/Format/SOSCapabilities.js",
+                "OpenLayers/Format/SOSCapabilities/v1_0_0.js",
+                "OpenLayers/Format/SOSGetFeatureOfInterest.js",
+                "OpenLayers/Format/SOSGetObservation.js",
+                "OpenLayers/Format/OWSContext.js",
+                "OpenLayers/Format/OWSContext/v0_3_1.js",
+                "OpenLayers/Format/WMTSCapabilities.js",
+                "OpenLayers/Format/WMTSCapabilities/v1_0_0.js",
+                "OpenLayers/Layer/WFS.js",
+                "OpenLayers/Control/GetFeature.js",
+                "OpenLayers/Control/MouseToolbar.js",
+                "OpenLayers/Control/NavToolbar.js",
+                "OpenLayers/Control/PanPanel.js",
+                "OpenLayers/Control/Pan.js",
+                "OpenLayers/Control/ZoomIn.js",
+                "OpenLayers/Control/ZoomOut.js",
+                "OpenLayers/Control/ZoomPanel.js",
+                "OpenLayers/Control/EditingToolbar.js",
+                "OpenLayers/Control/Geolocate.js",
+                "OpenLayers/Symbolizer.js",
+                "OpenLayers/Symbolizer/Point.js",
+                "OpenLayers/Symbolizer/Line.js",
+                "OpenLayers/Symbolizer/Polygon.js",
+                "OpenLayers/Symbolizer/Text.js",
+                "OpenLayers/Symbolizer/Raster.js",
+                "OpenLayers/Lang.js",
+                "OpenLayers/Lang/en.js"
+            ]; // etc.
+        }
 
         // 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/tschaub/xdomain/lib/Rico/Color.js
===================================================================
--- sandbox/tschaub/xdomain/lib/Rico/Color.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/lib/Rico/Color.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Ajax.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Ajax.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Ajax.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_Ajax_loadUrl(t) {

Modified: sandbox/tschaub/xdomain/tests/BaseTypes/Bounds.html
===================================================================
--- sandbox/tschaub/xdomain/tests/BaseTypes/Bounds.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/BaseTypes/Bounds.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/BaseTypes/Class.html
===================================================================
--- sandbox/tschaub/xdomain/tests/BaseTypes/Class.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/BaseTypes/Class.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     // remove this next line at 3.0
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);

Modified: sandbox/tschaub/xdomain/tests/BaseTypes/Element.html
===================================================================
--- sandbox/tschaub/xdomain/tests/BaseTypes/Element.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/BaseTypes/Element.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,7 +1,7 @@
 <html>
   <head>
   
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
 
     <script type="text/javascript">
 

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

Modified: sandbox/tschaub/xdomain/tests/BaseTypes/Pixel.html
===================================================================
--- sandbox/tschaub/xdomain/tests/BaseTypes/Pixel.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/BaseTypes/Pixel.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/BaseTypes/Size.html
===================================================================
--- sandbox/tschaub/xdomain/tests/BaseTypes/Size.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/BaseTypes/Size.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var Size; 
     

Modified: sandbox/tschaub/xdomain/tests/BaseTypes.html
===================================================================
--- sandbox/tschaub/xdomain/tests/BaseTypes.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/BaseTypes.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_String_startsWith(t) {
@@ -298,6 +298,13 @@
         //run again to make sure the arguments are handled correctly
         newFoo(g_Arg3, g_Arg4);
     }
+    
+    function test_Function_Void(t) {
+        
+        t.plan(1);
+        t.eq(OpenLayers.Function.Void(), undefined, "returns undefined");
+        
+    }
 
     function test_Function_bindAsEventListener(t) {
         t.plan(4);

Modified: sandbox/tschaub/xdomain/tests/Console.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Console.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Console.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
     function test_Console(t) {
         

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

Modified: sandbox/tschaub/xdomain/tests/Control/Attribution.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/Attribution.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/Attribution.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map; 
     function test_Control_Attribution_constructor (t) {

Modified: sandbox/tschaub/xdomain/tests/Control/Button.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/Button.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/Button.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
       function test_Control_Button_constructor (t) {
           t.plan( 2 );

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

Modified: sandbox/tschaub/xdomain/tests/Control/DragPan.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/DragPan.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/DragPan.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map, control, layer; 
 

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

Copied: sandbox/tschaub/xdomain/tests/Control/Geolocate.html (from rev 11673, trunk/openlayers/tests/Control/Geolocate.html)
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/Geolocate.html	                        (rev 0)
+++ sandbox/tschaub/xdomain/tests/Control/Geolocate.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Control/GetFeature.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/GetFeature.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/GetFeature.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     function test_Control_GetFeature_constructor(t) {
         t.plan(3);

Modified: sandbox/tschaub/xdomain/tests/Control/Graticule.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/Graticule.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/Graticule.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script src="http://proj4js.org/lib/proj4js-compressed.js"></script>
     <script type="text/javascript">
 

Modified: sandbox/tschaub/xdomain/tests/Control/KeyboardDefaults.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/KeyboardDefaults.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/KeyboardDefaults.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map; 
     function test_Control_KeyboardDefaults_constructor (t) {

Modified: sandbox/tschaub/xdomain/tests/Control/LayerSwitcher.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/LayerSwitcher.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/LayerSwitcher.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map; 
 

Modified: sandbox/tschaub/xdomain/tests/Control/Measure.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/Measure.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/Measure.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Control/ModifyFeature.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/ModifyFeature.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/ModifyFeature.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Control/MousePosition.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/MousePosition.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/MousePosition.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map, control; 
     function test_initialize (t) {

Modified: sandbox/tschaub/xdomain/tests/Control/MouseToolbar.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/MouseToolbar.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/MouseToolbar.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map; 
     function test_Control_MouseToolbar_constructor (t) {

Modified: sandbox/tschaub/xdomain/tests/Control/NavToolbar.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/NavToolbar.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/NavToolbar.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map; 
     function test_Control_NavToolbar_constructor (t) {

Modified: sandbox/tschaub/xdomain/tests/Control/Navigation.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/Navigation.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/Navigation.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Control/NavigationHistory.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/NavigationHistory.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/NavigationHistory.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/xdomain/tests/Control/OverviewMap.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/OverviewMap.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/OverviewMap.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map, control;
     function test_initialize(t) {

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

Modified: sandbox/tschaub/xdomain/tests/Control/PanZoom.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/PanZoom.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/PanZoom.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Control/PanZoomBar.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/PanZoomBar.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/PanZoomBar.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Control/Panel.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/Panel.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/Panel.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Control/Permalink.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/Permalink.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/Permalink.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Control/PinchZoom.html (from rev 11673, trunk/openlayers/tests/Control/PinchZoom.html)
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/PinchZoom.html	                        (rev 0)
+++ sandbox/tschaub/xdomain/tests/Control/PinchZoom.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Control/SLDSelect.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/SLDSelect.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/SLDSelect.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/xdomain/tests/Control/Scale.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/Scale.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/Scale.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,7 +1,8 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
+    OpenLayers.Lang.setCode('en');
     var map; 
     function test_Control_Scale_constructor (t) {
         t.plan( 2 );

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

Modified: sandbox/tschaub/xdomain/tests/Control/SelectFeature.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/SelectFeature.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/SelectFeature.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Control/Snapping.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/Snapping.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/Snapping.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

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

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

Modified: sandbox/tschaub/xdomain/tests/Control/TransformFeature.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/TransformFeature.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/TransformFeature.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/xdomain/tests/Control/WMSGetFeatureInfo.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/WMSGetFeatureInfo.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/WMSGetFeatureInfo.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/xdomain/tests/Control/WMTSGetFeatureInfo.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control/WMTSGetFeatureInfo.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control/WMTSGetFeatureInfo.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/xdomain/tests/Control.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Control.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Control.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Events.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Events.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Events.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Extras.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Extras.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Extras.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     var map;

Modified: sandbox/tschaub/xdomain/tests/Feature/Vector.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Feature/Vector.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Feature/Vector.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map; 
     var feature; 

Modified: sandbox/tschaub/xdomain/tests/Feature.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Feature.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Feature.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Filter/Comparison.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Filter/Comparison.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Filter/Comparison.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_initialize(t) { 

Modified: sandbox/tschaub/xdomain/tests/Filter/FeatureId.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Filter/FeatureId.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Filter/FeatureId.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_initialize(t) { 

Modified: sandbox/tschaub/xdomain/tests/Filter/Logical.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Filter/Logical.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Filter/Logical.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_initialize(t) { 

Modified: sandbox/tschaub/xdomain/tests/Filter/Spatial.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Filter/Spatial.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Filter/Spatial.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

Modified: sandbox/tschaub/xdomain/tests/Filter.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Filter.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Filter.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../lib/OpenLayers.js"></script> 
+    <script src="OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_initialize(t) { 

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

Modified: sandbox/tschaub/xdomain/tests/Format/ArcXML.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/ArcXML.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/ArcXML.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
 
     var axl_image_response = '<?xml version="1.0" encoding="UTF-8"?><ARCXML version="1.1"><RESPONSE><IMAGE><ENVELOPE minx="-2471.42857142857" miny="0" maxx="105671.428571429" maxy="75700" /><OUTPUT url="http://localhost/output/364826560.png" /></IMAGE></RESPONSE></ARCXML>';

Modified: sandbox/tschaub/xdomain/tests/Format/Atom.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/Atom.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/Atom.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

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

Modified: sandbox/tschaub/xdomain/tests/Format/CSWGetDomain/v2_0_2.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/CSWGetDomain/v2_0_2.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/CSWGetDomain/v2_0_2.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script src="v2_0_2.js"></script>
     <script type="text/javascript">
 

Modified: sandbox/tschaub/xdomain/tests/Format/CSWGetDomain.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/CSWGetDomain.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/CSWGetDomain.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/xdomain/tests/Format/CSWGetRecords/v2_0_2.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/CSWGetRecords/v2_0_2.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/CSWGetRecords/v2_0_2.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script src="v2_0_2.js"></script>
     <script type="text/javascript">
 

Modified: sandbox/tschaub/xdomain/tests/Format/CSWGetRecords.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/CSWGetRecords.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/CSWGetRecords.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/xdomain/tests/Format/Filter/v1.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/Filter/v1.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/Filter/v1.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_PropertyIsBetween(t) {

Modified: sandbox/tschaub/xdomain/tests/Format/Filter/v1_0_0.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/Filter/v1_0_0.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/Filter/v1_0_0.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     
     var test_xml =

Modified: sandbox/tschaub/xdomain/tests/Format/Filter/v1_1_0.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/Filter/v1_1_0.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/Filter/v1_1_0.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     
     var test_xml =

Modified: sandbox/tschaub/xdomain/tests/Format/Filter.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/Filter.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/Filter.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_initialize(t) { 

Modified: sandbox/tschaub/xdomain/tests/Format/GML/v2.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/GML/v2.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/GML/v2.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <html xmlns="http://www.w3.org/1999/xhtml"> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script src="cases.js"></script>
     <script type="text/javascript">
 

Modified: sandbox/tschaub/xdomain/tests/Format/GML/v3.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/GML/v3.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/GML/v3.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script src="cases.js"></script>
     <script type="text/javascript">
 

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

Modified: sandbox/tschaub/xdomain/tests/Format/GeoJSON.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/GeoJSON.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/GeoJSON.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Format/GeoRSS.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/GeoRSS.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/GeoRSS.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Format/JSON.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/JSON.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/JSON.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_Format_JSON_constructor(t) { 

Modified: sandbox/tschaub/xdomain/tests/Format/KML.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/KML.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/KML.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Format/OSM.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/OSM.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/OSM.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Format/OWSContext/v0_3_1.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/OWSContext/v0_3_1.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/OWSContext/v0_3_1.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Format/SLD/v1_0_0.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/SLD/v1_0_0.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/SLD/v1_0_0.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
 
     var xml = new OpenLayers.Format.XML(); 

Modified: sandbox/tschaub/xdomain/tests/Format/SLD.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/SLD.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/SLD.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     var test_content = '<sld:StyledLayerDescriptor xmlns:sld="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"><sld:NamedLayer><sld:Name>TestLayer</sld:Name><sld:UserStyle><sld:Name>foo</sld:Name><sld:FeatureTypeStyle><sld:Rule><sld:Name>bar</sld:Name><ogc:Filter></ogc:Filter><sld:PolygonSymbolizer><sld:Fill><sld:CssParameter name="fill"><ogc:Literal>blue</ogc:Literal></sld:CssParameter></sld:Fill></sld:PolygonSymbolizer></sld:Rule></sld:FeatureTypeStyle></sld:UserStyle></sld:NamedLayer></sld:StyledLayerDescriptor>';

Modified: sandbox/tschaub/xdomain/tests/Format/SOSCapabilities/v1_0_0.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/SOSCapabilities/v1_0_0.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/SOSCapabilities/v1_0_0.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script src="v1_0_0.js"></script>
     <script type="text/javascript">
 

Modified: sandbox/tschaub/xdomain/tests/Format/SOSGetFeatureOfInterest.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/SOSGetFeatureOfInterest.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/SOSGetFeatureOfInterest.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_read_SOSGetFeatureOfInterest_single(t) {

Modified: sandbox/tschaub/xdomain/tests/Format/SOSGetObservation.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/SOSGetObservation.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/SOSGetObservation.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Format/Text.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/Text.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/Text.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
     function test_basic(t) {
         t.plan(5);
@@ -8,7 +8,7 @@
         var features = format.read(OpenLayers.Util.getElement("content").value);
         t.eq(features[0].style.externalGraphic, format.defaultStyle.externalGraphic, "style is set to defaults if no style props set in text file");
         var features = format.read(OpenLayers.Util.getElement("contentMarker").value);
-        t.eq(features[0].style.externalGraphic, "../../img/marker.png", "marker set correctly by default.");
+        t.eq(features[0].style.externalGraphic, OpenLayers.Util.getImagesLocation() + "marker.png", "marker set correctly by default.");
         
         var features = format.read(OpenLayers.Util.getElement("content2").value);
         t.eq(features.length, 2, "two features read");

Modified: sandbox/tschaub/xdomain/tests/Format/WFS.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WFS.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WFS.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script>  
     function test_wfs_update_node(t) {
         t.plan(2);

Modified: sandbox/tschaub/xdomain/tests/Format/WFSCapabilities/v1.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WFSCapabilities/v1.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WFSCapabilities/v1.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_read(t) {

Modified: sandbox/tschaub/xdomain/tests/Format/WFSCapabilities.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WFSCapabilities.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WFSCapabilities.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_read(t) {

Modified: sandbox/tschaub/xdomain/tests/Format/WFSDescribeFeatureType.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WFSDescribeFeatureType.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WFSDescribeFeatureType.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_read_WFSDescribeFeatureType(t) {

Modified: sandbox/tschaub/xdomain/tests/Format/WFST/v1.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WFST/v1.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WFST/v1.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../../lib/OpenLayers.js"></script>
+  <script src="../../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_read(t) {

Modified: sandbox/tschaub/xdomain/tests/Format/WFST/v1_0_0.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WFST/v1_0_0.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WFST/v1_0_0.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../../lib/OpenLayers.js"></script>
+  <script src="../../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/xdomain/tests/Format/WFST/v1_1_0.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WFST/v1_1_0.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WFST/v1_1_0.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Format/WFST.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WFST.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WFST.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/xdomain/tests/Format/WKT.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WKT.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WKT.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Format/WMC/v1.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WMC/v1.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WMC/v1.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_write_wmc_StyleList(t) {

Modified: sandbox/tschaub/xdomain/tests/Format/WMC/v1_1_0.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WMC/v1_1_0.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WMC/v1_1_0.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Format/WMC.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WMC.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WMC.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Format/WMSCapabilities/v1_1_1.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WMSCapabilities/v1_1_1.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WMSCapabilities/v1_1_1.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_read(t) {

Modified: sandbox/tschaub/xdomain/tests/Format/WMSCapabilities/v1_1_1_WMSC.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WMSCapabilities/v1_1_1_WMSC.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WMSCapabilities/v1_1_1_WMSC.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_read(t) {

Modified: sandbox/tschaub/xdomain/tests/Format/WMSCapabilities/v1_3_0.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WMSCapabilities/v1_3_0.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WMSCapabilities/v1_3_0.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_layers(t) {

Modified: sandbox/tschaub/xdomain/tests/Format/WMSCapabilities.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WMSCapabilities.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WMSCapabilities.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_initialize(t) {

Modified: sandbox/tschaub/xdomain/tests/Format/WMSDescribeLayer.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WMSDescribeLayer.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WMSDescribeLayer.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_read_WMSDescribeLayer(t) {

Modified: sandbox/tschaub/xdomain/tests/Format/WMSGetFeatureInfo.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WMSGetFeatureInfo.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WMSGetFeatureInfo.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_read_FeatureInfoResponse(t) {

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

Modified: sandbox/tschaub/xdomain/tests/Format/WMTSCapabilities.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/WMTSCapabilities.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/WMTSCapabilities.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_initialize(t) {

Modified: sandbox/tschaub/xdomain/tests/Format/XML.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format/XML.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format/XML.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     var text =

Modified: sandbox/tschaub/xdomain/tests/Format.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Format.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Format.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_Format_constructor(t) {

Modified: sandbox/tschaub/xdomain/tests/Geometry/Collection.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Geometry/Collection.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Geometry/Collection.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Geometry/Curve.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Geometry/Curve.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Geometry/Curve.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var curve;
     var components = [new OpenLayers.Geometry.Point(10,10), 

Modified: sandbox/tschaub/xdomain/tests/Geometry/LineString.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Geometry/LineString.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Geometry/LineString.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Geometry/LinearRing.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Geometry/LinearRing.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Geometry/LinearRing.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var line;
     var components = [new OpenLayers.Geometry.Point(10,10), 

Modified: sandbox/tschaub/xdomain/tests/Geometry/MultiLineString.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Geometry/MultiLineString.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Geometry/MultiLineString.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var line;
         

Modified: sandbox/tschaub/xdomain/tests/Geometry/MultiPoint.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Geometry/MultiPoint.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Geometry/MultiPoint.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var point = new OpenLayers.Geometry.Point(10, 15);
      

Modified: sandbox/tschaub/xdomain/tests/Geometry/MultiPolygon.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Geometry/MultiPolygon.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Geometry/MultiPolygon.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var polygon;
     var components = [new OpenLayers.Geometry.Point(10,10), new OpenLayers.Geometry.Point(0,0)];

Modified: sandbox/tschaub/xdomain/tests/Geometry/Point.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Geometry/Point.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Geometry/Point.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var point; 
         

Modified: sandbox/tschaub/xdomain/tests/Geometry/Polygon.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Geometry/Polygon.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Geometry/Polygon.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var polygon;
     var components = [new OpenLayers.Geometry.Point(10,14), new OpenLayers.Geometry.Point(5,3)];

Modified: sandbox/tschaub/xdomain/tests/Geometry/Rectangle.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Geometry/Rectangle.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Geometry/Rectangle.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_Rectangle_constructor (t) {

Modified: sandbox/tschaub/xdomain/tests/Geometry/Surface.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Geometry/Surface.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Geometry/Surface.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_Surface_constructor (t) {

Modified: sandbox/tschaub/xdomain/tests/Geometry.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Geometry.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Geometry.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script src="data/geos_wkt_intersects.js"></script>
   <script type="text/javascript">
     var map; 

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

Modified: sandbox/tschaub/xdomain/tests/Handler/Click.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Handler/Click.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Handler/Click.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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,182 @@
         handler.activate();
 
     }
+    
+    var callbackMap;
+    function callbackSetup(log, options) {
+        callbackMap = new OpenLayers.Map('map', {controls: []});
 
-    function test_Handler_Click_callbacks(t) {
-        t.plan(13);
-        
-        var map = new OpenLayers.Map('map', {controls: []});
-
         var control = {
-            map: map
+            map: callbackMap
         };
 
-        var handler = new OpenLayers.Handler.Click(control, {});
+        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, 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");
-            }
-        };
-        map.events.triggerEvent("click", testEvt);
+        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");
         
-        // 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");
-            }
-        };
-        testEvt = Math.random();
-        map.events.triggerEvent("dblclick", testEvt);
+        // 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);
 
-        // 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);
+        var log = [];
+        var handler = callbackSetup(log);
+        var testEvt = {id: Math.random()};
+        handler.map.events.triggerEvent("dblclick", testEvt);
         
-        // 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");
-            }
-        };
-        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();
+        t.eq(log.length, 0, "nothing happens by default with dblclick (double is false)");
         
-        // 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)
+        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("mousedown", downEvt);
-        var clickEvt = {
-            xy: new OpenLayers.Pixel(0, 1)
+        var up = {
+            xy: px(0, 1)
         };
-        // mouse moves one pixel, click should be called
-        handler.callbacks = {
-            "click": function(evt) {
-                t.ok(evt.xy == clickEvt.xy, "(pixelTolerance met) click called");
-            }
-        };
-        map.events.triggerEvent("click", clickEvt);
-        handler.clearTimer();
+
+        handler.map.events.triggerEvent("mousedown", down);
+        handler.map.events.triggerEvent("mouseup", up);
+        handler.map.events.triggerEvent("click", up);
         
-        // mouse moves 3x3 pixels, click should not be called
-        map.events.triggerEvent("mousedown", downEvt);
-        var clickEvt = {
-            xy: new OpenLayers.Pixel(3, 3)
+        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)
         };
-        // mouse moves one pixel, click should be called
-        handler.callbacks = {
-            "click": function(evt) {
-                t.fail("(pixelTolerance not met) click should not be called");
-            }
+        var up = {
+            xy: px(2, 3)
         };
-        map.events.triggerEvent("click", clickEvt); // no test run
-        handler.clearTimer();
+
+        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);
         
-        window.setTimeout = sto;
-        window.clearTimeout = cto;
+        t.eq(log.length, 0, "nothing logged - event outside tolerance");
         
-
+        callbackTeardown();
+        
     }
 
     function test_Handler_Click_deactivate(t) {
@@ -252,45 +300,183 @@
     }
 
     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_ignoresimulatedclick(t) {
+        t.plan(2);
+
+        // set up
+
+        var log;
+
+        var map = new OpenLayers.Map('map');
+        var control = {map: map};
+
+        var callbacks = {
+            'dblclick': function(e) {
+                log.dblclick = {x: e.xy.x, y: e.xy.y,
+                   lastTouches: e.lastTouches};
+            }
+        };
+
+        var handler = new OpenLayers.Handler.Click(
+                control, callbacks,
+                {'double': true, pixelTolerance: null});
+
+        // test
+
+        log = {};
+        handler.touchstart({xy: px(1, 1), touches: ["foo"]});
+        handler.touchend({});
+        handler.touchstart({xy: px(1, 1), touches: ["foo"]});
+        handler.touchend({type: "click"});
+
+        t.eq(!!handler.down.touches, true, "Handler down touches property should be truthy");
+        
+        t.ok(log.dblclick == undefined, "dblclick callback not called with simulated click");
+
+        // tear down
+        map.destroy();
+    }
+
+    function test_touch_dblclick(t) {
+        t.plan(5);
+
+        // set up
+
+        var log;
+
+        var map = new OpenLayers.Map('map');
+        var control = {map: map};
+
+        var callbacks = {
+            'click': function(e) {
+                log.click = {x: e.xy.x, y: e.xy.y,
+                   lastTouches: e.lastTouches};
             },
-            'control': {
-                'handleRightClicks': false
-            },
-            'rightclick': function(e) {
-                t.ok(e == g_evt, 'correct event passed in to checkModifiers');
-                return g_Propagate;
+            'dblclick': function(e) {
+                log.dblclick = {x: e.xy.x, y: e.xy.y,
+                   lastTouches: e.lastTouches};
             }
         };
-        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 handler = new OpenLayers.Handler.Click(
+                control, callbacks,
+                {'double': true, pixelTolerance: null});
 
-        t.ok(propagate == g_Propagate, "return from handler's rightClick() returned from mouseup");
+        // test
 
-        OpenLayers.Event.isRightClick = temp;
+        log = {};
+        handler.touchstart({xy: px(1, 1), touches: [{clientX:0, clientY:10}]});
+        handler.touchend({});
+        handler.touchstart({xy: px(1, 1), touches: [{clientX:0, clientY:10}]});
+        handler.touchend({});
+
+        t.eq(log.click, undefined, "click callback not called");
+        t.ok(log.dblclick != undefined, "dblclick callback called");
+        if(log.dblclick != undefined) {
+            t.eq(log.dblclick.x, 1, "evt.xy.x as expected");
+            t.eq(log.dblclick.y, 1, "evt.xy.y as expected");
+            t.ok(log.dblclick.lastTouches, "evt.lastTouches on evt");
+        }
+
+        // tear down
+        map.destroy();
     }
 
-
   </script>
 </head>
 <body>

Modified: sandbox/tschaub/xdomain/tests/Handler/Drag.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Handler/Drag.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Handler/Drag.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Handler/Feature.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Handler/Feature.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Handler/Feature.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Handler/Hover.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Handler/Hover.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Handler/Hover.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     function test_Handler_Hover_events(t) {
         t.plan(10);

Modified: sandbox/tschaub/xdomain/tests/Handler/Keyboard.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Handler/Keyboard.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Handler/Keyboard.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     function test_Handler_Keyboard_initialize(t) {
         t.plan(3);

Modified: sandbox/tschaub/xdomain/tests/Handler/MouseWheel.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Handler/MouseWheel.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Handler/MouseWheel.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     function test_Handler_MouseWheel_constructor(t) {
         t.plan(3);

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

Modified: sandbox/tschaub/xdomain/tests/Handler/Point.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Handler/Point.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Handler/Point.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     function test_Handler_Point_constructor(t) {
         t.plan(3);
@@ -25,11 +25,26 @@
     }
 
     function test_Handler_Point_activation(t) {
-        t.plan(3);
-        var map = new OpenLayers.Map('map');
+        t.plan(10);
+        var log = [];
+        var map = new OpenLayers.Map("map", {
+            resolutions: [1]
+        });
+        var layer = new OpenLayers.Layer.Vector("foo", {
+            maxExtent: new OpenLayers.Bounds(-10, -10, 10, 10),
+            isBaseLayer: true
+        });
+        map.addLayer(layer);
         var control = new OpenLayers.Control();
+        var handler = new OpenLayers.Handler.Point(control, {
+            "create": function(g, f) {
+                log.push({geometry: g, feature: f});
+            }
+        });
+        control.handler = handler;
         map.addControl(control);
-        var handler = new OpenLayers.Handler.Point(control);
+        map.setCenter(new OpenLayers.LonLat(0, 0), 0);
+
         handler.active = true;
         var activated = handler.activate();
         t.ok(!activated,
@@ -38,24 +53,52 @@
         activated = handler.activate();
         t.ok(activated,
              "activate returns true if the handler was not already active");
+        t.ok(handler.layer instanceof OpenLayers.Layer.Vector,
+             "activate creates a vector layer");
+        t.ok(handler.layer.map == map,
+             "activate adds the vector layer to the map");
+        t.ok(handler.point instanceof OpenLayers.Feature.Vector,
+             "activate creates a feature");
+        t.ok(handler.point.layer == handler.layer,
+             "activate adds the feature to the layer");
+        t.eq(log.length, 1,
+             "activate calls \"create\" once");
+        t.geom_eq(log[0].geometry, handler.point.geometry,
+                  "\"create\" called with expected geometry");
+        t.ok(log[0].feature == handler.point,
+             "\"create\" called with expected feature");
         activated = handler.deactivate();
         t.ok(activated,
              "deactivate returns true if the handler was active already");
+
+        map.destroy();
     }
 
     function test_Handler_Point_events(t) {
-        t.plan(29);
-        
-        var map = new OpenLayers.Map('map');
-        var control = {
-            map: map
-        };
-        var handler = new OpenLayers.Handler.Point(control);
+        t.plan(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 +142,7 @@
     }
     
     function test_callbacks(t) {
-        t.plan(10);
+        t.plan(28);
         var map = new OpenLayers.Map("map", {
             resolutions: [1]
         });
@@ -108,68 +151,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 +351,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 +371,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 +383,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/tschaub/xdomain/tests/Handler/Polygon.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Handler/Polygon.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Handler/Polygon.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Handler/RegularPolygon.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Handler/RegularPolygon.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Handler/RegularPolygon.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     function test_Handler_RegularPolygon_constructor(t) {
         t.plan(3);

Modified: sandbox/tschaub/xdomain/tests/Handler.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Handler.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Handler.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
     function test_Handler_constructor(t) {
         t.plan(4);

Modified: sandbox/tschaub/xdomain/tests/Icon.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Icon.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Icon.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
     var icon; 
     

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

Modified: sandbox/tschaub/xdomain/tests/Lang.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Lang.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Lang.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../lib/OpenLayers.js"></script>
+    <script src="OLLoader.js"></script>
     <script src="../lib/OpenLayers/Lang/en-CA.js" type="text/javascript"></script>
     <script src="../lib/OpenLayers/Lang/fr.js" type="text/javascript"></script>
     <script type="text/javascript">

Modified: sandbox/tschaub/xdomain/tests/Layer/ArcGIS93Rest.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/ArcGIS93Rest.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/ArcGIS93Rest.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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." );

Modified: sandbox/tschaub/xdomain/tests/Layer/ArcIMS.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/ArcIMS.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/ArcIMS.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Layer/Bing.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/Bing.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/Bing.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Layer/EventPane.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/EventPane.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/EventPane.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Layer/FixedZoomLevels.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/FixedZoomLevels.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/FixedZoomLevels.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var layer; 
 

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

Modified: sandbox/tschaub/xdomain/tests/Layer/Google.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/Google.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/Google.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -4,7 +4,7 @@
     <!-- this gmaps key generated for http://openlayers.org/dev/ -->
     <script src='http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAA9XNhd8q0UdwNC7YSO4YZghSPUCi5aRYVveCcVYxzezM4iaj_gxQ9t-UajFL70jfcpquH5l1IJ-Zyyw'></script>
     <script type="text/javascript">window.alert = oldAlert;</script>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     var layer; 
     var validkey = (window.location.protocol == "file:") ||

Modified: sandbox/tschaub/xdomain/tests/Layer/Grid.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/Grid.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/Grid.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Layer/HTTPRequest.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/HTTPRequest.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/HTTPRequest.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var layer; 
 

Modified: sandbox/tschaub/xdomain/tests/Layer/Image.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/Image.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/Image.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Layer/KaMap.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/KaMap.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/KaMap.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Layer/MapGuide.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/MapGuide.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/MapGuide.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Layer/MapServer.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/MapServer.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/MapServer.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Layer/Markers.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/Markers.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/Markers.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var layer; 
 

Modified: sandbox/tschaub/xdomain/tests/Layer/MultiMap.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/MultiMap.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/MultiMap.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -2,7 +2,7 @@
 <head>
   <!-- multimap api key for http://(www.)openlayers.org -->
   <script type="text/javascript" src="http://developer.multimap.com/API/maps/1.2/OA10072915821139765"></script>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var doTest = true;
     function test_Layer_MultiMap_constructor (t) {

Modified: sandbox/tschaub/xdomain/tests/Layer/PointTrack.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/PointTrack.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/PointTrack.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
   <script type="text/javascript">
   
     var name = "PointTrack Layer";

Modified: sandbox/tschaub/xdomain/tests/Layer/SphericalMercator.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/SphericalMercator.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/SphericalMercator.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Layer/TMS.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/TMS.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/TMS.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Layer/Text.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/Text.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/Text.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Layer/TileCache.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/TileCache.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/TileCache.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
 

Modified: sandbox/tschaub/xdomain/tests/Layer/Vector/RootContainer.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/Vector/RootContainer.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/Vector/RootContainer.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../../lib/OpenLayers.js"></script>
+  <script src="../../OLLoader.js"></script>
   <script type="text/javascript">
     var layer, map; 
 

Modified: sandbox/tschaub/xdomain/tests/Layer/Vector.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/Vector.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/Vector.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Layer/WFS.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/WFS.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/WFS.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     var name = "Vector Layer";

Modified: sandbox/tschaub/xdomain/tests/Layer/WMS/Post.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/WMS/Post.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/WMS/Post.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var isOpera   = (navigator.userAgent.indexOf("Opera") != -1);

Modified: sandbox/tschaub/xdomain/tests/Layer/WMS.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/WMS.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/WMS.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Layer/WMTS.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/WMTS.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/WMTS.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
     <head>
-        <script src="../../lib/OpenLayers.js"></script>
+        <script src="../OLLoader.js"></script>
         <script type="text/javascript">    
 
             function test_constructor(t) {

Modified: sandbox/tschaub/xdomain/tests/Layer/WrapDateLine.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/WrapDateLine.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/WrapDateLine.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Layer/XYZ.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/XYZ.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/XYZ.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Layer/Yahoo.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer/Yahoo.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer/Yahoo.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,7 +1,7 @@
 <html>
 <head>
   <script src="http://api.maps.yahoo.com/ajaxymap?v=3.0&appid=euzuro-openlayers"></script>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var layer; 
 

Modified: sandbox/tschaub/xdomain/tests/Layer.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Layer.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Layer.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
     var layer; 
 

Modified: sandbox/tschaub/xdomain/tests/Map.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Map.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Map.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Marker/Box.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Marker/Box.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Marker/Box.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Marker.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Marker.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Marker.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     var marker;

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

Modified: sandbox/tschaub/xdomain/tests/OpenLayers4.html
===================================================================
--- sandbox/tschaub/xdomain/tests/OpenLayers4.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/OpenLayers4.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/OpenLayersJsFiles.html (from rev 11673, trunk/openlayers/tests/OpenLayersJsFiles.html)
===================================================================
--- sandbox/tschaub/xdomain/tests/OpenLayersJsFiles.html	                        (rev 0)
+++ sandbox/tschaub/xdomain/tests/OpenLayersJsFiles.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -0,0 +1,27 @@
+<html>
+<head>
+    <script type="text/javascript">
+        window.OpenLayers = new Array(
+            "OpenLayers/Util.js",
+            "OpenLayers/BaseTypes.js"
+        );
+    </script>
+    <script src="../lib/OpenLayers.js"></script>
+    <script type="text/javascript">
+        function test_OpenLayers(t) {
+            t.plan(1);
+            var s = document.getElementsByTagName("script");
+            var src, count = 0;
+            for(var i=0, len=s.length; i<len; i++) {
+                src = s[i].getAttribute('src');
+                if(src) {
+                    count++;
+                }
+            }
+            t.eq(count, 3, "Three OpenLayers scripts loaded.");
+        }
+    </script>
+</head>
+<body>
+</body>
+</html>

Modified: sandbox/tschaub/xdomain/tests/Popup/Anchored.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Popup/Anchored.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Popup/Anchored.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Popup/AnchoredBubble.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Popup/AnchoredBubble.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Popup/AnchoredBubble.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
    function test_Popup_Anchored_setOpacity(t) { 

Modified: sandbox/tschaub/xdomain/tests/Popup/FramedCloud.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Popup/FramedCloud.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Popup/FramedCloud.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
    function test_Popup_FramedCloud_setHTML(t) { 

Modified: sandbox/tschaub/xdomain/tests/Popup.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Popup.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Popup.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Projection.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Projection.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Projection.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Protocol/HTTP.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Protocol/HTTP.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Protocol/HTTP.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Protocol/SOS.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Protocol/SOS.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Protocol/SOS.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_constructor(t) {

Modified: sandbox/tschaub/xdomain/tests/Protocol/SQL/Gears.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Protocol/SQL/Gears.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Protocol/SQL/Gears.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../../lib/OpenLayers.js"></script>
+  <script src="../../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/xdomain/tests/Protocol/SQL.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Protocol/SQL.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Protocol/SQL.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Protocol/SimpleFilterSerializer.html (from rev 11673, trunk/openlayers/tests/Protocol/SimpleFilterSerializer.html)
===================================================================
--- sandbox/tschaub/xdomain/tests/Protocol/SimpleFilterSerializer.html	                        (rev 0)
+++ sandbox/tschaub/xdomain/tests/Protocol/SimpleFilterSerializer.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Protocol/WFS.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Protocol/WFS.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Protocol/WFS.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Protocol.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Protocol.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Protocol.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/xdomain/tests/Renderer/Canvas.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Renderer/Canvas.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Renderer/Canvas.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Renderer/Elements.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Renderer/Elements.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Renderer/Elements.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Renderer/SVG.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Renderer/SVG.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Renderer/SVG.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Renderer/SVG2.html (from rev 11673, trunk/openlayers/tests/Renderer/SVG2.html)
===================================================================
--- sandbox/tschaub/xdomain/tests/Renderer/SVG2.html	                        (rev 0)
+++ sandbox/tschaub/xdomain/tests/Renderer/SVG2.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Renderer/VML.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Renderer/VML.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Renderer/VML.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Renderer.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Renderer.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Renderer.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<script src="../lib/OpenLayers.js"></script>
+<script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_Renderer_constructor(t) {

Modified: sandbox/tschaub/xdomain/tests/Request/XMLHttpRequest.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Request/XMLHttpRequest.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Request/XMLHttpRequest.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Request.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Request.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Request.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Rule.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Rule.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Rule.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../lib/OpenLayers.js"></script> 
+    <script src="OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_Rule_constructor(t) { 

Modified: sandbox/tschaub/xdomain/tests/Strategy/BBOX.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Strategy/BBOX.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Strategy/BBOX.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/Strategy/Cluster.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Strategy/Cluster.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Strategy/Cluster.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_activate(t) {

Modified: sandbox/tschaub/xdomain/tests/Strategy/Filter.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Strategy/Filter.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Strategy/Filter.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
 <script>
 
 var features = [];

Modified: sandbox/tschaub/xdomain/tests/Strategy/Fixed.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Strategy/Fixed.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Strategy/Fixed.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_activate(t) {

Modified: sandbox/tschaub/xdomain/tests/Strategy/Paging.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Strategy/Paging.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Strategy/Paging.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_activate(t) {

Modified: sandbox/tschaub/xdomain/tests/Strategy/Refresh.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Strategy/Refresh.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Strategy/Refresh.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     var interval = 5000;

Modified: sandbox/tschaub/xdomain/tests/Strategy/Save.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Strategy/Save.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Strategy/Save.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
   
     function test_initialize(t) {

Modified: sandbox/tschaub/xdomain/tests/Strategy.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Strategy.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Strategy.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_initialize(t) {

Modified: sandbox/tschaub/xdomain/tests/Style.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Style.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Style.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../lib/OpenLayers.js"></script> 
+    <script src="OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_Style_constructor(t) { 

Modified: sandbox/tschaub/xdomain/tests/Style2.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Style2.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Style2.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../lib/OpenLayers.js"></script> 
+    <script src="OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

Modified: sandbox/tschaub/xdomain/tests/StyleMap.html
===================================================================
--- sandbox/tschaub/xdomain/tests/StyleMap.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/StyleMap.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../lib/OpenLayers.js"></script> 
+    <script src="OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_StyleMap_constructor(t) { 

Modified: sandbox/tschaub/xdomain/tests/Symbolizer/Line.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Symbolizer/Line.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Symbolizer/Line.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

Modified: sandbox/tschaub/xdomain/tests/Symbolizer/Point.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Symbolizer/Point.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Symbolizer/Point.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

Modified: sandbox/tschaub/xdomain/tests/Symbolizer/Polygon.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Symbolizer/Polygon.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Symbolizer/Polygon.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

Modified: sandbox/tschaub/xdomain/tests/Symbolizer/Raster.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Symbolizer/Raster.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Symbolizer/Raster.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

Modified: sandbox/tschaub/xdomain/tests/Symbolizer/Text.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Symbolizer/Text.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Symbolizer/Text.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

Modified: sandbox/tschaub/xdomain/tests/Symbolizer.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Symbolizer.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Symbolizer.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../lib/OpenLayers.js"></script> 
+    <script src="OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_constructor(t) { 

Modified: sandbox/tschaub/xdomain/tests/Tile/Image/IFrame.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Tile/Image/IFrame.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Tile/Image/IFrame.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var isOpera   = (navigator.userAgent.indexOf("Opera") != -1);

Modified: sandbox/tschaub/xdomain/tests/Tile/Image.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Tile/Image.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Tile/Image.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
     var tile; 

Modified: sandbox/tschaub/xdomain/tests/Tile/WFS.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Tile/WFS.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Tile/WFS.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var tile; 
     

Modified: sandbox/tschaub/xdomain/tests/Tile.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Tile.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Tile.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
     var tile; 
     

Modified: sandbox/tschaub/xdomain/tests/Tween.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Tween.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Tween.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../lib/OpenLayers.js"></script> 
+    <script src="OLLoader.js"></script> 
     <script type="text/javascript">
 
     function test_Tween_constructor(t) { 

Modified: sandbox/tschaub/xdomain/tests/Util.html
===================================================================
--- sandbox/tschaub/xdomain/tests/Util.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/Util.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/list-tests.html
===================================================================
--- sandbox/tschaub/xdomain/tests/list-tests.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/list-tests.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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>
@@ -53,6 +57,7 @@
     <li>Format/Atom.html</li>
     <li>Format/ArcXML.html</li>
     <li>Format/ArcXML/Features.html</li>
+    <li>Format/CQL.html</li>
     <li>Format/GeoJSON.html</li>
     <li>Format/GeoRSS.html</li>
     <li>Format/GML.html</li>
@@ -111,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>
@@ -162,6 +169,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,7 @@
     <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 +187,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 +214,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/tschaub/xdomain/tests/node.js/mockdom.js
===================================================================
--- trunk/openlayers/tests/node.js/mockdom.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/node.js/mockdom.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/node.js/mockdom.js (from rev 11673, trunk/openlayers/tests/node.js/mockdom.js)
===================================================================
--- sandbox/tschaub/xdomain/tests/node.js/mockdom.js	                        (rev 0)
+++ sandbox/tschaub/xdomain/tests/node.js/mockdom.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/node.js/node-tests.cfg
===================================================================
--- trunk/openlayers/tests/node.js/node-tests.cfg	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/node.js/node-tests.cfg	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/node.js/node-tests.cfg (from rev 11673, trunk/openlayers/tests/node.js/node-tests.cfg)
===================================================================
--- sandbox/tschaub/xdomain/tests/node.js/node-tests.cfg	                        (rev 0)
+++ sandbox/tschaub/xdomain/tests/node.js/node-tests.cfg	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/node.js/node.js
===================================================================
--- trunk/openlayers/tests/node.js/node.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/node.js/node.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -1 +0,0 @@
-exports.OpenLayers = OpenLayers;

Copied: sandbox/tschaub/xdomain/tests/node.js/node.js (from rev 11673, trunk/openlayers/tests/node.js/node.js)
===================================================================
--- sandbox/tschaub/xdomain/tests/node.js/node.js	                        (rev 0)
+++ sandbox/tschaub/xdomain/tests/node.js/node.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -0,0 +1 @@
+exports.OpenLayers = OpenLayers;

Deleted: sandbox/tschaub/xdomain/tests/node.js/run-test.js
===================================================================
--- trunk/openlayers/tests/node.js/run-test.js	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/node.js/run-test.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/node.js/run-test.js (from rev 11673, trunk/openlayers/tests/node.js/run-test.js)
===================================================================
--- sandbox/tschaub/xdomain/tests/node.js/run-test.js	                        (rev 0)
+++ sandbox/tschaub/xdomain/tests/node.js/run-test.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/node.js/run.sh
===================================================================
--- trunk/openlayers/tests/node.js/run.sh	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/node.js/run.sh	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/node.js/run.sh (from rev 11673, trunk/openlayers/tests/node.js/run.sh)
===================================================================
--- sandbox/tschaub/xdomain/tests/node.js/run.sh	                        (rev 0)
+++ sandbox/tschaub/xdomain/tests/node.js/run.sh	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/run-tests.html
===================================================================
--- sandbox/tschaub/xdomain/tests/run-tests.html	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tests/run-tests.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/speed/vector-renderers.html (from rev 11673, trunk/openlayers/tests/speed/vector-renderers.html)
===================================================================
--- sandbox/tschaub/xdomain/tests/speed/vector-renderers.html	                        (rev 0)
+++ sandbox/tschaub/xdomain/tests/speed/vector-renderers.html	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tests/speed/vector-renderers.js (from rev 11673, trunk/openlayers/tests/speed/vector-renderers.js)
===================================================================
--- sandbox/tschaub/xdomain/tests/speed/vector-renderers.js	                        (rev 0)
+++ sandbox/tschaub/xdomain/tests/speed/vector-renderers.js	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/theme/default/img/add_point_off.png
===================================================================
(Binary files differ)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Modified: sandbox/tschaub/xdomain/theme/default/style.css
===================================================================
--- sandbox/tschaub/xdomain/theme/default/style.css	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/theme/default/style.css	2011-03-08 16:09:24 UTC (rev 11674)
@@ -93,11 +93,13 @@
 .olControlOverviewMapMinimizeButton {
     right: 0px;
     bottom: 80px;
+    cursor: pointer;
 }    
 
 .olControlOverviewMapMaximizeButton {
     right: 0px;
     bottom: 80px;
+    cursor: pointer;
 }
 
 .olControlOverviewMapExtentRectangle {
@@ -402,6 +404,7 @@
 .olControlLayerSwitcher .minimizeDiv {
     top: 5px;
     right: 0px;
+    cursor: pointer;
 }
 
 .olBingAttribution {


Property changes on: sandbox/tschaub/xdomain/tools
___________________________________________________________________
Modified: svn:ignore
   - *.pyc

   + *.pyc
closure-compiler.jar



Copied: sandbox/tschaub/xdomain/tools/closure.py (from rev 11673, trunk/openlayers/tools/closure.py)
===================================================================
--- sandbox/tschaub/xdomain/tools/closure.py	                        (rev 0)
+++ sandbox/tschaub/xdomain/tools/closure.py	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tools/closure_ws.py (from rev 11673, trunk/openlayers/tools/closure_ws.py)
===================================================================
--- sandbox/tschaub/xdomain/tools/closure_ws.py	                        (rev 0)
+++ sandbox/tschaub/xdomain/tools/closure_ws.py	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tools/exampleparser.py
===================================================================
--- sandbox/tschaub/xdomain/tools/exampleparser.py	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tools/exampleparser.py	2011-03-08 16:09:24 UTC (rev 11674)
@@ -20,7 +20,14 @@
 
 missing_deps = False
 try:
-    import simplejson
+    import json
+except ImportError:
+    try:
+        import simplejson as json
+    except ImportError, E:
+        missing_deps = E 
+    
+try:
     from BeautifulSoup import BeautifulSoup
 except ImportError, E:
     missing_deps = E 
@@ -196,7 +203,7 @@
 if __name__ == "__main__":
 
     if missing_deps:
-        print "This script requires simplejson and BeautifulSoup. You don't have them. \n(%s)" % E
+        print "This script requires json or simplejson and BeautifulSoup. You don't have them. \n(%s)" % E
         sys.exit()
     
     if len(sys.argv) > 1:
@@ -237,7 +244,7 @@
     
     index = wordIndex(exampleList)
 
-    json = simplejson.dumps({"examples": exampleList, "index": index})
+    json = json.dumps({"examples": exampleList, "index": index})
     #give the json a global variable we can use in our js.  This should be replaced or made optional.
     json = 'var info=' + json 
     outFile.write(json)

Modified: sandbox/tschaub/xdomain/tools/release.sh
===================================================================
--- sandbox/tschaub/xdomain/tools/release.sh	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tools/release.sh	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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/tschaub/xdomain/tools/update_dev_dir.sh
===================================================================
--- sandbox/tschaub/xdomain/tools/update_dev_dir.sh	2011-03-08 15:45:18 UTC (rev 11673)
+++ sandbox/tschaub/xdomain/tools/update_dev_dir.sh	2011-03-08 16:09:24 UTC (rev 11674)
@@ -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