Add a helper for instance customization options #901
Merged
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.
Previously there was an almost identical
svg-markers.json
in bothcontrol-base
andservice-print
modules. One incontrol-base
had hardcoded colors and print used placeholders. These can now be queried from a neworg.oskari.util.Customization
helper class (inservice-base
):JSONArray svgMarkers = Customization.getMarkers();
. This returns the markers with the placeholders so GetAppSetup needs to replace those with the existing hard coded#000000
values.The service logo can now be fetched as byte array with:
Customization.getLogo()
. This is used by printing to draw the service logo on the printout. This also adds an action route to get the logo with http://service.org/action/Logo. This enables using the same logo on the frontend with for example the "logo plugin" on the map or even the browser favicon. This makes customizing an Oskari instance easier.The logo for printing can still be configured with oskari-ext.properties like before with the
print.logo.path
, but also withlogo.path.print
and it also enables configuring a global logo withlogo.path
and adding different kinds of logo images for different purposes with other qualifiers if needed. The logo defaults to the Oskari logo found underservice-base
resources.This could also be improved to enable a service to override marker SVGs more easily since they are fetched from single source to both frontend and printing.