[OpenLayers-Commits] r11254 - in sandbox/cmoullet/openlayers: . examples lib/OpenLayers/Handler

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Tue Feb 22 10:48:01 EST 2011


Author: cmoullet
Date: 2011-02-22 07:48:01 -0800 (Tue, 22 Feb 2011)
New Revision: 11254

Modified:
   sandbox/cmoullet/openlayers/
   sandbox/cmoullet/openlayers/examples/controls.html
   sandbox/cmoullet/openlayers/lib/OpenLayers/Handler/Click.js
Log:
Merge with trunk



Property changes on: sandbox/cmoullet/openlayers
___________________________________________________________________
Modified: svn:mergeinfo
   - /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:11161-11245
   + /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:11161-11253

Modified: sandbox/cmoullet/openlayers/examples/controls.html
===================================================================
--- sandbox/cmoullet/openlayers/examples/controls.html	2011-02-22 15:28:31 UTC (rev 11253)
+++ sandbox/cmoullet/openlayers/examples/controls.html	2011-02-22 15:48:01 UTC (rev 11254)
@@ -27,23 +27,29 @@
                 });
     
 
-                var ol_wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
+                var ol_wms = new OpenLayers.Layer.WMS(
+                    "OpenLayers WMS",
                     "http://vmap0.tiles.osgeo.org/wms/vmap0",
-                    {layers: 'basic'} );
-                var jpl_wms = new OpenLayers.Layer.WMS( "NASA Global Mosaic",
-                    "http://t1.hypercube.telascience.org/cgi-bin/landsat7", 
-                    {layers: "landsat7"});
-                var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo",
+                    {layers: 'basic'} 
+                );
+
+                var gwc = new OpenLayers.Layer.WMS(
+                    "Global Imagery",
+                    "http://maps.opengeo.org/geowebcache/service/wms",
+                    {layers: "bluemarble"},
+                    {tileOrigin: new OpenLayers.LonLat(-180, -90)}
+                );
+                var dm_wms = new OpenLayers.Layer.WMS(
+                    "DM Solutions Demo",
                     "http://www2.dmsolutions.ca/cgi-bin/mswms_gmap",
                     {layers: "bathymetry,land_fn,park,drain_fn,drainage," +
                              "prov_bound,fedlimit,rail,road,popplace",
-                     transparent: "true", format: "image/png" });
+                     transparent: "true", format: "image/png"},
+                    {visibility: false}
+                );
 
-                jpl_wms.setVisibility(false);
-                dm_wms.setVisibility(false);
-
-                map.addLayers([ol_wms, jpl_wms, dm_wms]);
-                if (!map.getCenter()) map.zoomToMaxExtent();
+                map.addLayers([ol_wms, gwc, dm_wms]);
+                map.zoomToMaxExtent();
             }
         </script>
     </head>

Modified: sandbox/cmoullet/openlayers/lib/OpenLayers/Handler/Click.js
===================================================================
--- sandbox/cmoullet/openlayers/lib/OpenLayers/Handler/Click.js	2011-02-22 15:28:31 UTC (rev 11253)
+++ sandbox/cmoullet/openlayers/lib/OpenLayers/Handler/Click.js	2011-02-22 15:48:01 UTC (rev 11254)
@@ -269,10 +269,10 @@
      *   touches property from last touchstart or touchmove
      */
     touchend: function(evt) {
-        if(!evt) {
+        var last = this.last || this.down;
+        if (!evt || !last) {
             return false;
         }
-        var last = this.last || this.down;
         evt.xy = last.xy;
         evt.lastTouches = last.touches;
         return evt.xy ? this.click(evt) : false;



More information about the Commits mailing list