01-16-2019 08:21 AM
With a WebMap WMTS you can configure tiles to be obtained from a particular WMS layer and the <LayerDefinition> section within the Cache Filler configuration includes a "style" parameter.
A customer has a large asset dataset they display through a WMTS and its styled in a particular way. They are setting up a new Portal and the business requirement is to retrieve the same asset data through a WMTS but styled differently.
Searching the community I don't think the "style" parameter can be used on the WMTS configuration to request tiles from the same WebMap WMS with a different style as I would need to configure the Cache Filler to include the URL to the SLD file in the request. I am referring to the discussion topic here.
Is the only option here to get the customer to create a new WebMap WMS and Service Source configured with the required styling?
01-17-2019 02:20 AM
Yes it looks like there's such limitation on the CacheFillerService, if only it would allow additional parameter SLD.
However I think the customer might go a much easier way than creating another WMS through the publishing process. If the existing WMS works fine with an SLD style definition, then the customer can temporarily use URL Rewrite module which would detect a specific "style" parameter in the URL, and add the required SLD parameter to the request.
01-17-2019 02:25 AM
Thanks for looking into this and providing a possible solution.
I will need to test this. It's been a long time since I work with SLD files. Would you be able to share with me a simple example SLD file and confirm the formating of the SLD parameter I need to add to the WMS request URL?
01-17-2019 02:30 AM
Sure, I just walked around some of SLD files during checking this topic.
Sample URL with SLD:
<?xml version="1.0" encoding="UTF-8"?> <StyledLayerDescriptor version="1.1.0" xmlns="http://www.opengis.net/sld" xmlns:sld="http://www.opengis.net/sld" xmlns:se="http://www.opengis.net/se" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <NamedLayer xmlns="http://www.opengis.net/sld"> <se:Name>Rivers</se:Name> <UserStyle> <se:Name>Thick</se:Name> <IsDefault/> <se:FeatureTypeStyle> <se:Rule> <se:LineSymbolizer> <se:Stroke> <se:SvgParameter name="stroke">#00FF00</se:SvgParameter> <se:SvgParameter name="stroke-width">30</se:SvgParameter> <se:SvgParameter name="stroke-opacity">0,74</se:SvgParameter> </se:Stroke> </se:LineSymbolizer> </se:Rule> </se:FeatureTypeStyle> </UserStyle> </NamedLayer> </StyledLayerDescriptor>