Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

support for WebGL Lines and Polygons? #300

Closed
wendellwt opened this issue Feb 23, 2024 · 2 comments
Closed

support for WebGL Lines and Polygons? #300

wendellwt opened this issue Feb 23, 2024 · 2 comments

Comments

@wendellwt
Copy link
Contributor

How difficult would it be to add support for WebGL Lines and Polygons?

There is a demo on the ol examples page (WebGL Vector Layer). It is tagged as 'not part of the stable API', but it seems to work fine.

Would it be a matter of copying OlWebglPointsLayer to a new OLWebglVectorLayer and making it do the things in the ol example page? I suppose there should be a Vector version of the source OlSourceWebglPoints , and also corresponding demos for both of those.

If the response is 'contribution welcome' (!), then I could try to do a fork/edit/pullreq, but would need guidance and advice. I would be starting with:

WebGL OL vue3-ol
PointsLayer Y Y
PointsSource Y Y
PointsDemo Y Y
VectorLayer Y
VectorSource Y
VectorDemo Y

and it would just be a 'simple' matter of filling in the missing parts.

Thank you for all of the work on vue3-openlayers.

@wendellwt wendellwt changed the title support for WebGL Lines and Polygons support for WebGL Lines and Polygons? Feb 23, 2024
@d-koppenhagen
Copy link
Collaborator

Of course! Feel free to contribute. Copying one of the existing components is a good start.
You can start and send a draft PR if you are unsure and I will make suggestions for changes / can tell you what's missing.
When creating the component, please be sure most of the properties should be passed from OpenLayers to the component as props directly (don't create new fancy names or so).

@wendellwt
Copy link
Contributor Author

Ok, I tried, and I issued a PR, but it is somewhat rough. I want to use WebGL for Lines, and the OL changes seem to work for both Lines and Polygons, so there are some places in OlSourceWebglVector.vue that have 'Line' where they should be 'Line|Polygon' or maybe even 'Any'; I'm not sure how to make it work for both.

d-koppenhagen added a commit that referenced this issue Mar 6, 2024
…ponents

closes #300

---------

Co-authored-by: wendell <wendell@ilikecarrots.com>
Co-authored-by: Danny Koppenhagen <Danny.Koppenhagen@deutschebahn.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants