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

fix: Adding layers to map without overlays #2115

Merged
merged 5 commits into from
Feb 12, 2025

Conversation

jokd
Copy link
Contributor

@jokd jokd commented Dec 17, 2024

Fixes #2095
Replaces #2097

The issue was related to visibleLayersControl

@Grammostola
Copy link
Contributor

This works better : ) The only thing I noticed was that it matters whether the visibleLayersViewActive prop is true or not on map start in terms of how added layers appear (things look good if it's not active). If it is things still look better than in the current master, and look good once the visibleLayersControl has been toggled.

@jokd
Copy link
Contributor Author

jokd commented Feb 4, 2025

This works better : ) The only thing I noticed was that it matters whether the visibleLayersViewActive prop is true or not on map start in terms of how added layers appear (things look good if it's not active). If it is things still look better than in the current master, and look good once the visibleLayersControl has been toggled.

I am unable to reproduce this. To me it doesn't matter what value visibleLayersViewActive has, let go the legend can be a bit less wide when visibleLayersViewActive is true but that is not related to this.

@Grammostola
Copy link
Contributor

Hmm.

So looks my legend def:

      "name": "legend",
      "options": {
        "labelOpacitySlider": "Opacity",
        "useGroupIndication": true,
        "searchLayersControl": true,
        "turnOffLayersControl": true,
        "turnOnLayersControl": true,
        "visibleLayersControl": true,
        "visibleLayersViewActive": true
      }

and here's a gif of when the last param is as it says there above
add_layer_vislayersviewactive_true

Perhaps I've compromised the test in some way but I couldn't quickly perceive of how. Am testing the latest jokd:fix-map-without-overlays2

@jokd
Copy link
Contributor Author

jokd commented Feb 4, 2025

Hmm.

So looks my legend def:

      "name": "legend",
      "options": {
        "labelOpacitySlider": "Opacity",
        "useGroupIndication": true,
        "searchLayersControl": true,
        "turnOffLayersControl": true,
        "turnOnLayersControl": true,
        "visibleLayersControl": true,
        "visibleLayersViewActive": true
      }

and here's a gif of when the last param is as it says there above add_layer_vislayersviewactive_true add_layer_vislayersviewactive_true

Perhaps I've compromised the test in some way but I couldn't quickly perceive of how. Am testing the latest jokd:fix-map-without-overlays2

It is the add layer button that differs and mess things up. I added a layer with the api without that control but I'll have a look at it.

@jokd
Copy link
Contributor Author

jokd commented Feb 5, 2025

@Grammostola The adding of the add layer button didn't respect the visibleLayersViewActive status ( the row with button, search and eyes shouldn't have been visible nor usable in your example) so when that was active it looked a bit weird. Should work now.

@Grammostola
Copy link
Contributor

True. Works like a charm now.

@Grammostola Grammostola added the PR approved To highlight approved PR:s as it is not shown in list which are approved. label Feb 5, 2025
@Flodkvist Flodkvist merged commit f1c37ad into origo-map:master Feb 12, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR approved To highlight approved PR:s as it is not shown in list which are approved.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when adding layers to map without overlays
3 participants