Hi Lottie & Edward,

regarding question 2:
I'm pretty sure that the 'spaceAround' vendor option is only available 
for TextSymbolizers and not PointSymbolizers.

However, with a small workaround you can also use it for symbols.
Just specify a TextSymbolizer with an empty label and add the 
symbol/icon as a shield.

In CSS, this can be achieved like so:

* {
     label: ['.'];          /* must have content otherwise ignored */
     font-family: "Arial";
     font-size: 0;              /* do not display label */
     -gt-label-padding: 5;      /* = spaceAround option */

     shield: url("youricon.png"); /* or use predefined symbol altern. */
     shield-mime: "image/png";
     shield-size: 10;
}


This works perfectly fine for me, however, if someone knows a cleaner 
version I'd be interested in it, too.

Cheers,
Matthias



Am 19.06.2013 11:07, schrieb Edward Mac Gillavry:
> Hi lottie,
>
> For random colours, I suggest to compute this in advance and store as an
> attribute with the object. This also ensures colours are consistentent
> across zoom levels.
>
> To prevent overlapping symbols, use the 'spaceAround' vendor option
> together with the 'Priority' vendor option. The first option will make
> sure there'll always be a specified void between symbols. The second
> option will allow you to influence the decision which symbol to  retain
> or dismiss based on their relative priority. Not too familiar with the
> css styling, so someone else has to confirm these vendor options are
> available in the css styling or only in the default SLD styling.
>
> Regards,
>
> Edward
>
> ------------------------------------------------------------------------
> Date: Wed, 19 Jun 2013 16:39:19 +1000
> From: lotta.atzenb...@gmail.com
> To: geoserver-users@lists.sourceforge.net
> Subject: [Geoserver-users] css styling questions
>
> 1. Is it possible with css to add random colors, which don't change
> while zooming, based on different labels, but I don't know how many
> different colors I would need?
>
> 2. Is it possible to add a space around a point or symbol so that in a
> zoom out not all of the points/symbols are shown?
>
> Cheers
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows: Build for Windows Store.
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________ Geoserver-users mailing
> list Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
>
>
>
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>



------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to