-
-
Notifications
You must be signed in to change notification settings - Fork 860
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
Anchor position top/bottom wrong way around #66
Comments
Thanks for filing an issue! I think the original intention was that "top" meant "the top of the marker is pinned to the location." In Leaflet JS, the anchor is an X,Y position defining the "tip of the icon":
But it could be less confusing to define the anchor point as "below" and "above" the point on the map. Either way, we need better terminology or documentation for this feature. |
I could be totally misunderstanding something, but I think I agree with you, as in I also thought top would pin the top of the marker as well. However top pins the bottom of the marker to the geographical location. Let me run through an example Currently:
lets say the geographical y position is calculated to be at 10, and we have a 5x5 marker. if the top anchor is selected, the top of the marker will be drawn at (10 - (5 - 0)) or 5. if the bottom anchor is selected, the top of the marker will be drawn at (10 - (5 - 5)) or 10. I think it should be:
if the top anchor is selected, the top of the marker will be at (10 - 0), or 10. if the bottom anchor is selected, the top of the marker will be at (10-5) or 5. |
There's been some changes to AnchorAlign since this issue, marking as stale |
* Start Upgrade To flutter_map v3.0.0 * Fixed Bugs * Changed version numbers to v6.0.0 Improved example application * Use pub.dev beta release of flutter_map v3 * Built Example Applications * Added invalid store detector to stores list screen * Built Example Applications * Updated pub.dev badges in README Removed redundant analysis options * Improved Example Application * Built Example Applications * Updated for Flutter 3.3.0 Added funding links to pubspec Replaced issue templates with forms Improved example application * Built Example Applications * Set minimum Flutter constraint to 3.3.0 Ignored FVM * Removed example applications to resolve conflicts Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Firstly thank you, really enjoying the map!
The Anchor.top and Anchor.bottom look like they are the wrong way around, Anchor top actually pins the bottom of my marker to the correct spot.
Should be easy to verify, just place a few markers and zoom in and out.
The text was updated successfully, but these errors were encountered: