Thank you Ravi. The parcel layer is served also via WFS but I don't have much experience with dealing with WFS layers in OpenLayers. Can you say something more about this method of receiving feature bounds in Open Layers?
Regards, Michal 2011/3/11 Ravi Pavuluri <[email protected]> > Michal, > > I am not sure if this answers your question completely. You can try using > WFS which can get the boundary of your feature of interest and then you can > code for zooming to those bounds. > > -Ravi. > > ------------------------------ > *From:* michsred <[email protected]> > *To:* [email protected] > *Sent:* Fri, March 11, 2011 3:58:47 AM > *Subject:* [OpenLayers-Users] Zoom to filtered feature > > Hi list, > > is there possible to perform automatical zoom to feature filtered by CQL > filter? > > I have a WMS layer containig parcels and I want to enable some kind of > searching mechanism where user will put parcel number to a form and after > apply it the only searched parcel will be displayed and map view will be > set > to this parcel's bounds. > > I enabled CQL filtering like this: > > function updateFilter(){ > if(pureCoverage) > return; > > var filter = "parcel_number = " + > document.getElementById('filter').value; > > var filterParams = { > cql_filter: filter > }; > > mergeNewParams(filterParams); > } > > function mergeNewParams(params){ > myLayer.mergeNewParams(params); > } > > and after I put parcel number to a form connected with updateFilter() > function and apply it, the only searched parcel is dispayed. My question is > what should I do to enable zooming to the filtered parcel? Is it possible > to > retrieve BBOX of a particular feature from WMS layer and then use it in JS? > > Thank you in advance for any suggestions! > > Michal > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Zoom-to-filtered-feature-tp6160737p6160737.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/openlayers-users > > -- Michał Średnicki
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
