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

feat: 2034 - "just holes" polygon feature #2046

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

monsieurtanuki
Copy link
Contributor

What

  • Introduced a bool justHoles field for polygon:
    • the "full" points won't be considered and will be replaced by the full map
    • the "holes" points will be considered as the only "not colored" parts of the polygon
  • New example named "Advanced polygons".
  • The typical use-case would be using a single polygon with several holes.
  • In that case only the holes are clickable.
  • Could be that eventually we may consider that feature to be applied to the map instead, and have all polygons considered as holes. The thing is that currently we cannot say: "just hit hole number 2", because the label is attached to the "polygon", and all holes share the same polygon.
  • cc @enricostrijks and Provide option for Polygons & Polylines not to render shortest path over anti-meridian #2034

Screenshots

new menu item example
Screenshot_1740564922 Screenshot_1740564737
multi-world example hit example
Screenshot_1740564526 Screenshot_1740564628

Files

New file:

  • advanced_polygons.dart: Example dedicated to polygons with advanced features.

Impacted files:

  • main.dart: added the new AdvancedPolygonsPage page
  • menu_drawer.dart: added the new AdvancedPolygonsPage page
  • painter.dart: managed the justHoles case; refactored a bit borderPaint
  • polygon.dart: added the bool justHoles field
  • polygon_layer.dart: special case for justHoles
  • projected_polygon.dart: special case for `justHoles

New file:
* `advanced_polygons.dart`: Example dedicated to polygons with advanced features.

Impacted files:
* `main.dart`: added the new `AdvancedPolygonsPage` page
* `menu_drawer.dart`: added the new `AdvancedPolygonsPage` page
* `painter.dart`: managed the `justHoles` case; refactored a bit `borderPaint`
* `polygon.dart`: added the `bool justHoles` field
* `polygon_layer.dart`: special case for `justHoles`
* `projected_polygon.dart`: special case for `justHoles`
@enricostrijks
Copy link

LGTM

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