I'm looking for the guide to draw the arrow at end of line in geoserver.

So follow this thread (How do I draw the arrow on the line using SLD of Geoserver?), I've made it work with the shapefile.

However, with my data source is from Mongodb, the arrow did not appear. Here the sample of my Mongodb record.

"_id" : "Y6z5zsA6RF8Wpoocu",
"name" : "-1",
"description" : "",
"geometry" : {
    "type" : "LineString",
    "coordinates" : [ 

If I choose generic style, the layer preview display ok. But when I change to the arrow style, the layer preview not work at all. So I added the "properties" : { "the_geom" : "" }, "the_geom" : "" to make sure this part work, then the line appear again but without the arrow

<ogc:Function name="endPoint">

It's seem that the < ogc:Function name="endPoint" > is not work with MongoDB source. When I remove that part the arrow appear but in the middle of the line.

How should I config with my data?

  • your geometry is called geometry not the_geom
    – Ian Turton
    Feb 6, 2018 at 8:28

1 Answer 1


In your SLD you have asked GeoServer to find the endpoint of an attribute/property called the_geom (the default geometry name in a Shapefile), but in your MongoDB you have called your geometry element geometry so that nothing is found and the function (endPoint) returns a null geometry and thus nothing is drawn.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.