Jonathan,

Thanks! That was the missing piece of the puzzle. Works like a charm!

Regards,
Roel

Van: Jonathan Moules [mailto:jonathanmou...@warwickshire.gov.uk]
Verzonden: dinsdag 16 juli 2013 17:43
Aan: Roel De Nijs
CC: geoserver-users@lists.sourceforge.net
Onderwerp: Re: [Geoserver-users] SLD: open arrow on center of end segment?

Hi Roel,
  I suspect using the "forcelefttoright" parameter at false may do what you 
want:

<se:VendorOption name="forceLeftToRight">false</se:VendorOption>

This allows labels to be "upside down" on a line. In theory at least (I don't 
know how the labelling engine works), I'd imagine that'd ensure your arrow was 
pointing the right way.

Worth trying anyway. :-)

Jonathan



On 16 July 2013 16:17, Roel De Nijs 
<roel.den...@aquafin.be<mailto:roel.den...@aquafin.be>> wrote:
I'm using GeoServer 2.3.3 and I created a point symbolyzer which puts an open 
arrow on the end point of a line. This works great and is lightning fast. But I 
wonder if it's somehow possible to put the arrow at the center of the end 
segment instead of the end point? Even better (for our use case) would be to 
put the arrow in the center of the central segment (with the correct rotation), 
but that's just a nice to have. I would be more than happy with the center of 
the end segment.

In an attempt to get an arrow in the center of the line, I started playing with 
using an arrow symbol as a label. With a little bit of googling I ended up with 
the text symbolizer at the bottom which puts the arrow exactly where I want it 
to be. But my concern is what about the orientation of the arrow? Our lines 
have a direction: every geometry goes from start point to end point. I think 
labeling doesn't care about it. Its main concern is putting the label along the 
line. Can I make sure the labels get oriented based on the direction of each 
line?

My text symbolizer:
<TextSymbolizer>
  <Label>
    <ogc:Literal>&#x2192;</ogc:Literal>
  </Label>
  <Font>
    <CssParameter name="font-family">Lucida Sans</CssParameter>
    <CssParameter name="font-size">18</CssParameter>
    <CssParameter name="font-style">normal</CssParameter>
    <CssParameter name="font-weight">bold</CssParameter>
  </Font>
  <LabelPlacement>
    <LinePlacement>
      <PerpendicularOffset>-2</PerpendicularOffset>
    </LinePlacement>
  </LabelPlacement>
  <Fill>
    <CssParameter name="fill">#000000</CssParameter>
  </Fill>
  <VendorOption name="followLine">true</VendorOption>
  <VendorOption name="maxDisplacement">400</VendorOption>
  <VendorOption name="repeat">150</VendorOption>
</TextSymbolizer>

________________________________

Volg Aquafin op Facebook<https://www.facebook.com/AquafinNV> | 
Twitter<https://twitter.com/aquafinnv> | 
YouTube<http://www.youtube.com/channel/UCk_4P5BJ-MtEEDCkCsR_KqQ?feature=mhee> | 
LinkedIN<http://www.linkedin.com/company/aquafin/products>

Disclaimer: zie www.aquafin.be<http://www.aquafin.be>   P Denk aan het milieu. 
Druk deze mail niet onnodig af.

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net<mailto:Geoserver-users@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/geoserver-users


This transmission is intended for the named addressee(s) only and may contain 
sensitive or protectively marked material up to RESTRICTED 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.
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to