[OpenLayers-Commits] r11782 - in sandbox/cmoullet/openlayers: . examples lib/OpenLayers/Format/WFST lib/OpenLayers/Protocol/WFS

commits-20090109 at openlayers.org commits-20090109 at openlayers.org
Wed Mar 30 09:36:50 EDT 2011


Author: cmoullet
Date: 2011-03-30 06:36:49 -0700 (Wed, 30 Mar 2011)
New Revision: 11782

Modified:
   sandbox/cmoullet/openlayers/
   sandbox/cmoullet/openlayers/examples/drag-feature.html
   sandbox/cmoullet/openlayers/examples/modify-feature.html
   sandbox/cmoullet/openlayers/examples/select-feature.html
   sandbox/cmoullet/openlayers/lib/OpenLayers/Format/WFST/v1_1_0.js
   sandbox/cmoullet/openlayers/lib/OpenLayers/Protocol/WFS/v1.js
Log:
Merge with trunk



Property changes on: sandbox/cmoullet/openlayers
___________________________________________________________________
Modified: svn:mergeinfo
   - /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:11161-11775
   + /sandbox/roberthl/openlayers:9745-9748
/trunk/openlayers:11161-11775,11777-11781

Modified: sandbox/cmoullet/openlayers/examples/drag-feature.html
===================================================================
--- sandbox/cmoullet/openlayers/examples/drag-feature.html	2011-03-30 13:27:30 UTC (rev 11781)
+++ sandbox/cmoullet/openlayers/examples/drag-feature.html	2011-03-30 13:36:49 UTC (rev 11782)
@@ -25,8 +25,14 @@
                 var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
                     "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'});
     
-                vectors = new OpenLayers.Layer.Vector("Vector Layer");
+                // allow testing of specific renderers via "?renderer=Canvas", etc
+                var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
+                renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
 
+                vectors = new OpenLayers.Layer.Vector("Vector Layer", {
+                    renderers: renderer
+                });
+
                 map.addLayers([wms, vectors]);
                 map.addControl(new OpenLayers.Control.LayerSwitcher());
                 map.addControl(new OpenLayers.Control.MousePosition());

Modified: sandbox/cmoullet/openlayers/examples/modify-feature.html
===================================================================
--- sandbox/cmoullet/openlayers/examples/modify-feature.html	2011-03-30 13:27:30 UTC (rev 11781)
+++ sandbox/cmoullet/openlayers/examples/modify-feature.html	2011-03-30 13:36:49 UTC (rev 11782)
@@ -25,8 +25,15 @@
             var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
                 "http://vmap0.tiles.osgeo.org/wms/vmap0?", {layers: 'basic'}); 
             OpenLayers.Feature.Vector.style['default']['strokeWidth'] = '2';
-            vectors = new OpenLayers.Layer.Vector("Vector Layer");
 
+            // allow testing of specific renderers via "?renderer=Canvas", etc
+            var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
+            renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
+
+            vectors = new OpenLayers.Layer.Vector("Vector Layer", {
+                renderers: renderer
+            });
+
             map.addLayers([wms, vectors]);
             map.addControl(new OpenLayers.Control.LayerSwitcher());
             map.addControl(new OpenLayers.Control.MousePosition());

Modified: sandbox/cmoullet/openlayers/examples/select-feature.html
===================================================================
--- sandbox/cmoullet/openlayers/examples/select-feature.html	2011-03-30 13:27:30 UTC (rev 11781)
+++ sandbox/cmoullet/openlayers/examples/select-feature.html	2011-03-30 13:36:49 UTC (rev 11782)
@@ -22,7 +22,13 @@
                 {layers: 'basic'}
             ); 
 
-            var vectors = new OpenLayers.Layer.Vector("Vector Layer");
+            // allow testing of specific renderers via "?renderer=Canvas", etc
+            var renderer = OpenLayers.Util.getParameters(window.location.href).renderer;
+            renderer = (renderer) ? [renderer] : OpenLayers.Layer.Vector.prototype.renderers;
+
+            var vectors = new OpenLayers.Layer.Vector("Vector Layer", {
+                renderers: renderer
+            });
             vectors.events.on({
                 'featureselected': function(feature) {
                     $('counter').innerHTML = this.selectedFeatures.length;

Modified: sandbox/cmoullet/openlayers/lib/OpenLayers/Format/WFST/v1_1_0.js
===================================================================
--- sandbox/cmoullet/openlayers/lib/OpenLayers/Format/WFST/v1_1_0.js	2011-03-30 13:27:30 UTC (rev 11781)
+++ sandbox/cmoullet/openlayers/lib/OpenLayers/Format/WFST/v1_1_0.js	2011-03-30 13:36:49 UTC (rev 11782)
@@ -109,8 +109,10 @@
         "wfs": OpenLayers.Util.applyDefaults({
             "GetFeature": function(options) {
                 var node = OpenLayers.Format.WFST.v1.prototype.writers["wfs"]["GetFeature"].apply(this, arguments);
-                options && options.resultType && this.setAttributes(node, {
-                    resultType: options.resultType
+                options && this.setAttributes(node, {
+                    resultType: options.resultType,
+                    startIndex: options.startIndex,
+                    count: options.count
                 });
                 return node;
             },

Modified: sandbox/cmoullet/openlayers/lib/OpenLayers/Protocol/WFS/v1.js
===================================================================
--- sandbox/cmoullet/openlayers/lib/OpenLayers/Protocol/WFS/v1.js	2011-03-30 13:27:30 UTC (rev 11781)
+++ sandbox/cmoullet/openlayers/lib/OpenLayers/Protocol/WFS/v1.js	2011-03-30 13:36:49 UTC (rev 11782)
@@ -167,6 +167,16 @@
      * });
      * (end)
      *
+     * To use a configured protocol to use WFS paging (if supported by the
+     * server), applications could do the following:
+     *
+     * (code)
+     * protocol.read({
+     *     startIndex: 0,
+     *     count: 50
+     * });
+     * (end)
+     *
      * To limit the attributes returned by the GetFeature request, applications
      * can use the propertyNames option to specify the properties to include in
      * the response:



More information about the Commits mailing list