3

I have a GeoJSON point layer from GeoServer. As I recognised there are several ways to style. My question is, is it possible to style it using an SLD from GeoServer?

I use AJAX request for importing the GeoJSON. If not, is it possible to make markers invisible? Not that elegant but I would make layers with styles from GeoServer then have GeoJSON layers with popups.

3 Answers 3

5

GeoJSON is a data output format, if you want GeoServer to style the output then you need to request a WMS image output such as png or jpg.

Leaflet has styling options too but they are distinct from GeoServer's.

1
  • Leaflet styling options were useful, right after I corrected some mistakes I could use them.
    – buboreka
    Commented Jul 11, 2017 at 9:43
1

For me, when styling layers for GeoServer I prefer to use the QGIS "GeoServer Explorer" plugin from Víctor Olaya. You can style the layer in QGIS, as you would normally do, and save the SLD to GeoServer with the plugin, which passes the style from QGIS to the GeoServer. Hope this works for you.

1
  • I also use this, thanks for triing to help, the only thing is, that I wanted to use these styles in a leaflet map with geoJson.
    – buboreka
    Commented Jul 11, 2017 at 9:44
0

This post is a little outdated, but the question is still relevant.

We have used geostyler to convert SLDs (fetched from GeoServer) into OpenLayers styles for rendering. There is support for a few different map libraries.

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.