[OpenLayers-Users] Re: need a little help with this ( user input & wfsprotocol.read )

Phil Scadden p.scadden at gns.cri.nz
Mon Mar 5 15:52:34 EST 2012


On 6/03/2012 2:19 a.m., Diego M. wrote:
> *it's stable now and working great.
> i think it will be fine.
>
> regarding zoom thing,*
>
>
> Phil Scadden wrote
>> Just expand the bounds calculated by sEXT a little.
>>
> *i try this but nothing change
> am i doing it right ?*
>
> function processTheQuery(request) {
> 	
>       if (request.data&&  request.data.bbox) {
>             var b = request.data.bbox;
>             sExt = new OpenLayers.Bounds(b[0],b[1],b[2],b[3]);
>       }else {
>             var fts = request.features;
>             if (fts.length>0) {
>                 sExt = fts[0].geometry.getBounds().clone();
>                 for(var i=1;i<fts.length;i++) {
> 			
> 			&lt;b>var Lbouns = parseFloat((fts[i].geometry.getBounds().left) +
> 50);
Should be -50
> 			var Rbouns = parseFloat((fts[i].geometry.getBounds().right) + 50);
> 			   var Tbouns = parseFloat((fts[i].geometry.getBounds().top) + 50);
Likewise -50 to expand the box. Draw yourself a picture to see what you 
are doing.


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