Skip to content

feat: 2076 - new optimizeRadiusInMeters parameter for CircleLayer #2101

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

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

Conversation

monsieurtanuki
Copy link
Contributor

What

  • With the useRadiusInMeter parameter, we compute again and again the radius of each CircleMarker. Which depends on its latitude and requires heavy computation.
  • Now, with the new optimizeRadiusInMeters parameter for CircleLayer, we are able to cache the number of pixels per meter, and to compute the value once for all markers.
  • With this new feature, displaying 20k CircleMarkers doesn't freeze anymore.
  • cc. @bombicod
  • Closes: Add useRadiusInMeters option to CircleLayer #2076

Impacted files

  • circle_layer.dart: new bool optimizeRadiusInMeters field
  • many_circles.dart: now displaying radius of 100km (instead of 5 pixels), with optimizeRadiusInMeters: true
  • painter.dart: caching the meter in pixels value

Impacted files:
* `circle_layer.dart`: new `bool optimizeRadiusInMeters` field
* `many_circles.dart`: now displaying radius of 100km (instead of 5 pixels), with `optimizeRadiusInMeters: true`
* `painter.dart`: caching the meter in pixels value
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.

Add useRadiusInMeters option to CircleLayer
1 participant