[OpenLayers-Trac] [OpenLayers] #3589: BBOX-Strategy

OpenLayers trac-20090302 at openlayers.org
Wed Nov 30 06:18:15 EST 2011


#3589: BBOX-Strategy
----------------------------+-----------------------------------------------
 Reporter:  ottoxt          |       Owner:  tschaub     
     Type:  bug             |      Status:  new         
 Priority:  minor           |   Milestone:  2.12 Release
Component:  Strategy.BBOX   |     Version:  2.11        
 Keywords:  transformation  |       State:              
----------------------------+-----------------------------------------------
 When using BBOX-strategy on transformed vectorlayers, the transformation
 fails.
 Changing the BBOX merge method with the higlighted line of code repaired
 this:

 {{{
 merge: function(resp) {
         this.layer.destroyFeatures();
         var features = resp.features;
         if(features && features.length > 0) {
             var remote = this.layer.projection;
             var local = this.layer.map.getProjectionObject();
             if (!local.equals(remote)) {
 //line added
                 if (!this.layer.protocol.format.externalProjection) {
                     var geom;
                     for (var i = 0, len = features.length; i < len; ++i) {
                         geom = features[i].geometry;
                         if (geom) {
                             geom.transform(remote, local);
                         }
                     }
 //line added
                 }
             }
             this.layer.addFeatures(features);
         }
         this.response = null;
         this.layer.events.triggerEvent("loadend");
     },
 }}}

 Find the changed BBOX.js (Ver 2.11) in the attachment

-- 
Ticket URL: <http://trac.openlayers.org/ticket/3589>
OpenLayers <http://openlayers.org/>
A free AJAX map viewer


More information about the Trac mailing list