For ex. my search is to display the state selected in the demo states.shp.
After th WFS searches the particular states, I want it to be highlighted.
How can is be done. The search is working fine.
--
View this message in context: http://www.nabble.com/To-highlight-the-polygon-%2Creturned-in-the-search-feature.-tf4585883.html#a13090644
Sent from the GeoServer - Dev mailing list archive at Nabble.com.
Hi,
I am not 100% sure i understand from the description but it just sounds
like you want to highlight a single feature?
One thing you can do is make a wms request for that feature using the
"featureid" parameter, which you can get from the wfs feature. I should
also note that "feautreid" is not something that is supported by all wms
servers, just something geoserver does. In the request you can specify a
"highlighted style" of some sort. Example:
http://yourserver/wms?layers=yourlayer&styles=highlighted&…
Hope that helps. There may be an easier way depending on which client
you are using. Some more info may help us to give you a better answer.
-Justin
Joice wrote:
For ex. my search is to display the state selected in the demo states.shp.
After th WFS searches the particular states, I want it to be highlighted.
How can is be done. The search is working fine.
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org
Hi,
thanks,
Let's take the topp:states . From a list box I chose a particular state
eg, Texas and the map zooms to the Texas area with the WFS and WMS . Now I
would like to have only the polygon in the search (Texas) to be highlighted
or of a different color than the other polygon.
How can I solve it .
Thanks,
Joice
Justin Deoliveira-4 wrote:
Hi,
I am not 100% sure i understand from the description but it just sounds
like you want to highlight a single feature?One thing you can do is make a wms request for that feature using the
"featureid" parameter, which you can get from the wfs feature. I should
also note that "feautreid" is not something that is supported by all wms
servers, just something geoserver does. In the request you can specify a
"highlighted style" of some sort. Example:http://yourserver/wms?layers=yourlayer&styles=highlighted&…
Hope that helps. There may be an easier way depending on which client
you are using. Some more info may help us to give you a better answer.-Justin
Joice wrote:
For ex. my search is to display the state selected in the demo
states.shp.
After th WFS searches the particular states, I want it to be highlighted.
How can is be done. The search is working fine.--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
--
View this message in context: http://www.nabble.com/To-highlight-the-polygon-%2Creturned-in-the-search-feature.-tf4585883.html#a13148822
Sent from the GeoServer - Dev mailing list archive at Nabble.com.
Joice ha scritto:
Hi,
thanks,
Let's take the topp:states . From a list box I chose a particular state
eg, Texas and the map zooms to the Texas area with the WFS and WMS . Now I
would like to have only the polygon in the search (Texas) to be highlighted or of a different color than the other polygon.
How can I solve it .
Tsk tsk, this is a question for the users mailing list
Anyways, what you're asking must be done in the client, maybe
with OL (OpenLayers)
The workflow could be something like:
* fill the combo with the results of a WFS GetFeature, and force
GeoServer to compute the feature bounds anyways, so that in that
first step you get also the bounds of the feature, and not only
the state name (there is a switch in WFS configuration)
* when the user selects, use the bbox to zoom to that area
* for the hightlight, you can have a separate layer, usually disabled,
that draws the map with a different color, and you will add
dinamically a featureId=states.xxx in order to have it paint only
the state you want.
Alternatively, OL can paint the polygon client side if you're
using a WFS layer (or, if you are using GeoServer 1.6.0beta3,
a GeoJSON request on the WFS would be good as well, a possibly
faster as well).
How to do the above in detail is something you should ask on the OL
mailing list (or on the ml of your client of choice).
Cheers
Andrea
Thanks,
But the solution is not clear to me . Is there any similar demo to work out.
The WFS search is working . Just the polygon returned in the search should
have a diferent color.
aaime wrote:
Joice ha scritto:
Hi,
thanks,
Let's take the topp:states . From a list box I chose a particular state
eg, Texas and the map zooms to the Texas area with the WFS and WMS . Now
I
would like to have only the polygon in the search (Texas) to be
highlighted
or of a different color than the other polygon.
How can I solve it .Tsk tsk, this is a question for the users mailing list
Anyways, what you're asking must be done in the client, maybe
with OL (OpenLayers)
The workflow could be something like:
* fill the combo with the results of a WFS GetFeature, and force
GeoServer to compute the feature bounds anyways, so that in that
first step you get also the bounds of the feature, and not only
the state name (there is a switch in WFS configuration)
* when the user selects, use the bbox to zoom to that area
* for the hightlight, you can have a separate layer, usually disabled,
that draws the map with a different color, and you will add
dinamically a featureId=states.xxx in order to have it paint only
the state you want.
Alternatively, OL can paint the polygon client side if you're
using a WFS layer (or, if you are using GeoServer 1.6.0beta3,
a GeoJSON request on the WFS would be good as well, a possibly
faster as well).How to do the above in detail is something you should ask on the OL
mailing list (or on the ml of your client of choice).Cheers
Andrea-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
--
View this message in context: http://www.nabble.com/To-highlight-the-polygon-%2Creturned-in-the-search-feature.-tf4585883.html#a13151018
Sent from the GeoServer - Dev mailing list archive at Nabble.com.
Hi Joice,
To answer your question we will need more information about what you are
doing on the client side. Have you written a little custom app? How are
you making the wfs requests? Are you using a well-known client (like
openlayers or mapbuilder), or just some custom code?
Also, you say polygon returned in wfs has wrong color. Well wfs just
returns vector data, and no stylng. Or are you somehow rendering the
polygons on the client side? Or are you making actually making a wms
request?
-Justin
Joice wrote:
Thanks,
But the solution is not clear to me . Is there any similar demo to work out.
The WFS search is working . Just the polygon returned in the search should
have a diferent color.aaime wrote:
Joice ha scritto:
Hi,
thanks,
Let's take the topp:states . From a list box I chose a particular state
eg, Texas and the map zooms to the Texas area with the WFS and WMS . Now
I
would like to have only the polygon in the search (Texas) to be
highlighted
or of a different color than the other polygon.
How can I solve it .Tsk tsk, this is a question for the users mailing list
Anyways, what you're asking must be done in the client, maybe
with OL (OpenLayers)
The workflow could be something like:
* fill the combo with the results of a WFS GetFeature, and force
GeoServer to compute the feature bounds anyways, so that in that
first step you get also the bounds of the feature, and not only
the state name (there is a switch in WFS configuration)
* when the user selects, use the bbox to zoom to that area
* for the hightlight, you can have a separate layer, usually disabled,
that draws the map with a different color, and you will add
dinamically a featureId=states.xxx in order to have it paint only
the state you want.
Alternatively, OL can paint the polygon client side if you're
using a WFS layer (or, if you are using GeoServer 1.6.0beta3,
a GeoJSON request on the WFS would be good as well, a possibly
faster as well).How to do the above in detail is something you should ask on the OL
mailing list (or on the ml of your client of choice).Cheers
Andrea-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org