Skip to content

Commit

Permalink
Merge pull request #160 from geostyler/only-show-for-sld
Browse files Browse the repository at this point in the history
Only show GeoStyler for SLD Styles
  • Loading branch information
KaiVolland authored Oct 10, 2024
2 parents 1bf4ed6 + f4f8715 commit 4f5855f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions src/main/java/org/geoserver/wms/web/data/GeoStyler.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ private void renderHeaderCss(IHeaderResponse header) throws IOException, Templat
* @throws TemplateException
*/
private void renderHeaderScript(IHeaderResponse header) throws IOException, TemplateException {
String styleFormat = parent.getStyleInfo().getFormat();

if (!styleFormat.equals("sld")) {
LOGGER.info(
"Don't render GeoStyler for format "
+ styleFormat
+ " as it is not supported.");
return;
}

Map<String, Object> context = new HashMap<>();
LayerInfo layerInfo = parent.getLayerInfo();
ResourceInfo resource = layerInfo.getResource();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
visibility: false
}
},
RuelCard: {
RuleCard: {
amountField: {
visibility: false
},
Expand Down

0 comments on commit 4f5855f

Please sign in to comment.