Skip to content

PB-207 preparation work#677

Merged
ltshb merged 7 commits intodevelopfrom
feat_PB-207_preparation_work
Mar 4, 2024
Merged

PB-207 preparation work#677
ltshb merged 7 commits intodevelopfrom
feat_PB-207_preparation_work

Conversation

@pakb
Copy link
Contributor

@pakb pakb commented Mar 1, 2024

Main goal : transform layer constructor to have one single arg
side effects :

  • adding updateDelay to GeoJSON layers
  • renaming some attribute in layers config
    • baseURL is now baseUrl
    • serverLayerId is not technicalName
  • replacing getID() layer function with attribute .id set/built once in the constructor

Test link

@pakb pakb changed the title Feat pb 207 preparation work PB-207 preparation work Mar 1, 2024
@pakb pakb force-pushed the feat_PB-207_preparation_work branch 2 times, most recently from 2cd137c to 1f8b5ed Compare March 1, 2024 15:32
@cypress
Copy link

cypress bot commented Mar 1, 2024

Passing run #847 ↗︎

0 167 22 0 Flakiness 0

Details:

PR review
Project: web-mapviewer Commit: e22a9a9787
Status: Passed Duration: 04:48 💡
Started: Mar 4, 2024 10:28 AM Ended: Mar 4, 2024 10:33 AM

Review all test suite changes for PR #677 ↗︎

@pakb pakb requested a review from ltshb March 1, 2024 16:29
Copy link
Contributor

@ltshb ltshb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huge code improvement, thanks a lot.

pakb added 6 commits March 4, 2024 11:14
and deconstruct its content when called, should shorten most calls to constructors that were using many default/blank/null values to reach one last argument and set it to something else

Adding the updateDelay param to GeoJson layer (it will be relevant only relevant for this type of layers)
calculated once and for all at layer creation
we had once some attributes that were getThisId or someUrl, and other that used getThisID and someURL...
I thought it would be easier to navigate all this if we sticked to a single way of naming thing, hence the move to baseUrl instead of baseURL
hopefully it is a bit clearer what this is about with this name
checking that what has been deconstructed from the single Object entry is sufficient to go on building the instance.

Also moving the timeConfig directly in GeoAdminLayer, so that it may be set to any kind of layer (will be useful in the future) and add layer config parsing of hasLegend
OL features getId was caught by my IDE as I hadn't enabled case sensitivity... So this reverts all .getId() being replaced by .id on OL features
A couple tests also slipped by when renaming baseURL to baseUrl
And finally there was a little mistake in how kmlMetadata was handled when loading a legacy KML
@pakb pakb force-pushed the feat_PB-207_preparation_work branch from 939dfa1 to 258f38a Compare March 4, 2024 10:14
set default attribution to false across the board, and either fail if none is given (for GeoAdmin layers) or create a default one based on the host for externals
So, in essence, attributions are mandatory for GeoAdmin layers, and optional for externals

change LayerLegend and GroupOfLayers to also be based on an args constructor
@pakb pakb force-pushed the feat_PB-207_preparation_work branch from 258f38a to e22a9a9 Compare March 4, 2024 10:26
@pakb pakb requested a review from ltshb March 4, 2024 10:40
@ltshb ltshb merged commit 0f32a59 into develop Mar 4, 2024
@ltshb ltshb deleted the feat_PB-207_preparation_work branch March 4, 2024 11:26
ltshb added a commit that referenced this pull request Mar 4, 2024
External layer that did not specified its opacity in URL could not be displayed
as they default opacity was set to undefined. This has been broken with PR #677
ltshb added a commit that referenced this pull request Mar 5, 2024
External layer that did not specified its opacity in URL could not be displayed
as they default opacity was set to undefined. This has been broken with PR #677
ltshb added a commit that referenced this pull request Mar 5, 2024
External layer that did not specified its opacity in URL could not be displayed
as they default opacity was set to undefined. This has been broken with PR #677
ltshb added a commit that referenced this pull request Mar 5, 2024
External layer that did not specified its opacity in URL could not be displayed
as they default opacity was set to undefined. This has been broken with PR #677
ltshb added a commit that referenced this pull request Mar 5, 2024
External layer that did not specified its opacity in URL could not be displayed
as they default opacity was set to undefined. This has been broken with PR #677
ltshb added a commit that referenced this pull request Mar 5, 2024
External layer that did not specified its opacity in URL could not be displayed
as they default opacity was set to undefined. This has been broken with PR #677
ltshb added a commit that referenced this pull request Mar 6, 2024
External layer that did not specified its opacity in URL could not be displayed
as they default opacity was set to undefined. This has been broken with PR #677
ltshb added a commit that referenced this pull request Mar 6, 2024
External layer that did not specified its opacity in URL could not be displayed
as they default opacity was set to undefined. This has been broken with PR #677
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants