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

1.0.0 alpha - Legend Switcher on WMS #392

Merged
merged 18 commits into from
Sep 11, 2019

Conversation

hugbe8
Copy link
Member

@hugbe8 hugbe8 commented Aug 27, 2019

Please check if the PR fulfills these requirements

What is the current behavior? (You can also link to an open issue here)

  1. Legend Style: The wmw apply only a legend style. It use always the default style.

  2. Behavior of the legend display: On map tool, the legend is always displayed.

What is the new behavior?

  1. Legend Style:
    The possibility of having several legends on a WMS. By a context file or by the catalog tool.

Origin:
options

optionsFromCapabilities: true

contexts

 legendOptions: {
          stylesAvailable: [{name: 'rain', title: 'Pluie'}, {name: 'raster', title: 'Défaut'}]
        },

By default:

  • The legends come from GetCapabilities when it is available even if there are no stylesAvailable parameter.
  • On using the stylesAvailable parameter, the first style of the list is applied.

Limitation: the multiple layers are not managing

  1. Behavior of the legend display (Legend properties on wms-datasource 1.0.0-alpha.1 #309)
    The statut of the legend is conserver on the navigation between tools.

Does this PR introduce a breaking change? (check one with "x")

[ ] Yes
[X ] No

If this PR contains a breaking change, please describe the impact and migration path for existing applications:

Other information:

  • the optionsFromCapabilities option was removed because it already obtains it by inheriting from datasource.interface.ts (packages/geo/src/lib/datasource/shared/datasources/wmts-datasource.interface.ts)
  • the loop on the legends has been reversed to have the same behavior as OpenLayers which places the last layer of a list on top. (packages\geo\src\lib\layer\layer-legend\layer-legend.component.html)

hbernard added 15 commits June 12, 2019 16:05
- Get the image size of the corresponding layer on multiple layers

Adjust behavior of legend:
- Set legend collapse default at true
- Apply expandLegendIfVisible only on first loading

To see (todo):
- The behavior of toggleLegend on ResolutionRange: layer-item.component.ts/onResolutionChange
…0-alpha_switchLegend

# Conflicts:
#	package.json
#	packages/geo/src/lib/datasource/shared/datasources/datasource.interface.ts
#	packages/geo/src/lib/datasource/shared/datasources/osm-datasource.ts
#	packages/geo/src/lib/layer/shared/layers/layer.interface.ts
#	packages/geo/src/lib/layer/utils/index.ts
@hugbe8 hugbe8 changed the title 1.0.0 alpha 1.0.0 alpha - Legend Switcher on WMS Aug 28, 2019
@mbarbeau mbarbeau merged commit 2a8ca55 into infra-geo-ouverte:1.0.0-alpha Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants