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

Use ecoregions data #13177

Merged
merged 18 commits into from
Jan 8, 2022
Merged

Use ecoregions data #13177

merged 18 commits into from
Jan 8, 2022

Conversation

tschaub
Copy link
Member

@tschaub tschaub commented Dec 31, 2021

This branch replaces the use of the current countries dataset with data from the RESOLVE Ecoregions 2017 dataset.

See the updated examples. I'm curious if people think these load or render too slowly.

The new https://github.com/openlayers/data repo is a place where we can host data for our examples. Yes, data in git is not fun, but these are the benefits:

Fixes #12940
Closes #12941
Closes #12942

@github-actions
Copy link

📦 Preview the examples and docs from this branch here: https://deploy-preview-13177--ol-site.netlify.app/.

@tschaub tschaub changed the title Use Ecoregions 2017 data Use ecoregions data Jan 1, 2022
@mike-000
Copy link
Contributor

mike-000 commented Jan 2, 2022

In a map export there is no reason (apart from a very un-obvious assertion if you don't set a className on one of the layers) why you couldn't have a semi-opaque vector layer with background over another layer as in https://codesandbox.io/s/export-map-forked-cmdk1?file=/main.js The backgroundColor should therefore be applied to the mapContext after the globalAlpha is set. I think it would be helpful to keep a tile layer to demonstrate that.

@tschaub
Copy link
Member Author

tschaub commented Jan 2, 2022

The backgroundColor should therefore be applied to the mapContext after the globalAlpha is set.

Good point. I adjusted the example to do this.

I think it would be helpful to keep a tile layer to demonstrate that.

I don't agree with this part. I think it is unfortunate that our examples tend to get more complex and uglier over time, as people add new functionality or fix issues and tack features on to existing examples as a way to demonstrate the change to themselves. While the changes likely make sense to the author, I don't think this makes the examples more useful.

I can imagine it would be useful to add a map.export({type, quality}) method (that would throw in cases where we cannot generate a data URL). Then we could push the complexity from this example into that method. And we could have tests that assert that things work with layer background, opacity, etc.

@tschaub tschaub marked this pull request as ready for review January 7, 2022 20:59
Copy link
Member

@ahocevar ahocevar left a comment

Choose a reason for hiding this comment

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

Thanks for this huge effort, @tschaub!

@tschaub tschaub merged commit 85d5e5d into openlayers:main Jan 8, 2022
@tschaub tschaub deleted the ecoregions branch January 8, 2022 15:32
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.

Update country names and borders in example
3 participants