Skip to content

Commit

Permalink
don't remove attributes.data and update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
okauppinen committed Aug 11, 2023
1 parent 2b784d3 commit ec896fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ public JSONObject getJSON(OskariLayer baseLayer, UserDataLayer layer, String srs
return this.getJSON(baseLayer, layer, srs, PropertyUtil.getDefaultLanguage());
}

// common parser for UserData layers
// override methods in subclasses if needed to highlight differences between them
public JSONObject getJSON(OskariLayer baseLayer, UserDataLayer layer, String srs, String lang) {
JSONObject layerJson = getBaseJSON(baseLayer, lang, IS_SECURE, srs);
JSONHelper.putValue(layerJson, KEY_ISQUERYABLE, true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ public JSONObject getJSON(OskariLayer layer,

final JSONObject layerJson = getBaseJSON(layer, lang, isSecure, crs);
JSONHelper.putValue(layerJson, KEY_ISQUERYABLE, true);
// getBaseJSON adds these but model builder isn't using them. Frontend uses DescribeLayer response
// getBaseJSON adds options but model builder isn't using it. Frontend uses DescribeLayer response
layerJson.remove(KEY_OPTIONS);
layerJson.optJSONObject(KEY_ATTRIBUTES).remove("data");
return layerJson;
}
}

0 comments on commit ec896fd

Please sign in to comment.