Skip to content
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

Enhance Legend Customization for Dynamic Dimension Adjustment and Source Configuration #9

Open
codinachssm opened this issue Aug 29, 2023 · 7 comments
Labels
enhancement New feature or request

Comments

@codinachssm
Copy link

codinachssm commented Aug 29, 2023

Is your feature request related to a problem? Please describe.

Th current version of SITNA API does not allow for customization of the legend's dimensions. This limitation poses challenges for users attempting to adjust the legend size to accommodate various screen sizes or specific preferences.

Describe the solution you'd like

We propose enhancing the Map Viewer functionality to support displaying a legend that can be configured by SITMUN administrators. Specifically, the Viewer should be capable of:

  1. The map viewer configuration contains the URL of the legend image, which may contain height, width and format. The URL may point to a service whose access is managed by the SITMUN proxy.
  2. The map viewer makes a HTTP GET request to the provided URL to fetch the image
  3. The map viewer will add the fetched image to the map canvas. The map viewer could need information on height, width and format parameters to decide how to add the image to the canvas.

SITMUN administrators should have the flexibility to specify the source of the legend by configuring:

  • A static URL pointing directly to the legend image.
  • A URL relative to a service.
  • A GetLegendGraphic request to a service that dynamically generates the legend.

Additionally, administrators should be able to specify any parameters that need to be appended to the URL request (e.g., width, height) or handled by the Map Viewer itself.

Initial configuration values, such as default dimensions and the availability of a GetLegendGraphic operation, could be derived from the WMS capabilities information, specifically from the LegendURL element.

Additional context

Below is an example of the LegendURL element as found in a WMS Capabilities 1.3.0 document, demonstrating how the legend image URL and its dimensions are specified:

<LegendURL width="125" height="21">
   <Format>image/png</Format>
   <OnlineResource 
        xmlns:xlink="http://www.w3.org/1999/xlink" 
        xlink:type="simple"
        xlink:href="https://www.ign.es/wms-inspire/pnoa-ma/leyendas/mosaico.png"
   />
</LegendURL>
@fjlopez
Copy link
Contributor

fjlopez commented Mar 11, 2024

@codinachssm is this a bug or a feature that the client should implement because the SITNA API does not support it?

@codinachssm
Copy link
Author

I think it should be implemented in the client, but I would like to know @IDEmenorca 's opinion.

@mvinent
Copy link
Contributor

mvinent commented Mar 11, 2024

I would say that this is not a bug because it is not supported by SITNA API, so it should be considered a new feature to implement if needed.

@fjlopez fjlopez added the enhancement New feature or request label Mar 11, 2024
@fjlopez
Copy link
Contributor

fjlopez commented Mar 11, 2024

Priority?

@IDEmenorca
Copy link

IDEmenorca commented Mar 13, 2024

It works fine for us as it is. Therefore, from our point of view, it's not a priority issue.

@codinachssm
Copy link
Author

OK, we keep it on standby because it may not need to be implemented.

@fjlopez
Copy link
Contributor

fjlopez commented Mar 13, 2024

@codinachssm I've updated the description of the issue based on your email. Is this a good description of the desired feature?

@fjlopez fjlopez changed the title SITNA API does not support the LegendURL dimensions of WMS Enhance Legend Customization for Dynamic Dimension Adjustment and Source Configuration Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants