It should be usable in CSS, although I've not tried it. The CSS equivalent
of Edward Mac Gillavry's example would be:
* {
label: ".";
font-family: "Liberation Sans";
font-size: 10;
label-anchor: 0.5 0.5;
font-fill: #ff0000;
shield: url(/symbols/red.svg);
shield-mime: "image/svg";
-gt-label-priority: 150000;
-gt-label-padding: 20;
}
I will note that since the labeling priority is used to sort WITHIN a layer
it is a little unusual to make it a constant value; normally you would put
a reference to a numeric field for sorting in it.
--
David Winslow
OpenGeo - http://opengeo.org/
On Fri, Jan 4, 2013 at 9:08 AM, Chris Haste <cha...@airdata.co.uk> wrote:
> Ahh, now that is interesting. I did wonder about going down that route.***
> *
>
> ** **
>
> Would anyone know if that ‘abuse’ is workable using CSS?****
>
> ** **
>
> *From:* Edward Mac Gillavry [mailto:emacgilla...@hotmail.com]
> *Sent:* 04 January 2013 13:41
> *To:* Chris Haste; geoserver-users@lists.sourceforge.net
>
> *Subject:* RE: [Geoserver-users] [bulk]: Decluttering/SLD/CSS****
>
> ** **
>
> Chris,
>
> That's right: the approach I outlined in my previous posting achieves a
> z-order of the rendering, though it doesn't address the overlap. A next
> approach is actually to "abuse" the <TextSymbolizer>:
>
> 1. Use a type face that contains the symbols you would like to plot, e.g,
> "OpenSymbol", "Symbol"
>
> 2. A <TextSymbolizer> tag can actually contain an <ExternalGraphic> tag,
> typically used to render so-called highway shields. You would put a space
> or dot for a label and add an <ExternalGraphic>-tag to hold the symbol
> would like to plot:
>
> <TextSymbolizer>
> *<Label>.</Label>*
> <Font>
> <CssParameter name="font-family">Liberation Sans</CssParameter>
> <CssParameter name="font-size">10</CssParameter>
> </Font>
> <LabelPlacement>
> <PointPlacement>
> <AnchorPoint>
> <AnchorPointX>0.5</AnchorPointX>
> <AnchorPointY>0.5</AnchorPointY>
> </AnchorPoint>
> </PointPlacement>
> </LabelPlacement>
> <Fill>
> <CssParameter name="fill">#ff0000</CssParameter>
> </Fill>
> *<Graphic>
> <ExternalGraphic>
> <OnlineResource xlink:type="simple"
> xlink:href="/symbols/red.svg"/>
> <Format>image/svg+xml</Format>
> </ExternalGraphic>
>
> </Graphic>
> <Priority>150000</Priority>
> <VendorOption name="spaceAround">20</VendorOption>*
> </TextSymbolizer>
>
> If you are using a dot for a label, make sure to have it the same colour
> as your symbol ;-)
>
> HTH
>
> Edward
>
>
> ****
> ------------------------------
>
> From: cha...@airdata.co.uk
> To: emacgilla...@hotmail.com
> Date: Fri, 4 Jan 2013 08:03:22 -0500
> Subject: RE: [Geoserver-users] [bulk]: Decluttering/SLD/CSS****
>
> Thanks Edward.****
>
> ****
>
> If I understand you correctly that will simply achieve a sort of z-order
> to the rendering – placing the important symbols on top of the less
> important ones? If that is the case it isn’t really what I am trying to
> achieve as that would look rather messy. I want to hide the less important
> symbols if there isn’t room to render them.****
>
> ****
>
> *From:* Edward Mac Gillavry [mailto:emacgilla...@hotmail.com]
> *Sent:* 04 January 2013 12:29
> *To:* Chris Haste; stefan.engelha...@hbt.de;
> geoserver-users@lists.sourceforge.net
> *Subject:* RE: [Geoserver-users] [bulk]: Decluttering/SLD/CSS****
>
> ****
>
> Use multiple <FeatureTypeStyle> tags in your SLD. First <FeatureTypeStyle>
> tags contain least important symbols, while consecutive
> <FeatureTypeStyle>-tags contain more important symbols. You can use the
> <ogc:Filter> to specify the attribute that indicates the importance of the
> symbol.
>
> Each <FeatureTypeStyle> tag makes a full scan of the table and draws only
> the features that satisfy the <ogc:Filter> statement. Thus the most
> important symbols are drawn last on top of the less important symbols.
>
> Regards,
>
> Edward****
> ------------------------------
>
> From: cha...@airdata.co.uk
> To: stefan.engelha...@hbt.de; geoserver-users@lists.sourceforge.net
> Date: Fri, 4 Jan 2013 07:04:45 -0500
> Subject: Re: [Geoserver-users] [bulk]: Decluttering/SLD/CSS****
>
> Thanks Stefan,****
>
> ****
>
> But my understanding is that that only applies to labels.. it is control
> over the point symbols that I need/want.****
>
> ****
>
> Brgrds,****
>
> ****
>
> Chris****
>
> ****
>
> *From:* Stefan Engelhardt (HBT) [mailto:stefan.engelha...@hbt.de]
> *Sent:* 04 January 2013 11:53
> *To:* geoserver-users@lists.sourceforge.net
> *Subject:* Re: [Geoserver-users] [bulk]: Decluttering/SLD/CSS****
>
> ****
>
> Hi Chris,****
>
> without having done it by myself, I would expect, that priority would give
> you what you want:****
>
> ****
>
> http://docs.geoserver.org/2.1.0/user/styling/sld-reference/labeling.html**
> **
>
> ****
>
> Cheers****
>
> Stefan****
>
> ****
>
> *From:* Chris Haste [mailto:cha...@airdata.co.uk]
> *Sent:* Friday, January 04, 2013 12:19 PM
> *To:* geoserver-users@lists.sourceforge.net
> *Subject:* [bulk]: [Geoserver-users] Decluttering/SLD/CSS****
>
> ****
>
> Hello list and HNY to you all!****
>
> ****
>
> This is probably a very basic question so if someone can point me in the
> right direction it would be greatly appreciated.****
>
> ****
>
> I understand how to control labelling based on zoom level, priority and
> z-order to manage the clarity of the map. I also understand how to display
> or not display point symbols based on zoom level filters.****
>
> ****
>
> BUT I can’t work out how to control drawing symbols with the same degree
> of control as I have over labels.****
>
> ****
>
> I have points on a map that are more important than others but are all in
> the same layer. In areas where there are a lot of points, and the scale
> doesn’t support drawing them all clearly, I want to only display just the
> important ones (and their labels) but as the user zooms in and the screen
> real-estate increases I want to display more i.e. include the less
> important points. This is all doable via the scale filters, but causes an
> undesirable issue in areas where there are a low numbers of points – they
> only become visible when you are zoomed in. In these areas I would like to
> be able to display the less important points at the same time as limiting
> the display of points in the more congested areas to only show the
> important ones.****
>
> ****
>
> Any ideas on how to achieve this?****
>
> ****
>
> Thanks ****
>
> ****
>
> Chris****
>
> *** This communication has been sent from World Fuel Services
> Corporation or its subsidiaries or its affiliates for the intended
> recipient
> only and may contain proprietary, confidential or privileged information.
> If you are not the intended recipient, any review, disclosure, copying,
> use, or distribution of the information included in this communication
> and any attachments is strictly prohibited. If you have received this
> communication in error, please notify us immediately by replying to this
> communication and delete the communication, including any
> attachments, from your computer. Electronic communications sent to or
> from World Fuel Services Corporation or its subsidiaries or its affiliates
> may be monitored for quality assurance and compliance purposes.*******
>
>
> ------------------------------------------------------------------------------
> Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and much
> more. Get web development skills now with LearnDevNow - 350+ hours of
> step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99
> this month only -- learn more at: http://p.sf.net/sfu/learnmore_122812
> _______________________________________________ Geoserver-users mailing
> list Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users****
>
>
> ------------------------------------------------------------------------------
> Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
> much more. Get web development skills now with LearnDevNow -
> 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only -- learn more at:
> http://p.sf.net/sfu/learnmore_122812
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users