[OpenLayers-Users] Zoom to filtered feature
Michał Średnicki
michsred at gmail.com
Fri Mar 11 09:58:25 EST 2011
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 <ravitheja at ymail.com>
> 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 <michsred at gmail.com>
> *To:* users at openlayers.org
> *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
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
--
Michał Średnicki
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110311/97f75fbc/attachment-0001.html
More information about the Users
mailing list