Wednesday, 13 January 2016

openlayers - geoserver SLD in ol3


i have some vector layers in geoserver with style (SLD)


When i add these layers though OL3 i want to use same SLD.


right now i am giving style to layer as below



style: new ol.style.Style({
stroke: new ol.style.Stroke({
color: '#f00',
width: 1
}),
fill: new ol.style.Fill({
color: 'rgba(255,0,0,0.1)'
})
})


How can i get the same SLD which is present for the layer in geoserver and use in OL3?



Answer



Openlayers 3 does not yet have an SLD parser


There's an open issue at https://github.com/openlayers/ol3/issues/2954 that you may +1


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...