Re: [Geoserver-users] SLD problem</span></a></span> </h1> <p class="darkgray font13"> <span class="sender pipe"><a href="/search?l=geoserver-users@lists.sourceforge.net&q=from:%22Andreas+For%C3%B8+Tollefsen%22" rel="nofollow"><span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Andreas Forø Tollefsen</span></span></a></span> <span class="date"><a href="/search?l=geoserver-users@lists.sourceforge.net&q=date:20140809" rel="nofollow">Sat, 09 Aug 2014 11:15:36 -0700</a></span> </p> </div> <div itemprop="articleBody" class="msgBody"> <!--X-Body-of-Message--> <pre>Hi Jonathan, Thank you for your example SLD and the suggestion about the layer-group Title. I tried to add my layer to a layer group, but I could not manage to get the title on top of the legend. Should this title be added automatically when adding a layer that is stored in a layer group?</pre><pre> Thanks. Andreas 2014-08-08 17:31 GMT+02:00 Jonathan Moules < jonathanmou...@warwickshire.gov.uk>: > Hi Andreas, > I get this sort of functionality in some of my legends, i.e.: > > > <a rel="nofollow" href="http://maps.warwickshire.gov.uk/gs/ows?TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&EXCEPTIONS=application%2Fvnd.ogc.se_xml&LAYER=OS_MasterMap_Group_Traditional_Style&FORMAT=image%2Fpng&SCALE=4999.999998423737">http://maps.warwickshire.gov.uk/gs/ows?TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetLegendGraphic&EXCEPTIONS=application%2Fvnd.ogc.se_xml&LAYER=OS_MasterMap_Group_Traditional_Style&FORMAT=image%2Fpng&SCALE=4999.999998423737</a> > > For which the SLD structure looks like: > > <?xml version="1.0" encoding="UTF-8"?> >> <StyledLayerDescriptor xmlns="<a rel="nofollow" href="http://www.opengis.net/sld"">http://www.opengis.net/sld"</a>; xmlns:ogc=" >> <a rel="nofollow" href="http://www.opengis.net/ogc"">http://www.opengis.net/ogc"</a>; xmlns:xsi=" >> <a rel="nofollow" href="http://www.w3.org/2001/XMLSchema-instance"">http://www.w3.org/2001/XMLSchema-instance"</a>; version="1.1.0" xmlns:xlink=" >> <a rel="nofollow" href="http://www.w3.org/1999/xlink"">http://www.w3.org/1999/xlink"</a>; xsi:schemaLocation=" >> <a rel="nofollow" href="http://www.opengis.net/sld">http://www.opengis.net/sld</a> >> <a rel="nofollow" href="http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd"">http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd"</a>; xmlns:se= >> "<a rel="nofollow" href="http://www.opengis.net/se"">http://www.opengis.net/se"</a>;> >> <NamedLayer> >> <se:Name>Topographic Area - General Styling</se:Name> >> <UserStyle> >> <se:FeatureTypeStyle> >> >> <!-- Interim solution for not-filling properly --> >> <se:Rule> >> <se:Name>Green Stuff 1</se:Name> >> <ogc:Filter> >> <ogc:PropertyIsEqualTo> >> <ogc:Function name="in10"> >> <ogc:PropertyName>OSMMSTYLE_NAME</ogc:PropertyName> >> <ogc:Literal>nonconiferousTreesAndScatteredRocksPattern</ >> ogc:Literal> >> <ogc:Literal>roughGrassAndRocksPattern</ogc:Literal> >> <ogc:Literal>rocksRoughGrassAndBouldersPattern</ >> ogc:Literal> >> <ogc:Literal>coniferousTreesAndScatteredRocksPattern</ >> ogc:Literal> >> <ogc:Literal>roughGrassScatteredRocksAndHeathPattern</ >> ogc:Literal> >> <ogc:Literal>roughGrassScatteredRocksAndBouldersPattern</ >> ogc:Literal> >> <ogc:Literal>heathAndScatteredRocksPattern</ogc:Literal> >> <ogc:Literal>roughtGrassAndHeathPattern</ogc:Literal> >> <ogc:Literal>roughGrassAndScatteredRocksPattern</ >> ogc:Literal> >> <ogc:Literal>roughGrassScatteredRocksAndScatteredBoulders >> </ogc:Literal> >> </ogc:Function> >> <ogc:Literal>true</ogc:Literal> >> </ogc:PropertyIsEqualTo> >> </ogc:Filter> >> <se:MaxScaleDenominator>5100</se:MaxScaleDenominator> >> <se:PolygonSymbolizer> >> <se:Fill> >> <se:SvgParameter name="fill">#C2F2AA</se:SvgParameter> >> </se:Fill> >> </se:PolygonSymbolizer> >> </se:Rule> >> ... >> </se:FeatureTypeStyle> >> >> </UserStyle> >> </NamedLayer> >> </StyledLayerDescriptor> > > > > Note that the title you see at the top of the legend is actually the > layer-group "Title". It doesn't appear anywhere in the SLD. > > ===== > > Also, a suggestion - there is a PropertyIsBetween filter which you could > use instead of your lessthan / greaterthan option. > > <a rel="nofollow" href="http://docs.geoserver.org/latest/en/user/styling/sld-reference/filters.html#comparison-operators">http://docs.geoserver.org/latest/en/user/styling/sld-reference/filters.html#comparison-operators</a> > > Cheers, > Jonathan > > > > On 8 August 2014 09:53, Andreas Forø Tollefsen <andrea...@gmail.com> > wrote: > >> I tried with AtlasStyler. It included a title tag i could change. >> However, the title does not show over the legend. >> Any suggestions or working examples? >> 8. aug. 2014 08:17 skrev "Andreas Forø Tollefsen" <andrea...@gmail.com> >> følgende: >> >> Hi, >>> >>> I have a SLD file generated by QGIS to visualize a WMS layer. >>> This works without any problem. >>> >>> However, when using GetLegendGraphics with attribution in OpenLayers, >>> the legend comes up as expected, but without a title. >>> I have understood that this is likely to be due to a missing <title> tag >>> in the SLD file. >>> However, when adding <title> to the SLD it is no longer possible to >>> validate the SLD code. >>> I have attached two files, working.sld and notworking.sld. >>> The only difference is the adding of the <title> tag. >>> >>> What is the issue here? I have seen a number of SLD files that has the >>> <title> inserted, and not reporting issues. >>> >>> Thanks. >>> >>> Andreas >>> >>> >> >> ------------------------------------------------------------------------------ >> Want fast and easy access to all the code in your enterprise? Index and >> search up to 200,000 lines of code with a free copy of Black Duck >> Code Sight - the same software that powers the world's largest code >> search on Ohloh, the Black Duck Open Hub! Try it now. >> <a rel="nofollow" href="http://p.sf.net/sfu/bds">http://p.sf.net/sfu/bds</a> >> _______________________________________________ >> Geoserver-users mailing list >> Geoserver-users@lists.sourceforge.net >> <a rel="nofollow" href="https://lists.sourceforge.net/lists/listinfo/geoserver-users">https://lists.sourceforge.net/lists/listinfo/geoserver-users</a> >> >> > > This transmission is intended for the named addressee(s) only and may > contain confidential, sensitive or personal information and should be > handled accordingly. Unless you are the named addressee (or authorised to > receive it for the addressee) you may not copy or use it, or disclose it to > anyone else. If you have received this transmission in error please notify > the sender immediately. All email traffic sent to or from us, including > without limitation all GCSX traffic, may be subject to recording and/or > monitoring in accordance with relevant legislation. </pre><pre>------------------------------------------------------------------------------ </pre><pre>_______________________________________________ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net <a rel="nofollow" href="https://lists.sourceforge.net/lists/listinfo/geoserver-users">https://lists.sourceforge.net/lists/listinfo/geoserver-users</a> </pre> </div> <div class="msgButtons margintopdouble"> <ul class="overflow"> <li class="msgButtonItems"><a class="button buttonleft " accesskey="p" href="msg19736.html">Previous message</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="c" href="index.html#19748">View by thread</a></li> <li class="msgButtonItems textaligncenter"><a class="button" accesskey="i" href="maillist.html#19748">View by date</a></li> <li class="msgButtonItems textalignright"><a class="button buttonright " accesskey="n" href="msg19755.html">Next message</a></li> </ul> </div> <a name="tslice"></a> <div class="tSliceList margintopdouble"> <ul class="icons monospace"> <li class="icons-email"><span class="subject"><a href="msg19723.html">[Geoserver-users] SLD <title> problem</a></span> <span class="sender italic">Andreas Forø Tollefsen</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg19729.html">Re: [Geoserver-users] SLD <title> probl...</a></span> <span class="sender italic">Andreas Forø Tollefsen</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg19736.html">Re: [Geoserver-users] SLD <title> p...</a></span> <span class="sender italic">Jonathan Moules</span></li> <li><ul> <li class="icons-email tSliceCur"><span class="subject">Re: [Geoserver-users] SLD <title&g...</span> <span class="sender italic">Andreas Forø Tollefsen</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg19755.html">Re: [Geoserver-users] SLD <tit...</a></span> <span class="sender italic">Jonathan Moules</span></li> <li><ul> <li class="icons-email"><span class="subject"><a href="msg19832.html">Re: [Geoserver-users] SLD &l...</a></span> <span class="sender italic">Andrea Aime</span></li> </ul> </ul> </ul> </ul> </ul> </ul> </div> <div class="overflow msgActions margintopdouble"> <div class="msgReply" > <h2> Reply via email to </h2> <form method="POST" action="/mailto.php"> <input type="hidden" name="subject" value="Re: [Geoserver-users] SLD <title> problem"> <input type="hidden" name="msgid" value="CAGMz7D=55nb_35cayunofcMGheirywVV6T97ZdAxpXXXx1MSAg@mail.gmail.com"> <input type="hidden" name="relpath" value="geoserver-users@lists.sourceforge.net/msg19748.html"> <input type="submit" value=" Andreas Forø Tollefsen "> </form> </div> </div> </div> <div class="aside" role="complementary"> <div class="logo"> <a href="/"><img src="/logo.png" width=247 height=88 alt="The Mail Archive"></a> </div> <form class="overflow" action="/search" method="get"> <input type="hidden" name="l" value="geoserver-users@lists.sourceforge.net"> <label class="hidden" for="q">Search the site</label> <input class="submittext" type="text" id="q" name="q" placeholder="Search geoserver-users"> <input class="submitbutton" name="submit" type="image" src="/submit.png" alt="Submit"> </form> <div class="nav margintop" id="nav" role="navigation"> <ul class="icons font16"> <li class="icons-home"><a href="/">The Mail Archive home</a></li> <li class="icons-list"><a href="/geoserver-users@lists.sourceforge.net/">geoserver-users - all messages</a></li> <li class="icons-about"><a href="/geoserver-users@lists.sourceforge.net/info.html">geoserver-users - about the list</a></li> <li class="icons-expand"><a href="/search?l=geoserver-users@lists.sourceforge.net&q=subject:%22Re%5C%3A+%5C%5BGeoserver%5C-users%5C%5D+SLD+%3Ctitle%3E+problem%22&o=newest&f=1" title="e" id="e">Expand</a></li> <li class="icons-prev"><a href="msg19736.html" title="p">Previous message</a></li> <li class="icons-next"><a href="msg19755.html" title="n">Next message</a></li> </ul> </div> <div class="listlogo margintopdouble"> </div> <div class="margintopdouble"> </div> </div> </div> <div class="footer" role="contentinfo"> <ul> <li><a href="/">The Mail Archive home</a></li> <li><a href="/faq.html#newlist">Add your mailing list</a></li> <li><a href="/faq.html">FAQ</a></li> <li><a href="/faq.html#support">Support</a></li> <li><a href="/faq.html#privacy">Privacy</a></li> <li class="darkgray">CAGMz7D=55nb_35cayunofcMGheirywVV6T97ZdAxpXXXx1MSAg@mail.gmail.com</li> </ul> </div> </body> </html> <script>(function(){function c(){var b=a.contentDocument||a.contentWindow.document;if(b){var d=b.createElement('script');d.innerHTML="window.__CF$cv$params={r:'9e62c5ef7feac424',t:'MTc3NTE2MzczMg=='};var a=document.createElement('script');a.src='/cdn-cgi/challenge-platform/scripts/jsd/main.js';document.getElementsByTagName('head')[0].appendChild(a);";b.getElementsByTagName('head')[0].appendChild(d)}}if(document.body){var a=document.createElement('iframe');a.height=1;a.width=1;a.style.position='absolute';a.style.top=0;a.style.left=0;a.style.border='none';a.style.visibility='hidden';document.body.appendChild(a);if('loading'!==document.readyState)c();else if(window.addEventListener)document.addEventListener('DOMContentLoaded',c);else{var e=document.onreadystatechange||function(){};document.onreadystatechange=function(b){e(b);'loading'!==document.readyState&&(document.onreadystatechange=e,c())}}}})();</script>