[OpenLayers-Commits] r11589 - in sandbox/ahocevar/renderer-ng: . build doc examples examples/img img lib lib/Firebug lib/OpenLayers lib/OpenLayers/BaseTypes lib/OpenLayers/Control lib/OpenLayers/Feature lib/OpenLayers/Filter lib/OpenLayers/Format lib/OpenLayers/Format/ArcXML lib/OpenLayers/Format/CSWGetDomain lib/OpenLayers/Format/CSWGetRecords lib/OpenLayers/Format/Filter lib/OpenLayers/Format/GML lib/OpenLayers/Format/OWSCommon lib/OpenLayers/Format/OWSContext lib/OpenLayers/Format/SLD lib/OpenLayers/Format/SOSCapabilities lib/OpenLayers/Format/WFSCapabilities lib/OpenLayers/Format/WFST lib/OpenLayers/Format/WMC lib/OpenLayers/Format/WMSCapabilities lib/OpenLayers/Format/WMSDescribeLayer lib/OpenLayers/Format/WMTSCapabilities lib/OpenLayers/Geometry lib/OpenLayers/Handler lib/OpenLayers/Lang lib/OpenLayers/Layer lib/OpenLayers/Layer/Google lib/OpenLayers/Layer/MapServer lib/OpenLayers/Layer/Vector lib/OpenLayers/Layer/WMS lib/OpenLayers/Marker lib/OpenLayers/Popup lib/OpenLayers/Protoc ol lib/OpenLayers/Protocol/SOS lib/OpenLayers/Protocol/SQL lib/OpenLayers/Protocol/WFS lib/OpenLayers/Renderer lib/OpenLayers/Strategy lib/OpenLayers/Symbolizer lib/OpenLayers/Tile lib/OpenLayers/Tile/Image lib/Rico tests tests/BaseTypes tests/Control tests/Feature tests/Filter tests/Format tests/Format/ArcXML tests/Format/CSWGetDomain tests/Format/CSWGetRecords tests/Format/Filter tests/Format/GML tests/Format/OWSContext tests/Format/SLD tests/Format/SOSCapabilities tests/Format/WFSCapabilities tests/Format/WFST tests/Format/WMC tests/Format/WMSCapabilities tests/Format/WMTSCapabilities tests/Geometry tests/Handler tests/Layer tests/Layer/Google tests/Layer/Vector tests/Layer/WMS tests/Marker tests/Popup tests/Protocol tests/Protocol/SQL tests/Renderer tests/Request tests/Strategy tests/Symbolizer tests/Tile tests/Tile/Image tests/node.js theme/default theme/default/img tools

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Mon Feb 28 17:02:52 EST 2011


Author: ahocevar
Date: 2011-02-28 14:02:50 -0800 (Mon, 28 Feb 2011)
New Revision: 11589

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


Property changes on: sandbox/ahocevar/renderer-ng
___________________________________________________________________
Modified: svn:mergeinfo
   - /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:10635-10646,10648-10676,10678-10685,10687-10692,10694-10991
   + /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:10635-10646,10648-10676,10678-10685,10687-10692,10694-10991,10995-11588

Modified: sandbox/ahocevar/renderer-ng/build/README.txt
===================================================================
--- sandbox/ahocevar/renderer-ng/build/README.txt	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/build/README.txt	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/build/build.py
===================================================================
--- sandbox/ahocevar/renderer-ng/build/build.py	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/build/build.py	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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"

Modified: sandbox/ahocevar/renderer-ng/build/full.cfg
===================================================================
--- sandbox/ahocevar/renderer-ng/build/full.cfg	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/build/full.cfg	2011-02-28 22:02:50 UTC (rev 11589)
@@ -2,11 +2,6 @@
 # like Renderers and Formats.
 
 [first]
-OpenLayers/SingleFile.js
-OpenLayers/BaseTypes.js
-OpenLayers/BaseTypes/Class.js
-OpenLayers/Util.js
-Rico/Corner.js
 
 [last]
 

Modified: sandbox/ahocevar/renderer-ng/build/library.cfg
===================================================================
--- sandbox/ahocevar/renderer-ng/build/library.cfg	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/build/library.cfg	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,13 +1,7 @@
 # This file includes the OpenLayers code to create a build for everything that 
-# does not require vector support. build.py uses this profile if no other one
-# is specified.
+# does not require vector support.
 
 [first]
-OpenLayers/SingleFile.js
-OpenLayers/BaseTypes.js
-OpenLayers/BaseTypes/Class.js
-OpenLayers/Util.js
-Rico/Corner.js
 
 [last]
 

Modified: sandbox/ahocevar/renderer-ng/build/license.txt
===================================================================
--- sandbox/ahocevar/renderer-ng/build/license.txt	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/build/license.txt	2011-02-28 22:02:50 UTC (rev 11589)
@@ -2,7 +2,7 @@
 
   OpenLayers.js -- OpenLayers Map Viewer Library
 
-  Copyright 2005-2010 OpenLayers Contributors, released under the Clear BSD
+  Copyright 2005-2011 OpenLayers Contributors, released under the Clear BSD
   license. Please see http://svn.openlayers.org/trunk/openlayers/license.txt
   for the full text of the license.
 

Modified: sandbox/ahocevar/renderer-ng/build/lite.cfg
===================================================================
--- sandbox/ahocevar/renderer-ng/build/lite.cfg	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/build/lite.cfg	2011-02-28 22:02:50 UTC (rev 11589)
@@ -5,10 +5,6 @@
 # Web Mapping BOF.
 
 [first]
-OpenLayers/SingleFile.js
-OpenLayers/BaseTypes.js
-OpenLayers/BaseTypes/Class.js
-OpenLayers/Util.js
 
 [last]
 

Added: sandbox/ahocevar/renderer-ng/build/mobile.cfg
===================================================================
--- sandbox/ahocevar/renderer-ng/build/mobile.cfg	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/build/mobile.cfg	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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]
+
+

Added: sandbox/ahocevar/renderer-ng/build/tests.cfg
===================================================================
--- sandbox/ahocevar/renderer-ng/build/tests.cfg	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/build/tests.cfg	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/doc/authors.txt
===================================================================
--- sandbox/ahocevar/renderer-ng/doc/authors.txt	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/doc/authors.txt	2011-02-28 22:02:50 UTC (rev 11589)
@@ -15,6 +15,7 @@
 John Frank
 Sean Gilles
 Pierre Giraud
+Ivan Grcic
 Andreas Hocevar
 Ian Johnson
 Eric Lemoine

Modified: sandbox/ahocevar/renderer-ng/examples/GMLParser.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/GMLParser.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/GMLParser.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/KMLParser.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/KMLParser.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/KMLParser.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/SLDSelect.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/SLDSelect.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/SLDSelect.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/WMSDescribeLayerParser.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/WMSDescribeLayerParser.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/WMSDescribeLayerParser.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/WMSPost.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/WMSPost.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/WMSPost.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/accelerometer.html (from rev 11588, trunk/openlayers/examples/accelerometer.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/accelerometer.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/accelerometer.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/accessible.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/accessible.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/accessible.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/all-overlays-google.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/all-overlays-google.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/all-overlays-google.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/all-overlays.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/all-overlays.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/all-overlays.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/anchor-permalink.html (from rev 11588, trunk/openlayers/examples/anchor-permalink.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/anchor-permalink.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/anchor-permalink.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/anchor-permalink.js (from rev 11588, trunk/openlayers/examples/anchor-permalink.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/anchor-permalink.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/anchor-permalink.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/animated_panning.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/animated_panning.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/animated_panning.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/arcgis93rest.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/arcgis93rest.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/arcgis93rest.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/arcims-thematic.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/arcims-thematic.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/arcims-thematic.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/arcims.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/arcims.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/arcims.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/attribution.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/attribution.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/attribution.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/baseLayers.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/baseLayers.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/baseLayers.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/behavior-fixed-http-gml.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/behavior-fixed-http-gml.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/behavior-fixed-http-gml.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/bing-tiles.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/bing-tiles.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/bing-tiles.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/bing-tiles.js
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/bing-tiles.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/bing-tiles.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -6,7 +6,10 @@
 
 var road = new OpenLayers.Layer.Bing({
     key: apiKey,
-    type: "Road"
+    type: "Road",
+    // custom metadata parameter to request the new map style - only useful
+    // before May 1st, 2011
+    metadataParams: {mapVersion: "v1"}
 });
 var aerial = new OpenLayers.Layer.Bing({
     key: apiKey,

Modified: sandbox/ahocevar/renderer-ng/examples/bing.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/bing.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/bing.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/boxes-vector.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/boxes-vector.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/boxes-vector.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/boxes.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/boxes.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/boxes.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/browser-name.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/browser-name.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/browser-name.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/browser.html (from rev 11588, trunk/openlayers/examples/browser.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/browser.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/browser.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/browser.js (from rev 11588, trunk/openlayers/examples/browser.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/browser.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/browser.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/buffer.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/buffer.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/buffer.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/canvas.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/canvas.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/canvas.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/canvas.js
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/canvas.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/canvas.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/click-handler.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/click-handler.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/click-handler.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/click.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/click.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/click.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/controls.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/controls.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/controls.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/cql-format.html (from rev 11588, trunk/openlayers/examples/cql-format.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/cql-format.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/cql-format.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/cql-format.js (from rev 11588, trunk/openlayers/examples/cql-format.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/cql-format.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/cql-format.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/custom-control-point.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/custom-control-point.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/custom-control-point.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/custom-control.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/custom-control.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/custom-control.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/custom-style.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/custom-style.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/custom-style.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/debug.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/debug.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/debug.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/document-drag.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/document-drag.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/document-drag.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/donut.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/donut.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/donut.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/doubleSetCenter.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/doubleSetCenter.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/doubleSetCenter.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/drag-feature.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/drag-feature.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/drag-feature.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/draw-feature.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/draw-feature.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/draw-feature.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/dynamic-text-layer.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/dynamic-text-layer.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/dynamic-text-layer.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/editingtoolbar-outside.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/editingtoolbar-outside.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/editingtoolbar-outside.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/editingtoolbar.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/editingtoolbar.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/editingtoolbar.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/events.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/events.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/events.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/example-list.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/example-list.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/example-list.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/example.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/example.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/example.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/filter-strategy.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/filter-strategy.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/filter-strategy.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/filter.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/filter.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/filter.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/fractional-zoom.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/fractional-zoom.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/fractional-zoom.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/fullScreen.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/fullScreen.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/fullScreen.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/fullScreen.js (from rev 11588, trunk/openlayers/examples/fullScreen.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/fullScreen.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/fullScreen.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/game-accel-ball.html (from rev 11588, trunk/openlayers/examples/game-accel-ball.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/game-accel-ball.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/game-accel-ball.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/geojson.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/geojson.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/geojson.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/geolocation.html (from rev 11588, trunk/openlayers/examples/geolocation.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/geolocation.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/geolocation.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/geolocation.js (from rev 11588, trunk/openlayers/examples/geolocation.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/geolocation.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/geolocation.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -0,0 +1,103 @@
+var style = {
+    fillColor: '#000',
+    fillOpacity: 0.1,
+    strokeWidth: 0
+}
+
+var map = new OpenLayers.Map('map');
+var layer = new OpenLayers.Layer.OSM( "Simple OSM Map");
+var vector = new OpenLayers.Layer.Vector('vector');
+map.addLayers([layer, vector]);
+
+map.setCenter(
+    new OpenLayers.LonLat(-71.147, 42.472).transform(
+        new OpenLayers.Projection("EPSG:4326"),
+        map.getProjectionObject()
+    ), 12
+);
+
+var pulsate = function(feature) {
+    var point = feature.geometry.getCentroid(),
+        bounds = feature.geometry.getBounds(),
+        radius = Math.abs((bounds.right - bounds.left)/2),
+        count = 0,
+        grow = 'up';
+
+    var resize = function(){
+        if (count>16) clearInterval(window.resizeInterval);
+        var interval = radius * 0.03;
+        var ratio = interval/radius;
+        switch(count) {
+            case 4:
+            case 12:
+                grow = 'down'; break;
+            case 8:
+                grow = 'up'; break;
+        }
+        if (grow!=='up') {
+            ratio = - Math.abs(ratio);
+        }
+        feature.geometry.resize(1+ratio, point);
+        vector.drawFeature(feature);
+        count++;
+    }
+    window.resizeInterval = window.setInterval(resize, 50, point, radius);
+};
+
+var geolocate = new OpenLayers.Control.Geolocate({
+    geolocationOptions: {
+        enableHighAccuracy: false,
+        maximumAge: 0,
+        timeout: 7000
+    }
+});
+map.addControl(geolocate);
+geolocate.events.register("locationupdated",this,function(e) {
+    vector.removeAllFeatures();
+    var circle = new OpenLayers.Feature.Vector(
+        OpenLayers.Geometry.Polygon.createRegularPolygon(
+            new OpenLayers.Geometry.Point(e.point.x, e.point.y),
+            e.position.coords.accuracy/2,
+            40,
+            0
+        ),
+        {},
+        style
+    );
+    vector.addFeatures([
+        new OpenLayers.Feature.Vector(
+            e.point,
+            {},
+            {
+                graphicName: 'cross',
+                strokeColor: '#f00',
+                strokeWidth: 2,
+                fillOpacity: 0,
+                pointRadius: 10
+            }
+        ),
+        circle
+    ]);
+    map.zoomToExtent(vector.getDataExtent());
+    pulsate(circle);
+});
+geolocate.events.register("locationfailed",this,function() {
+    OpenLayers.Console.log('Location detection failed');
+});
+
+$('locate').onclick = function() {
+    vector.removeAllFeatures();
+    geolocate.deactivate();
+    $('track').checked = false;
+    geolocate.watch = false;
+    geolocate.activate();
+};
+$('track').onclick = function() {
+    vector.removeAllFeatures();
+    geolocate.deactivate();
+    if (this.checked) {
+        geolocate.watch = true;
+        geolocate.activate();
+    }
+};
+$('track').checked = false;

Modified: sandbox/ahocevar/renderer-ng/examples/georss-flickr.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/georss-flickr.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/georss-flickr.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/georss-markers.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/georss-markers.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/georss-markers.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/georss.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/georss.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/georss.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/getfeature-wfs.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/getfeature-wfs.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/getfeature-wfs.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/getfeatureinfo-control.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/getfeatureinfo-control.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/getfeatureinfo-control.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/getfeatureinfo-popup.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/getfeatureinfo-popup.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/getfeatureinfo-popup.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/getfeatureinfo.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/getfeatureinfo.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/getfeatureinfo.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/gml-layer.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/gml-layer.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/gml-layer.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/google-reproject.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/google-reproject.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/google-reproject.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/google-v3-alloverlays.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/google-v3-alloverlays.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/google-v3-alloverlays.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/google-v3.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/google-v3.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/google-v3.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,11 +1,13 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers Google (v3) Layer Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="../theme/default/google.css" type="text/css">
         <link rel="stylesheet" href="style.css" type="text/css">
-        <script src="http://maps.google.com/maps/api/js?v=3.2&amp;sensor=false"></script>
+        <script src="http://maps.google.com/maps/api/js?v=3.3&amp;sensor=false"></script>
         <script src="../lib/OpenLayers.js"></script>
         <script src="google-v3.js"></script>
     </head>
@@ -19,6 +21,8 @@
         </p>
         <div id="map" class="smallmap"></div>
         <div id="docs">
+            <p><input id="animate" type="checkbox" checked="checked">Animated
+                zoom (if supported by GMaps on your device)</input></p>
             <p>
                 If you use the Google Maps v3 API with a Google layer, you don't
                 need to include an API key.  This layer only works in the 

Modified: sandbox/ahocevar/renderer-ng/examples/google-v3.js
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/google-v3.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/google-v3.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -29,4 +29,12 @@
         new OpenLayers.Projection("EPSG:4326"),
         map.getProjectionObject()
     ), 5);
+    
+    // add behavior to html
+    var animate = document.getElementById("animate");
+    animate.onclick = function() {
+        for (var i=map.layers.length-1; i>=0; --i) {
+            map.layers[i].animationEnabled = this.checked;
+        }
+    };
 }

Modified: sandbox/ahocevar/renderer-ng/examples/google.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/google.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/google.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/graphic-name.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/graphic-name.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/graphic-name.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/graticule.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/graticule.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/graticule.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/gutter.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/gutter.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/gutter.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/highlight-feature.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/highlight-feature.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/highlight-feature.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/hover-handler.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/hover-handler.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/hover-handler.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/image-layer.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/image-layer.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/image-layer.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/img/check-round-green.png
===================================================================
(Binary files differ)

Copied: sandbox/ahocevar/renderer-ng/examples/img/check-round-green.png (from rev 11588, trunk/openlayers/examples/img/check-round-green.png)
===================================================================
(Binary files differ)

Deleted: sandbox/ahocevar/renderer-ng/examples/img/check-round-grey.png
===================================================================
(Binary files differ)

Copied: sandbox/ahocevar/renderer-ng/examples/img/check-round-grey.png (from rev 11588, trunk/openlayers/examples/img/check-round-grey.png)
===================================================================
(Binary files differ)

Deleted: sandbox/ahocevar/renderer-ng/examples/img/list.png
===================================================================
(Binary files differ)

Copied: sandbox/ahocevar/renderer-ng/examples/img/list.png (from rev 11588, trunk/openlayers/examples/img/list.png)
===================================================================
(Binary files differ)

Deleted: sandbox/ahocevar/renderer-ng/examples/img/locate.png
===================================================================
(Binary files differ)

Copied: sandbox/ahocevar/renderer-ng/examples/img/locate.png (from rev 11588, trunk/openlayers/examples/img/locate.png)
===================================================================
(Binary files differ)

Deleted: sandbox/ahocevar/renderer-ng/examples/img/marker_shadow.png
===================================================================
(Binary files differ)

Copied: sandbox/ahocevar/renderer-ng/examples/img/marker_shadow.png (from rev 11588, trunk/openlayers/examples/img/marker_shadow.png)
===================================================================
(Binary files differ)

Deleted: sandbox/ahocevar/renderer-ng/examples/img/minus1.png
===================================================================
(Binary files differ)

Copied: sandbox/ahocevar/renderer-ng/examples/img/minus1.png (from rev 11588, trunk/openlayers/examples/img/minus1.png)
===================================================================
(Binary files differ)

Deleted: sandbox/ahocevar/renderer-ng/examples/img/mobile-layers.png
===================================================================
(Binary files differ)

Copied: sandbox/ahocevar/renderer-ng/examples/img/mobile-layers.png (from rev 11588, trunk/openlayers/examples/img/mobile-layers.png)
===================================================================
(Binary files differ)

Deleted: sandbox/ahocevar/renderer-ng/examples/img/mobile-loc.png
===================================================================
(Binary files differ)

Copied: sandbox/ahocevar/renderer-ng/examples/img/mobile-loc.png (from rev 11588, trunk/openlayers/examples/img/mobile-loc.png)
===================================================================
(Binary files differ)

Deleted: sandbox/ahocevar/renderer-ng/examples/img/mobile-zoombar.png
===================================================================
--- trunk/openlayers/examples/img/mobile-zoombar.png	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/img/mobile-zoombar.png	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/img/mobile-zoombar.png (from rev 11588, trunk/openlayers/examples/img/mobile-zoombar.png)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/img/mobile-zoombar.png	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/img/mobile-zoombar.png	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/img/openlayers.png
===================================================================
(Binary files differ)

Copied: sandbox/ahocevar/renderer-ng/examples/img/openlayers.png (from rev 11588, trunk/openlayers/examples/img/openlayers.png)
===================================================================
(Binary files differ)

Deleted: sandbox/ahocevar/renderer-ng/examples/img/popupMatrix.jpg
===================================================================
(Binary files differ)

Copied: sandbox/ahocevar/renderer-ng/examples/img/popupMatrix.jpg (from rev 11588, trunk/openlayers/examples/img/popupMatrix.jpg)
===================================================================
(Binary files differ)

Deleted: sandbox/ahocevar/renderer-ng/examples/img/small.jpg
===================================================================
(Binary files differ)

Copied: sandbox/ahocevar/renderer-ng/examples/img/small.jpg (from rev 11588, trunk/openlayers/examples/img/small.jpg)
===================================================================
(Binary files differ)

Deleted: sandbox/ahocevar/renderer-ng/examples/img/thinlong.jpg
===================================================================
(Binary files differ)

Copied: sandbox/ahocevar/renderer-ng/examples/img/thinlong.jpg (from rev 11588, trunk/openlayers/examples/img/thinlong.jpg)
===================================================================
(Binary files differ)

Deleted: sandbox/ahocevar/renderer-ng/examples/img/widelong.jpg
===================================================================
(Binary files differ)

Copied: sandbox/ahocevar/renderer-ng/examples/img/widelong.jpg (from rev 11588, trunk/openlayers/examples/img/widelong.jpg)
===================================================================
(Binary files differ)

Deleted: sandbox/ahocevar/renderer-ng/examples/img/wideshort.jpg
===================================================================
(Binary files differ)

Copied: sandbox/ahocevar/renderer-ng/examples/img/wideshort.jpg (from rev 11588, trunk/openlayers/examples/img/wideshort.jpg)
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/examples/intersects.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/intersects.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/intersects.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/kamap.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/kamap.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/kamap.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/kinetic.html (from rev 11588, trunk/openlayers/examples/kinetic.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/kinetic.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/kinetic.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/kinetic.js (from rev 11588, trunk/openlayers/examples/kinetic.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/kinetic.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/kinetic.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/kml-layer.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/kml-layer.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/kml-layer.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/kml-track.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/kml-track.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/kml-track.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/late-render.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/late-render.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/late-render.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/layer-opacity.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/layer-opacity.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/layer-opacity.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/layerLoadMonitoring.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/layerLoadMonitoring.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/layerLoadMonitoring.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/layerswitcher.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/layerswitcher.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/layerswitcher.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/lite.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/lite.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/lite.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/mapguide.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/mapguide.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/mapguide.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/mapserver.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/mapserver.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/mapserver.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/mapserver_untiled.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/mapserver_untiled.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/mapserver_untiled.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/marker-shadow.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/marker-shadow.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/marker-shadow.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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" />
@@ -41,7 +43,7 @@
                     styleMap: new OpenLayers.StyleMap({
                         // Set the external graphic and background graphic images.
                         externalGraphic: "../img/marker-gold.png",
-                        backgroundGraphic: "./marker_shadow.png",
+                        backgroundGraphic: "./img/marker_shadow.png",
                         
                         // Makes sure the background graphic is placed correctly relative
                         // to the external graphic.

Modified: sandbox/ahocevar/renderer-ng/examples/markerResize.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/markerResize.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/markerResize.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/marker_shadow.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/examples/markers.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/markers.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/markers.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/markersTextLayer.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/markersTextLayer.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/markersTextLayer.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/measure.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/measure.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/measure.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/mm.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/mm.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/mm.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/mobile-base.js (from rev 11588, trunk/openlayers/examples/mobile-base.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/mobile-base.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/mobile-base.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/mobile-jq.html (from rev 11588, trunk/openlayers/examples/mobile-jq.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/mobile-jq.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/mobile-jq.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/mobile-jq.js (from rev 11588, trunk/openlayers/examples/mobile-jq.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/mobile-jq.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/mobile-jq.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/mobile-navigation.html (from rev 11588, trunk/openlayers/examples/mobile-navigation.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/mobile-navigation.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/mobile-navigation.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/mobile-navigation.js (from rev 11588, trunk/openlayers/examples/mobile-navigation.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/mobile-navigation.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/mobile-navigation.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/mobile-sencha.html (from rev 11588, trunk/openlayers/examples/mobile-sencha.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/mobile-sencha.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/mobile-sencha.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/mobile-sencha.js (from rev 11588, trunk/openlayers/examples/mobile-sencha.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/mobile-sencha.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/mobile-sencha.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/mobile.html (from rev 11588, trunk/openlayers/examples/mobile.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/mobile.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/mobile.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/mobile.js (from rev 11588, trunk/openlayers/examples/mobile.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/mobile.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/mobile.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/modify-feature.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/modify-feature.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/modify-feature.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/mouse-position.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/mouse-position.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/mouse-position.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/mousewheel-interval.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/mousewheel-interval.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/mousewheel-interval.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/multimap-mercator.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/multimap-mercator.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/multimap-mercator.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/multiserver.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/multiserver.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/multiserver.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/multitouch.html (from rev 11588, trunk/openlayers/examples/multitouch.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/multitouch.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/multitouch.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -0,0 +1,22 @@
+<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();
+    });    
+    if (!(typeof box.ontouchstart != 'undefined')) { 
+        box.style.backgroundColor = "red";
+    }    
+  </script>
+  </body>
+</html>  

Modified: sandbox/ahocevar/renderer-ng/examples/mvs.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/mvs.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/mvs.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/navigation-control.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/navigation-control.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/navigation-control.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/navigation-history.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/navigation-history.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/navigation-history.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/navtoolbar-alwaysZoom.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/navtoolbar-alwaysZoom.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/navtoolbar-alwaysZoom.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 	<head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/navtoolbar-outsidemap.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/navtoolbar-outsidemap.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/navtoolbar-outsidemap.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/navtoolbar.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/navtoolbar.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/navtoolbar.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/ordering.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/ordering.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/ordering.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Z-Ordering and Y-Ordering of Vector Features</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/ahocevar/renderer-ng/examples/osm-google.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/osm-google.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/osm-google.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,11 +1,13 @@
 <!DOCTYPE html>
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>OpenLayers OSM and Google Example</title>
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css">
         <link rel="stylesheet" href="../theme/default/google.css" type="text/css">
         <link rel="stylesheet" href="style.css" type="text/css">
-        <script src="http://maps.google.com/maps/api/js?sensor=false"></script>
+        <script src="http://maps.google.com/maps/api/js?v=3.3&amp;sensor=false"></script>
         <script src="../lib/OpenLayers.js"></script>
         <script src="osm-google.js"></script>
     </head>

Modified: sandbox/ahocevar/renderer-ng/examples/osm-layer.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/osm-layer.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/osm-layer.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/osm.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/osm.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/osm.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/outOfRangeMarkers.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/outOfRangeMarkers.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/outOfRangeMarkers.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/overviewmap.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/overviewmap.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/overviewmap.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/pan-zoom-panels.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/pan-zoom-panels.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/pan-zoom-panels.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/panel.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/panel.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/panel.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/point-track-markers.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/point-track-markers.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/point-track-markers.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/popupMatrix.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/popupMatrix.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/popupMatrix.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/popupMatrix.jpg
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/examples/popups.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/popups.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/popups.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/projected-map.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/projected-map.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/projected-map.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/protocol-gears.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/protocol-gears.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/protocol-gears.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/regular-polygons.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/regular-polygons.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/regular-polygons.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/resize-features.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/resize-features.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/resize-features.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/restricted-extent.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/restricted-extent.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/restricted-extent.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers Restricted Extent Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/ahocevar/renderer-ng/examples/rotate-features.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/rotate-features.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/rotate-features.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/select-feature-multilayer.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/select-feature-multilayer.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/select-feature-multilayer.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/select-feature-openpopup.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/select-feature-openpopup.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/select-feature-openpopup.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/select-feature.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/select-feature.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/select-feature.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/setextent.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/setextent.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/setextent.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/simplify-linestring.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/simplify-linestring.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/simplify-linestring.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/single-tile.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/single-tile.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/single-tile.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/sld-parser.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/sld-parser.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/sld-parser.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/sld.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/sld.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/sld.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/small.jpg
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/examples/snap-split.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/snap-split.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/snap-split.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>Snapping & Splitting</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/ahocevar/renderer-ng/examples/snapping.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/snapping.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/snapping.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/sos.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/sos.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/sos.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,10 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
-  <head>
+  <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
+    <title>SOS Client Example</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
+    <link rel="stylesheet" href="style.css" type="text/css" />
     <style type="text/css">
     .sosmap {
         width: 768px;

Modified: sandbox/ahocevar/renderer-ng/examples/spherical-mercator.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/spherical-mercator.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/spherical-mercator.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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(-20037508, -20037508, 20037508, 20037508),
+        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/ahocevar/renderer-ng/examples/split-feature.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/split-feature.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/split-feature.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <title>Split Feature Example</title>
         
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />

Modified: sandbox/ahocevar/renderer-ng/examples/strategy-bbox.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/strategy-bbox.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/strategy-bbox.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/strategy-cluster-extended.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/strategy-cluster-extended.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/strategy-cluster-extended.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/strategy-cluster-threshold.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/strategy-cluster-threshold.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/strategy-cluster-threshold.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/strategy-cluster.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/strategy-cluster.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/strategy-cluster.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/strategy-paging.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/strategy-paging.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/strategy-paging.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/style-rules.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/style-rules.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/style-rules.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/style.css
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/style.css	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/style.css	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/style.mobile-jq.css (from rev 11588, trunk/openlayers/examples/style.mobile-jq.css)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/style.mobile-jq.css	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/style.mobile-jq.css	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/style.mobile.css (from rev 11588, trunk/openlayers/examples/style.mobile.css)
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/style.mobile.css	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/examples/style.mobile.css	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/stylemap.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/stylemap.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/stylemap.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/styles-context.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/styles-context.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/styles-context.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/styles-rotation.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/styles-rotation.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/styles-rotation.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/styles-unique.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/styles-unique.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/styles-unique.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/sundials-spherical-mercator.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/sundials-spherical-mercator.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/sundials-spherical-mercator.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/sundials.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/sundials.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/sundials.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/symbolizers-fill-stroke-graphic.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/symbolizers-fill-stroke-graphic.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/symbolizers-fill-stroke-graphic.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/teleportation.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/teleportation.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/teleportation.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/thinlong.jpg
===================================================================
(Binary files differ)

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

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

Modified: sandbox/ahocevar/renderer-ng/examples/tilecache.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/tilecache.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/tilecache.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/tms.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/tms.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/tms.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/transform-feature.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/transform-feature.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/transform-feature.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/transition.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/transition.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/transition.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/urban.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/urban.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/urban.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/ve-novibrate.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/ve-novibrate.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/ve-novibrate.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/ve.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/ve.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/ve.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/vector-features-with-text.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/vector-features-with-text.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/vector-features-with-text.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/vector-features.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/vector-features.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/vector-features.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,8 @@
 <!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
     <title>OpenLayers: Vector Features</title>
     <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
     <link rel="stylesheet" href="style.css" type="text/css" />

Modified: sandbox/ahocevar/renderer-ng/examples/vector-formats.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/vector-formats.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/vector-formats.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/web-mercator.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/web-mercator.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/web-mercator.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/wfs-filter.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/wfs-filter.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/wfs-filter.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/wfs-protocol-transactions.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/wfs-protocol-transactions.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/wfs-protocol-transactions.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/wfs-protocol.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/wfs-protocol.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/wfs-protocol.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/wfs-reprojection.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/wfs-reprojection.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/wfs-reprojection.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
+    <meta name="viewport" content="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/ahocevar/renderer-ng/examples/wfs-snap-split.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/wfs-snap-split.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/wfs-snap-split.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/wfs-states.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/wfs-states.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/wfs-states.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html>
     <head>
+    <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;" />
+    <meta name="apple-mobile-web-app-capable" content="yes" />
         <link rel="stylesheet" href="../theme/default/style.css" type="text/css" />
         <link rel="stylesheet" href="style.css" type="text/css" />
         <title>WFS: United States (GeoServer)</title>

Deleted: sandbox/ahocevar/renderer-ng/examples/widelong.jpg
===================================================================
(Binary files differ)

Deleted: sandbox/ahocevar/renderer-ng/examples/wideshort.jpg
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/examples/wmc.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/wmc.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/wmc.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/wms-long-url.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/wms-long-url.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/wms-long-url.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/wms-untiled.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/wms-untiled.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/wms-untiled.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/wms-v13.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/wms-v13.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/wms-v13.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/wms.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/wms.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/wms.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/wmst.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/wmst.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/wmst.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/wmts-capabilities.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/wmts-capabilities.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/wmts-capabilities.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/wmts-getfeatureinfo.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/wmts-getfeatureinfo.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/wmts-getfeatureinfo.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/wmts.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/wmts.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/wmts.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/worldwind.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/worldwind.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/worldwind.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/wrapDateLine.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/wrapDateLine.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/wrapDateLine.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/xhtml.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/xhtml.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/xhtml.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/xml.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/xml.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/xml.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/xyz-esri.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/xyz-esri.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/xyz-esri.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/xyz-offset.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/xyz-offset.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/xyz-offset.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/examples/yahoo.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/yahoo.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/yahoo.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/examples/zoomLevels.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/zoomLevels.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/zoomLevels.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" 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/ahocevar/renderer-ng/examples/zoomify.html
===================================================================
--- sandbox/ahocevar/renderer-ng/examples/zoomify.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/examples/zoomify.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,5 +1,7 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
+    <meta name="viewport" content="width=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/ahocevar/renderer-ng/img/cloud-popup-relative.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/drag-rectangle-off.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/drag-rectangle-on.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/east-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/layer-switcher-maximize.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/layer-switcher-minimize.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/marker-blue.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/marker-gold.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/marker-green.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/marker.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/measuring-stick-off.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/measuring-stick-on.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/north-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/panning-hand-off.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/panning-hand-on.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/slider.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/south-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/west-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/zoom-minus-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/zoom-plus-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/zoom-world-mini.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/img/zoombar.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/lib/Firebug/firebugx.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/Firebug/firebugx.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/Firebug/firebugx.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Ajax.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Ajax.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Ajax.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/Bounds.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/Bounds.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/Bounds.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Console.js
  * @requires OpenLayers/Lang.js
  */
@@ -259,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.
      */
 
@@ -559,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.
@@ -614,14 +617,15 @@
  * 
  * Parameters: 
  * str - {String}Comma-separated bounds string. (ex. <i>"5,42,10,45"</i>)
+ * reverseAxisOrder - {Boolean} Does the string use reverse axis order?
  * 
  * Returns:
  * {<OpenLayers.Bounds>} New bounds object built from the 
  *                       passed-in String.
  */
-OpenLayers.Bounds.fromString = function(str) {
+OpenLayers.Bounds.fromString = function(str, reverseAxisOrder) {
     var bounds = str.split(",");
-    return OpenLayers.Bounds.fromArray(bounds);
+    return OpenLayers.Bounds.fromArray(bounds, reverseAxisOrder);
 };
 
 /** 
@@ -631,12 +635,18 @@
  * 
  * Parameters:
  * bbox - {Array(Float)} Array of bounds values (ex. <i>[5,42,10,45]</i>)
+ * reverseAxisOrder - {Boolean} Does the array use reverse axis order?
  *
  * Returns:
  * {<OpenLayers.Bounds>} New bounds object built from the passed-in Array.
  */
-OpenLayers.Bounds.fromArray = function(bbox) {
-    return new OpenLayers.Bounds(parseFloat(bbox[0]),
+OpenLayers.Bounds.fromArray = function(bbox, reverseAxisOrder) {
+    return reverseAxisOrder === true ?
+           new OpenLayers.Bounds(parseFloat(bbox[1]),
+                                 parseFloat(bbox[0]),
+                                 parseFloat(bbox[3]),
+                                 parseFloat(bbox[2])) :
+           new OpenLayers.Bounds(parseFloat(bbox[0]),
                                  parseFloat(bbox[1]),
                                  parseFloat(bbox[2]),
                                  parseFloat(bbox[3]));

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/Class.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/Class.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/Class.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/SingleFile.js
+ */
+
+/**
  * Constructor: OpenLayers.Class
  * Base class used to construct all other classes. Includes support for 
  *     multiple inheritance. 
@@ -106,3 +110,50 @@
        OpenLayers.Util.extend(C.prototype, o);
    }
 };
+
+/**
+ * APIFunction: extend
+ * Copy all properties of a source object to a destination object.  Modifies
+ *     the passed in destination object.  Any properties on the source object
+ *     that are set to undefined will not be (re)set on the destination object.
+ *
+ * Parameters:
+ * destination - {Object} The object that will be modified
+ * source - {Object} The object with properties to be set on the destination
+ *
+ * Returns:
+ * {Object} The destination object.
+ */
+OpenLayers.Util = OpenLayers.Util || {};
+OpenLayers.Util.extend = function(destination, source) {
+    destination = destination || {};
+    if (source) {
+        for (var property in source) {
+            var value = source[property];
+            if (value !== undefined) {
+                destination[property] = value;
+            }
+        }
+
+        /**
+         * IE doesn't include the toString property when iterating over an object's
+         * properties with the for(property in object) syntax.  Explicitly check if
+         * the source has its own toString property.
+         */
+
+        /*
+         * FF/Windows < 2.0.0.13 reports "Illegal operation on WrappedNative
+         * prototype object" when calling hawOwnProperty if the source object
+         * is an instance of window.Event.
+         */
+
+        var sourceIsEvt = typeof window.Event == "function"
+                          && source instanceof window.Event;
+
+        if (!sourceIsEvt
+           && source.hasOwnProperty && source.hasOwnProperty("toString")) {
+            destination.toString = source.toString;
+        }
+    }
+    return destination;
+};

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/Element.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/Element.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/Element.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,14 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/Util.js
+ * @requires OpenLayers/BaseTypes.js
+ */
+
+/**
  * Namespace: OpenLayers.Element
  */
 OpenLayers.Element = {
@@ -40,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) {
@@ -56,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/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/LonLat.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/LonLat.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/LonLat.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Console.js
  * @requires OpenLayers/Lang.js
  */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/Pixel.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/Pixel.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/Pixel.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Console.js
  * @requires OpenLayers/Lang.js
  */
@@ -85,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/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/Size.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/Size.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes/Size.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
+ */
+
+/**
  * Class: OpenLayers.Size
  * Instances of this class represent a width/height pair
  */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/BaseTypes.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,15 +1,9 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
- * @requires OpenLayers/BaseTypes/Class.js
- * @requires OpenLayers/BaseTypes/LonLat.js
- * @requires OpenLayers/BaseTypes/Size.js
- * @requires OpenLayers/BaseTypes/Pixel.js
- * @requires OpenLayers/BaseTypes/Bounds.js
- * @requires OpenLayers/BaseTypes/Element.js
  * @requires OpenLayers/Lang.js
  * @requires OpenLayers/Console.js
  */
@@ -31,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.
@@ -210,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.
@@ -464,7 +458,17 @@
      */
     True : function() {
         return true;
-    }
+    },
+    
+    /**
+     * APIFunction: Void
+     * A reusable function that returns ``undefined``.
+     *
+     * Returns:
+     * {undefined}
+     */
+    Void: function() {}
+
 };
 
 if (!Function.prototype.bind) {
@@ -628,9 +632,11 @@
      * APIMethod: parse
      * Generate a date object from a string.  The format for the string follows
      *     the profile of ISO 8601 for date and time on the Internet (see 
-     *     http://tools.ietf.org/html/rfc3339).  If the parse method on 
-     *     the Date constructor returns a valid date for the given string,
-     *     that method is used.
+     *     http://tools.ietf.org/html/rfc3339).  We don't call the native
+     *     Date.parse because of inconsistency between implmentations.  In 
+     *     Chrome, calling Date.parse with a string that doesn't contain any
+     *     indication of the timezone (e.g. "2011"), the date is interpreted
+     *     in local time.  On Firefox, the assumption is UTC.
      *
      * Parameters:
      * str - {String} A string representing the date (e.g. 
@@ -643,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/ahocevar/renderer-ng/lib/OpenLayers/Console.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Console.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Console.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
+ */
+
+/**
  * Namespace: OpenLayers.Console
  * The OpenLayers.Console namespace is used for debugging and error logging.
  * If the Firebug Lite (../Firebug/firebug.js) is included before this script,
@@ -97,7 +101,7 @@
      * Expects a single error message
      * 
      * Parameters:
-     * object - {Object}
+     * error - {Object}
      */
     userError: function(error) {
         alert(error);

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ArgParser.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ArgParser.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ArgParser.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -64,6 +64,22 @@
         OpenLayers.Control.prototype.initialize.apply(this, arguments);
     },
 
+    getParameters: function(url) {
+        url = url || window.location.href;
+        var parameters = OpenLayers.Util.getParameters(url);
+
+        // If we have an chchor in the url use it to split the url
+        var index = url.indexOf('#');
+        if (index > 0) {
+            // create an url to parce on the getParameters
+            url = '?' + url.substring(index + 1, url.length);
+
+            OpenLayers.Util.extend(parameters,
+                    OpenLayers.Util.getParameters(url));
+        }
+        return parameters;
+    },
+    
     /**
      * Method: setMap
      * Set the map property for the control. 
@@ -92,7 +108,7 @@
         }
         if (i == this.map.controls.length) {
 
-            var args = OpenLayers.Util.getParameters();
+            var args = this.getParameters();
             // Be careful to set layer first, to not trigger unnecessary layer loads
             if (args.layers) {
                 this.layers = args.layers;

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Attribution.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Attribution.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Attribution.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Button.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Button.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Button.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/DragFeature.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/DragFeature.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/DragFeature.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -66,6 +66,28 @@
     onComplete: function(feature, pixel) {},
 
     /**
+     * APIProperty: onEnter
+     * {Function} Define this function if you want to know when the mouse
+     *     goes over a feature and thereby makes this feature a candidate
+     *     for dragging.
+     *
+     * Parameters:
+     * feature - {<OpenLayers.Feature.Vector>} The feature that is ready
+     *     to be dragged.
+     */
+    onEnter: function(feature) {},
+
+    /**
+     * APIProperty: onLeave
+     * {Function} Define this function if you want to know when the mouse
+     *     goes out of the feature that was dragged.
+     *
+     * Parameters:
+     * feature - {<OpenLayers.Feature.Vector>} The feature that was dragged.
+     */
+    onLeave: function(feature) {},
+
+    /**
      * APIProperty: documentDrag
      * {Boolean} If set to true, mouse dragging will continue even if the
      *     mouse cursor leaves the map viewport. Default is false.
@@ -192,6 +214,7 @@
             this.handlers.drag.activate();
             this.over = true;
             OpenLayers.Element.addClass(this.map.viewPortDiv, this.displayClass + "Over");
+            this.onEnter(feature);
         } else {
             if(this.feature.id == feature.id) {
                 this.over = true;
@@ -269,6 +292,7 @@
             OpenLayers.Element.removeClass(
                 this.map.viewPortDiv, this.displayClass + "Over"
             );
+            this.onLeave(feature);
             this.feature = null;
         } else {
             if(this.feature.id == feature.id) {

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/DragPan.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/DragPan.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/DragPan.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -43,16 +43,48 @@
      *     mouse cursor leaves the map viewport. Default is false.
      */
     documentDrag: false,
-    
+
     /**
+     * Property: kinetic
+     * {OpenLayers.Kinetic} The OpenLayers.Kinetic object.
+     */
+    kinetic: null,
+
+    /**
+     * APIProperty: enableKinetic
+     * {Boolean} Set this option to enable "kinetic dragging". Can be
+     *     set to true or to an object. If set to an object this
+     *     object will be passed to the {<OpenLayers.Kinetic>}
+     *     constructor. Defaults to false.
+     */
+    enableKinetic: false,
+
+    /**
+     * APIProperty: kineticInterval
+     * {Integer} Interval in milliseconds between 2 steps in the "kinetic
+     *     scrolling". Applies only if enableKinetic is set. Defaults
+     *     to 10 milliseconds.
+     */
+    kineticInterval: 10,
+
+
+    /**
      * Method: draw
      * Creates a Drag handler, using <panMap> and
      * <panMapDone> as callbacks.
      */    
     draw: function() {
+        if(this.enableKinetic) {
+            var config = {interval: this.kineticInterval};
+            if(typeof this.enableKinetic === "object") {
+                config = OpenLayers.Util.extend(config, this.enableKinetic);
+            }
+            this.kinetic = new OpenLayers.Kinetic(config);
+        }
         this.handler = new OpenLayers.Handler.Drag(this, {
                 "move": this.panMap,
-                "done": this.panMapDone
+                "done": this.panMapDone,
+                "down": this.panMapStart
             }, {
                 interval: this.interval,
                 documentDrag: this.documentDrag
@@ -61,17 +93,29 @@
     },
 
     /**
+     * Method: panMapStart
+     */
+    panMapStart: function() {
+        if(this.kinetic) {
+            this.kinetic.begin();
+        }
+    },
+
+    /**
     * Method: panMap
     *
     * Parameters:
     * xy - {<OpenLayers.Pixel>} Pixel of the mouse position
     */
     panMap: function(xy) {
+        if(this.kinetic) {
+            this.kinetic.update(xy);
+        }
         this.panned = true;
         this.map.pan(
             this.handler.last.x - xy.x,
             this.handler.last.y - xy.y,
-            {dragging: this.handler.dragging, animate: false}
+            {dragging: true, animate: false}
         );
     },
     
@@ -85,7 +129,21 @@
      */
     panMapDone: function(xy) {
         if(this.panned) {
-            this.panMap(xy);
+            var res = null;
+            if (this.kinetic) {
+                res = this.kinetic.end(xy);
+            }
+            this.map.pan(
+                this.handler.last.x - xy.x,
+                this.handler.last.y - xy.y,
+                {dragging: !!res, animate: false}
+            );
+            if (res) {
+                var self = this;
+                this.kinetic.move(res, function(x, y, end) {
+                    self.map.pan(x, y, {dragging: !end, animate: false});
+                });
+            }
             this.panned = false;
         }
     },

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/DrawFeature.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/DrawFeature.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/DrawFeature.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/EditingToolbar.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/EditingToolbar.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/EditingToolbar.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Copied: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Geolocate.js (from rev 11588, trunk/openlayers/lib/OpenLayers/Control/Geolocate.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Geolocate.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Geolocate.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Control/GetFeature.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/GetFeature.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/GetFeature.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Graticule.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Graticule.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Graticule.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/KeyboardDefaults.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/KeyboardDefaults.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/KeyboardDefaults.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/LayerSwitcher.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/LayerSwitcher.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/LayerSwitcher.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -6,6 +6,7 @@
 /** 
  * @requires OpenLayers/Control.js
  * @requires OpenLayers/Lang.js
+ * @requires Rico/Corner.js
  */
 
 /**
@@ -315,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/ahocevar/renderer-ng/lib/OpenLayers/Control/Measure.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Measure.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Measure.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Control/ModifyFeature.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ModifyFeature.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ModifyFeature.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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);
+        }
     },
 
     /**
@@ -608,6 +613,11 @@
                vertex.geometry.parent) {
                 // remove the vertex
                 vertex.geometry.parent.removeComponent(vertex.geometry);
+                this.layer.events.triggerEvent("vertexremoved", {
+                    vertex: vertex.geometry,
+                    feature: this.feature,
+                    pixel: evt.xy
+                });
                 this.layer.drawFeature(this.feature, this.standalone ?
                                        undefined :
                                        this.selectControl.renderIntent);

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/MouseDefaults.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/MouseDefaults.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/MouseDefaults.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -165,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/ahocevar/renderer-ng/lib/OpenLayers/Control/MousePosition.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/MousePosition.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/MousePosition.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/MouseToolbar.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/MouseToolbar.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/MouseToolbar.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -207,7 +207,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/ahocevar/renderer-ng/lib/OpenLayers/Control/NavToolbar.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/NavToolbar.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/NavToolbar.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Navigation.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Navigation.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Navigation.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Control/NavigationHistory.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/NavigationHistory.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/NavigationHistory.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/OverviewMap.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/OverviewMap.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/OverviewMap.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -157,7 +157,7 @@
             this.handlers.drag.destroy();
         }
 
-        this.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/ahocevar/renderer-ng/lib/OpenLayers/Control/Pan.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Pan.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Pan.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -20,11 +20,21 @@
     /** 
      * APIProperty: slideFactor
      * {Integer} Number of pixels by which we'll pan the map in any direction 
-     *     on clicking the arrow buttons, defaults to 50.
+     *     on clicking the arrow buttons, defaults to 50.  If you want to pan
+     *     by some ratio of the map dimensions, use <slideRatio> instead.
      */
     slideFactor: 50,
 
     /** 
+     * APIProperty: slideRatio
+     * {Number} The fraction of map width/height by which we'll pan the map            
+     *     on clicking the arrow buttons.  Default is null.  If set, will
+     *     override <slideFactor>. E.g. if slideRatio is .5, then Pan Up will
+     *     pan up half the map height. 
+     */
+    slideRatio: null,
+
+    /** 
      * Property: direction
      * {String} in {'North', 'South', 'East', 'West'}
      */
@@ -61,18 +71,24 @@
      */
     trigger: function(){
     
+        var getSlideFactor = OpenLayers.Function.bind(function (dim) {
+            return this.slideRatio ?
+                this.map.getSize()[dim] * this.slideRatio :
+                this.slideFactor;
+        }, this);
+
         switch (this.direction) {
             case OpenLayers.Control.Pan.NORTH: 
-                this.map.pan(0, -this.slideFactor);
+                this.map.pan(0, -getSlideFactor("h"));
                 break;
             case OpenLayers.Control.Pan.SOUTH: 
-                this.map.pan(0, this.slideFactor);
+                this.map.pan(0, getSlideFactor("h"));
                 break;
             case OpenLayers.Control.Pan.WEST: 
-                this.map.pan(-this.slideFactor, 0);
+                this.map.pan(-getSlideFactor("w"), 0);
                 break;
             case OpenLayers.Control.Pan.EAST: 
-                this.map.pan(this.slideFactor, 0);
+                this.map.pan(getSlideFactor("w"), 0);
                 break;
         }
     },

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/PanPanel.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/PanPanel.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/PanPanel.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -33,10 +33,20 @@
     /** 
      * APIProperty: slideFactor
      * {Integer} Number of pixels by which we'll pan the map in any direction 
-     *     on clicking the arrow buttons, defaults to 50.
+     *     on clicking the arrow buttons, defaults to 50.  If you want to pan
+     *     by some ratio of the map dimensions, use <slideRatio> instead.
      */
     slideFactor: 50,
 
+    /** 
+     * APIProperty: slideRatio
+     * {Number} The fraction of map width/height by which we'll pan the map            
+     *     on clicking the arrow buttons.  Default is null.  If set, will
+     *     override <slideFactor>. E.g. if slideRatio is .5, then Pan Up will
+     *     pan up half the map height. 
+     */
+    slideRatio: null,
+
     /**
      * Constructor: OpenLayers.Control.PanPanel 
      * Add the four directional pan buttons.
@@ -47,15 +57,15 @@
      */
     initialize: function(options) {
         OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
+        var options = {
+            slideFactor: this.slideFactor,
+            slideRatio: this.slideRatio
+        };
         this.addControls([
-            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH,
-                                       {slideFactor: this.slideFactor}),
-            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH,
-                                       {slideFactor: this.slideFactor}),
-            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST,
-                                       {slideFactor: this.slideFactor}),
-            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST,
-                                       {slideFactor: this.slideFactor})
+            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH, options),
+            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH, options),
+            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST, options),
+            new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST, options)
         ]);
     },
 

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/PanZoom.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/PanZoom.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/PanZoom.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -123,7 +123,7 @@
         var btn = OpenLayers.Util.createAlphaImageDiv(
                                     this.id + "_" + id, 
                                     xy, sz, imgLocation, "absolute");
-
+        btn.style.cursor = "pointer";
         //we want to add the outer div
         this.div.appendChild(btn);
 

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/PanZoomBar.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/PanZoomBar.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/PanZoomBar.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -73,6 +73,12 @@
     mouseDragStart: null,
 
     /**
+     * Property: deltaY
+     * {Number} The cumulative vertical pixel offset during a zoom bar drag.
+     */
+    deltaY: null,
+
+    /**
      * Property: zoomStart
      * {<OpenLayers.Pixel>}
      */
@@ -180,11 +186,15 @@
                        new OpenLayers.Size(20,9), 
                        imgLocation+"slider.png",
                        "absolute");
+        slider.style.cursor = "move";
         this.slider = slider;
         
         this.sliderEvents = new OpenLayers.Events(this, slider, null, true,
                                             {includeXY: true});
         this.sliderEvents.on({
+            "touchstart": this.zoomBarDown,
+            "touchmove": this.zoomBarDrag,
+            "touchend": this.zoomBarUp,
             "mousedown": this.zoomBarDown,
             "mousemove": this.zoomBarDrag,
             "mouseup": this.zoomBarUp,
@@ -212,12 +222,13 @@
                         sz,
                         imgLocation+"zoombar.png");
         }
-        
+        div.style.cursor = "pointer";
         this.zoombarDiv = div;
         
         this.divEvents = new OpenLayers.Events(this, div, null, true, 
                                                 {includeXY: true});
         this.divEvents.on({
+            "touchmove": this.passEventToSlider,
             "mousedown": this.divClick,
             "mousemove": this.passEventToSlider,
             "dblclick": this.doubleClick,
@@ -241,6 +252,7 @@
      */
     _removeZoomBar: function() {
         this.sliderEvents.un({
+            "touchmove": this.zoomBarDrag,
             "mousedown": this.zoomBarDown,
             "mousemove": this.zoomBarDrag,
             "mouseup": this.zoomBarUp,
@@ -250,6 +262,7 @@
         this.sliderEvents.destroy();
 
         this.divEvents.un({
+            "touchmove": this.passEventToSlider,
             "mousedown": this.divClick,
             "mousemove": this.passEventToSlider,
             "dblclick": this.doubleClick,
@@ -304,10 +317,11 @@
      * evt - {<OpenLayers.Event>} 
      */
     zoomBarDown:function(evt) {
-        if (!OpenLayers.Event.isLeftClick(evt)) {
+        if (!OpenLayers.Event.isLeftClick(evt) && !OpenLayers.Event.isSingleTouch(evt)) {
             return;
         }
         this.map.events.on({
+            "touchmove": this.passEventToSlider,
             "mousemove": this.passEventToSlider,
             "mouseup": this.passEventToSlider,
             scope: this
@@ -340,6 +354,8 @@
                 this.slider.style.top = newTop+"px";
                 this.mouseDragStart = evt.xy.clone();
             }
+            // set cumulative displacement
+            this.deltaY = this.zoomStart.y - evt.xy.y;
             OpenLayers.Event.stop(evt);
         }
     },
@@ -353,28 +369,30 @@
      * evt - {<OpenLayers.Event>} 
      */
     zoomBarUp:function(evt) {
-        if (!OpenLayers.Event.isLeftClick(evt)) {
+        if (!OpenLayers.Event.isLeftClick(evt) && evt.type !== "touchend") {
             return;
         }
         if (this.mouseDragStart) {
             this.div.style.cursor="";
             this.map.events.un({
+                "touchmove": this.passEventToSlider,
                 "mouseup": this.passEventToSlider,
                 "mousemove": this.passEventToSlider,
                 scope: this
             });
-            var deltaY = this.zoomStart.y - evt.xy.y;
             var zoomLevel = this.map.zoom;
             if (!this.forceFixedZoomLevel && this.map.fractionalZoom) {
-                zoomLevel += deltaY/this.zoomStopHeight;
+                zoomLevel += this.deltaY/this.zoomStopHeight;
                 zoomLevel = Math.min(Math.max(zoomLevel, 0), 
                                      this.map.getNumZoomLevels() - 1);
             } else {
-                zoomLevel += Math.round(deltaY/this.zoomStopHeight);
+                zoomLevel += this.deltaY/this.zoomStopHeight;
+                zoomLevel = Math.max(Math.round(zoomLevel), 0);      
             }
             this.map.zoomTo(zoomLevel);
             this.mouseDragStart = null;
             this.zoomStart = null;
+            this.deltaY = 0;
             OpenLayers.Event.stop(evt);
         }
     },

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Panel.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Panel.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Panel.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Permalink.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Permalink.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Permalink.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -36,6 +36,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/ahocevar/renderer-ng/lib/OpenLayers/Control/PinchZoom.js (from rev 11588, trunk/openlayers/lib/OpenLayers/Control/PinchZoom.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/PinchZoom.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/PinchZoom.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -0,0 +1,192 @@
+/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for
+ * full list of contributors). Published under the Clear BSD license.
+ * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
+ * full text of the license. */
+
+/**
+ * @requires OpenLayers/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/ahocevar/renderer-ng/lib/OpenLayers/Control/SLDSelect.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/SLDSelect.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/SLDSelect.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Scale.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Scale.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Scale.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ScaleLine.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ScaleLine.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ScaleLine.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/SelectFeature.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/SelectFeature.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/SelectFeature.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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,

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Snapping.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Snapping.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Snapping.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -165,6 +165,14 @@
      * filter - {OpenLayers.Filter} Optional filter to evaluate to determine if
      *     feature is eligible for snapping.  If filter evaluates to true for a
      *     target feature a vertex may be snapped to the feature. 
+     * minResolution - {Number} If a minResolution is provided, snapping to this
+     *     target will only be considered if the map resolution is greater than
+     *     or equal to this value (the minResolution is inclusive).  Default is
+     *     no minimum resolution limit.
+     * maxResolution - {Number} If a maxResolution is provided, snapping to this
+     *     target will only be considered if the map resolution is strictly
+     *     less than this value (the maxResolution is exclusive).  Default is
+     *     no maximum resolution limit.
      */
     initialize: function(options) {
         // concatenate events specific to measure with those from the base
@@ -364,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.
@@ -436,10 +444,21 @@
      *     Returns null if candidate is not eligible for snapping.
      */
     testTarget: function(target, loc) {
+        var resolution = this.layer.map.getResolution();
+        if ("minResolution" in target) {
+            if (resolution < target.minResolution) {
+                return null;
+            }
+        }
+        if ("maxResolution" in target) {
+            if (resolution >= target.maxResolution) {
+                return null;
+            }
+        }
         var tolerance = {
-            node: this.getGeoTolerance(target.nodeTolerance),
-            vertex: this.getGeoTolerance(target.vertexTolerance),
-            edge: this.getGeoTolerance(target.edgeTolerance)
+            node: this.getGeoTolerance(target.nodeTolerance, resolution),
+            vertex: this.getGeoTolerance(target.vertexTolerance, resolution),
+            edge: this.getGeoTolerance(target.edgeTolerance, resolution)
         };
         // this could be cached if we don't support setting tolerance values directly
         var maxTolerance = Math.max(
@@ -512,12 +531,12 @@
      *     
      * Parameters:
      * tolerance - {Number} A tolerance value in pixels.
+     * resolution - {Number} Map resolution.
      *
      * Returns:
      * {Number} A tolerance value in map units.
      */
-    getGeoTolerance: function(tolerance) {
-        var resolution = this.layer.map.getResolution();
+    getGeoTolerance: function(tolerance, resolution) {
         if(resolution !== this.resolution) {
             this.resolution = resolution;
             this.geoToleranceCache = {};

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Split.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Split.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/Split.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Control/TouchNavigation.js (from rev 11588, trunk/openlayers/lib/OpenLayers/Control/TouchNavigation.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/TouchNavigation.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/TouchNavigation.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -0,0 +1,170 @@
+/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for
+ * full list of contributors). Published under the Clear BSD license.
+ * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
+ * full text of the license. */
+
+/**
+ * @requires OpenLayers/Control/DragPan.js
+ * @requires OpenLayers/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,
+
+    /**
+     * APIProprety: dragPanOptions
+     * {Object} Options passed to the DragPan control.
+     */
+    dragPanOptions: null,
+
+    /**
+     * Property: pinchZoom
+     * {<OpenLayers.Control.PinchZoom>}
+     */
+    pinchZoom: null,
+
+    /**
+     * APIProprety: 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/ahocevar/renderer-ng/lib/OpenLayers/Control/TransformFeature.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/TransformFeature.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/TransformFeature.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/WMSGetFeatureInfo.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/WMSGetFeatureInfo.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/WMSGetFeatureInfo.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -370,13 +370,13 @@
         }, (parseFloat(firstLayer.params.VERSION) >= 1.3) ?
             {
                 crs: projection,
-                i: clickPosition.x,
-                j: clickPosition.y
+                i: parseInt(clickPosition.x),
+                j: parseInt(clickPosition.y)
             } :
             {
                 srs: projection,
-                x: clickPosition.x,
-                y: clickPosition.y
+                x: parseInt(clickPosition.x),
+                y: parseInt(clickPosition.y)
             }
         );
         OpenLayers.Util.applyDefaults(params, this.vendorParams);

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/WMTSGetFeatureInfo.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/WMTSGetFeatureInfo.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/WMTSGetFeatureInfo.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ZoomBox.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ZoomBox.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ZoomBox.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ZoomIn.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ZoomIn.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ZoomIn.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ZoomOut.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ZoomOut.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ZoomOut.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ZoomPanel.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ZoomPanel.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ZoomPanel.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ZoomToMaxExtent.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ZoomToMaxExtent.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control/ZoomToMaxExtent.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Control.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Console.js
  */
 
@@ -70,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>. 
@@ -100,7 +102,7 @@
     displayClass: "",
     
     /**
-    * Property: title  
+    * APIProperty: title  
     * {string}  This property is used for showing a tooltip over the  
     * Control.  
     */ 
@@ -135,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,
 
@@ -295,7 +297,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.
@@ -323,7 +325,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/ahocevar/renderer-ng/lib/OpenLayers/Events.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Events.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Events.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -91,6 +91,34 @@
     },
 
     /**
+     * Method: isSingleTouch
+     * Determine whether event was caused by a single touch
+     *
+     * Parameters:
+     * event - {Event}
+     *
+     * Returns:
+     * {Boolean}
+     */
+    isSingleTouch: function(event) {
+        return event.touches && event.touches.length == 1;
+    },
+
+    /**
+     * Method: isMultiTouch
+     * Determine whether event was caused by a multi touch
+     *
+     * Parameters:
+     * event - {Event}
+     *
+     * Returns:
+     * {Boolean}
+     */
+    isMultiTouch: function(event) {
+        return event.touches && event.touches.length > 1;
+    },
+
+    /**
      * Method: isLeftClick
      * Determine whether event was caused by a left click. 
      *
@@ -369,7 +397,8 @@
         "mouseover", "mouseout",
         "mousedown", "mouseup", "mousemove", 
         "click", "dblclick", "rightclick", "dblrightclick",
-        "resize", "focus", "blur"
+        "resize", "focus", "blur",
+        "touchstart", "touchmove", "touchend"
     ],
 
     /** 
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Feature/Vector.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Feature/Vector.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Feature/Vector.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Feature/WFS.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Feature/WFS.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Feature/WFS.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Feature.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Feature.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Feature.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,10 +1,11 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Util.js
  * @requires OpenLayers/Marker.js
  * @requires OpenLayers/Popup/AnchoredBubble.js

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Filter/Comparison.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Filter/Comparison.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Filter/Comparison.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Filter/FeatureId.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Filter/FeatureId.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Filter/FeatureId.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Filter/Logical.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Filter/Logical.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Filter/Logical.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Filter/Spatial.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Filter/Spatial.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Filter/Spatial.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Filter.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Filter.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Filter.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,10 +1,11 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Util.js
  * @requires OpenLayers/Style.js
  */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/ArcXML/Features.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/ArcXML/Features.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/ArcXML/Features.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/ArcXML.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/ArcXML.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/ArcXML.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Atom.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Atom.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Atom.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Copied: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/CQL.js (from rev 11588, trunk/openlayers/lib/OpenLayers/Format/CQL.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/CQL.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/CQL.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/CSWGetDomain/v2_0_2.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -133,7 +133,7 @@
             },
             "Value": function(node, obj) {
                 var attrs = node.attributes;
-                var value = {}
+                var value = {};
                 for(var i=0, len=attrs.length; i<len; ++i) {
                     value[attrs[i].name] = attrs[i].nodeValue;
                 }
@@ -159,7 +159,7 @@
             },
             "MinValue": function(node, obj) {
                 var attrs = node.attributes;
-                var value = {}
+                var value = {};
                 for(var i=0, len=attrs.length; i<len; ++i) {
                     value[attrs[i].name] = attrs[i].nodeValue;
                 }
@@ -168,7 +168,7 @@
             },
             "MaxValue": function(node, obj) {
                 var attrs = node.attributes;
-                var value = {}
+                var value = {};
                 for(var i=0, len=attrs.length; i<len; ++i) {
                     value[attrs[i].name] = attrs[i].nodeValue;
                 }

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/CSWGetDomain.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/CSWGetDomain.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/CSWGetDomain.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/CSWGetRecords/v2_0_2.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/CSWGetRecords.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/CSWGetRecords.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/CSWGetRecords.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Context.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Context.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Context.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Filter/v1.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Filter/v1.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Filter/v1.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Filter/v1_0_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Filter/v1_0_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Filter/v1_0_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Filter/v1_1_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Filter/v1_1_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Filter/v1_1_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Filter.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Filter.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Filter.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GML/Base.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GML/Base.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GML/Base.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GML/v2.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GML/v2.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GML/v2.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GML/v3.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GML/v3.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GML/v3.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GML.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GML.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GML.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -582,7 +582,7 @@
      * Method: parseAttributes
      *
      * Parameters:
-     * node - {<DOMElement>}
+     * node - {DOMElement}
      *
      * Returns:
      * {Object} An attributes object.

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GPX.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GPX.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GPX.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Format/GeoJSON.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GeoJSON.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GeoJSON.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GeoRSS.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GeoRSS.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/GeoRSS.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -253,7 +253,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 +263,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/ahocevar/renderer-ng/lib/OpenLayers/Format/JSON.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/JSON.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/JSON.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/KML.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/KML.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/KML.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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.

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OSM.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OSM.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OSM.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OWSCommon/v1.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OWSCommon/v1.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OWSCommon/v1.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OWSCommon/v1_0_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OWSCommon/v1_0_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OWSCommon/v1_0_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OWSCommon/v1_1_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OWSCommon/v1_1_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OWSCommon/v1_1_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OWSContext/v0_3_1.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OWSContext/v0_3_1.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OWSContext/v0_3_1.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OWSContext.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OWSContext.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/OWSContext.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SLD/v1.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SLD/v1.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SLD/v1.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SLD/v1_0_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SLD/v1_0_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SLD/v1_0_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SLD.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SLD.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SLD.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SOSCapabilities/v1_0_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SOSCapabilities/v1_0_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SOSCapabilities/v1_0_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SOSCapabilities.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SOSCapabilities.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SOSCapabilities.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SOSGetFeatureOfInterest.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SOSGetObservation.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SOSGetObservation.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/SOSGetObservation.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Text.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Text.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/Text.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFS.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFS.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFS.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFSCapabilities/v1.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFSCapabilities/v1.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFSCapabilities/v1.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFSCapabilities/v1_0_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFSCapabilities/v1_1_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFSCapabilities.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFSCapabilities.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFSCapabilities.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFSDescribeFeatureType.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFSDescribeFeatureType.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFSDescribeFeatureType.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFST/v1.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFST/v1.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFST/v1.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -182,7 +182,7 @@
         if(value) {
             this.setAttributeNS(
                 node, this.namespaces["xsi"], "xsi:schemaLocation",  value
-            )
+            );
         }
         return OpenLayers.Format.XML.prototype.write.apply(this, [node]);
     },
@@ -253,8 +253,9 @@
                 
                 // add in geometry
                 if (this.geometryName !== null) {
+                    this.srsName = this.getSrsName(feature);
                     this.writeNode(
-                        "Property", {name: this.geometryName, value: feature}, node
+                        "Property", {name: this.geometryName, value: feature.geometry}, node
                     );
                 }
         
@@ -287,10 +288,9 @@
             },
             "Value": function(obj) {
                 var node;
-                if(obj instanceof OpenLayers.Feature.Vector) {
+                if(obj instanceof OpenLayers.Geometry) {
                     node = this.createElementNSPlus("wfs:Value");
-                    this.srsName = this.getSrsName(obj);
-                    var geom = this.writeNode("feature:_geometry", obj.geometry).firstChild;
+                    var geom = this.writeNode("feature:_geometry", obj).firstChild;
                     node.appendChild(geom);
                 } else {
                     node = this.createElementNSPlus("wfs:Value", {value: obj});                

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFST/v1_0_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFST/v1_0_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFST/v1_0_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFST/v1_1_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFST/v1_1_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFST/v1_1_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFST.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFST.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WFST.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WKT.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WKT.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WKT.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMC/v1.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMC/v1.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMC/v1.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMC/v1_0_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMC/v1_0_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMC/v1_0_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMC/v1_1_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMC/v1_1_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMC/v1_1_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMC.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMC.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMC.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_1.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_1.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_1.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_1_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_1_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_1_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_1_1.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_1_1.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_1_1.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Copied: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js (from rev 11588, trunk/openlayers/lib/OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -0,0 +1,90 @@
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
+ * full list of contributors). Published under the Clear BSD license.  
+ * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
+ * full text of the license. */
+
+/**
+ * @requires OpenLayers/Format/WMSCapabilities/v1_1_1.js
+ */
+
+/**
+ * Class: OpenLayers.Format.WMSCapabilities/v1_1_1_WMSC
+ * Read WMS-C Capabilities version 1.1.1.
+ * 
+ * Inherits from:
+ *  - <OpenLayers.Format.WMSCapabilities.v1_1_1>
+ */
+OpenLayers.Format.WMSCapabilities.v1_1_1_WMSC = OpenLayers.Class(
+    OpenLayers.Format.WMSCapabilities.v1_1_1, {
+    
+    /**
+     * Property: version
+     * {String} The specific parser version.
+     */
+    version: "1.1.1",
+    
+    /**
+     * Property: profile
+     * {String} The specific profile
+     */
+    profile: "WMSC",
+    
+    /**
+     * Constructor: OpenLayers.Format.WMSCapabilities.v1_1_1
+     * Create a new parser for WMS-C capabilities version 1.1.1.
+     *
+     * Parameters:
+     * options - {Object} An optional object whose properties will be set on
+     *     this instance.
+     */
+    initialize: function(options) {
+        OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.initialize.apply(
+            this, [options]
+        );
+    },
+
+    /**
+     * Property: readers
+     * Contains public functions, grouped by namespace prefix, that will
+     *     be applied when a namespaced node is found matching the function
+     *     name.  The function will be applied in the scope of this parser
+     *     with two arguments: the node being read and a context object passed
+     *     from the parent.
+     */
+    readers: {
+        "wms": OpenLayers.Util.applyDefaults({
+            "VendorSpecificCapabilities": function(node, obj) {
+                obj.vendorSpecific = {tileSets: []};
+                this.readChildNodes(node, obj.vendorSpecific);
+            },
+            "TileSet": function(node, vendorSpecific) {
+                var tileset = {srs: {}, bbox: {}, resolutions: []};
+                this.readChildNodes(node, tileset);
+                vendorSpecific.tileSets.push(tileset);
+            },
+            "Resolutions": function(node, tileset) {
+                var res = this.getChildValue(node).split(" ");
+                for (var i=0, len=res.length; i<len; i++) {
+                    if (res[i] != "") {
+                        tileset.resolutions.push(parseFloat(res[i]));
+                    }
+                }
+            },
+            "Width": function(node, tileset) {
+                tileset.width = parseInt(this.getChildValue(node));
+            },
+            "Height": function(node, tileset) {
+                tileset.height = parseInt(this.getChildValue(node));
+            },
+            "Layers": function(node, tileset) {
+                tileset.layers = this.getChildValue(node);
+            },
+            "Styles": function(node, tileset) {
+                tileset.styles = this.getChildValue(node);
+            }
+        }, OpenLayers.Format.WMSCapabilities.v1_1_1.prototype.readers["wms"])
+    },
+
+    CLASS_NAME: "OpenLayers.Format.WMSCapabilities.v1_1_1_WMSC" 
+
+});

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_3.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_3.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_3.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,8 +1,8 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
-
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
+ * full list of contributors). Published under the Clear BSD license.  
+ * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
+ * full text of the license. */
+
 /**
  * @requires OpenLayers/Format/WMSCapabilities/v1.js
  */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_3_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_3_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities/v1_3_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,8 +1,8 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
- * full list of contributors). Published under the Clear BSD license.  
- * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
- * full text of the license. */
-
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
+ * full list of contributors). Published under the Clear BSD license.  
+ * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
+ * full text of the license. */
+
 /**
  * @requires OpenLayers/Format/WMSCapabilities/v1_3.js
  */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSCapabilities.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -29,6 +29,15 @@
     version: null,
     
     /**
+     * APIProperty: profile
+     * {String} If provided, use a custom profile.
+     *
+     * Currently supported profiles:
+     * - WMSC - parses vendor specific capabilities for WMS-C.
+     */
+    profile: null,
+    
+    /**
      * Property: parser
      * {<OpenLayers.Format>} A cached versioned format used for reading.
      */
@@ -63,12 +72,14 @@
         }
         var root = data.documentElement;
         var version = this.version || root.getAttribute("version") || this.defaultVersion;
+        var profile = this.profile ? "_" + this.profile : "";
         if(!this.parser || this.parser.version !== version) {
             var constr = OpenLayers.Format.WMSCapabilities[
-                "v" + version.replace(/\./g, "_")
+                "v" + version.replace(/\./g, "_") + profile
             ];
             if(!constr) {
-                throw "Can't find a WMS capabilities parser for version " + version;
+                throw "Can't find a WMS capabilities parser for version " +
+                    version + profile;
             }
             this.parser = new constr(this.options);
         }

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSDescribeLayer/v1_1.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSDescribeLayer.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSDescribeLayer.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSDescribeLayer.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSGetFeatureInfo.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSGetFeatureInfo.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMSGetFeatureInfo.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMTSCapabilities/v1_0_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -191,7 +191,14 @@
             },
             "MatrixHeight": function(node, obj) {
                 obj.matrixHeight = parseInt(this.getChildValue(node)); 
-            },        
+            },
+            "ResourceURL": function(node, obj) {
+                obj.resourceUrl = obj.resourceUrl || {};
+                obj.resourceUrl[node.getAttribute("resourceType")] = {
+                    format: node.getAttribute("format"),
+                    template: node.getAttribute("template")
+                };
+            },
             // not used for now, can be added in the future though
             /*"Themes": function(node, obj) {
                 obj.themes = [];

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMTSCapabilities.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMTSCapabilities.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/WMTSCapabilities.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -149,7 +149,7 @@
                 OpenLayers.Util.applyDefaults(config, {
                     url: capabilities.operationsMetadata.GetTile.dcp.http.get,
                     name: layerDef.title,
-                    style: style,
+                    style: style.identifier,
                     matrixIds: matrixSet.matrixIds
                 })
             );

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/XML.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/XML.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format/XML.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Format.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Util.js
  * @requires OpenLayers/Console.js
  * @requires OpenLayers/Lang.js

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Collection.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Collection.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Collection.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Curve.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Curve.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Curve.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/LineString.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/LineString.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/LineString.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -578,7 +578,7 @@
                 var maxDistance = 0;
                 var indexFarthest = 0;
     
-                for (var index = firstPoint; index < lastPoint; index++) {
+                for (var index = firstPoint, distance; index < lastPoint; index++) {
                     distance = perpendicularDistance(points[firstPoint], points[lastPoint], points[index]);
                     if (distance > maxDistance) {
                         maxDistance = distance;

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/LinearRing.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/LinearRing.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/LinearRing.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/MultiLineString.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/MultiLineString.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/MultiLineString.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/MultiPoint.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/MultiPoint.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/MultiPoint.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/MultiPolygon.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/MultiPolygon.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/MultiPolygon.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Point.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Point.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Point.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Polygon.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Polygon.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Polygon.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Rectangle.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Rectangle.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Rectangle.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -50,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/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Surface.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Surface.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry/Surface.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Geometry.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
  
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Format/WKT.js
  * @requires OpenLayers/Feature/Vector.js
  */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Box.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Box.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Box.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -43,33 +43,36 @@
      *
      * Parameters:
      * control - {<OpenLayers.Control>} 
-     * callbacks - {Object} An object containing a single function to be
-     *                          called when the drag operation is finished.
-     *                          The callback should expect to recieve a single
-     *                          argument, the point geometry.
+     * callbacks - {Object} An object with a "done" property whose value is a
+     *     callback to be called when the box drag operation is finished.  
+     *     The callback should expect to recieve a single argument, the box 
+     *     bounds or a pixel. If the box dragging didn't span more than a 5 
+     *     pixel distance, a pixel will be returned instead of a bounds object.
      * options - {Object} 
      */
     initialize: function(control, callbacks, options) {
         OpenLayers.Handler.prototype.initialize.apply(this, arguments);
-        var callbacks = {
-            "down": this.startBox, 
-            "move": this.moveBox, 
-            "out":  this.removeBox,
-            "up":   this.endBox
-        };
         this.dragHandler = new OpenLayers.Handler.Drag(
-                                this, callbacks, {keyMask: this.keyMask});
+            this, 
+            {
+                down: this.startBox, 
+                move: this.moveBox, 
+                out: this.removeBox,
+                up: this.endBox
+            }, 
+            {keyMask: this.keyMask}
+        );
     },
 
     /**
      * Method: destroy
      */
     destroy: function() {
+        OpenLayers.Handler.prototype.destroy.apply(this, arguments);
         if (this.dragHandler) {
             this.dragHandler.destroy();
             this.dragHandler = null;
         }            
-        OpenLayers.Handler.prototype.destroy.apply(this, arguments);
     },
 
     /**
@@ -90,13 +93,13 @@
     */
     startBox: function (xy) {
         this.zoomBox = OpenLayers.Util.createDiv('zoomBox',
-                                                 this.dragHandler.start);
+             new OpenLayers.Pixel(-9999, -9999));
         this.zoomBox.className = this.boxDivClassName;                                         
         this.zoomBox.style.zIndex = this.map.Z_INDEX_BASE["Popup"] - 1;
-        this.map.viewPortDiv.appendChild(this.zoomBox);
+        this.map.eventsDiv.appendChild(this.zoomBox);
 
         OpenLayers.Element.addClass(
-            this.map.viewPortDiv, "olDrawBox"
+            this.map.eventsDiv, "olDrawBox"
         );
     },
 
@@ -154,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/ahocevar/renderer-ng/lib/OpenLayers/Handler/Click.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Click.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Click.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -22,7 +22,6 @@
  *  - <OpenLayers.Handler> 
  */
 OpenLayers.Handler.Click = OpenLayers.Class(OpenLayers.Handler, {
-
     /**
      * APIProperty: delay
      * {Number} Number of milliseconds between clicks before the event is
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Handler/Drag.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Drag.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Drag.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -32,11 +32,11 @@
   
     /** 
      * Property: started
-     * {Boolean} When a mousedown event is received, we want to record it, but
-     *     not set 'dragging' until the mouse moves after starting. 
+     * {Boolean} When a mousedown or touchstart event is received, we want to
+     * record it, but not set 'dragging' until the mouse moves after starting.
      */
     started: false,
-    
+
     /**
      * Property: stopDown
      * {Boolean} Stop propagation of mousedown events from getting to listeners
@@ -132,10 +132,125 @@
     },
     
     /**
+     * Method: dragstart
+     * This private method is factorized from mousedown and touchstart methods
+     *
+     * Parameters:
+     * evt - {Event} The event
+     *
+     * Returns:
+     * {Boolean} Let the event propagate.
+     */
+    dragstart: function (evt) {
+        var propagate = true;
+        this.dragging = false;
+        if (this.checkModifiers(evt) &&
+               (OpenLayers.Event.isLeftClick(evt) ||
+                OpenLayers.Event.isSingleTouch(evt))) {
+            this.started = true;
+            this.start = evt.xy;
+            this.last = evt.xy;
+            OpenLayers.Element.addClass(
+                this.map.viewPortDiv, "olDragDown"
+            );
+            this.down(evt);
+            this.callback("down", [evt.xy]);
+
+            OpenLayers.Event.stop(evt);
+
+            if(!this.oldOnselectstart) {
+                this.oldOnselectstart = document.onselectstart ?
+                    document.onselectstart : OpenLayers.Function.True;
+            }
+            document.onselectstart = OpenLayers.Function.False;
+
+            propagate = !this.stopDown;
+        } else {
+            this.started = false;
+            this.start = null;
+            this.last = null;
+        }
+        return propagate;
+    },
+
+    /**
+     * Method: dragmove
+     * This private method is factorized from mousemove and touchmove methods
+     *
+     * Parameters:
+     * evt - {Event} The event
+     *
+     * Returns:
+     * {Boolean} Let the event propagate.
+     */
+    dragmove: function (evt) {
+        if (this.started && !this.timeoutId && (evt.xy.x != this.last.x ||
+                                                evt.xy.y != this.last.y)) {
+            if(this.documentDrag === true && this.documentEvents) {
+                if(evt.element === document) {
+                    this.adjustXY(evt);
+                    // do setEvent manually because the documentEvents are not
+                    // registered with the map
+                    this.setEvent(evt);
+                } else {
+                    this.removeDocumentEvents();
+                }
+            }
+            if (this.interval > 0) {
+                this.timeoutId = setTimeout(
+                    OpenLayers.Function.bind(this.removeTimeout, this),
+                    this.interval);
+            }
+            this.dragging = true;
+
+            this.move(evt);
+            this.callback("move", [evt.xy]);
+            if(!this.oldOnselectstart) {
+                this.oldOnselectstart = document.onselectstart;
+                document.onselectstart = OpenLayers.Function.False;
+            }
+            this.last = this.evt.xy;
+        }
+        return true;
+    },
+
+    /**
+     * Method: dragend
+     * This private method is factorized from mouseup and touchend methods
+     *
+     * Parameters:
+     * evt - {Event} The event
+     *
+     * Returns:
+     * {Boolean} Let the event propagate.
+     */
+    dragend: function (evt) {
+        if (this.started) {
+            if(this.documentDrag === true && this.documentEvents) {
+                this.adjustXY(evt);
+                this.removeDocumentEvents();
+            }
+            var dragged = (this.start != this.last);
+            this.started = false;
+            this.dragging = false;
+            OpenLayers.Element.removeClass(
+                this.map.viewPortDiv, "olDragDown"
+            );
+            this.up(evt);
+            this.callback("up", [evt.xy]);
+            if(dragged) {
+                this.callback("done", [evt.xy]);
+            }
+            document.onselectstart = this.oldOnselectstart;
+        }
+        return true;
+    },
+
+    /**
      * The four methods below (down, move, up, and out) are used by subclasses
      *     to do their own processing related to these mouse events.
      */
-    
+
     /**
      * Method: down
      * This method is called during the handling of the mouse down event.
@@ -146,7 +261,7 @@
      */
     down: function(evt) {
     },
-    
+
     /**
      * Method: move
      * This method is called during the handling of the mouse move event.
@@ -192,77 +307,58 @@
      * Handle mousedown events
      *
      * Parameters:
-     * evt - {Event} 
+     * evt - {Event}
      *
      * Returns:
      * {Boolean} Let the event propagate.
      */
-    mousedown: function (evt) {
-        var propagate = true;
-        this.dragging = false;
-        if (this.checkModifiers(evt) && OpenLayers.Event.isLeftClick(evt)) {
-            this.started = true;
-            this.start = evt.xy;
-            this.last = evt.xy;
-            OpenLayers.Element.addClass(
-                this.map.viewPortDiv, "olDragDown"
-            );
-            this.down(evt);
-            this.callback("down", [evt.xy]);
-            OpenLayers.Event.stop(evt);
-            
-            if(!this.oldOnselectstart) {
-                this.oldOnselectstart = (document.onselectstart) ? document.onselectstart : OpenLayers.Function.True;
-            }
-            document.onselectstart = OpenLayers.Function.False;
-            
-            propagate = !this.stopDown;
-        } else {
-            this.started = false;
-            this.start = null;
-            this.last = null;
-        }
-        return propagate;
+    mousedown: function(evt) {
+        return this.dragstart(evt);
     },
 
     /**
+     * Method: touchstart
+     * Handle touchstart events
+     *
+     * Parameters:
+     * evt - {Event}
+     *
+     * Returns:
+     * {Boolean} Let the event propagate.
+     */
+    touchstart: function(evt) {
+        return this.dragstart(evt);
+    },
+
+    /**
      * Method: mousemove
      * Handle mousemove events
      *
      * Parameters:
-     * evt - {Event} 
+     * evt - {Event}
      *
      * Returns:
      * {Boolean} Let the event propagate.
      */
-    mousemove: function (evt) {
-        if (this.started && !this.timeoutId && (evt.xy.x != this.last.x || evt.xy.y != this.last.y)) {
-            if(this.documentDrag === true && this.documentEvents) {
-                if(evt.element === document) {
-                    this.adjustXY(evt);
-                    // do setEvent manually because the documentEvents are not
-                    // registered with the map
-                    this.setEvent(evt);
-                } else {
-                    this.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.
      */
@@ -275,39 +371,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/ahocevar/renderer-ng/lib/OpenLayers/Handler/Feature.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Feature.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Feature.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -29,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/ahocevar/renderer-ng/lib/OpenLayers/Handler/Hover.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Hover.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Hover.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Keyboard.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Keyboard.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Keyboard.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/MouseWheel.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/MouseWheel.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/MouseWheel.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Path.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Path.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Path.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -79,6 +79,9 @@
      *     feature.
      */
     createFeature: function(pixel) {
+        if(!pixel) {
+            pixel = new OpenLayers.Pixel(-50, -50);
+        }
         var lonlat = this.control.map.getLonLatFromPixel(pixel);
         this.point = new OpenLayers.Feature.Vector(
             new OpenLayers.Geometry.Point(lonlat.lon, lonlat.lat)
@@ -101,6 +104,17 @@
     },
 
     /**
+     * Method: destroyPersistedFeature
+     * Destroy the persisted feature.
+     */
+    destroyPersistedFeature: function() {
+        var layer = this.layer;
+        if(layer && layer.features.length > 2) {
+            this.layer.features[0].destroy();
+        }
+    },
+
+    /**
      * Method: removePoint
      * Destroy the temporary point.
      */
@@ -151,12 +165,13 @@
      * Parameters:
      * pixel - {<OpenLayers.Pixel>} The updated pixel location for the latest
      *     point.
+     * drawing - {Boolean} Indicate if we're currently drawing.
      */
-    modifyFeature: function(pixel) {
+    modifyFeature: function(pixel, drawing) {
         var lonlat = this.control.map.getLonLatFromPixel(pixel);
         this.point.geometry.x = lonlat.lon;
         this.point.geometry.y = lonlat.lat;
-        this.callback("modify", [this.point.geometry, this.getSketch()]);
+        this.callback("modify", [this.point.geometry, this.getSketch(), drawing]);
         this.point.geometry.clearBounds();
         this.drawFeature();
     },
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Handler/Pinch.js (from rev 11588, trunk/openlayers/lib/OpenLayers/Handler/Pinch.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Pinch.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Pinch.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Handler/Point.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Point.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Point.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -11,9 +11,9 @@
 
 /**
  * Class: OpenLayers.Handler.Point
- * Handler to draw a point on the map.  Point is displayed on mouse down,
- *     moves on mouse move, and is finished on mouse up.  The handler triggers
- *     callbacks for 'done', 'cancel', and 'modify'.  The modify callback is
+ * Handler to draw a point on the map. Point is displayed on activation,
+ *     moves on mouse move, and is finished on mouse up. The handler triggers
+ *     callbacks for 'done', 'cancel', and 'modify'. The modify callback is
  *     called with each change in the sketch and will receive the latest point
  *     drawn.  Create a new instance with the <OpenLayers.Handler.Point>
  *     constructor.
@@ -43,18 +43,19 @@
     multi: false,
     
     /**
-     * Property: drawing 
-     * {Boolean} A point is being drawn
-     */
-    drawing: false,
-    
-    /**
      * Property: mouseDown
      * {Boolean} The mouse is down
      */
     mouseDown: false,
 
     /**
+     * Property: stoppedDown
+     * {Boolean} Indicate whether the last mousedown stopped the event
+     * propagation.
+     */
+    stoppedDown: null,
+
+    /**
      * Property: lastDown
      * {<OpenLayers.Pixel>} Location of the last mouse down
      */
@@ -76,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/ahocevar/renderer-ng/lib/OpenLayers/Handler/Polygon.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Polygon.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/Polygon.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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.

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/RegularPolygon.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/RegularPolygon.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler/RegularPolygon.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Handler.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Events.js
  */
 

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Icon.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Icon.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Icon.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
+ */
+
+/**
  * Class: OpenLayers.Icon
  * 
  * The icon represents a graphical icon on the screen.  Typically used in

Copied: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Kinetic.js (from rev 11588, trunk/openlayers/lib/OpenLayers/Kinetic.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Kinetic.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Kinetic.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Lang/en.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Lang/en.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Lang/en.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -122,6 +122,9 @@
     // console message
     'filterEvaluateNotImplemented': "evaluate is not implemented for this filter type.",
 
+    'proxyNeeded': "You probably need to set OpenLayers.ProxyHost to access ${url}."+
+        "See http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost",
+
     // **** end ****
     'end': ''
     

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Lang/fr.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Lang/fr.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Lang/fr.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -75,6 +75,7 @@
 
     'pagePositionFailed': "OpenLayers.Util.pagePosition a échoué: l\'élément d\'id ${elemId} pourrait être mal positionné.",
 
-    'filterEvaluateNotImplemented': "évaluer n\'a pas encore été implémenté pour ce type de filtre."
+    'filterEvaluateNotImplemented': "évaluer n\'a pas encore été implémenté pour ce type de filtre.",
 
+    'proxyNeeded': "Vous avez très probablement besoin de renseigner OpenLayers.ProxyHost pour accéder à ${url}. Voir http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost"
 });

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Lang.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Lang.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Lang.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes.js
  * @requires OpenLayers/Console.js
  */
 

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/ArcGIS93Rest.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/ArcGIS93Rest.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/ArcGIS93Rest.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Layer/ArcIMS.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/ArcIMS.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/ArcIMS.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Layer/Bing.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Bing.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Bing.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -19,35 +19,6 @@
 OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
 
     /**
-     * Constant: RESOLUTIONS
-     */
-    RESOLUTIONS: [
-        78271.517,
-        39135.7585,
-        19567.87925,
-        9783.939625,
-        4891.9698125,
-        2445.98490625,
-        1222.992453125,
-        611.4962265625,
-        305.74811328125,
-        152.874056640625,
-        76.4370283203125,
-        38.21851416015625,
-        19.109257080078127,
-        9.554628540039063,
-        4.777314270019532,
-        2.388657135009766,
-        1.194328567504883,
-        0.5971642837524415,
-        0.29858214187622073,
-        0.14929107093811037,
-        0.07464553546905518,
-        0.03732276773452759,
-        0.018661383867263796
-    ],
-
-    /**
      * Property: attributionTemplate
      * {String}
      */
@@ -59,12 +30,6 @@
          'Terms of Use</a></span>',
 
     /**
-     * Property: sphericalMercator
-     * {Boolean} always true for this layer type
-     */
-    sphericalMercator: true,
-    
-    /**
      * Property: metadata
      * {Object} Metadata for this layer, as returned by the callback script
      */
@@ -77,28 +42,13 @@
      *     used.  Default is "Road".
      */
     type: "Road",
-
+    
     /**
-     * Constant: EVENT_TYPES
-     * {Array(String)} Supported application event types.  Register a listener
-     *     for a particular event with the following syntax:
-     * (code)
-     * layer.events.register(type, obj, listener);
-     * (end)
-     *
-     * Listeners will be called with a reference to an event object.  The
-     *     properties of this event depends on exactly what happened.
-     *
-     * All event objects have at least the following properties:
-     * object - {Object} A reference to layer.events.object.
-     * element - {DOMElement} A reference to layer.events.element.
-     *
-     * Supported map event types (in addition to those from <OpenLayers.Layer>):
-     * added - Triggered after the layer is added to a map.  Listeners
-     *      will receive an object with a *map* property referencing the
-     *      map and a *layer* property referencing the layer.
+     * APIProperty: metadataParams
+     * {Object} Optional url parameters for the Get Imagery Metadata request
+     * as described here: http://msdn.microsoft.com/en-us/library/ff701716.aspx
      */
-    EVENT_TYPES: ["added"],
+    metadataParams: null,
 
     /**
      * Constructor: OpenLayers.Layer.Bing
@@ -126,33 +76,34 @@
      * Any other documented layer properties can be provided in the config object.
      */
     initialize: function(options) {
-        // concatenate events specific to vector with those from the base
-        this.EVENT_TYPES =
-            OpenLayers.Layer.Bing.prototype.EVENT_TYPES.concat(
-            OpenLayers.Layer.prototype.EVENT_TYPES
-        );
+        options = OpenLayers.Util.applyDefaults({
+            restrictedMinZoom: 1,
+            sphericalMercator: true
+        }, options);
         var name = options.name || "Bing " + (options.type || this.type);
+        
         var newArgs = [name, null, options];
         OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArgs);
-        this.loadMetadata(this.type); 
+        this.loadMetadata(); 
     },
 
     /**
      * Method: loadMetadata
-     *
-     * Parameters:
-     * imageryType - {String}
      */
-    loadMetadata: function(imageryType) {
+    loadMetadata: function() {
         this._callbackId = "_callback_" + this.id.replace(/\./g, "_");
         // link the processMetadata method to the global scope and bind it
         // to this instance
         window[this._callbackId] = OpenLayers.Function.bind(
             OpenLayers.Layer.Bing.processMetadata, this
         );
+        var params = OpenLayers.Util.applyDefaults({
+            key: this.key,
+            jsonp: this._callbackId,
+            include: "ImageryProviders"
+        }, this.metadataParams);
         var url = "http://dev.virtualearth.net/REST/v1/Imagery/Metadata/" +
-            imageryType + "?key=" + this.key + "&jsonp=" + this._callbackId +
-            "&include=ImageryProviders";
+            this.type + "?" + OpenLayers.Util.getParameterString(params);
         var script = document.createElement("script");
         script.type = "text/javascript";
         script.src = url;
@@ -172,15 +123,13 @@
         for (var i=0; i<res.imageUrlSubdomains.length; ++i) {
             this.url.push(url.replace("{subdomain}", res.imageUrlSubdomains[i]));
         };
-        
         this.addOptions({
-            resolutions: this.RESOLUTIONS.slice(res.zoomMin-1, res.zoomMax-1),
-            zoomOffset: res.zoomMin
+            restrictedMinZoom: res.zoomMin,
+            numZoomLevels: res.zoomMax + 1
         });
-        if (this.map) {
-            this.redraw();
-            this.updateAttribution();
-        }
+        this.updateAttribution();
+        // redraw to replace "blank.gif" tiles with real tiles
+        this.redraw();
     },
 
     /**
@@ -220,7 +169,7 @@
      */
     updateAttribution: function() {
         var metadata = this.metadata;
-        if (!metadata || !this.map) {
+        if (!metadata || !this.map || !this.map.center) {
             return;
         }
         var res = metadata.resourceSets[0].resources[0];
@@ -254,13 +203,8 @@
      */
     setMap: function() {
         OpenLayers.Layer.XYZ.prototype.setMap.apply(this, arguments);
-        if (this.map.getCenter()) {
-            this.updateAttribution();
-        }
+        this.updateAttribution();
         this.map.events.register("moveend", this, this.updateAttribution);
-        // TODO: move this event to Layer
-        // http://trac.osgeo.org/openlayers/ticket/2983
-        this.events.triggerEvent("added", {map: this.map, layer: this});
     },
     
     /**

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Boxes.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Boxes.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Boxes.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/EventPane.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/EventPane.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/EventPane.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Layer/FixedZoomLevels.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/FixedZoomLevels.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/FixedZoomLevels.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/GML.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/GML.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/GML.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/GeoRSS.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/GeoRSS.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/GeoRSS.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

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

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Google.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Google.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Google.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Grid.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Grid.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Grid.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -24,7 +24,27 @@
      * {<OpenLayers.Size>}
      */
     tileSize: null,
+
+    /**
+     * Property: tileOriginCorner
+     * {String} If the <tileOrigin> property is not provided, the tile origin 
+     *     will be derived from the layer's <maxExtent>.  The corner of the 
+     *     <maxExtent> used is determined by this property.  Acceptable values
+     *     are "tl" (top left), "tr" (top right), "bl" (bottom left), and "br"
+     *     (bottom right).  Default is "bl".
+     */
+    tileOriginCorner: "bl",
     
+    /**
+     * APIProperty: tileOrigin
+     * {<OpenLayers.LonLat>} Optional origin for aligning the grid of tiles.
+     *     If provided, requests for tiles at all resolutions will be aligned
+     *     with this location (no tiles shall overlap this location).  If
+     *     not provided, the grid of tiles will be aligned with the layer's
+     *     <maxExtent>.  Default is ``null``.
+     */
+    tileOrigin: null,
+    
     /** APIProperty: tileOptions
      *  {Object} optional configuration options for <OpenLayers.Tile> instances
      *  created by this Layer, if supported by the tile class.
@@ -58,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
@@ -68,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
      *
@@ -89,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.
      */
@@ -197,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
@@ -309,32 +388,32 @@
 
     /** 
      * Method: calculateGridLayout
-     * Generate parameters for the grid layout. This  
+     * Generate parameters for the grid layout.
      *
      * Parameters:
      * bounds - {<OpenLayers.Bound>}
-     * extent - {<OpenLayers.Bounds>}
+     * origin - {<OpenLayers.LonLat>}
      * resolution - {Number}
      *
      * Returns:
      * Object containing properties tilelon, tilelat, tileoffsetlat,
      * tileoffsetlat, tileoffsetx, tileoffsety
      */
-    calculateGridLayout: function(bounds, extent, resolution) {
+    calculateGridLayout: function(bounds, origin, resolution) {
         var tilelon = resolution * this.tileSize.w;
         var tilelat = resolution * this.tileSize.h;
         
-        var offsetlon = bounds.left - extent.left;
+        var offsetlon = bounds.left - origin.lon;
         var tilecol = Math.floor(offsetlon/tilelon) - this.buffer;
         var tilecolremain = offsetlon/tilelon - tilecol;
         var tileoffsetx = -tilecolremain * this.tileSize.w;
-        var tileoffsetlon = extent.left + tilecol * tilelon;
+        var tileoffsetlon = origin.lon + tilecol * tilelon;
         
-        var offsetlat = bounds.top - (extent.bottom + tilelat);  
+        var offsetlat = bounds.top - (origin.lat + tilelat);  
         var tilerow = Math.ceil(offsetlat/tilelat) + this.buffer;
         var tilerowremain = tilerow - offsetlat/tilelat;
         var tileoffsety = -tilerowremain * this.tileSize.h;
-        var tileoffsetlat = extent.bottom + tilerow * tilelat;
+        var tileoffsetlat = origin.lat + tilerow * tilelat;
         
         return { 
           tilelon: tilelon, tilelat: tilelat,
@@ -343,6 +422,32 @@
         };
 
     },
+    
+    /**
+     * Method: getTileOrigin
+     * Determine the origin for aligning the grid of tiles.  If a <tileOrigin>
+     *     property is supplied, that will be returned.  Otherwise, the origin
+     *     will be derived from the layer's <maxExtent> property.  In this case,
+     *     the tile origin will be the corner of the <maxExtent> given by the 
+     *     <tileOriginCorner> property.
+     *
+     * Returns:
+     * {<OpenLayers.LonLat>} The tile origin.
+     */
+    getTileOrigin: function() {
+        var origin = this.tileOrigin;
+        if (!origin) {
+            var extent = this.getMaxExtent();
+            var edges = ({
+                "tl": ["left", "top"],
+                "tr": ["right", "top"],
+                "bl": ["left", "bottom"],
+                "br": ["right", "bottom"]
+            })[this.tileOriginCorner];
+            origin = new OpenLayers.LonLat(extent[edges[0]], extent[edges[1]]);
+        }
+        return origin;
+    },
 
     /**
      * Method: initGriddedTiles
@@ -361,10 +466,10 @@
         var minCols = Math.ceil(viewSize.w/this.tileSize.w) +
                       Math.max(1, 2 * this.buffer);
         
-        var extent = this.getMaxExtent();
+        var origin = this.getTileOrigin();
         var resolution = this.map.getResolution();
         
-        var tileLayout = this.calculateGridLayout(bounds, extent, resolution);
+        var tileLayout = this.calculateGridLayout(bounds, origin, resolution);
 
         var tileoffsetx = Math.round(tileLayout.tileoffsetx); // heaven help us
         var tileoffsety = Math.round(tileLayout.tileoffsety);
@@ -524,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>}
@@ -536,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);
     },
     
     /** 
@@ -590,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);
+        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);
+        }
     },
 
     /**
@@ -691,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/ahocevar/renderer-ng/lib/OpenLayers/Layer/HTTPRequest.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/HTTPRequest.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/HTTPRequest.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -38,7 +38,7 @@
     
     /** 
      * APIProperty: reproject
-     * *Deprecated*. See http://trac.openlayers.org/wiki/SpatialMercator
+     * *Deprecated*. See http://docs.openlayers.org/library/spherical_mercator.html
      * for information on the replacement for this functionality. 
      * {Boolean} Whether layer should reproject itself based on base layer 
      *           locations. This allows reprojection onto commercial layers. 

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Image.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Image.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Image.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/KaMap.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/KaMap.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/KaMap.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Layer/KaMapCache.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/KaMapCache.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/KaMapCache.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/MapGuide.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/MapGuide.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/MapGuide.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Layer/MapServer/Untiled.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/MapServer/Untiled.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/MapServer/Untiled.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/MapServer.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/MapServer.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/MapServer.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Layer/Markers.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Markers.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Markers.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/MultiMap.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/MultiMap.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/MultiMap.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -13,6 +13,7 @@
  * 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/ahocevar/renderer-ng/lib/OpenLayers/Layer/PointTrack.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/PointTrack.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/PointTrack.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/SphericalMercator.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/SphericalMercator.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/SphericalMercator.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -95,7 +95,7 @@
     initMercatorParameters: function() {
         // set up properties for Mercator - assume EPSG:900913
         this.RESOLUTIONS = [];
-        var maxResolution = 156543.0339;
+        var maxResolution = 156543.03390625;
         for(var zoom=0; zoom<=this.MAX_ZOOM_LEVEL; ++zoom) {
             this.RESOLUTIONS[zoom] = maxResolution / Math.pow(2, zoom);
         }

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/TMS.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/TMS.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/TMS.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Layer/Text.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Text.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Text.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/TileCache.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/TileCache.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/TileCache.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Layer/Vector/RootContainer.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Vector/RootContainer.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Vector/RootContainer.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Vector.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Vector.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Vector.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -90,6 +90,12 @@
      *      property referencing the vertex modified (always a point geometry),
      *      and a *pixel* property referencing the pixel location of the
      *      modification.
+     * vertexremoved - Triggered when a vertex within any feature geometry
+     *      has been deleted.  Listeners will receive an object with a
+     *      *feature* property referencing the modified feature, a *vertex*
+     *      property referencing the vertex modified (always a point geometry),
+     *      and a *pixel* property referencing the pixel location of the
+     *      removal.
      * sketchstarted - Triggered when a feature sketch bound for this layer
      *      is started.  Listeners will receive an object with a *feature*
      *      property referencing the new sketch feature and a *vertex* property
@@ -110,8 +116,8 @@
                   "beforefeaturesremoved", "featureremoved", "featuresremoved",
                   "beforefeatureselected", "featureselected", "featureunselected", 
                   "beforefeaturemodified", "featuremodified", "afterfeaturemodified",
-                  "vertexmodified", "sketchstarted", "sketchmodified",
-                  "sketchcomplete", "refresh"],
+                  "vertexmodified", "vertexremoved", "sketchstarted",
+                  "sketchmodified", "sketchcomplete", "refresh"],
 
     /**
      * APIProperty: isBaseLayer
@@ -791,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/ahocevar/renderer-ng/lib/OpenLayers/Layer/VirtualEarth.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/VirtualEarth.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/VirtualEarth.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -13,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/ahocevar/renderer-ng/lib/OpenLayers/Layer/WFS.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/WFS.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/WFS.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/WMS/Post.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/WMS/Post.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/WMS/Post.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/WMS/Untiled.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/WMS/Untiled.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/WMS/Untiled.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/WMS.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/WMS.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/WMS.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Layer/WMTS.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/WMTS.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/WMTS.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Layer/WorldWind.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/WorldWind.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/WorldWind.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Layer/XYZ.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/XYZ.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/XYZ.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Layer/Yahoo.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Yahoo.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Yahoo.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Zoomify.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Zoomify.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer/Zoomify.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -105,7 +105,7 @@
      */
     initializeZoomify: function( size ) {
 
-        var imageSize = size.clone()
+        var imageSize = size.clone();
         var tiles = new OpenLayers.Size(
             Math.ceil( imageSize.w / this.standardTileSize ),
             Math.ceil( imageSize.h / this.standardTileSize )
@@ -151,9 +151,9 @@
         OpenLayers.Layer.Grid.prototype.destroy.apply(this, arguments);
 
         // Remove from memory the Zoomify pyramid - is that enough?
-        this.tileCountUpToTier.length = 0
-        this.tierSizeInTiles.length = 0
-        this.tierImageSize.length = 0
+        this.tileCountUpToTier.length = 0;
+        this.tierSizeInTiles.length = 0;
+        this.tierImageSize.length = 0;
 
     },
 
@@ -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/ahocevar/renderer-ng/lib/OpenLayers/Layer.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Layer.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,10 +1,11 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Map.js
  * @requires OpenLayers/Projection.js
  */
@@ -80,9 +81,15 @@
      * moveend - Triggered when layer is done moving, object passed as
      *     argument has a zoomChanged boolean property which tells that the
      *     zoom has changed.
+     * added - Triggered after the layer is added to a map.  Listeners will
+     *     receive an object with a *map* property referencing the map and a
+     *     *layer* property referencing the layer.
+     * removed - Triggered after the layer is removed from the map.  Listeners
+     *     will receive an object with a *map* property referencing the map and
+     *     a *layer* property referencing the layer.
      */
     EVENT_TYPES: ["loadstart", "loadend", "loadcancel", "visibilitychanged",
-                  "move", "moveend"],
+                  "move", "moveend", "added", "removed"],
 
     /**
      * Constant: RESOLUTION_PROPERTIES
@@ -267,6 +274,18 @@
      * {Integer}
      */
     numZoomLevels: null,
+    
+    /**
+     * Property: restrictedMinZoom
+     * {Integer} Restriction of the minimum zoom level. This is used for layers
+     *     that only use a subset of the resolutions in the <resolutions>
+     *     array. This is independent of <numResolutions>, which always starts
+     *     counting at zoom level 0. If restrictedMinZoom is e.g. set to 2,
+     *     the first two zoom levels (0 and 1) will not be used by this layer.
+     *     If the layer is a base layer, zooming to the map's maxExtent means
+     *     setting the map's zoom to 2.
+     */
+    restrictedMinZoom: 0,
    
     /**
      * APIProperty: minScale
@@ -537,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}
@@ -551,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 
@@ -685,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) {
@@ -733,7 +763,8 @@
         } else {
             if (this.map) {
                 var resolution = this.map.getResolution();
-                inRange = ( (resolution >= this.minResolution) &&
+                inRange = ( this.map.getZoom() >= this.restrictedMinZoom &&
+                            (resolution >= this.minResolution) &&
                             (resolution <= this.maxResolution) );
             }
         }
@@ -795,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;
@@ -825,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];
             }
@@ -940,6 +971,8 @@
      */
     calculateResolutions: function(props) {
 
+        var viewSize, wRes, hRes;
+
         // determine maxResolution
         var maxResolution = props.maxResolution;
         if(props.minScale != null) {
@@ -947,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);
         }
 
@@ -960,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);
         }
 
@@ -1046,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.
@@ -1121,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;
@@ -1149,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) {
@@ -1164,7 +1197,7 @@
             }
             zoom = Math.max(0, i-1);
         }
-        return zoom;
+        return Math.max(this.restrictedMinZoom, zoom);
     },
     
     /**
@@ -1179,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();
+            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/ahocevar/renderer-ng/lib/OpenLayers/Map.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Map.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Map.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Util.js
  * @requires OpenLayers/Events.js
  * @requires OpenLayers/Tween.js
@@ -415,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.
@@ -506,18 +524,27 @@
         this.viewPortDiv.className = "olMapViewport";
         this.div.appendChild(this.viewPortDiv);
 
+        // the eventsDiv is where we listen for all map events
+        var eventsDiv = document.createElement("div");
+        eventsDiv.id = this.id + "_events";
+        eventsDiv.style.position = "absolute";
+        eventsDiv.style.width = "100%";
+        eventsDiv.style.height = "100%";
+        eventsDiv.style.zIndex = this.Z_INDEX_BASE.Control - 1;
+        this.viewPortDiv.appendChild(eventsDiv);
+        this.eventsDiv = eventsDiv;
+        this.events = new OpenLayers.Events(
+            this, this.eventsDiv, this.EVENT_TYPES, this.fallThrough, 
+            {includeXY: true}
+        );
+
         // the layerContainerDiv is the one that holds all the layers
         id = this.id + "_OpenLayers_Container";
         this.layerContainerDiv = OpenLayers.Util.createDiv(id);
         this.layerContainerDiv.style.zIndex=this.Z_INDEX_BASE['Popup']-1;
         
-        this.viewPortDiv.appendChild(this.layerContainerDiv);
+        this.eventsDiv.appendChild(this.layerContainerDiv);
 
-        this.events = new OpenLayers.Events(this, 
-                                            this.viewPortDiv, 
-                                            this.EVENT_TYPES, 
-                                            this.fallThrough, 
-                                            {includeXY: true});
         this.updateSize();
         if(this.eventListeners instanceof Object) {
             this.events.on(this.eventListeners);
@@ -590,6 +617,14 @@
         
         // add any initial layers
         if (options && options.layers) {
+            /** 
+             * If you have set options.center, the map center property will be
+             * set at this point.  However, since setCenter has not been caleld,
+             * addLayers gets confused.  So we delete the map center in this 
+             * case.  Because the check below uses options.center, it will
+             * be properly set below.
+             */
+            delete this.center;
             this.addLayers(options.layers);        
             // set center (and optionally zoom)
             if (options.center) {
@@ -633,7 +668,15 @@
 
     /**
      * APIMethod: destroy
-     * Destroy this map
+     * Destroy this map.
+     *    Note that if you are using an application which removes a container
+     *    of the map from the DOM, you need to ensure that you destroy the
+     *    map *before* this happens; otherwise, the page unload handler
+     *    will fail because the DOM elements that map.destroy() wants
+     *    to clean up will be gone. (See 
+     *    http://trac.osgeo.org/openlayers/ticket/2277 for more information).
+     *    This will apply to GeoExt and also to other applications which
+     *    modify the DOM of the container of the OpenLayers Map.
      */
     destroy:function() {
         // if unloadDestroy is null, we've already been destroyed
@@ -942,6 +985,7 @@
         }
 
         this.events.triggerEvent("addlayer", {layer: layer});
+        layer.events.triggerEvent("added", {map: this, layer: layer});
         layer.afterAdd();
     },
 
@@ -1016,6 +1060,7 @@
         this.resetLayersZIndex();
 
         this.events.triggerEvent("removelayer", {layer: layer});
+        layer.events.triggerEvent("removed", {map: this, layer: layer});
     },
 
     /**
@@ -1112,7 +1157,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
                 );
@@ -1374,7 +1419,7 @@
                     this.layers[i].onMapResize();                
                 }
     
-                var center = this.getCenter();
+                var center = this.getCachedCenter();
     
                 if (this.baseLayer != null && center != null) {
                     var zoom = this.getZoom();
@@ -1425,7 +1470,7 @@
         var extent = null;
         
         if (center == null) {
-            center = this.getCenter();
+            center = this.getCachedCenter();
         }                
         if (resolution == null) {
             resolution = this.getResolution();
@@ -1465,12 +1510,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
@@ -1499,22 +1559,30 @@
             animate: true,
             dragging: false
         });
-        // getCenter
-        var centerPx = this.getViewPortPxFromLonLat(this.getCenter());
+        if (options.dragging) {
+            if (dx != 0 || dy != 0) {
+                this.moveByPx(dx, dy);
+            }
+        } else {
+            // if we don't have a center, we were using moveByPx previously
+            var forceSetCenter = !this.center;
+            
+            // 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 (forceSetCenter || !newCenterPx.equals(centerPx)) {
+                var newCenterLonLat = this.getLonLatFromViewPortPx(newCenterPx);
+                if (options.animate) {
+                    this.panTo(newCenterLonLat);
+                } else {
+                    this.setCenter(newCenterLonLat, null, options.dragging);
+                }    
+            }
+        }        
+
    },
    
    /** 
@@ -1523,14 +1591,14 @@
      * 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 &&
@@ -1538,31 +1606,25 @@
                 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) {
+                    start: OpenLayers.Function.bind(function() {
                         this.events.triggerEvent("movestart");
                     }, this),
-                    eachStep: OpenLayers.Function.bind(function(lonlat) {
-                        lonlat = new OpenLayers.LonLat(lonlat.lon, lonlat.lat);
-                        this.moveTo(lonlat, this.zoom, {
-                            'dragging': true,
-                            'noEvent': true
-                        });
+                    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),
-                    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.zoom, {noEvent: true});
                         this.events.triggerEvent("moveend");
                     }, this)
                 }
@@ -1593,6 +1655,71 @@
             'caller': 'setCenter'
         });
     },
+    
+    /** 
+     * 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 valid = y <= this.maxPx.y &&
+                    y >= this.minPx.y;
+        var minX, maxX;
+        if (this.baseLayer.wrapDateLine === true) {
+            minX = this.minPx.x, maxX = this.maxPx.x;
+        } else {
+            valid = valid &&
+                    x <= this.maxPx.x &&
+                    x >= this.minPx.x;
+        }
+        if (this.restrictedExtent && valid) {
+            valid = !(this.maxPx.x - x < hw ||
+                      x - this.minPx.x < hw ||
+                      this.maxPx.y - y < hh ||
+                      y - this.minPx.y < hh);
+        }
+        if (valid) {
+            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 (this.baseLayer.wrapDateLine === true) {
+                    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
@@ -1623,14 +1750,14 @@
             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(); 
@@ -1677,7 +1804,7 @@
             }
 
             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);
@@ -1685,16 +1812,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++;
             }    
@@ -1776,14 +1915,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;
+        }        
     },
 
     /**
@@ -1797,8 +1945,8 @@
      *           within the min/max range of zoom levels.
      */
     isValidZoomLevel: function(zoomLevel) {
-       return ( (zoomLevel != null) &&
-                (zoomLevel >= 0) && 
+        return ( (zoomLevel != null) &&
+                (zoomLevel >= this.getRestrictedMinZoom()) && 
                 (zoomLevel < this.getNumZoomLevels()) );
     },
     
@@ -1903,6 +2051,20 @@
     },
     
     /**
+     * Method: getRestricteMinZoom
+     *
+     * Returns:
+     * {Integer} the minimum zoom level allowed for the current baseLayer.
+     */
+    getRestrictedMinZoom: function() {
+        var minZoom = null;
+        if (this.baseLayer != null) {
+            minZoom = this.baseLayer.restrictedMinZoom;
+        }
+        return minZoom;
+    },
+    
+    /**
      * APIMethod: getNumZoomLevels
      * 
      * Returns:
@@ -2088,8 +2250,6 @@
     /**
      * APIMethod: zoomIn
      * 
-     * Parameters:
-     * zoom - {int}
      */
     zoomIn: function() {
         this.zoomTo(this.getZoom() + 1);
@@ -2098,8 +2258,6 @@
     /**
      * APIMethod: zoomOut
      * 
-     * Parameters:
-     * zoom - {int}
      */
     zoomOut: function() {
         this.zoomTo(this.getZoom() - 1);
@@ -2183,7 +2341,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,
@@ -2295,8 +2453,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/ahocevar/renderer-ng/lib/OpenLayers/Marker/Box.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Marker/Box.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Marker/Box.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Marker.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Marker.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Marker.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,10 +1,11 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Events.js
  * @requires OpenLayers/Icon.js
  */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Popup/Anchored.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Popup/Anchored.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Popup/Anchored.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Popup/AnchoredBubble.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Popup/AnchoredBubble.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Popup/AnchoredBubble.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -6,6 +6,7 @@
 
 /**
  * @requires OpenLayers/Popup/Anchored.js
+ * @requires Rico/Corner.js
  */
 
 /**

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Popup/Framed.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Popup/Framed.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Popup/Framed.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Popup/FramedCloud.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Popup/FramedCloud.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Popup/FramedCloud.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -6,6 +6,9 @@
 /**
  * @requires OpenLayers/Popup/Framed.js
  * @requires OpenLayers/Util.js
+ * @requires OpenLayers/BaseTypes/Bounds.js
+ * @requires OpenLayers/BaseTypes/Pixel.js
+ * @requires OpenLayers/BaseTypes/Size.js
  */
 
 /**

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Popup.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Popup.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Popup.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
+/**
+ * @requires OpenLayers/BaseTypes/Class.js
+ */
 
+
 /**
  * Class: OpenLayers.Popup
  * A popup is a small div that can opened and closed on the map.
@@ -427,7 +431,7 @@
      * Makes the popup visible.
      */
     show: function() {
-        OpenLayers.Element.show(this.div);
+        this.div.style.display = '';
 
         if (this.panMapIfOutOfView) {
             this.panIntoView();
@@ -439,7 +443,7 @@
      * Makes the popup invisible.
      */
     hide: function() {
-        OpenLayers.Element.hide(this.div);
+        this.div.style.display = 'none';
     },
 
     /**

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Projection.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Projection.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Projection.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Util.js
  */
 
@@ -29,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=[^\+]*/,
 
@@ -173,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/ahocevar/renderer-ng/lib/OpenLayers/Protocol/HTTP.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/HTTP.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/HTTP.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -80,6 +80,15 @@
     wildcarded: false,
 
     /**
+     * APIProperty: srsInBBOX
+     * {Boolean} Include the SRS identifier in BBOX query string parameter.  
+     *     Default is false.  If true and the layer has a projection object set,
+     *     any BBOX filter will be serialized with a fifth item identifying the
+     *     projection.  E.g. bbox=-1000,-1000,1000,1000,EPSG:900913
+     */
+    srsInBBOX: false,
+
+    /**
      * Constructor: OpenLayers.Protocol.HTTP
      * A class for giving layers generic HTTP protocol.
      *
@@ -200,6 +209,9 @@
                 switch(filter.type) {
                     case OpenLayers.Filter.Spatial.BBOX:
                         params.bbox = filter.value.toArray();
+                        if (this.srsInBBOX && filter.projection) {
+                            params.bbox.push(filter.projection.getCode());
+                        }
                         break;
                     case OpenLayers.Filter.Spatial.DWITHIN:
                         params.tolerance = filter.distance;

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/SOS/v1_0_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/SOS/v1_0_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/SOS/v1_0_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/SOS.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/SOS.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/SOS.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/SQL/Gears.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/SQL/Gears.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/SQL/Gears.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/SQL.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/SQL.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/SQL.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/WFS/v1.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/WFS/v1.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/WFS/v1.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -250,7 +250,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/ahocevar/renderer-ng/lib/OpenLayers/Protocol/WFS/v1_0_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/WFS/v1_0_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/WFS/v1_0_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/WFS/v1_1_0.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/WFS/v1_1_0.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/WFS/v1_1_0.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/WFS.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/WFS.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol/WFS.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Protocol.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
+ */
+
+/**
  * Class: OpenLayers.Protocol
  * Abstract vector layer protocol class.  Not to be instantiated directly.  Use
  *     one of the protocol subclasses instead.

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Renderer/Canvas.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Renderer/Canvas.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Renderer/Canvas.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Renderer/Elements.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Renderer/Elements.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Renderer/Elements.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Renderer/SVG.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Renderer/SVG.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Renderer/SVG.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -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;
@@ -329,11 +334,17 @@
             if ((rotation !== undefined || node._rotation !== undefined) && pos) {
                 node._rotation = rotation;
                 rotation |= 0;
-                var metrics = this.symbolMetrics[id];
-                node.firstChild.setAttributeNS(null, "transform", "rotate(" 
-                    + rotation + " " 
-                    + metrics[1] + " "
-                    + metrics[2] + ")");
+                if (node.nodeName !== "svg") { 
+                    node.setAttributeNS(null, "transform", 
+                        "rotate(" + rotation + " " + pos.x + " " + 
+                        pos.y + ")"); 
+                } else {
+                    var metrics = this.symbolMetrics[id];
+                    node.firstChild.setAttributeNS(null, "transform", "rotate(" 
+                        + rotation + " " 
+                        + metrics[1] + " "
+                        + metrics[2] + ")");
+                }
             }
         }
         
@@ -789,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
@@ -973,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();
+};

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Renderer/VML.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Renderer/VML.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Renderer/VML.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -219,6 +219,7 @@
 
         if (node._geometryClass === "OpenLayers.Geometry.Point") {
             if (style.externalGraphic) {
+                options.isFilled = true;
                 if (style.graphicTitle) {
                     node.title=style.graphicTitle;
                 } 
@@ -764,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/ahocevar/renderer-ng/lib/OpenLayers/Renderer.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Renderer.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Renderer.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
+ */
+
+/**
  * Class: OpenLayers.Renderer 
  * This is the base class for all renderers.
  *

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Request.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Request.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Request.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -36,6 +36,11 @@
     },
     
     /**
+     * Constant: URL_SPLIT_REGEX
+     */
+    URL_SPLIT_REGEX: /([^:]*:)\/\/([^:]*:?[^@]*@)?([^:\/\?]*):?([^\/\?]*)/,
+    
+    /**
      * APIProperty: events
      * {<OpenLayers.Events>} An events object that handles all 
      *     events on the {<OpenLayers.Request>} object.
@@ -120,19 +125,30 @@
 
         // create request, open, and set headers
         var request = new OpenLayers.Request.XMLHttpRequest();
-        var url = config.url;
-        if(config.params) {
-            var paramString = OpenLayers.Util.getParameterString(config.params);
-            if(paramString.length > 0) {
-                var separator = (url.indexOf('?') > -1) ? '&' : '?';
-                url += separator + paramString;
+        var url = OpenLayers.Util.urlAppend(config.url, 
+            OpenLayers.Util.getParameterString(config.params || {}));
+        var sameOrigin = !(url.indexOf("http") == 0);
+        var urlParts = !sameOrigin && url.match(this.URL_SPLIT_REGEX);
+        if (urlParts) {
+            var location = window.location;
+            sameOrigin =
+                urlParts[1] == location.protocol &&
+                urlParts[3] == location.hostname;
+            var uPort = urlParts[4], lPort = location.port;
+            if (uPort != 80 && uPort != "" || lPort != "80" && lPort != "") {
+                sameOrigin = sameOrigin && uPort == lPort;
             }
         }
-        if(config.proxy && (url.indexOf("http") == 0)) {
-            if(typeof config.proxy == "function") {
-                url = config.proxy(url);
+        if (!sameOrigin) {
+            if (config.proxy) {
+                if (typeof config.proxy == "function") {
+                    url = config.proxy(url);
+                } else {
+                    url = config.proxy + encodeURIComponent(url);
+                }
             } else {
-                url = config.proxy + encodeURIComponent(url);
+                OpenLayers.Console.warn(
+                    OpenLayers.i18n("proxyNeeded"), {url: url});
             }
         }
         request.open(

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Rule.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Rule.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Rule.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,10 +1,11 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Util.js
  * @requires OpenLayers/Style.js
  * @requires OpenLayers/Symbolizer/Point.js

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/SingleFile.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/SingleFile.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/SingleFile.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/BBOX.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/BBOX.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/BBOX.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Cluster.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Cluster.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Cluster.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Filter.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Filter.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Filter.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Fixed.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Fixed.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Fixed.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Paging.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Paging.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Paging.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Refresh.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Refresh.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Refresh.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Save.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Save.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy/Save.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Strategy.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
+ */
+
+/**
  * Class: OpenLayers.Strategy
  * Abstract vector layer strategy class.  Not to be instantiated directly.  Use
  *     one of the strategy subclasses instead.

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Style.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Style.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Style.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,10 +1,11 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Util.js
  * @requires OpenLayers/Feature/Vector.js
  */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Style2.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Style2.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Style2.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Rule.js
  * @requires OpenLayers/Symbolizer/Point.js
  * @requires OpenLayers/Symbolizer/Line.js

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/StyleMap.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/StyleMap.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/StyleMap.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Style.js
  * @requires OpenLayers/Feature/Vector.js
  */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer/Line.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer/Line.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer/Line.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer/Point.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer/Point.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer/Point.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer/Polygon.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer/Polygon.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer/Polygon.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer/Raster.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer/Raster.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer/Raster.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer/Text.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer/Text.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer/Text.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Symbolizer.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,13 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
+ */
+
+/**
  * Class: OpenLayers.Symbolizer
  * Base class representing a symbolizer used for feature rendering.
  */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Tile/Image/IFrame.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Tile/Image/IFrame.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Tile/Image/IFrame.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -42,7 +42,7 @@
                 delete iFrame;
             }
         } else {
-            OpenLayers.Tile.Image.prototype.clear.apply(this, arguments)
+            OpenLayers.Tile.Image.prototype.clear.apply(this, arguments);
         }
     },
 
@@ -221,4 +221,5 @@
 
         return form;
     }
-}
+};
+

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Tile/Image.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Tile/Image.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Tile/Image.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Tile/WFS.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Tile/WFS.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Tile/WFS.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Tile.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Tile.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Tile.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,10 +1,11 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 
 /*
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Util.js
  * @requires OpenLayers/Console.js
  * @requires OpenLayers/Lang.js

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Tween.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Tween.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Tween.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,10 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes/Class.js
  * @requires OpenLayers/Console.js
  */
 

Modified: sandbox/ahocevar/renderer-ng/lib/OpenLayers/Util.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers/Util.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers/Util.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,9 +1,15 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
 
 /**
+ * @requires OpenLayers/BaseTypes.js
+ * @requires OpenLayers/BaseTypes/Bounds.js
+ * @requires OpenLayers/BaseTypes/Element.js
+ * @requires OpenLayers/BaseTypes/LonLat.js
+ * @requires OpenLayers/BaseTypes/Pixel.js
+ * @requires OpenLayers/BaseTypes/Size.js
  * @requires OpenLayers/Console.js
  * @requires OpenLayers/Lang.js
  */
@@ -11,11 +17,16 @@
 /**
  * Namespace: Util
  */
-OpenLayers.Util = {};
+OpenLayers.Util = OpenLayers.Util || {};
 
 /** 
  * Function: getElement
  * This is the old $() from prototype
+ *
+ * Parameters:
+ * e - {String or DOMElement or Window}
+ * Return:
+ * {Array(DOMElement)}
  */
 OpenLayers.Util.getElement = function() {
     var elements = [];
@@ -54,53 +65,6 @@
     window.$ = OpenLayers.Util.getElement;
 }
 
-/**
- * APIFunction: extend
- * Copy all properties of a source object to a destination object.  Modifies
- *     the passed in destination object.  Any properties on the source object
- *     that are set to undefined will not be (re)set on the destination object.
- *
- * Parameters:
- * destination - {Object} The object that will be modified
- * source - {Object} The object with properties to be set on the destination
- *
- * Returns:
- * {Object} The destination object.
- */
-OpenLayers.Util.extend = function(destination, source) {
-    destination = destination || {};
-    if(source) {
-        for(var property in source) {
-            var value = source[property];
-            if(value !== undefined) {
-                destination[property] = value;
-            }
-        }
-
-        /**
-         * IE doesn't include the toString property when iterating over an object's
-         * properties with the for(property in object) syntax.  Explicitly check if
-         * the source has its own toString property.
-         */
-
-        /*
-         * FF/Windows < 2.0.0.13 reports "Illegal operation on WrappedNative
-         * prototype object" when calling hawOwnProperty if the source object
-         * is an instance of window.Event.
-         */
-
-        var sourceIsEvt = typeof window.Event == "function"
-                          && source instanceof window.Event;
-
-        if(!sourceIsEvt
-           && source.hasOwnProperty && source.hasOwnProperty('toString')) {
-            destination.toString = source.toString;
-        }
-    }
-    return destination;
-};
-
-
 /** 
  * Function: removeItem
  * Remove an object from an array. Iterates through the array
@@ -146,7 +110,7 @@
  * 
  * Parameters:
  * array - {Array}
- * obj - {Object}
+ * obj - {*}
  * 
  * Returns:
  * {Integer} The index at, which the first object was found in the array.
@@ -175,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.
@@ -445,6 +410,7 @@
 /** 
  * Function: modifyAlphaImageDiv
  * 
+ * Parameters:
  * div - {DOMElement} Div containing Alpha-adjusted Image
  * id - {String}
  * px - {<OpenLayers.Pixel>}
@@ -452,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, 
@@ -493,6 +459,7 @@
 /** 
  * Function: createAlphaImageDiv
  * 
+ * Parameters:
  * id - {String}
  * px - {<OpenLayers.Pixel>}
  * sz - {<OpenLayers.Size>}
@@ -873,13 +840,11 @@
     if (precision == null) {
         precision = OpenLayers.Util.DEFAULT_PRECISION;
     }
-    var number;
-    if (precision == 0) {
+    if (typeof number !== "number") {
         number = parseFloat(number);
-    } else {
-        number = parseFloat(parseFloat(number).toPrecision(precision));
     }
-    return number;
+    return precision === 0 ? number :
+                             parseFloat(number.toPrecision(precision));
 };
 
 /**
@@ -981,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.
@@ -1081,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) {
@@ -1706,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 
@@ -1882,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);
@@ -1892,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/ahocevar/renderer-ng/lib/OpenLayers.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/OpenLayers.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/OpenLayers.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for 
+/* Copyright (c) 2006-2011 by OpenLayers Contributors (see authors.txt for 
  * full list of contributors). Published under the Clear BSD license.  
  * See http://svn.openlayers.org/trunk/openlayers/license.txt for the
  * full text of the license. */
@@ -29,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,272 +93,270 @@
      * OpenLayers library code as it will be appended at the end of this file.
      */
     if(!singleFile) {
-        var jsfiles = new Array(
-            "OpenLayers/Util.js",
-            "OpenLayers/BaseTypes.js",
-            "OpenLayers/BaseTypes/Class.js",
-            "OpenLayers/BaseTypes/Bounds.js",
-            "OpenLayers/BaseTypes/Element.js",
-            "OpenLayers/BaseTypes/LonLat.js",
-            "OpenLayers/BaseTypes/Pixel.js",
-            "OpenLayers/BaseTypes/Size.js",
-            "OpenLayers/Console.js",
-            "OpenLayers/Tween.js",
-            "Rico/Corner.js",
-            "Rico/Color.js",
-            "OpenLayers/Ajax.js",
-            "OpenLayers/Events.js",
-            "OpenLayers/Request.js",
-            "OpenLayers/Request/XMLHttpRequest.js",
-            "OpenLayers/Projection.js",
-            "OpenLayers/Map.js",
-            "OpenLayers/Layer.js",
-            "OpenLayers/Icon.js",
-            "OpenLayers/Marker.js",
-            "OpenLayers/Marker/Box.js",
-            "OpenLayers/Popup.js",
-            "OpenLayers/Tile.js",
-            "OpenLayers/Tile/Image.js",
-            "OpenLayers/Tile/Image/IFrame.js",
-            "OpenLayers/Tile/WFS.js",
-            "OpenLayers/Layer/Image.js",
-            "OpenLayers/Layer/SphericalMercator.js",
-            "OpenLayers/Layer/EventPane.js",
-            "OpenLayers/Layer/FixedZoomLevels.js",
-            "OpenLayers/Layer/Google.js",
-            "OpenLayers/Layer/Google/v3.js",
-            "OpenLayers/Layer/VirtualEarth.js",
-            "OpenLayers/Layer/Yahoo.js",
-            "OpenLayers/Layer/HTTPRequest.js",
-            "OpenLayers/Layer/Grid.js",
-            "OpenLayers/Layer/MapGuide.js",
-            "OpenLayers/Layer/MapServer.js",
-            "OpenLayers/Layer/MapServer/Untiled.js",
-            "OpenLayers/Layer/KaMap.js",
-            "OpenLayers/Layer/KaMapCache.js",
-            "OpenLayers/Layer/MultiMap.js",
-            "OpenLayers/Layer/Markers.js",
-            "OpenLayers/Layer/Text.js",
-            "OpenLayers/Layer/WorldWind.js",
-            "OpenLayers/Layer/ArcGIS93Rest.js",
-            "OpenLayers/Layer/WMS.js",
-            "OpenLayers/Layer/WMS/Untiled.js",
-            "OpenLayers/Layer/WMS/Post.js",
-            "OpenLayers/Layer/WMTS.js",
-            "OpenLayers/Layer/ArcIMS.js",
-            "OpenLayers/Layer/GeoRSS.js",
-            "OpenLayers/Layer/Boxes.js",
-            "OpenLayers/Layer/XYZ.js",
-            "OpenLayers/Layer/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/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/SQL.js",
-            "OpenLayers/Protocol/SQL/Gears.js",
-            "OpenLayers/Protocol/WFS.js",
-            "OpenLayers/Protocol/WFS/v1.js",
-            "OpenLayers/Protocol/WFS/v1_0_0.js",
-            "OpenLayers/Protocol/WFS/v1_1_0.js",
-            "OpenLayers/Protocol/SOS.js",
-            "OpenLayers/Protocol/SOS/v1_0_0.js",
-            "OpenLayers/Layer/PointTrack.js",
-            "OpenLayers/Layer/GML.js",
-            "OpenLayers/Style.js",
-            "OpenLayers/Style2.js",
-            "OpenLayers/StyleMap.js",
-            "OpenLayers/Rule.js",
-            "OpenLayers/Format.js",
-            "OpenLayers/Format/XML.js",
-            "OpenLayers/Format/Context.js",
-            "OpenLayers/Format/ArcXML.js",
-            "OpenLayers/Format/ArcXML/Features.js",
-            "OpenLayers/Format/GML.js",
-            "OpenLayers/Format/GML/Base.js",
-            "OpenLayers/Format/GML/v2.js",
-            "OpenLayers/Format/GML/v3.js",
-            "OpenLayers/Format/Atom.js",
-            "OpenLayers/Format/KML.js",
-            "OpenLayers/Format/GeoRSS.js",
-            "OpenLayers/Format/WFS.js",
-            "OpenLayers/Format/WFSCapabilities.js",
-            "OpenLayers/Format/WFSCapabilities/v1.js",
-            "OpenLayers/Format/WFSCapabilities/v1_0_0.js",
-            "OpenLayers/Format/WFSCapabilities/v1_1_0.js",
-            "OpenLayers/Format/WFSDescribeFeatureType.js",
-            "OpenLayers/Format/WMSDescribeLayer.js",
-            "OpenLayers/Format/WMSDescribeLayer/v1_1.js",
-            "OpenLayers/Format/WKT.js",
-            "OpenLayers/Format/OSM.js",
-            "OpenLayers/Format/GPX.js",
-            "OpenLayers/Format/Filter.js",
-            "OpenLayers/Format/Filter/v1.js",
-            "OpenLayers/Format/Filter/v1_0_0.js",
-            "OpenLayers/Format/Filter/v1_1_0.js",
-            "OpenLayers/Format/SLD.js",
-            "OpenLayers/Format/SLD/v1.js",
-            "OpenLayers/Format/SLD/v1_0_0.js",
-            "OpenLayers/Format/OWSCommon/v1.js",
-            "OpenLayers/Format/OWSCommon/v1_0_0.js",
-            "OpenLayers/Format/OWSCommon/v1_1_0.js",
-            "OpenLayers/Format/CSWGetDomain.js",
-            "OpenLayers/Format/CSWGetDomain/v2_0_2.js",
-            "OpenLayers/Format/CSWGetRecords.js",
-            "OpenLayers/Format/CSWGetRecords/v2_0_2.js",
-            "OpenLayers/Format/WFST.js",
-            "OpenLayers/Format/WFST/v1.js",
-            "OpenLayers/Format/WFST/v1_0_0.js",
-            "OpenLayers/Format/WFST/v1_1_0.js",
-            "OpenLayers/Format/Text.js",
-            "OpenLayers/Format/JSON.js",
-            "OpenLayers/Format/GeoJSON.js",
-            "OpenLayers/Format/WMC.js",
-            "OpenLayers/Format/WMC/v1.js",
-            "OpenLayers/Format/WMC/v1_0_0.js",
-            "OpenLayers/Format/WMC/v1_1_0.js",
-            "OpenLayers/Format/WMSCapabilities.js",
-            "OpenLayers/Format/WMSCapabilities/v1.js",
-            "OpenLayers/Format/WMSCapabilities/v1_1.js",
-            "OpenLayers/Format/WMSCapabilities/v1_1_0.js",
-            "OpenLayers/Format/WMSCapabilities/v1_1_1.js",
-            "OpenLayers/Format/WMSCapabilities/v1_3.js",
-            "OpenLayers/Format/WMSCapabilities/v1_3_0.js",
-            "OpenLayers/Format/WMSGetFeatureInfo.js",
-            "OpenLayers/Format/SOSCapabilities.js",
-            "OpenLayers/Format/SOSCapabilities/v1_0_0.js",
-            "OpenLayers/Format/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/SQL.js",
+                "OpenLayers/Protocol/SQL/Gears.js",
+                "OpenLayers/Protocol/WFS.js",
+                "OpenLayers/Protocol/WFS/v1.js",
+                "OpenLayers/Protocol/WFS/v1_0_0.js",
+                "OpenLayers/Protocol/WFS/v1_1_0.js",
+                "OpenLayers/Protocol/SOS.js",
+                "OpenLayers/Protocol/SOS/v1_0_0.js",
+                "OpenLayers/Layer/PointTrack.js",
+                "OpenLayers/Layer/GML.js",
+                "OpenLayers/Style.js",
+                "OpenLayers/Style2.js",
+                "OpenLayers/StyleMap.js",
+                "OpenLayers/Rule.js",
+                "OpenLayers/Format.js",
+                "OpenLayers/Format/XML.js",
+                "OpenLayers/Format/Context.js",
+                "OpenLayers/Format/ArcXML.js",
+                "OpenLayers/Format/ArcXML/Features.js",
+                "OpenLayers/Format/GML.js",
+                "OpenLayers/Format/GML/Base.js",
+                "OpenLayers/Format/GML/v2.js",
+                "OpenLayers/Format/GML/v3.js",
+                "OpenLayers/Format/Atom.js",
+                "OpenLayers/Format/KML.js",
+                "OpenLayers/Format/GeoRSS.js",
+                "OpenLayers/Format/WFS.js",
+                "OpenLayers/Format/WFSCapabilities.js",
+                "OpenLayers/Format/WFSCapabilities/v1.js",
+                "OpenLayers/Format/WFSCapabilities/v1_0_0.js",
+                "OpenLayers/Format/WFSCapabilities/v1_1_0.js",
+                "OpenLayers/Format/WFSDescribeFeatureType.js",
+                "OpenLayers/Format/WMSDescribeLayer.js",
+                "OpenLayers/Format/WMSDescribeLayer/v1_1.js",
+                "OpenLayers/Format/WKT.js",
+                "OpenLayers/Format/CQL.js",
+                "OpenLayers/Format/OSM.js",
+                "OpenLayers/Format/GPX.js",
+                "OpenLayers/Format/Filter.js",
+                "OpenLayers/Format/Filter/v1.js",
+                "OpenLayers/Format/Filter/v1_0_0.js",
+                "OpenLayers/Format/Filter/v1_1_0.js",
+                "OpenLayers/Format/SLD.js",
+                "OpenLayers/Format/SLD/v1.js",
+                "OpenLayers/Format/SLD/v1_0_0.js",
+                "OpenLayers/Format/OWSCommon/v1.js",
+                "OpenLayers/Format/OWSCommon/v1_0_0.js",
+                "OpenLayers/Format/OWSCommon/v1_1_0.js",
+                "OpenLayers/Format/CSWGetDomain.js",
+                "OpenLayers/Format/CSWGetDomain/v2_0_2.js",
+                "OpenLayers/Format/CSWGetRecords.js",
+                "OpenLayers/Format/CSWGetRecords/v2_0_2.js",
+                "OpenLayers/Format/WFST.js",
+                "OpenLayers/Format/WFST/v1.js",
+                "OpenLayers/Format/WFST/v1_0_0.js",
+                "OpenLayers/Format/WFST/v1_1_0.js",
+                "OpenLayers/Format/Text.js",
+                "OpenLayers/Format/JSON.js",
+                "OpenLayers/Format/GeoJSON.js",
+                "OpenLayers/Format/WMC.js",
+                "OpenLayers/Format/WMC/v1.js",
+                "OpenLayers/Format/WMC/v1_0_0.js",
+                "OpenLayers/Format/WMC/v1_1_0.js",
+                "OpenLayers/Format/WMSCapabilities.js",
+                "OpenLayers/Format/WMSCapabilities/v1.js",
+                "OpenLayers/Format/WMSCapabilities/v1_1.js",
+                "OpenLayers/Format/WMSCapabilities/v1_1_0.js",
+                "OpenLayers/Format/WMSCapabilities/v1_1_1.js",
+                "OpenLayers/Format/WMSCapabilities/v1_3.js",
+                "OpenLayers/Format/WMSCapabilities/v1_3_0.js",
+                "OpenLayers/Format/WMSCapabilities/v1_1_1_WMSC.js",
+                "OpenLayers/Format/WMSGetFeatureInfo.js",
+                "OpenLayers/Format/SOSCapabilities.js",
+                "OpenLayers/Format/SOSCapabilities/v1_0_0.js",
+                "OpenLayers/Format/SOSGetFeatureOfInterest.js",
+                "OpenLayers/Format/SOSGetObservation.js",
+                "OpenLayers/Format/OWSContext.js",
+                "OpenLayers/Format/OWSContext/v0_3_1.js",
+                "OpenLayers/Format/WMTSCapabilities.js",
+                "OpenLayers/Format/WMTSCapabilities/v1_0_0.js",
+                "OpenLayers/Layer/WFS.js",
+                "OpenLayers/Control/GetFeature.js",
+                "OpenLayers/Control/MouseToolbar.js",
+                "OpenLayers/Control/NavToolbar.js",
+                "OpenLayers/Control/PanPanel.js",
+                "OpenLayers/Control/Pan.js",
+                "OpenLayers/Control/ZoomIn.js",
+                "OpenLayers/Control/ZoomOut.js",
+                "OpenLayers/Control/ZoomPanel.js",
+                "OpenLayers/Control/EditingToolbar.js",
+                "OpenLayers/Control/Geolocate.js",
+                "OpenLayers/Symbolizer.js",
+                "OpenLayers/Symbolizer/Point.js",
+                "OpenLayers/Symbolizer/Line.js",
+                "OpenLayers/Symbolizer/Polygon.js",
+                "OpenLayers/Symbolizer/Text.js",
+                "OpenLayers/Symbolizer/Raster.js",
+                "OpenLayers/Lang.js",
+                "OpenLayers/Lang/en.js"
+            ]; // etc.
+        }
 
-        var agent = navigator.userAgent;
-        var docWrite = (agent.match("MSIE") || agent.match("Safari"));
-        if(docWrite) {
-            var allScriptTags = new Array(jsfiles.length);
-        }
-        var host = OpenLayers._getScriptLocation() + "lib/";    
-        for (var i=0, len=jsfiles.length; i<len; i++) {
-            if (docWrite) {
-                allScriptTags[i] = "<script src='" + host + jsfiles[i] +
+        // use "parser-inserted scripts" for guaranteed execution order
+        // http://hsivonen.iki.fi/script-execution/
+        var scriptTags = new Array(jsFiles.length);
+        var host = OpenLayers._getScriptLocation() + "lib/";
+        for (var i=0, len=jsFiles.length; i<len; i++) {
+            scriptTags[i] = "<script src='" + host + jsFiles[i] +
                                    "'></script>"; 
-            } else {
-                var s = document.createElement("script");
-                s.src = host + jsfiles[i];
-                var h = document.getElementsByTagName("head").length ? 
-                           document.getElementsByTagName("head")[0] : 
-                           document.body;
-                h.appendChild(s);
-            }
         }
-        if (docWrite) {
-            document.write(allScriptTags.join(""));
+        if (scriptTags.length > 0) {
+            document.write(scriptTags.join(""));
         }
     }
 })();

Modified: sandbox/ahocevar/renderer-ng/lib/Rico/Color.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/Rico/Color.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/Rico/Color.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,3 +1,8 @@
+/** 
+ * @requires OpenLayers/BaseTypes/Class.js
+ */
+
+
 /*
  * This file has been edited substantially from the Rico-released version by
  * the OpenLayers development team.
@@ -4,6 +9,7 @@
  *
  * This file is licensed under the Apache License, Version 2.0.
  */
+OpenLayers.Rico = OpenLayers.Rico || {};
 OpenLayers.Rico.Color = OpenLayers.Class({
 
    initialize: function(red, green, blue) {

Modified: sandbox/ahocevar/renderer-ng/lib/Rico/Corner.js
===================================================================
--- sandbox/ahocevar/renderer-ng/lib/Rico/Corner.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/lib/Rico/Corner.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,3 +1,8 @@
+/**
+ * @requires Rico/Color.js
+ */
+
+
 /*
  * This file has been edited substantially from the Rico-released
  * version by the OpenLayers development team.
@@ -16,8 +21,8 @@
  * implied. See the License for the specific language governing
  * permissions * and limitations under the License.
  *
- */  
-OpenLayers.Rico = new Object();
+ */
+OpenLayers.Rico = OpenLayers.Rico || {};
 OpenLayers.Rico.Corner = {
 
     round: function(e, options) {

Modified: sandbox/ahocevar/renderer-ng/license.txt
===================================================================
--- sandbox/ahocevar/renderer-ng/license.txt	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/license.txt	2011-02-28 22:02:50 UTC (rev 11589)
@@ -2,7 +2,7 @@
 'project' directories of the Openlayers code repository at svn.openlayers.org,
 and applies to all release of OpenLayers later than 2.5.
  
-Copyright (c) 2005-2010 OpenLayers Contributors. See authors.txt for
+Copyright (c) 2005-2011 OpenLayers Contributors. See authors.txt for
   full list.
 
 All rights reserved.

Added: sandbox/ahocevar/renderer-ng/patch.diff
===================================================================
--- sandbox/ahocevar/renderer-ng/patch.diff	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/patch.diff	2011-02-28 22:02:50 UTC (rev 11589)
@@ -0,0 +1,355 @@
+Index: tests/speed/vector-renderers.html
+===================================================================
+--- tests/speed/vector-renderers.html	(revision 10646)
++++ tests/speed/vector-renderers.html	(working copy)
+@@ -1,4 +1,5 @@
+-<html xmlns="http://www.w3.org/1999/xhtml">
++<!DOCTYPE html>
++<html>
+   <head>
+     <title>Vector Features Performance Test</title>
+     <style type="text/css">
+@@ -17,10 +18,10 @@
+             map = new OpenLayers.Map('map', {
+                 eventListeners: {
+                     movestart: function() {
+-                        console.time("move");
++                        window.console && console.time && console.time("move");
+                     },
+                     moveend: function() {
+-                        console.timeEnd("move");
++                        window.console && console.timeEnd && console.timeEnd("move");
+                     }
+                 }
+             });
+@@ -34,10 +35,10 @@
+                 renderers: renderer,
+                 eventListeners: {
+                     beforefeaturesadded: function() {
+-                        console.time("addFeatures");
++                        window.console && console.time && console.time("addFeatures");
+                     },
+                     featuresadded: function() {
+-                        console.timeEnd("addFeatures");
++                        window.console && console.timeEnd && console.timeEnd("addFeatures");
+                     }
+                 }
+             });
+Index: lib/OpenLayers/Renderer.js
+===================================================================
+--- lib/OpenLayers/Renderer.js	(revision 10646)
++++ lib/OpenLayers/Renderer.js	(working copy)
+@@ -124,6 +124,28 @@
+         }
+     },
+     
++    rescale: function(div, features) {
++        if (features) {
++            for (var i=0, len=features.length; i<len; i++) {
++                this.locked = (i !== (len - 1));
++                this.drawFeature(features[i]);
++            }
++        }
++    },
++    
++    reposition: function(div) {
++        this.root.style.visibility = "hidden";
++
++        div.style.left = -parseInt(this.map.layerContainerDiv.style.left) + "px";
++        div.style.top = -parseInt(this.map.layerContainerDiv.style.top) + "px";
++        var extent = this.map.getExtent();
++        coordSysUnchanged = this.setExtent(extent, false);
++
++        this.root.style.visibility = "visible";
++
++        return coordSysUnchanged;
++    },
++    
+     /**
+      * Method: setSize
+      * Sets the size of the drawing surface.
+Index: lib/OpenLayers/Renderer/NG.js
+===================================================================
+--- lib/OpenLayers/Renderer/NG.js	(revision 10646)
++++ lib/OpenLayers/Renderer/NG.js	(working copy)
+@@ -49,21 +49,39 @@
+     },
+ 
+     /**
+-     * Method: setDimensions
+-     * To be extended by subclasses
++     * Method: rescale
++     * To be called and extended by subclasses
+      *
+      * Parameters:
+      * div - {DOMElement}
+      */
+-    setDimensions: function(div) {
+-        var extent = this.map.getExtent();
++    rescale: function(div, features) {
++        // maxExtent might have changed, e.g. by switching to a new base layer
+         var maxExtent = this.map.getMaxExtent().scale(this.ratio);
+         this.setExtent(maxExtent, true);
++        
++        var extent = this.map.getExtent();        
+         var res = this.getResolution();
+         var left = parseFloat(div.parentNode.style.left);
+         var top = parseFloat(div.parentNode.style.top);
+         div.style.left = (maxExtent.left - extent.left) / res - left;
+         div.style.top = (extent.top - maxExtent.top) / res - top;
++
++        if (features) {
++            var nodes = this.vectorRoot.childNodes;
++            // update styles for the new resolution
++            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)
++                );
++            }
++        }
+     },
+ 
+     /**
+Index: lib/OpenLayers/Renderer/SVG.js
+===================================================================
+--- lib/OpenLayers/Renderer/SVG.js	(revision 10646)
++++ lib/OpenLayers/Renderer/SVG.js	(working copy)
+@@ -61,6 +61,8 @@
+      * See https://bugs.webkit.org/show_bug.cgi?id=33322
+      */
+     supportUse: null,
++    
++    unrenderedFeatureCache: null,
+ 
+     /**
+      * Constructor: OpenLayers.Renderer.SVG
+@@ -79,6 +81,7 @@
+         this.isGecko = (navigator.userAgent.toLowerCase().indexOf("gecko/") != -1);
+         
+         this.symbolMetrics = {};
++        this.unrenderedFeatureCache = {};
+     },
+ 
+     /**
+@@ -164,6 +167,42 @@
+         }
+     },
+     
++    rescale: function(div, features) {
++        this.unrenderedFeatureCache = {};
++        OpenLayers.Renderer.Elements.prototype.rescale.apply(this, arguments);
++    },
++    
++    reposition: function(div) {
++        var coordSysUnchanged = OpenLayers.Renderer.Elements.prototype.reposition.apply(this, arguments);
++
++        // Force a reflow on gecko based browsers to prevent jump/flicker.
++        // This seems to happen on only certain configurations; it was originally
++        // noticed in FF 2.0 and Linux.
++        if (navigator.userAgent.toLowerCase().indexOf("gecko") != -1) {
++            div.scrollLeft = div.scrollLeft;
++        }
++
++        if(!coordSysUnchanged) {
++            var featureCache;
++            for (var id in this.unrenderedFeatureCache) {
++                featureCache = this.undrenderedFeatureCache[id];
++                if (this.drawFeature(featureCache.feature, featureCache.style)) {
++                    delete this.unrenderedFeatureCache[id];
++                };
++            }
++        }
++    },
++    
++    drawFeature: function(feature, style) {
++        var drawn = OpenLayers.Renderer.Elements.prototype.drawFeature.apply(this, arguments);
++        if (!drawn) {
++            this.unrenderedFeatureCache[feature.id] = {
++                feature: feature,
++                style: style
++            };
++        }
++    },
++    
+     /**
+      * Method: translate
+      * Transforms the SVG coordinate system
+Index: lib/OpenLayers/Renderer/SVG2.js
+===================================================================
+--- lib/OpenLayers/Renderer/SVG2.js	(revision 10646)
++++ lib/OpenLayers/Renderer/SVG2.js	(working copy)
+@@ -77,23 +77,16 @@
+      * {Boolean} Whether or not the browser supports the SVG2 renderer
+      */
+     supported: function() {
+-        var webkit = navigator.userAgent.match("AppleWebKit/([0-9]*)");
+-        var gecko = navigator.userAgent.match("Gecko/([0-9]*)");
+-        return ((webkit.length > 0 && webkit[1] >= 533) ||
+-                (gecko.length > 0 && gecko[1] >= "20100722"));
++        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: setDimensions
+-     * 
+-     * Parameters:
+-     * div - {DOMElement}
+-     */
+-    setDimensions: function(div) {
+-        OpenLayers.Renderer.NG.prototype.setDimensions.apply(this, arguments);
++    setExtent: function(extent, resolutionChanged) {
++        OpenLayers.Renderer.NG.prototype.setExtent.apply(this, arguments);
+         
+-        var res = this.getResolution();
+-        
+         var width = this.extent.getWidth();
+         var height = this.extent.getHeight();
+         
+@@ -106,22 +99,10 @@
+         
+         this.rendererRoot.setAttributeNS(null, "viewBox", extentString);
+ 
++        var res = this.getResolution();
+         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)
+-            );
+-        }
+     },
+     
+     /** 
+Index: lib/OpenLayers/Layer/Vector.js
+===================================================================
+--- lib/OpenLayers/Layer/Vector.js	(revision 10646)
++++ lib/OpenLayers/Layer/Vector.js	(working copy)
+@@ -215,12 +215,6 @@
+      */
+     geometryType: null,
+ 
+-    /** 
+-     * Property: drawn
+-     * {Boolean} Whether the Vector Layer features have been drawn yet.
+-     */
+-    drawn: false,
+-
+     /**
+      * Constructor: OpenLayers.Layer.Vector
+      * Create a new vector layer
+@@ -301,7 +295,6 @@
+         }
+         this.renderer = null;
+         this.geometryType = null;
+-        this.drawn = null;
+         OpenLayers.Layer.prototype.destroy.apply(this, arguments);  
+     },
+ 
+@@ -426,7 +419,7 @@
+      * map - {<OpenLayers.Map>}
+      */
+     removeMap: function(map) {
+-        this.drawn = false;
++        this.renderer.clear();
+         if(this.strategies) {
+             var strategy, i, len;
+             for(i=0, len=this.strategies.length; i<len; i++) {
+@@ -466,46 +459,15 @@
+     moveTo: function(bounds, zoomChanged, dragging) {
+         OpenLayers.Layer.prototype.moveTo.apply(this, arguments);
+         
+-        var ng = (this.renderer instanceof OpenLayers.Renderer.NG);
+-        if (ng) {
+-            (!this.drawn || zoomChanged) && this.renderer.setDimensions(this.div);
+-        } else {
+-            var coordSysUnchanged = true;
+-
+-            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.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 (navigator.userAgent.toLowerCase().indexOf("gecko") != -1) {
+-                    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) {
++            // different scale
++            this.renderer.rescale(this.div);
+         }
+-        if (!this.drawn || (!ng && (zoomChanged || !coordSysUnchanged))) {
+-            this.drawn = true;
+-            var feature;
+-            for(var i=0, len=this.features.length; i<len; i++) {
+-                this.renderer.locked = (i !== (len - 1));
+-                feature = this.features[i];
+-                this.drawFeature(feature);
+-            }
+-        }    
++        
++        if (!this.dragging) {
++            // on moveend
++            this.renderer.reposition(this.div);
++        }
+     },
+     
+     /** 
+@@ -774,11 +736,6 @@
+      * style - {String | Object} Named render intent or full symbolizer object.
+      */
+     drawFeature: function(feature, style) {
+-        // don't try to draw the feature with the renderer if the layer is not 
+-        // drawn itself
+-        if (!this.drawn) {
+-            return
+-        }
+         if (typeof style != "object") {
+             if(!style && feature.state === OpenLayers.State.DELETE) {
+                 style = "delete";
+@@ -790,11 +747,7 @@
+             }
+         }
+         
+-        if (!this.renderer.drawFeature(feature, style)) {
+-            this.unrenderedFeatures[feature.id] = feature;
+-        } else {
+-            delete this.unrenderedFeatures[feature.id];
+-        };
++        this.renderer.drawFeature(feature, style);
+     },
+     
+     /**

Modified: sandbox/ahocevar/renderer-ng/readme.txt
===================================================================
--- sandbox/ahocevar/renderer-ng/readme.txt	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/readme.txt	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,7 +1,7 @@
 OpenLayers
 -=-=-=-=-=-
 
-Copyright (c) 2005-2010 OpenLayers Contributors. See authors.txt for
+Copyright (c) 2005-2011 OpenLayers Contributors. See authors.txt for
 more details.
 
 OpenLayers is a JavaScript library for building map applications

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

Modified: sandbox/ahocevar/renderer-ng/tests/BaseTypes/Class.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/BaseTypes/Class.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/BaseTypes/Class.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/BaseTypes/Element.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/BaseTypes/Element.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/BaseTypes/Element.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,7 +1,7 @@
 <html>
   <head>
   
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
 
     <script type="text/javascript">
 

Modified: sandbox/ahocevar/renderer-ng/tests/BaseTypes/LonLat.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/BaseTypes/LonLat.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/BaseTypes/LonLat.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/BaseTypes/Pixel.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/BaseTypes/Pixel.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/BaseTypes/Pixel.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/BaseTypes/Size.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/BaseTypes/Size.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/BaseTypes/Size.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/BaseTypes.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/BaseTypes.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/BaseTypes.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Console.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Console.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Console.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/ArgParser.html (from rev 11588, trunk/openlayers/tests/Control/ArgParser.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/ArgParser.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/tests/Control/ArgParser.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/Attribution.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/Attribution.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/Attribution.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/Button.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/Button.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/Button.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/DragFeature.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/DragFeature.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/DragFeature.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/DragPan.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/DragPan.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/DragPan.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/DrawFeature.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/DrawFeature.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/DrawFeature.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/Geolocate.html (from rev 11588, trunk/openlayers/tests/Control/Geolocate.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/Geolocate.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/tests/Control/Geolocate.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/GetFeature.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/GetFeature.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/GetFeature.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/Graticule.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/Graticule.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/Graticule.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/KeyboardDefaults.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/KeyboardDefaults.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/KeyboardDefaults.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/LayerSwitcher.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/LayerSwitcher.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/LayerSwitcher.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/Measure.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/Measure.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/Measure.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/ModifyFeature.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/ModifyFeature.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/ModifyFeature.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_initialize(t) {
@@ -74,7 +74,7 @@
     }
     
     function test_handleKeypress(t) {
-        t.plan(11);
+        t.plan(14);
 
         /**
          * There are two things that we want to test here
@@ -108,9 +108,17 @@
                      "vertex deletion: removeComponent called on parent with proper geometry");
             }
         };
-        layer.events.on({"featuremodified": function(event) {
-            t.eq(event.feature.id, poly.id, "vertex deletion: featuremodifed triggered");
-        }});
+        layer.events.on({
+            "featuremodified": function(event) {
+                t.eq(event.feature.id, poly.id, "vertex deletion: featuremodifed triggered");
+            },
+            "vertexremoved": function(evt) {
+                layer.events.unregister("vertexremoved", this, arguments.callee);
+                t.eq(evt.feature.id, poly.id, "vertexremoved triggered with correct feature");
+                t.eq(evt.vertex.id, point.geometry.id, "vertexremoved triggered with correct vertex");
+                t.eq(evt.pixel, "foo", "vertexremoved triggered with correct pixel");
+            }
+        });
         layer.drawFeature = function(feature) {
             t.eq(feature.id, poly.id,
                  "vertex deletion: drawFeature called with the proper feature");
@@ -123,7 +131,7 @@
                  "vertex deletion: onModification called with the proper feature");
         };
         // run the above four tests twice
-        control.handleKeypress({keyCode:delKey});
+        control.handleKeypress({keyCode:delKey, xy: "foo"});
         control.handleKeypress({keyCode:dKey});
         t.eq(control.feature.state, OpenLayers.State.UPDATE, "feature state set to update");
 
@@ -640,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();
         
@@ -665,6 +673,7 @@
         var log = [];
         layer.events.on({
             beforefeaturemodified: function(evt) {
+                layer.events.unregister("beforefeaturemodified", this, arguments.callee);
                 log.push(evt);
             },
             featuremodified: function(evt) {
@@ -682,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/ahocevar/renderer-ng/tests/Control/MousePosition.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/MousePosition.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/MousePosition.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/MouseToolbar.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/MouseToolbar.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/MouseToolbar.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/NavToolbar.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/NavToolbar.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/NavToolbar.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/Navigation.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/Navigation.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/Navigation.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/NavigationHistory.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/NavigationHistory.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/NavigationHistory.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/OverviewMap.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/OverviewMap.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/OverviewMap.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/PanPanel.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/PanPanel.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/PanPanel.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/PanZoom.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/PanZoom.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/PanZoom.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/PanZoomBar.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/PanZoomBar.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/PanZoomBar.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
     var map;
     function test_Control_PanZoomBar_constructor (t) {
@@ -44,7 +44,7 @@
         control = new OpenLayers.Control.PanZoomBar();
         map.addControl(control);
         control.removeButtons();
-        control._removeZoomBar();
+        map.destroy();
         t.eq(control.div.childNodes.length, 0, "control's div cleared.");
         t.eq(control.zoombarDiv, null, "zoombar div nullified.")
     }
@@ -67,20 +67,104 @@
 
     }
 
-    function test_Control_PanZoomBar_forceFixedZoomLevel_divClick (t) {
+    function test_Control_PanZoomBar_forceFixedZoomLevel_divClick(t){
         t.plan(1);
-        map = new OpenLayers.Map('map', {controls:[], fractionalZoom: true});
-        var layer = new OpenLayers.Layer.WMS("Test Layer",
-            "http://octo.metacarta.com/cgi-bin/mapserv?",
-            {map: "/mapdata/vmap_wms.map", layers: "basic"});
+        map = new OpenLayers.Map('map', {
+            controls: [],
+            fractionalZoom: true
+        });
+        var layer = new OpenLayers.Layer.WMS("Test Layer", "http://octo.metacarta.com/cgi-bin/mapserv?", {
+            map: "/mapdata/vmap_wms.map",
+            layers: "basic"
+        });
         map.addLayer(layer);
-        control = new OpenLayers.Control.PanZoomBar({forceFixedZoomLevel: true});
+        control = new OpenLayers.Control.PanZoomBar({
+            forceFixedZoomLevel: true
+        });
         map.addControl(control);
-
-        control.divClick({'xy': {'x': 0, 'y': 49}, which: 1});
-        t.eq(map.zoom, 11, "forceFixedZoomLevel makes sure only fixed zoom levels are used even if the map has fractionalZoom");
+        
+        control.divClick({
+            'xy': {
+                'x': 0,
+                'y': 49
+            },
+            which: 1
+        });
+        t.eq(map.zoom, 11, "forceFixedZoomLevel makes sure that after a div click only fixed zoom levels are used even if the map has fractionalZoom");
+    }     
+         
+    function test_Control_PanZoomBar_forceFixedZoomLevel_zoomBarUp (t) {     
+        var numRandomDrags = 25;
+        // plan one static recorded test and two for every random drag
+        t.plan(1 + (numRandomDrags * 2));
+        
+        
+        var map = new OpenLayers.Map('map', {
+            controls: [],
+            fractionalZoom: true
+        });
+        var layer = new OpenLayers.Layer.WMS("Test Layer", "http://octo.metacarta.com/cgi-bin/mapserv?", {
+            map: "/mapdata/vmap_wms.map",
+            layers: "basic"
+        });
+        map.addLayer(layer);
+        
+        // zoom to a fractional ZoomLevel initially:
+        map.setCenter(new OpenLayers.LonLat(0, 0), 9.545);
+        
+        control = new OpenLayers.Control.PanZoomBar({
+            forceFixedZoomLevel: true
+        });
+        map.addControl(control);
+        
+        // The y values come from manually recording real values in an example
+        var evt = {
+            'xy': {
+                'x': 0,
+                'y': -10.633
+            },
+            which: 1
+        };
+        control.zoomStart = {
+            'x': 0,
+            'y': 5.366
+        };
+        control.mouseDragStart = {
+            'x': 0,
+            'y': -10.633
+        };
+        control.deltaY = control.zoomStart.y - evt.xy.y
+        control.zoomBarUp(evt);
+        t.eq(map.zoom, 11, "forceFixedZoomLevel makes sure that after dragging of the handle only fixed zoom levels are used even if the map has fractionalZoom");
+        
+        // randomly drag the handle around
+        // we should never get a zoom < 0 or a non-integer zoom, regardless of
+        // captured random values for start and end of the drag.
+        for (var i = 0; i < numRandomDrags; i++) {
+            var randStartY = Math.random() * 10 * ((i % 2 === 0) ? -1 : 1);
+            var randStopY = Math.random() * 160 * ((i % 2 === 1) ? -1 : 1);
+            var evt = {
+                'xy': {
+                    'x': 0,
+                    'y': randStopY
+                },
+                which: 1
+            };
+            control.zoomStart = {
+                'x': 0,
+                'y': randStartY
+            };
+            control.mouseDragStart = {
+                'x': 0,
+                'y': randStopY
+            };
+            control.deltaY = control.zoomStart.y - evt.xy.y
+            control.zoomBarUp(evt);
+            
+            t.eq(Math.floor(map.zoom), Math.ceil(map.zoom), 'Only integer zooms after random handle drag with forceFixedZoomLevel=true and fractionalZoom=true (current zoom was ' + map.zoom + ')');
+            t.ok(map.zoom >= 0, 'map.zoom is never < 0 after random handle drag with forceFixedZoomLevel=true and fractionalZoom=true');
+        }
     }
-
   </script>
 </head>
 <body>

Modified: sandbox/ahocevar/renderer-ng/tests/Control/Panel.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/Panel.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/Panel.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/Permalink.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/Permalink.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/Permalink.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/PinchZoom.html (from rev 11588, trunk/openlayers/tests/Control/PinchZoom.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/PinchZoom.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/tests/Control/PinchZoom.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/SLDSelect.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/SLDSelect.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/SLDSelect.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/Scale.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/Scale.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/Scale.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/ScaleLine.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/ScaleLine.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/ScaleLine.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/SelectFeature.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/SelectFeature.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/SelectFeature.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
     function test_Control_SelectFeature_constructor(t) {
         t.plan(5);

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

Modified: sandbox/ahocevar/renderer-ng/tests/Control/Split.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/Split.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/Split.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/TouchNavigation.html (from rev 11588, trunk/openlayers/tests/Control/TouchNavigation.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/TouchNavigation.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/tests/Control/TouchNavigation.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/TransformFeature.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/TransformFeature.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/TransformFeature.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control/WMSGetFeatureInfo.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/WMSGetFeatureInfo.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/WMSGetFeatureInfo.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../../lib/OpenLayers.js"></script>
+    <script src="../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_initialize(t) {
@@ -233,7 +233,7 @@
     // Verify that things work all right when we combine different types for the STYLES and LAYERS
     // params in the WMS Layers involved
     function test_mixedParams(t) {
-        t.plan(3);
+        t.plan(5);
         var map = new OpenLayers.Map("map", {
             getExtent: function() {return(new OpenLayers.Bounds(-180,-90,180,90));}
             }
@@ -271,10 +271,22 @@
             log.options = options;
         };
         click.activate();
-        click.getInfoForClick({xy: {x: 50, y: 50}});
+        click.getInfoForClick({xy: {x: 50.2, y: 50.1}});
         OpenLayers.Request.GET = _request;
 
         t.eq(
+            log.options && log.options.params.X,
+            50,
+            "X should be an integer"
+        );
+
+        t.eq(
+            log.options && log.options.params.Y,
+            50,
+            "Y should be an integer" 
+        );
+
+        t.eq(
             log.options && log.options.url,
             "http://localhost/wms",
             "url from first layer used"
@@ -506,7 +518,7 @@
             log.options = options;
         };
         click.activate();
-        click.getInfoForClick({xy: {x: 50, y: 60}});
+        click.getInfoForClick({xy: {x: 50.1, y: 60.2}});
         OpenLayers.Request.GET = _request;
         t.eq(
             log.options && log.options.params.CRS,

Modified: sandbox/ahocevar/renderer-ng/tests/Control/WMTSGetFeatureInfo.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control/WMTSGetFeatureInfo.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control/WMTSGetFeatureInfo.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Control.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Control.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Control.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
     function test_Control_constructor(t) {
         t.plan(4);

Modified: sandbox/ahocevar/renderer-ng/tests/Events.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Events.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Events.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Extras.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Extras.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Extras.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Feature/Vector.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Feature/Vector.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Feature/Vector.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Feature.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Feature.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Feature.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Filter/Comparison.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Filter/Comparison.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Filter/Comparison.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Filter/FeatureId.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Filter/FeatureId.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Filter/FeatureId.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Filter/Logical.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Filter/Logical.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Filter/Logical.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Filter/Spatial.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Filter/Spatial.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Filter/Spatial.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Filter.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Filter.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Filter.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/ArcXML/Features.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/ArcXML/Features.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/ArcXML/Features.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/ArcXML.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/ArcXML.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/ArcXML.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/Atom.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/Atom.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/Atom.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/CQL.html (from rev 11588, trunk/openlayers/tests/Format/CQL.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/CQL.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/tests/Format/CQL.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/CSWGetDomain/v2_0_2.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/CSWGetDomain/v2_0_2.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/CSWGetDomain/v2_0_2.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/CSWGetDomain.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/CSWGetDomain.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/CSWGetDomain.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/CSWGetRecords/v2_0_2.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/CSWGetRecords/v2_0_2.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/CSWGetRecords/v2_0_2.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/CSWGetRecords.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/CSWGetRecords.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/CSWGetRecords.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/Filter/v1.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/Filter/v1.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/Filter/v1.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/Filter/v1_0_0.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/Filter/v1_0_0.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/Filter/v1_0_0.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/Filter/v1_1_0.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/Filter/v1_1_0.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/Filter/v1_1_0.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/Filter.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/Filter.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/Filter.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/GML/v2.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/GML/v2.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/GML/v2.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/GML/v3.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/GML/v3.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/GML/v3.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/GML.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/GML.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/GML.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/GPX.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/GPX.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/GPX.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/GeoJSON.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/GeoJSON.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/GeoJSON.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     var poly_content = '{"type": "FeatureCollection", "features": [{"geometry": {"type": "Polygon", "coordinates": [[[-131.484375, -5.9765625], [-112.5, -58.0078125], [-32.34375, -50.2734375], [-114.609375, 52.3828125], [-167.34375, -35.5078125], [-146.953125, -57.3046875], [-139.921875, -34.1015625], [-131.484375, -5.9765625]]]}, "type": "Feature", "id": 562, "properties": {"strokeColor": "red", "title": "Feature 2", "author": "Your Name Here"}}]}'; 

Modified: sandbox/ahocevar/renderer-ng/tests/Format/GeoRSS.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/GeoRSS.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/GeoRSS.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/JSON.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/JSON.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/JSON.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/KML.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/KML.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/KML.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script type="text/javascript">
 
     var test_content = '<kml xmlns="http://earth.google.com/kml/2.0"><Folder><name>OpenLayers export</name><description>Vector geometries from OpenLayers</description><Placemark id="KML.Polygon"><name>OpenLayers.Feature.Vector_344</name><description>A KLM Polygon</description><Polygon><outerBoundaryIs><LinearRing><coordinates>5.001370157823406,49.26855713824488 8.214706453896161,49.630662409673505 8.397385910100951,48.45172350357396 5.001370157823406,49.26855713824488</coordinates></LinearRing></outerBoundaryIs></Polygon></Placemark><Placemark id="KML.LineString"><name>OpenLayers.Feature.Vector_402</name><description>A KML LineString</description><LineString><coordinates>5.838523393080493,49.74814616928052 5.787079558782349,48.410795432216574 8.91427702008381,49.28932499608202</coordinates></LineString></Placemark><Placemark id="KML.Point"><name>OpenLayers.Feature.Vector_451</name><description>A KML Point</description><Point><coordinates>6.985073041685488,49.8682250149058</c
 oordinates></Point></Placemark><Placemark id="KML.MultiGeometry"><name>SF Marina Harbor Master</name><description>KML MultiGeometry</description><MultiGeometry><LineString><coordinates>-122.4425587930444,37.80666418607323 -122.4428379594768,37.80663578323093</coordinates></LineString><LineString><coordinates>-122.4425509770566,37.80662588061205 -122.4428340530617,37.8065999493009</coordinates></LineString></MultiGeometry></Placemark></Folder></kml>';

Modified: sandbox/ahocevar/renderer-ng/tests/Format/OSM.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/OSM.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/OSM.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../lib/OpenLayers.js"></script> 
+    <script src="../OLLoader.js"></script> 
     <script src="../data/osm.js"></script> 
     <script type="text/javascript">
     

Modified: sandbox/ahocevar/renderer-ng/tests/Format/OWSContext/v0_3_1.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/OWSContext/v0_3_1.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/OWSContext/v0_3_1.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
 
     function test_read_wmswfs(t) {

Modified: sandbox/ahocevar/renderer-ng/tests/Format/SLD/v1_0_0.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/SLD/v1_0_0.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/SLD/v1_0_0.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/SLD.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/SLD.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/SLD.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/SOSCapabilities/v1_0_0.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/SOSCapabilities/v1_0_0.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/SOSCapabilities/v1_0_0.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/SOSGetFeatureOfInterest.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/SOSGetFeatureOfInterest.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/SOSGetFeatureOfInterest.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/SOSGetObservation.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/SOSGetObservation.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/SOSGetObservation.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/Text.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/Text.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/Text.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/WFS.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WFS.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WFS.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/WFSCapabilities/v1.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WFSCapabilities/v1.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WFSCapabilities/v1.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/WFSCapabilities.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WFSCapabilities.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WFSCapabilities.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/WFSDescribeFeatureType.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WFSDescribeFeatureType.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WFSDescribeFeatureType.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/WFST/v1.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WFST/v1.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WFST/v1.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../../lib/OpenLayers.js"></script>
+  <script src="../../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_read(t) {
@@ -89,6 +89,32 @@
         }
     }
 
+    function test_update_null_geometry(t) {
+        var format = new OpenLayers.Format.WFST({
+            featureNS: "http://www.openplans.org/topp",
+            featureType: "states",
+            featurePrefix: "topp",
+            geometryName: "the_geom"
+        });
+
+        var feature = new OpenLayers.Feature.Vector(null, {foo: "bar"});
+        feature.state = OpenLayers.State.UPDATE;
+        feature.fid = "fid.36";
+
+        t.plan(1);
+        var snippets = {
+            "UpdateNullGeometry": feature
+        };
+
+        var arg;
+        for (var snippet in snippets) {
+            arg = snippets[snippet]
+            var expected = readXML(snippet);
+            var got = format.writers["wfs"]["Update"].apply(format, [arg]);
+            t.xml_eq(got, expected, snippet + " request with null geometry created correctly");
+        }
+    }
+
     function test_write_multiple(t) {
 
         var format = new OpenLayers.Format.WFST({
@@ -232,5 +258,19 @@
     </ogc:Filter>
 </wfs:Update>
 --></div>
+<div id="UpdateNullGeometry"><!--
+<wfs:Update xmlns:wfs="http://www.opengis.net/wfs" typeName="topp:states" xmlns:topp="http://www.openplans.org/topp">
+    <wfs:Property>
+        <wfs:Name>the_geom</wfs:Name>
+    </wfs:Property>
+    <wfs:Property>
+        <wfs:Name>foo</wfs:Name>
+        <wfs:Value>bar</wfs:Value>
+    </wfs:Property>
+    <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
+        <ogc:FeatureId fid="fid.36"/>
+    </ogc:Filter>
+</wfs:Update>
+--></div>
 </body>
 </html>

Modified: sandbox/ahocevar/renderer-ng/tests/Format/WFST/v1_0_0.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WFST/v1_0_0.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WFST/v1_0_0.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/WFST/v1_1_0.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WFST/v1_1_0.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WFST/v1_1_0.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/WFST.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WFST.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WFST.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/WKT.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WKT.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WKT.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/WMC/v1.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WMC/v1.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WMC/v1.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/WMC/v1_1_0.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WMC/v1_1_0.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WMC/v1_1_0.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/WMC.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WMC.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WMC.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/WMSCapabilities/v1_1_1.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WMSCapabilities/v1_1_1.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WMSCapabilities/v1_1_1.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html> 
 <head> 
-    <script src="../../../lib/OpenLayers.js"></script>
+    <script src="../../OLLoader.js"></script>
     <script type="text/javascript">
     
     function test_read(t) {

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

Modified: sandbox/ahocevar/renderer-ng/tests/Format/WMSCapabilities/v1_3_0.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WMSCapabilities/v1_3_0.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WMSCapabilities/v1_3_0.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/WMSCapabilities.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WMSCapabilities.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WMSCapabilities.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/WMSDescribeLayer.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WMSDescribeLayer.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WMSDescribeLayer.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/WMSGetFeatureInfo.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WMSGetFeatureInfo.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WMSGetFeatureInfo.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/WMTSCapabilities/v1_0_0.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WMTSCapabilities/v1_0_0.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WMTSCapabilities/v1_0_0.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/WMTSCapabilities.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/WMTSCapabilities.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/WMTSCapabilities.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format/XML.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format/XML.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format/XML.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Format.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Format.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Format.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Geometry/Collection.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Geometry/Collection.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Geometry/Collection.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Geometry/Curve.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Geometry/Curve.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Geometry/Curve.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Geometry/LineString.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Geometry/LineString.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Geometry/LineString.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Geometry/LinearRing.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Geometry/LinearRing.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Geometry/LinearRing.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Geometry/MultiLineString.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Geometry/MultiLineString.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Geometry/MultiLineString.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Geometry/MultiPoint.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Geometry/MultiPoint.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Geometry/MultiPoint.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Geometry/MultiPolygon.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Geometry/MultiPolygon.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Geometry/MultiPolygon.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Geometry/Point.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Geometry/Point.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Geometry/Point.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Geometry/Polygon.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Geometry/Polygon.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Geometry/Polygon.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Geometry/Rectangle.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Geometry/Rectangle.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Geometry/Rectangle.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Geometry/Surface.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Geometry/Surface.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Geometry/Surface.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Geometry.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Geometry.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Geometry.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Handler/Box.html (from rev 11588, trunk/openlayers/tests/Handler/Box.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Handler/Box.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/tests/Handler/Box.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Handler/Click.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Handler/Click.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Handler/Click.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Handler/Drag.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Handler/Drag.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Handler/Drag.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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);
         

Modified: sandbox/ahocevar/renderer-ng/tests/Handler/Feature.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Handler/Feature.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Handler/Feature.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Handler/Hover.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Handler/Hover.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Handler/Hover.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Handler/Keyboard.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Handler/Keyboard.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Handler/Keyboard.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Handler/MouseWheel.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Handler/MouseWheel.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Handler/MouseWheel.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Handler/Path.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Handler/Path.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Handler/Path.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Handler/Pinch.html (from rev 11588, trunk/openlayers/tests/Handler/Pinch.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Handler/Pinch.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/tests/Handler/Pinch.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Handler/Point.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Handler/Point.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Handler/Point.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Handler/Polygon.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Handler/Polygon.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Handler/Polygon.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Handler/RegularPolygon.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Handler/RegularPolygon.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Handler/RegularPolygon.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Handler.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Handler.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Handler.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Icon.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Icon.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Icon.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
     var icon; 
     

Added: sandbox/ahocevar/renderer-ng/tests/Kinetic.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Kinetic.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/tests/Kinetic.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Lang.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Lang.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Lang.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/ArcGIS93Rest.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/ArcGIS93Rest.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/ArcGIS93Rest.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/ArcIMS.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/ArcIMS.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/ArcIMS.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/Bing.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/Bing.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/Bing.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,8 +1,8 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
-    var layer; 
+    var map, layer; 
 
     var layerType = 'Aerial';
     var key = "AqTGBsziZHIJYYxgivLBf0hVdrAk9mWO5cQcb8Yux8sW5M8c8opEC2lZqKR1ZZXf";
@@ -13,23 +13,73 @@
     };
 
     function test_constructor(t) {
-        t.plan(2);
+        t.plan(3);
                        
         var origProcessMetadata = OpenLayers.Layer.Bing.processMetadata;
         var log = [];
         OpenLayers.Layer.Bing.processMetadata = function(metadata) {
-            log.push(metadata);
+            var script = document.getElementById(this._callbackId);
+            log.push(script.src);
             origProcessMetadata.apply(this, arguments);
         };
-        layer = new OpenLayers.Layer.Bing(options);
+        layer = new OpenLayers.Layer.Bing({metadataParams: {foo: "bar"}});
         t.ok(layer instanceof OpenLayers.Layer.Bing, "returns OpenLayers.Layer.Bing object" );
-        t.delay_call(2, function() {
+        t.delay_call(5, function() {
             t.eq(log.length, 1, "processMetadata called");
+            t.eq(OpenLayers.Util.getParameters(log[0]).foo, "bar", "metadataParams passed to url correctly.");
             OpenLayers.Layer.Bing.processMetadata = origProcessMetadata;
             layer.destroy();
         });
     }
     
+    function test_initLayer(t) {
+        t.plan(2);
+
+        var meta = [];
+        var origProcessMetadata = OpenLayers.Layer.Bing.processMetadata;
+        OpenLayers.Layer.Bing.processMetadata = function(metadata) {
+            meta.push(metadata);
+        }
+        map = new OpenLayers.Map("map");
+        layer = new OpenLayers.Layer.Bing(options);
+        var extent;
+        map.addLayers([layer, new OpenLayers.Layer(null, {
+            moveTo: function(bounds, changed) {
+                extent = bounds;
+            }
+        })]);
+        map.zoomToMaxExtent();
+        
+        var map2 = new OpenLayers.Map("map");
+        var layer2 = new OpenLayers.Layer.Bing(OpenLayers.Util.extend({
+            initLayer: function() {
+                // pretend we have a zoomMin of 2
+                this.metadata.resourceSets[0].resources[0].zoomMin = 2;
+                OpenLayers.Layer.Bing.prototype.initLayer.apply(this, arguments);
+            }
+        }, options));
+        var extent2;
+        map2.addLayers([layer2, new OpenLayers.Layer(null, {
+            moveTo: function(bounds, changed) {
+                extent2 = bounds;
+            }
+        })]);
+        map2.zoomToMaxExtent();
+        
+        t.delay_call(5, function() {
+            origProcessMetadata.call(layer, meta[0]);
+            t.eq(extent.toBBOX(), map.getExtent().toBBOX(), "layer extent correct for base layer with zoomMin == 1.");
+            map.destroy();
+        });
+
+        t.delay_call(6, function() {
+            origProcessMetadata.call(layer2, meta[1]);
+            t.eq(extent2.toBBOX(), map2.getExtent().toBBOX(), "layer extent correct for base layer with zoomMin == 2.");
+            map2.destroy();
+            OpenLayers.Layer.Bing.processMetadata = origProcessMetadata;
+        });
+    }
+    
     function test_attribution(t) {
         t.plan(3);
         

Modified: sandbox/ahocevar/renderer-ng/tests/Layer/EventPane.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/EventPane.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/EventPane.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/FixedZoomLevels.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/FixedZoomLevels.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/FixedZoomLevels.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/GML.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/GML.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/GML.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     var name = "GML Layer";

Modified: sandbox/ahocevar/renderer-ng/tests/Layer/GeoRSS.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/GeoRSS.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/GeoRSS.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/Google/v3.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/Google/v3.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/Google/v3.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/Google.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/Google.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/Google.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/Grid.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/Grid.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/Grid.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/HTTPRequest.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/HTTPRequest.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/HTTPRequest.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/Image.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/Image.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/Image.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/KaMap.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/KaMap.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/KaMap.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/MapGuide.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/MapGuide.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/MapGuide.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/MapServer.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/MapServer.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/MapServer.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/Markers.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/Markers.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/Markers.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/MultiMap.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/MultiMap.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/MultiMap.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/PointTrack.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/PointTrack.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/PointTrack.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/SphericalMercator.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/SphericalMercator.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/SphericalMercator.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/TMS.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/TMS.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/TMS.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/Text.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/Text.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/Text.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/TileCache.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/TileCache.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/TileCache.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
 

Modified: sandbox/ahocevar/renderer-ng/tests/Layer/Vector/RootContainer.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/Vector/RootContainer.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/Vector/RootContainer.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/Vector.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/Vector.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/Vector.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/WFS.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/WFS.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/WFS.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/WMS/Post.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/WMS/Post.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/WMS/Post.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Layer/WMS.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Layer/WMS.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Layer/WMS.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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." );
@@ -154,7 +154,6 @@
         map.destroy();
     }
 
-
     function test_Layer_WMS_clone (t) {
         t.plan(4);
 
@@ -313,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);
@@ -330,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];
@@ -381,6 +380,39 @@
 
     }
 
+    function test_tileOrigin(t) {
+        t.plan(4);
+        
+        var dummy = new OpenLayers.Layer(null, {isBaseLayer: true});
+        var unconstrained = new OpenLayers.Layer.WMS(
+            null, "http://example.com/wms", 
+            {layers: "unconstrained"}, 
+            {isBaseLayer: false, buffer: 0}
+        );
+        var constrained = new OpenLayers.Layer.WMS(
+            null, "http://example.com/wms-c", 
+            {layers: "constrained"}, 
+            {buffer: 0, isBaseLayer: false, tileOrigin: new OpenLayers.LonLat(-180, -90)}
+        );
+        var map = new OpenLayers.Map({
+            div: "map",
+            maxExtent: new OpenLayers.Bounds(-185, -95, 185, 95),
+            layers: [dummy, unconstrained, constrained],
+            center: new OpenLayers.LonLat(0, 0),
+            zoom: 1
+        });
+        
+        t.eq(unconstrained.grid[1][0].bounds.bottom, -95, "unconstrained bottom correct");
+        t.eq(unconstrained.grid[1][0].bounds.left, -185, "unconstrained left correct");
+        t.eq(constrained.grid[1][0].bounds.bottom, -90, "constrained bottom correct");
+        t.eq(constrained.grid[1][0].bounds.left, -180, "constrained left correct");
+        
+        map.destroy();
+        
+    }
+
+
+
     // DEPRECATED -- REMOVE IN 3.0
     function test_Layer_Untiled_WMS(t) {
         t.plan(1);

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

Modified: sandbox/ahocevar/renderer-ng/tests/Map.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Map.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Map.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     var isMozilla = (navigator.userAgent.indexOf("compatible") == -1);
@@ -326,6 +326,36 @@
     }
  */
 
+    function test_Map_isValidZoomLevel(t) {
+        t.plan(6);
+        var map = new OpenLayers.Map("map");
+        map.addLayer(new OpenLayers.Layer(null, {
+            isBaseLayer: true, numZoomLevels: 19
+        }))
+        var valid;
+
+        valid = OpenLayers.Map.prototype.isValidZoomLevel.apply(map, [0]);
+        t.eq(valid, true, "0 is a valid zoomLevel when baseLayer has no restrictedMinZoom");
+
+        valid = OpenLayers.Map.prototype.isValidZoomLevel.apply(map, [18]);
+        t.eq(valid, true, "18 is a valid zoomLevel");
+
+        valid = OpenLayers.Map.prototype.isValidZoomLevel.apply(map, [19]);
+        t.eq(valid, false, "19 is not a valid zoomLevel");
+        
+        map.baseLayer.restrictedMinZoom = 1;
+        valid = OpenLayers.Map.prototype.isValidZoomLevel.apply(map, [0]);
+        t.eq(valid, false, "0 is not a valid zoomLevel when baseLayer has restrictedMinZoom of 1");
+
+        valid = OpenLayers.Map.prototype.isValidZoomLevel.apply(map, [1]);
+        t.eq(valid, true, "1 is a valid zoomLevel");
+
+        valid = OpenLayers.Map.prototype.isValidZoomLevel.apply(map, [19]);
+        t.eq(valid, false, "19 is not a valid zoomLevel when baseLayer has restrictedMinZoom of 1");
+
+        map.destroy();
+    }
+    
     function test_Map_isValidLonLat(t) {
         t.plan( 3 );    
 
@@ -699,11 +729,12 @@
     function test_Map_removeLayer(t) {
         t.plan(1);
         var f = function() {};
+        var events = {triggerEvent: f};
         var layers = [
-            {name: "fee", removeMap: f},
-            {name: "fi", removeMap: f},
-            {name: "fo", removeMap: f},
-            {name: "fum", removeMap: f}
+            {name: "fee", removeMap: f, events: events},
+            {name: "fi", removeMap: f, events: events},
+            {name: "fo", removeMap: f, events: events},
+            {name: "fum", removeMap: f, events: events}
         ];
         var map = {
             layers: layers,
@@ -948,6 +979,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) {
@@ -1233,6 +1266,27 @@
         t.ok(maxExtent == map.baseLayer.maxExtent, "null options, valid baseLayer returns map.baseLayer.maxExtent");     
     }
 
+    function test_Map_getRestrictedMinZoom(t){
+        t.plan(3);
+
+        var map = {};
+
+      //no baseLayer
+        var minZoom = OpenLayers.Map.prototype.getRestrictedMinZoom.apply(map);
+        t.eq(minZoom, null, "no baseLayer returns null");
+        
+        map.baseLayer = new OpenLayers.Layer(null, {isBaseLayer: true});
+
+      //baseLayer
+        minZoom = OpenLayers.Map.prototype.getRestrictedMinZoom.apply(map);
+        t.eq(minZoom, 0, "default baseLayer.restrictedMinZoom returns 0");     
+
+      //custom minZoomLevel on baseLayer
+        map.baseLayer.restrictedMinZoom = 1;
+        minZoom = OpenLayers.Map.prototype.getRestrictedMinZoom.apply(map);
+        t.eq(minZoom, map.baseLayer.restrictedMinZoom, "custom baseLayer.restrictedMinZoom returns map.baseLayer.restrictedMinZoom");     
+    }
+    
     function test_Map_zoomToMaxExtent(t){
         t.plan(4)
 
@@ -1269,7 +1323,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()");
@@ -1548,11 +1602,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;
         
@@ -1575,6 +1631,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);
@@ -1585,8 +1647,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;
@@ -1617,7 +1681,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/ahocevar/renderer-ng/tests/Marker/Box.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Marker/Box.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Marker/Box.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Marker.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Marker.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Marker.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../lib/OpenLayers.js"></script>
+  <script src="OLLoader.js"></script>
   <script type="text/javascript">
 
     var marker;

Added: sandbox/ahocevar/renderer-ng/tests/OLLoader.js
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/OLLoader.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/tests/OLLoader.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/OpenLayers4.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/OpenLayers4.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/OpenLayers4.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/OpenLayersJsFiles.html (from rev 11588, trunk/openlayers/tests/OpenLayersJsFiles.html)
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/OpenLayersJsFiles.html	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/tests/OpenLayersJsFiles.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Popup/Anchored.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Popup/Anchored.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Popup/Anchored.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Popup/AnchoredBubble.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Popup/AnchoredBubble.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Popup/AnchoredBubble.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Popup/FramedCloud.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Popup/FramedCloud.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Popup/FramedCloud.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Popup.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Popup.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Popup.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Projection.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Projection.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Projection.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Protocol/HTTP.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Protocol/HTTP.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Protocol/HTTP.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html>
 <head>
-  <script src="../../lib/OpenLayers.js"></script>
+  <script src="../OLLoader.js"></script>
   <script type="text/javascript">
 
     function test_constructor(t) {
@@ -199,29 +199,43 @@
     }
 
     function test_read_bbox(t) {
-        t.plan(1);
-        var protocol = new OpenLayers.Protocol.HTTP();
+        t.plan(6);
 
-        // fake XHR request object
-        var request = {'status': 200};
-
         var _get = OpenLayers.Request.GET;
 
         var bounds = new OpenLayers.Bounds(1, 2, 3, 4);
         var filter = new OpenLayers.Filter.Spatial({
             type: OpenLayers.Filter.Spatial.BBOX,
             value: bounds,
-            projection: "foo"
+            projection: new OpenLayers.Projection("foo")
         });
         
+        // log requests
+        var log, exp;
         OpenLayers.Request.GET = function(options) {
-            t.eq(options.params['bbox'].toString(), bounds.toArray().toString(),
-                'GET called with bbox filter in params');
-            return request;
+            log.push(options.params.bbox);
+            return {status: 200};
         };
 
-        var resp = protocol.read({filter: filter});
+        // 1) issue request with default protocol
+        log = [];
+        new OpenLayers.Protocol.HTTP().read({filter: filter});
 
+        t.eq(log.length, 1, "1) GET called once");
+        t.ok(log[0] instanceof Array, "1) bbox param is array");
+        exp = bounds.toArray();
+        t.eq(log[0], exp, "1) bbox param doesn't include SRS id by default");
+        
+        // 2) issue request with default protocol
+        log = [];
+        new OpenLayers.Protocol.HTTP({srsInBBOX: true}).read({filter: filter});
+
+        t.eq(log.length, 1, "2) GET called once");
+        t.ok(log[0] instanceof Array, "2) bbox param is array");
+        exp = bounds.toArray();
+        exp.push("foo");
+        t.eq(log[0], exp, "2) bbox param includes SRS id if srsInBBOX is true");
+
         OpenLayers.Request.GET = _get;        
     }
 

Modified: sandbox/ahocevar/renderer-ng/tests/Protocol/SOS.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Protocol/SOS.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Protocol/SOS.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Protocol/SQL/Gears.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Protocol/SQL/Gears.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Protocol/SQL/Gears.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Protocol/SQL.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Protocol/SQL.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Protocol/SQL.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Protocol/WFS.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Protocol/WFS.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Protocol/WFS.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Protocol.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Protocol.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Protocol.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Renderer/Canvas.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Renderer/Canvas.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Renderer/Canvas.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Renderer/Elements.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Renderer/Elements.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Renderer/Elements.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Renderer/SVG.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Renderer/SVG.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Renderer/SVG.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Renderer/VML.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Renderer/VML.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Renderer/VML.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Renderer.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Renderer.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Renderer.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Request/XMLHttpRequest.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Request/XMLHttpRequest.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Request/XMLHttpRequest.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Request.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Request.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Request.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,6 +1,6 @@
 <html>
 <head>
-    <script src="../lib/OpenLayers.js"></script>
+    <script src="OLLoader.js"></script>
     <script type="text/javascript">
     function setup() {
         window._xhr = OpenLayers.Request.XMLHttpRequest;
@@ -20,7 +20,7 @@
     function test_issue(t) {
         setup();
 
-        t.plan(21);
+        t.plan(22);
         var request, config;
         var proto = OpenLayers.Request.XMLHttpRequest.prototype;
         var issue = OpenLayers.Function.bind(OpenLayers.Request.issue,
@@ -81,7 +81,18 @@
             t.eq(url, config.url + "&foo=bar", "existing query string gets extended with &");
         }
         request = issue(config);
-
+        
+        // test that query string doesn't get ? followed by &
+        config = {
+            method: "GET",
+            url: "http://example.com/service?",
+            params: {"foo": "bar"}
+        };
+        proto.open = function(method, url, async, user, password) {
+            t.eq(url, config.url + "foo=bar", "existing query string ending with ? gets extended without &");
+        }
+        request = issue(config);
+        
         // reset open method
         proto.open = _open;
         
@@ -319,7 +330,7 @@
     }
 
     function test_ProxyHost(t) {
-        t.plan(4);
+        t.plan(5);
 
         /*
          * Setup
@@ -334,6 +345,7 @@
         var proto = OpenLayers.Request.XMLHttpRequest.prototype;
         var _open = proto.open;
         var log = [];
+        var port;
         proto.open = function(method, url, async, user, password) {
             log.push(url);
         };
@@ -349,9 +361,17 @@
         OpenLayers.Request.GET({url: "http://bar?k1=v1&k2=v2"});
         t.eq(log.length, 1, "[1] XHR.open called once");
         t.eq(log[0], expectedURL, "[1] the URL used for XHR is correct (" + log[0] + ")");
-
+        
+        // 1 test
+        log = [];
+        OpenLayers.ProxyHost = "http://fooproxy/?url=";
+        port = window.location.port ? ':'+window.location.port : '';
+        expectedURL = window.location.protocol+"//"+window.location.hostname+port+"/service";
+        OpenLayers.Request.GET({url: expectedURL});
+        t.eq(log[0], expectedURL, "[2] proxy is not used when requesting the same server");
+        
         // 2 tests
-        log = []
+        log = [];
         OpenLayers.ProxyHost = function(url) {
             var p = OpenLayers.Util.getParameters(url);
             var p = OpenLayers.Util.getParameterString(p);
@@ -359,8 +379,8 @@
         };
         expectedURL = "http://barproxy/?k1=v1&k2=v2";
         OpenLayers.Request.GET({url: "http://bar?k1=v1&k2=v2"});
-        t.eq(log.length, 1, "[2] XHR.open called once");
-        t.eq(log[0], expectedURL, "[2] the URL used for XHR is correct (" + log[0] + ")");
+        t.eq(log.length, 1, "[3] XHR.open called once");
+        t.eq(log[0], expectedURL, "[3] the URL used for XHR is correct (" + log[0] + ")");
 
         /*
          * Teardown

Modified: sandbox/ahocevar/renderer-ng/tests/Rule.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Rule.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Rule.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Strategy/BBOX.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Strategy/BBOX.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Strategy/BBOX.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Strategy/Cluster.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Strategy/Cluster.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Strategy/Cluster.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Strategy/Filter.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Strategy/Filter.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Strategy/Filter.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-<script src="../../lib/OpenLayers.js"></script>
+<script src="../OLLoader.js"></script>
 <script>
 
 var features = [];

Modified: sandbox/ahocevar/renderer-ng/tests/Strategy/Fixed.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Strategy/Fixed.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Strategy/Fixed.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Strategy/Paging.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Strategy/Paging.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Strategy/Paging.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Strategy/Refresh.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Strategy/Refresh.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Strategy/Refresh.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Strategy/Save.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Strategy/Save.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Strategy/Save.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Strategy.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Strategy.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Strategy.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Style.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Style.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Style.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Style2.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Style2.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Style2.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/StyleMap.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/StyleMap.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/StyleMap.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Symbolizer/Line.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Symbolizer/Line.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Symbolizer/Line.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Symbolizer/Point.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Symbolizer/Point.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Symbolizer/Point.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Symbolizer/Polygon.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Symbolizer/Polygon.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Symbolizer/Polygon.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Symbolizer/Raster.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Symbolizer/Raster.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Symbolizer/Raster.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Symbolizer/Text.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Symbolizer/Text.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Symbolizer/Text.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Symbolizer.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Symbolizer.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Symbolizer.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Tile/Image/IFrame.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Tile/Image/IFrame.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Tile/Image/IFrame.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Tile/Image.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Tile/Image.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Tile/Image.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Tile/WFS.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Tile/WFS.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Tile/WFS.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Tile.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Tile.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Tile.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Tween.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Tween.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Tween.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/Util.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/Util.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/Util.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -5,16 +5,20 @@
     var custom$ = function() {};
     window.$ = custom$;
   </script>
-  <script src="../lib/OpenLayers/SingleFile.js"></script>
-  <script src="../lib/OpenLayers/Util.js"></script>
-  <script src="../lib/OpenLayers/BaseTypes.js"></script>
-  <script src="../lib/OpenLayers/BaseTypes/Class.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/ahocevar/renderer-ng/tests/list-tests.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/list-tests.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/list-tests.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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>
@@ -83,6 +88,7 @@
     <li>Format/WMC/v1.html</li>
     <li>Format/WMSCapabilities.html</li>
     <li>Format/WMSCapabilities/v1_1_1.html</li>
+    <li>Format/WMSCapabilities/v1_1_1_WMSC.html</li>
     <li>Format/WMSCapabilities/v1_3_0.html</li>
     <li>Format/WMSDescribeLayer.html</li>
     <li>Format/WMSGetFeatureInfo.html</li>
@@ -110,8 +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>
@@ -161,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>
@@ -203,5 +212,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/ahocevar/renderer-ng/tests/node.js/mockdom.js
===================================================================
--- trunk/openlayers/tests/node.js/mockdom.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/node.js/mockdom.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/node.js/mockdom.js (from rev 11588, trunk/openlayers/tests/node.js/mockdom.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/node.js/mockdom.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/tests/node.js/mockdom.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/node.js/node-tests.cfg
===================================================================
--- trunk/openlayers/tests/node.js/node-tests.cfg	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/node.js/node-tests.cfg	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/node.js/node-tests.cfg (from rev 11588, trunk/openlayers/tests/node.js/node-tests.cfg)
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/node.js/node-tests.cfg	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/tests/node.js/node-tests.cfg	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/node.js/node.js
===================================================================
--- trunk/openlayers/tests/node.js/node.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/node.js/node.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -1 +0,0 @@
-exports.OpenLayers = OpenLayers;

Copied: sandbox/ahocevar/renderer-ng/tests/node.js/node.js (from rev 11588, trunk/openlayers/tests/node.js/node.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/node.js/node.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/tests/node.js/node.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -0,0 +1 @@
+exports.OpenLayers = OpenLayers;

Deleted: sandbox/ahocevar/renderer-ng/tests/node.js/run-test.js
===================================================================
--- trunk/openlayers/tests/node.js/run-test.js	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/node.js/run-test.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/node.js/run-test.js (from rev 11588, trunk/openlayers/tests/node.js/run-test.js)
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/node.js/run-test.js	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/tests/node.js/run-test.js	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/node.js/run.sh
===================================================================
--- trunk/openlayers/tests/node.js/run.sh	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/node.js/run.sh	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/node.js/run.sh (from rev 11588, trunk/openlayers/tests/node.js/run.sh)
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/node.js/run.sh	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/tests/node.js/run.sh	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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/ahocevar/renderer-ng/tests/run-tests.html
===================================================================
--- sandbox/ahocevar/renderer-ng/tests/run-tests.html	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tests/run-tests.html	2011-02-28 22:02:50 UTC (rev 11589)
@@ -686,7 +686,7 @@
 		timeout_seconds=4;
 	}
 	var no_close=document.getElementById( "dont_close_test_windows" );
-	var action={ action_kind: "window", wnd_url: url.toString(), wnd_wnd: null, wnd_fn: fn, wnd_timeout_milliseconds: timeout_seconds*1000, wnd_no_close: no_close.checked };
+	var action={ action_kind: "window", wnd_url: url.toString() + (window.location.search || ""), wnd_wnd: null, wnd_fn: fn, wnd_timeout_milliseconds: timeout_seconds*1000, wnd_no_close: no_close.checked };
 	this.delay_total_milliseconds_left+=Test.AnotherWay._action_estimate_milliseconds( action );
 	this.delay_actions.push( action );
 }
@@ -2410,4 +2410,10 @@
 </div>
 
 </span>
+<script>
+    if (/noscroll/.test(location.href)) {
+        document.getElementById('scroller').style.height='auto';
+        document.getElementById('right_frame').style.height='auto';
+    }
+</script>
 </body></html>

Modified: sandbox/ahocevar/renderer-ng/theme/default/google.css
===================================================================
--- sandbox/ahocevar/renderer-ng/theme/default/google.css	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/theme/default/google.css	2011-02-28 22:02:50 UTC (rev 11589)
@@ -3,8 +3,15 @@
     bottom: 2px;
     left: auto;  
 }
+.olLayerGoogleV3.olLayerGoogleCopyright {
+    bottom: 0px;
+    right: 0px !important;
+}
 .olLayerGooglePoweredBy {
     left: 2px;
     bottom: 2px;   
 }
+.olLayerGoogleV3.olLayerGooglePoweredBy {
+    bottom: 0px !important;
+}
 

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/add_point_off.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/drag-rectangle-off.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/drag-rectangle-on.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/draw_line_off.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/draw_line_on.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/draw_point_off.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/draw_point_on.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/draw_polygon_off.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/draw_polygon_on.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/editing_tool_bar.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/move_feature_off.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/move_feature_on.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/navigation_history.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/pan-panel-NOALPHA.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/pan-panel.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/pan_on.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/panning-hand-off.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/panning-hand-on.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/remove_point_on.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/save_features_off.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/save_features_on.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/view_next_off.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/view_previous_off.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/img/zoom-panel.png
===================================================================
(Binary files differ)

Modified: sandbox/ahocevar/renderer-ng/theme/default/style.css
===================================================================
--- sandbox/ahocevar/renderer-ng/theme/default/style.css	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/theme/default/style.css	2011-02-28 22:02:50 UTC (rev 11589)
@@ -16,12 +16,18 @@
 
 .olLayerGoogleCopyright {
     left: 2px;
-    bottom: 2px;  
+    bottom: 2px;
 }
+.olLayerGoogleV3.olLayerGoogleCopyright {
+    right: auto !important;
+}
 .olLayerGooglePoweredBy {
     left: 2px;
     bottom: 15px;   
 }
+.olLayerGoogleV3.olLayerGooglePoweredBy {
+    bottom: 15px !important;
+}
 .olControlAttribution {
     font-size: smaller; 
     right: 3px; 
@@ -87,11 +93,13 @@
 .olControlOverviewMapMinimizeButton {
     right: 0px;
     bottom: 80px;
+    cursor: pointer;
 }    
 
 .olControlOverviewMapMaximizeButton {
     right: 0px;
     bottom: 80px;
+    cursor: pointer;
 }
 
 .olControlOverviewMapExtentRectangle {
@@ -396,6 +404,7 @@
 .olControlLayerSwitcher .minimizeDiv {
     top: 5px;
     right: 0px;
+    cursor: pointer;
 }
 
 .olBingAttribution {


Property changes on: sandbox/ahocevar/renderer-ng/tools
___________________________________________________________________
Modified: svn:ignore
   - *.pyc

   + *.pyc
closure-compiler.jar



Added: sandbox/ahocevar/renderer-ng/tools/closure.py
===================================================================
--- sandbox/ahocevar/renderer-ng/tools/closure.py	                        (rev 0)
+++ sandbox/ahocevar/renderer-ng/tools/closure.py	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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

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

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

Modified: sandbox/ahocevar/renderer-ng/tools/update_dev_dir.sh
===================================================================
--- sandbox/ahocevar/renderer-ng/tools/update_dev_dir.sh	2011-02-28 19:34:46 UTC (rev 11588)
+++ sandbox/ahocevar/renderer-ng/tools/update_dev_dir.sh	2011-02-28 22:02:50 UTC (rev 11589)
@@ -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