[OpenLayers-Users] Search and pan to feature

Phil Scadden p.scadden at gns.cri.nz
Sun Nov 3 12:31:06 PST 2013


I would do a WFS attribute based query on the pole no. and use the 
returned GML to construct an extent bounds object, then do zoomToExtent.

Something like:
         var fts = request.features;
         if (fts.length>0 && fts[0].geometry) {
             sExt = fts[0].geometry.getBounds().clone();
             for(var i=1;i<fts.length;i++) {
                 sExt.extend(fts[i].geometry.getBounds());
             }
         }


Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.



More information about the Users mailing list