-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[GEOS-11353] MapML Make default image format for raster requests configurable for layers and layer groups #7612
[GEOS-11353] MapML Make default image format for raster requests configurable for layers and layer groups #7612
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested the layer case, the UI does not seem to be responsive:
- I uncheck "use features", the mime type drop-down is still disabled
- I go to the tile caching tab, add a format, it does not show in the drop-down either
In both cases, even pressing "apply" does not help, one has to exit the page and come back into it.
The changes seem to introduce a new format option to control the format: as I correct? Is it documented anywhere?
defaultMimeType = | ||
layerMeta.get(MapMLConstants.MAPML_MIME) != null | ||
? layerMeta.get(MapMLConstants.MAPML_MIME).toString() | ||
: defaultMimeType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block is duplicated here and below. It can be shared outside of the if, because layerMeta itself can be obtained calling PublishedInfo.getMetadata
(that is, no need to know if it's a layer group or not).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also no need to call onto that metadata entry twice, e.g.:
defaultMimeType = | |
layerMeta.get(MapMLConstants.MAPML_MIME) != null | |
? layerMeta.get(MapMLConstants.MAPML_MIME).toString() | |
: defaultMimeType; | |
defaultMimeType = Optional.ofNullable(layerMeta.get(MapMLConstants.MAPML_MIME)).orElse(defaultMimeType); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to Optional.ofNullable format but still needs to appear in both parts of if because metadata is stored in resourceInfo in the case of LayerInfo and in the main metadata in the case of LayerGroupInfo.
@@ -1,65 +1,98 @@ | |||
<html xmlns:wicket="http://wicket.apache.org/"> | |||
<head></head> | |||
<body> | |||
<form name="theForm"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mass reformat here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
boolean useTilesFromModel = | ||
Boolean.TRUE.equals( | ||
model.getObject().getMetadata().get(MAPML_USE_TILES, Boolean.class)); | ||
mime = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happes if use tiles gets flipped? This "boolean" here does not look like it would update.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ajax update added.
// GridSetBroker gridSetBroker = | ||
// new GridSetBroker(Collections.singletonList(new DefaultGridsets(true, true))); | ||
// tileLayer = new | ||
// GeoServerTileLayer(getCatalog().getLayerByName(MockData.PONDS.getLocalPart()), | ||
// gridSetBroker, tileLayerInfo); | ||
// GridSet testGridSet = namedGridsetCopy("TEST", | ||
// gridSetBroker.getDefaults().worldEpsg4326()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid commented out code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed
assertThat( | ||
dropDownChoiceTile.getChoices(), | ||
Matchers.containsInAnyOrder("image/jpeg", "image/png")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I don't expect the mapml client to handle tiff related format, it's browser based, should be able to handle all the png/jpeg variations, including the "jpeg or png" one. Give it a try?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and confirmed that tiff is not supported. Removed from regex.
"image/vnd.jpeg-png", | ||
"image/jpeg", | ||
"image/vnd.jpeg-png8", | ||
"image/tiff8", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tiff is normally not handled properly by clients... what about the MapML one, can it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above, not handled. Removed
5649c70
to
d32890f
Compare
…igurable for layers and layer groups -Added tests for dropdown values and tile cache version getting from enabled tile cache added ajax added to layergroup panel Added document builder read and write of default mime layer group and unit test cleanup removed default call made sure default representation goes to html pr changes formatting
d32890f
to
ef4e44b
Compare
UI is fixed - use features now uses Ajax for disabling dropdown. Tile caching format, once apply is clicked is added to list. The dropdown is documented in index.rst.
|
switched to text actually xpath is better community compile issue
…igurable for layers and layer groups -Added tests for dropdown values and tile cache version getting from enabled tile cache added ajax added to layergroup panel Added document builder read and write of default mime layer group and unit test cleanup removed default call made sure default representation goes to html pr changes formatting
-Added tests for dropdown values and tile cache version
getting from enabled tile cache
added ajax
added to layergroup panel
Added document builder read and write of default mime
layer group and unit test
cleanup
removed default call
made sure default representation goes to html
Checklist
main
branch (backports managed later; ignore for branch specific issues).For core and extension modules:
[GEOS-XYZWV] Title of the Jira ticket
.