Jody,
thanks for your answer.
concerning the links you provided, it's not dynamic. What I want to achieve is
to show the data providers for the current bbox. There's about 30 data
providers covering 1.5 million km² so I'd rather show them dynamically.
With text decoration, I have to pass the format_options parameter to make it
work. This service will be consumed by GIS softwares and other web client so I
cannot make them pass another parameter. It's not dynamic either.
I'm currently going with the custom function path. The function will take
features returned, build a string with the data provider name and return only
one feature at the bottom right (using wms_bbox) and label this feature with
the built string.
Maybe this is possible with SLD only but I checked quite a bit and I didn't
find a way of changing a feature coordinate or a function to extract wms_bbox
individual parts (maxx, miny). I tried getX but it returns zero since wms_bbox
returns a ReferencedEnvelope. I could probably get those parts with string
functions but again, I need a function to create a geometry or to change the
coordinate of one of the returned geometries.
If anyone has a better idea, feel free to contact me.
As for the devel-list, I thought it would be a good place since the current
solution involves development. I don't mind posting in the user-list.
Thanks
Envoyé à partir d’Outlook<http://aka.ms/weboutlook>
________________________________
De : Jody Garnett <jody.garn...@gmail.com>
Envoyé : 22 août 2017 18:26
À : Olyster
Cc : GeoServer Users
Objet : Re: [Geoserver-devel] Dynamic Copyright
Thanks for contacting the community:
Can I ask if you have read the following page of the user guide:
1)
http://docs.geoserver.org/latest/en/user/data/webadmin/layers.html#wms-attribution
2)
http://docs.geoserver.org/latest/en/user/services/wms/webadmin.html#watermark-settings
Depending on your client these may due the trick.
For more advanced functionality see
http://docs.geoserver.org/latest/en/user/services/wms/decoration.html
Aside: this was sent todevel-list (for those working on geoserver), the
geoserver-users@lists.sourceforge.net<mailto:geoserver-users@lists.sourceforge.net>
is used for questions.
--
Jody Garnett
On 22 August 2017 at 11:59, Olyster
<mcno...@hotmail.com<mailto:mcno...@hotmail.com>> wrote:
Hi there,
I need to add a dynamic copyright text to an wms layer as data is provided
by multiple data providers.
For each wms request, a copyright will be added (ex bottom right) with the
name of the data providers of the viewed region (bbox).
I have a polygon layer in Oracle Spatial which contains the areas of data
and the name of the providers related to them. A simple spatial query using
the bounding box (wms_bbox) will return the names of the data providers to
display in the copyright.
The copyright will change on each pan and/or zoom according to the area
that's being viewed.
The dirtiest solution would be to add the polygon layer labeled with the
provider name filed and using SLD to displace labels at the bottom right. I
read that the labeling engine should be able to prevent overlapping of the
labels so it would therically work.
The other way would be to create a custom function. I'd get the bounding box
via wms_bbox, perform the spatial query to get the provider names and then
format the strings to be displayed. How would I place a string on the map ?
Maybe by creating a temporary geometry and use the formatted string as a
label ?
How would you handle this problem ?
Again the whole process is quite simple :
wms request --> call oracle spatial to get data providers name--> show those
providers on the map.
I hope my explanation is clear.
Thanks for your help.
--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/Dynamic-Copyright-tp5332186.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-devel mailing list
geoserver-de...@lists.sourceforge.net<mailto:geoserver-de...@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list
Please make sure you read the following two resources before posting to this
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users