Metadata editor / fix generate thumbnail from metadata layer when the map background layer is a WMTS layer#9267
Open
josegar74 wants to merge 1 commit into
Conversation
… map background layer is a WMTS layer
Member
I've to admit I don't remember all the history for this. The component was initially coming from https://github.com/geoadmin/mf-geoadmin3 but then some changes were added. Indeed some method are the same eg toHexa, some are almost identical transformToPrintLiteral. Good that you add support for WMTS. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When configuring a WTMS map background layer an error occurs generating the thumbnail of a metadata with a map layer.
http://localhost:8080/geonetwork/srv/api/records/f5a3e80e-8d60-4e06-ab6e-eb45dc5ef560/attachments/print-thumbnail?jsonConfig={%22layout%22:%22overviewPrintTemplate%22,%22srs%22:%22EPSG:28992%22,%22units%22:%22m%22,%22rotation%22:0,%22lang%22:%22dut%22,%22dpi%22:%22127%22,%22outputFormat%22:%22png%22,%22layers%22:[{%22opacity%22:1,%22type%22:%22WMTS%22,%22baseURL%22:%22http://wmts.geo.admin.ch%22,%22maxExtent%22:[-285401,22598,595401,903401],%22tileSize%22:[null,null],%22resolutions%22:[3440.64,1720.32,860.16,430.08,215.04,107.52,53.76,26.88,13.44,6.72,3.36,1.68,0.84,0.42,0.21],%22zoomOffset%22:0,%22version%22:%221.0.0%22,%22requestEncoding%22:%22REST%22,%22formatSuffix%22:%22jpeg%22,%22style%22:%22default%22,%22dimensions%22:[%22TIME%22],%22params%22:{},%22matrixSet%22:%2221781%22},{%22opacity%22:1,%22type%22:%22WMS%22,%22baseURL%22:%22https://services.geodataoverijssel.nl/geoserver/B22_wegen/wms%22,%22layers%22:[%22B22_Rotondes_in_provinciale_wegen%22],%22styles%22:[%22%22],%22format%22:%22image/png%22,%22customParams%22:{%22EXCEPTIONS%22:%22XML%22,%22TRANSPARENT%22:%22true%22,%22CRS%22:%22EPSG:28992%22},%22singleTile%22:true}],%22pages%22:[{%22title%22:%22%22,%22center%22:[233300.26503093337,493898.61395412975],%22scale%22:%22781250.0%22,%22dataOwner%22:%22%C2%A9+%22,%22rotation%22:0,%22langdut%22:true}],%22hasNoTitle%22:true}&rotationAngle=0
{ "message": "attribute [spec.layers[0].layer] missing", "code": "runtime_exception", "description": null }The code had hardcoded values for the layer URL and projection.
core-geonetwork/web-ui/src/main/resources/catalog/components/common/map/print/PrintDirective.js
Line 555 in 0456f35
core-geonetwork/web-ui/src/main/resources/catalog/components/common/map/print/PrintDirective.js
Line 568 in 0456f35
Apart of this, there is a similar code with some unclear differences:
core-geonetwork/web-ui/src/main/resources/catalog/components/common/map/print/PrintMapService.js
Lines 149 to 413 in 0456f35
@fxprunayre do you know the reason for this kind of duplication? It seems like the
GaPrintDirectiveControllercould usegnPrint, but it's not the case. And with the code differences, there are quite chances to break some stuffChecklist
mainbranch, backports managed with labelREADME.mdfilespom.xmldependency management. Update build documentation with intended library use and library tutorials or documentation