[Geoserver-users] CSS -gt-shield-margin

Does anyone know the correct syntax for the above label parameter?

I’m trying to use it in conjunction with an SVG shield symbol and -gt-shield-resize: stretch.

If I use the following it only seems to pay attention to the first value. i.e. I get a padding of 4 all around.

-gt-shield-margin: 4, 8, 4, 4;

If I use this

-gt-shield-margin: 4 8 4 4;

I get pink tiles!

Thanks

*** 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.***

Any takers?

From: Chris Haste [mailto:CHaste@anonymised.com]
Sent: 21 January 2013 17:48
To: geoserver-users@anonymised.comet
Subject: [Geoserver-users] CSS -gt-shield-margin

Does anyone know the correct syntax for the above label parameter?

I’m trying to use it in conjunction with an SVG shield symbol and -gt-shield-resize: stretch.

If I use the following it only seems to pay attention to the first value. i.e. I get a padding of 4 all around.

-gt-shield-margin: 4, 8, 4, 4;

If I use this

-gt-shield-margin: 4 8 4 4;

I get pink tiles!

Thanks

*** 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.***

“-gt-shield-margin: 4 8 4 4;” should work. Pink tiles in OpenLayers are usually its way of telling you that it got an error message back instead of a tile image; if you view such an image directly you can usually see the error message.

For example, in Chrome I would right-click on one of the pink tiles, then choose 'Open Image in New Tab" from the context menu.

I’d be interested to see the error message, as well as the .css and .sld files for your style.

···

On Tue, Jan 22, 2013 at 10:05 AM, Chris Haste <CHaste@anonymised.com> wrote:

Any takers?

From: Chris Haste [mailto:CHaste@anonymised.com]
Sent: 21 January 2013 17:48
To: geoserver-users@anonymised.comceforge.net
Subject: [Geoserver-users] CSS -gt-shield-margin

Does anyone know the correct syntax for the above label parameter?

I’m trying to use it in conjunction with an SVG shield symbol and -gt-shield-resize: stretch.

If I use the following it only seems to pay attention to the first value. i.e. I get a padding of 4 all around.

-gt-shield-margin: 4, 8, 4, 4;

If I use this

-gt-shield-margin: 4 8 4 4;

I get pink tiles!

Thanks

*** 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 Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only – learn more at:
http://p.sf.net/sfu/learnnow-d2d


Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi David,

The error message is:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

Rendering process failed

For input string: "4 8 4 4"

The css is this:

  • {

font-family: “Lucida Sans”;

font-style: normal;

font-weight: bold;

font-size: 10;

-gt-label-follow-line: true;

-gt-label-padding: 0;

-gt-shield-resize: stretch;

-gt-shield-margin: 4 8 4 4;

-gt-label-max-displacement: 10;

-gt-label-group: true;

stroke-width: 0.01;

shield-mime: “image/svg+xml”;

stroke:#000;

font-fill:#00FFFF;

fill-opacity:1.0;

}

[@scale<32000000]{

label: [name];

label-placement: line;

label-anchor: 0.5 0.5;

label-offset: 0;

}

/* Bidirectional is represented by ‘-’ through coalesce in the SQL*/

[direction=‘-’]{

shield: url(BidirectionShield.svg);

}

[direction=‘F’]{

shield: url(ForwardShield.svg);

}

[direction=‘B’]{

shield: url(BackwardShield.svg);

}

From: David Winslow [mailto:dwinslow@anonymised.com]
Sent: 22 January 2013 15:45
To: Chris Haste
Cc: geoserver-users@anonymised.comsourceforge.net
Subject: Re: [Geoserver-users] CSS -gt-shield-margin

“-gt-shield-margin: 4 8 4 4;” should work. Pink tiles in OpenLayers are usually its way of telling you that it got an error message back instead of a tile image; if you view such an image directly you can usually see the error message.

For example, in Chrome I would right-click on one of the pink tiles, then choose 'Open Image in New Tab" from the context menu.

I’d be interested to see the error message, as well as the .css and .sld files for your style.

David Winslow

OpenGeo - http://opengeo.org/

On Tue, Jan 22, 2013 at 10:05 AM, Chris Haste <CHaste@anonymised.com2…> wrote:

Any takers?

From: Chris Haste [mailto:CHaste@anonymised.com]
Sent: 21 January 2013 17:48
To: geoserver-users@lists.sourceforge.net
Subject: [Geoserver-users] CSS -gt-shield-margin

Does anyone know the correct syntax for the above label parameter?

I’m trying to use it in conjunction with an SVG shield symbol and -gt-shield-resize: stretch.

If I use the following it only seems to pay attention to the first value. i.e. I get a padding of 4 all around.

-gt-shield-margin: 4, 8, 4, 4;

If I use this

-gt-shield-margin: 4 8 4 4;

I get pink tiles!

Thanks

*** 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 Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only – learn more at:
http://p.sf.net/sfu/learnnow-d2d


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Well the generated SLD looks as I would expect; I guess this is a problem with the implementation of shield margins in GeoTools and not CSS in particular. I’m not familiar with that code in depth, so I’m not sure what to tell you. Maybe Andrea can weigh in.

···

On Tue, Jan 22, 2013 at 10:59 AM, Chris Haste <CHaste@anonymised.com> wrote:

Hi David,

The error message is:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

Rendering process failed

For input string: "4 8 4 4"

The css is this:

  • {

font-family: “Lucida Sans”;

font-style: normal;

font-weight: bold;

font-size: 10;

-gt-label-follow-line: true;

-gt-label-padding: 0;

-gt-shield-resize: stretch;

-gt-shield-margin: 4 8 4 4;

-gt-label-max-displacement: 10;

-gt-label-group: true;

stroke-width: 0.01;

shield-mime: “image/svg+xml”;

stroke:#000;

font-fill:#00FFFF;

fill-opacity:1.0;

}

[@scale<32000000]{

label: [name];

label-placement: line;

label-anchor: 0.5 0.5;

label-offset: 0;

}

/* Bidirectional is represented by ‘-’ through coalesce in the SQL*/

[direction=‘-’]{

shield: url(BidirectionShield.svg);

}

[direction=‘F’]{

shield: url(ForwardShield.svg);

}

[direction=‘B’]{

shield: url(BackwardShield.svg);

}

From: David Winslow [mailto:dwinslow@anonymised.com]
Sent: 22 January 2013 15:45
To: Chris Haste
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] CSS -gt-shield-margin

“-gt-shield-margin: 4 8 4 4;” should work. Pink tiles in OpenLayers are usually its way of telling you that it got an error message back instead of a tile image; if you view such an image directly you can usually see the error message.

For example, in Chrome I would right-click on one of the pink tiles, then choose 'Open Image in New Tab" from the context menu.

I’d be interested to see the error message, as well as the .css and .sld files for your style.

David Winslow

OpenGeo - http://opengeo.org/

On Tue, Jan 22, 2013 at 10:05 AM, Chris Haste <CHaste@anonymised.com92…> wrote:

Any takers?

From: Chris Haste [mailto:CHaste@anonymised.com]
Sent: 21 January 2013 17:48
To: geoserver-users@anonymised.comceforge.net
Subject: [Geoserver-users] CSS -gt-shield-margin

Does anyone know the correct syntax for the above label parameter?

I’m trying to use it in conjunction with an SVG shield symbol and -gt-shield-resize: stretch.

If I use the following it only seems to pay attention to the first value. i.e. I get a padding of 4 all around.

-gt-shield-margin: 4, 8, 4, 4;

If I use this

-gt-shield-margin: 4 8 4 4;

I get pink tiles!

Thanks

*** 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 Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only – learn more at:
http://p.sf.net/sfu/learnnow-d2d


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

On Tue, Jan 22, 2013 at 5:08 PM, David Winslow <dwinslow@anonymised.com> wrote:

Well the generated SLD looks as I would expect; I guess this is a problem with the implementation of shield margins in GeoTools and not CSS in particular. I’m not familiar with that code in depth, so I’m not sure what to tell you. Maybe Andrea can weigh in.

Is there a stack trace I can look at? See the geoserver logs rigth after making a WMS call that makes
it fail, or enable “verbose exception reporting” and send the file which GeoServer returns

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Andrea,

I emailed the log to you directly, did you get it?

Chris

From: andrea.aime@anonymised.com [mailto:andrea.aime@anonymised.com] On Behalf Of Andrea Aime
Sent: 22 January 2013 16:20
To: David Winslow
Cc: Chris Haste; geoserver-users@anonymised.comrge.net
Subject: Re: [Geoserver-users] CSS -gt-shield-margin

On Tue, Jan 22, 2013 at 5:08 PM, David Winslow <dwinslow@anonymised.com> wrote:

Well the generated SLD looks as I would expect; I guess this is a problem with the implementation of shield margins in GeoTools and not CSS in particular. I’m not familiar with that code in depth, so I’m not sure what to tell you. Maybe Andrea can weigh in.

Is there a stack trace I can look at? See the geoserver logs rigth after making a WMS call that makes

it fail, or enable “verbose exception reporting” and send the file which GeoServer returns

Cheers

Andrea

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it


*** 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.***

On Wed, Jan 23, 2013 at 9:44 AM, Chris Haste <CHaste@anonymised.com> wrote:

Andrea,

I emailed the log to you directly, did you get it?

Yes, I got it, but I haven’t found any time to look into it yet.
If you need priority support there are support contracts that provide that, this mailing
list is where people answer each other in their spare time

The “user posting guidelines” provide some more detail on this an other topics
of relevance for users of this mailing list:
http://geoserver.org/display/GEOS/GeoServer+user+list+posting+guidelines

Cheers
Andrea

==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

Ing. Andrea Aime
@geowolf
Technical Lead

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549

http://www.geo-solutions.it
http://twitter.com/geosolutions_it


Hi Andrea,

I wasn’t chasing it up, I was just wanting to check you received it J

Thanks

From: andrea.aime@…84… [mailto:andrea.aime@anonymised.com] On Behalf Of Andrea Aime
Sent: 23 January 2013 09:08
To: Chris Haste
Cc: David Winslow; geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] CSS -gt-shield-margin

On Wed, Jan 23, 2013 at 9:44 AM, Chris Haste <CHaste@anonymised.com> wrote:

Andrea,

I emailed the log to you directly, did you get it?

Yes, I got it, but I haven’t found any time to look into it yet.

If you need priority support there are support contracts that provide that, this mailing

list is where people answer each other in their spare time

The “user posting guidelines” provide some more detail on this an other topics

of relevance for users of this mailing list:

http://geoserver.org/display/GEOS/GeoServer+user+list+posting+guidelines

Cheers

Andrea

==

Our support, Your Success! Visit http://opensdi.geo-solutions.it for more information.

==

Ing. Andrea Aime

@geowolf

Technical Lead

GeoSolutions S.A.S.

Via Poggio alle Viti 1187

55054 Massarosa (LU)

Italy

phone: +39 0584 962313

fax: +39 0584 1660272

mob: +39 339 8844549

http://www.geo-solutions.it

http://twitter.com/geosolutions_it


*** 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.***