Skip to content

Commit

Permalink
skip attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
turingtestfail committed Feb 28, 2025
1 parent 26ad74f commit 90a00b3
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ public void initialize() throws ServiceException {
baseUrl = ResponseUtils.baseURL(request);
baseUrlPattern = baseUrl;
forceYX = isYX();
useFeatures = mapMLLayerMetadata.isUseFeatures();
useTiles = mapMLLayerMetadata.isUseTiles();
// useFeatures = mapMLLayerMetadata.isUseFeatures();
// useTiles = mapMLLayerMetadata.isUseTiles();
}
}

Expand Down Expand Up @@ -1787,8 +1787,6 @@ public String getMapMLHTMLDocument() {
String cqlFilter = "";
Double latitude = 0.0;
Double longitude = 0.0;
boolean useTiles = false;
boolean useFeatures = false;
ReferencedEnvelope projectedBbox = this.projectedBox;
ReferencedEnvelope geographicBox = new ReferencedEnvelope(DefaultGeographicCRS.WGS84);
List<String> headerContent = getPreviewTemplates(MAPML_PREVIEW_HEAD_FTL, getFeatureTypes());
Expand Down Expand Up @@ -1818,8 +1816,6 @@ public String getMapMLHTMLDocument() {
} catch (TransformException | FactoryException e) {
throw new ServiceException("Unable to transform bbox to WGS84", e);
}
useTiles = mapMLLayerMetadata.isUseTiles();
useFeatures = mapMLLayerMetadata.isUseFeatures();
}
// remove trailing commas
layerLabel = layerLabel.replaceAll(",$", "");
Expand Down Expand Up @@ -1951,10 +1947,12 @@ private String buildGetMap(
kvp.put("CQL_FILTER", cqlFilter);
}
kvp.put("FORMAT", MAPML_MIME_TYPE);
boolean skipAttributes = useTiles && useFeatures;
String formatOptions =
MapMLConstants.MAPML_WMS_MIME_TYPE_OPTION + ":" + escapeHtml4((String) format.orElse(imageFormat)) + ";"
+ MapMLConstants.MAPML_MULTILAYER_AS_MULTIEXTENT + ":" + isMultiExtent + ";"
+ MAPML_USE_TILES_REP + ":" + useTiles + ";" + MAPML_CREATE_FEATURE_LINKS + ":" + useFeatures;
+ MAPML_USE_TILES_REP + ":" + useTiles + ";" + MAPML_CREATE_FEATURE_LINKS + ":" + useFeatures
+ ";" + MAPML_SKIP_ATTRIBUTES_FO + ":" + skipAttributes + ";";
kvp.put("format_options", formatOptions);
kvp.put("SERVICE", "WMS");
kvp.put("REQUEST", "GetMap");
Expand Down

0 comments on commit 90a00b3

Please sign in to comment.