Allow to specify sample layers to be loaded only by using a configuration file #45
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.
Following some discussion by email, this PR now allows to specify the sample layers to be loaded in the UI only by using a configuration file.
It also removes many example layer files which weren't used anymore.
If we merge this, the UI will be feeded only by the
sample_layers.json
file which will now be an Array of Objects, each of them describing a layer to be added in the interface.Each of these objects must have a
path
member (the path to the file on the server) and aname
member (it will be used to fetch the display name" in translation files withapp_page.sample_layer_box.the_given_name
or display directly that name in all languages if there is no match in translation files).These objects might also have optionally a
fields_type
member (containing an Array of Objects describing the type of each field to force it's display "as it" when the layer will be opened) and asuggested_projection
member (containing an Array of two members to describe how to access that suggested projection).The order of the layers in the "Sample dataset" dialog will now depend directly on the order of the layers described in this
sample_layers.json
file.