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

Tooltip anchor locations are incorrect for small GeoJSON polygons in 1.9.x #8783

Closed
4 tasks done
michaelthoreau opened this issue Jan 5, 2023 · 12 comments · Fixed by #8784
Closed
4 tasks done

Tooltip anchor locations are incorrect for small GeoJSON polygons in 1.9.x #8783

michaelthoreau opened this issue Jan 5, 2023 · 12 comments · Fixed by #8784
Labels

Comments

@michaelthoreau
Copy link

Checklist

  • I've looked at the documentation to make sure the behavior isn't documented and expected.
  • I'm sure this is an issue with Leaflet, not with my app or other dependencies (Angular, Cordova, React, etc.).
  • I've searched through the current issues to make sure this hasn't been reported yet.
  • I agree to follow the Code of Conduct that this project adheres to.

Steps to reproduce

This JSFiddle Illustrates the problem well: https://jsfiddle.net/michaelthoreau/ekafvph8/6/

This issue seems to only affect geojson polygons that are geographically small, regardless of pixel size when drawn.

Expected behavior

Both tooltips should appear centered on the polygons.

Current behavior

The smaller polygon's tooltip appears in the wrong position. This behaviour does not appear in leaflet@1.8.0.

Minimal example reproducing the issue

https://jsfiddle.net/michaelthoreau/ekafvph8/6/

Environment

  • Leaflet version: 1.9.3
  • Browser (with version): 108.0.5359.124 (Official Build) (arm64)
  • OS/Platform (with version): Mac OS 12.6
@Mushr0000m
Copy link

Any news about this ?

@Falke-Design
Copy link
Member

We have already a PR (#8784) for this, but the PR needs first to be merged and then a Release is necessary. So this will take a while.

@Mushr0000m
Copy link

When you say a while you mean weeks ? months ? We can't use Leaflet for our new project due to this...

@Falke-Design
Copy link
Member

You can use Leaflet 1.8.0 until the fix is released.
I can't say you how fast the release will be done. I hope in the next 2 weeks but i can also take 2 months.

@IvanSanchez

This comment was marked as outdated.

@Mushr0000m

This comment was marked as outdated.

@IvanSanchez

This comment was marked as outdated.

@michaelthoreau
Copy link
Author

@Falke-Design Thanks for the pull request! I was suspicious of something like rounding that but didn't do a great job of debugging due to unfamiliarity with the project structure. Looking forward to the release but using 1.8.0 until then.

BTW we frequently use 7+ decimal places to annotate small objects... works well so far but hoping we dont run in to precision issues if we go much smaller.

@Falke-Design
Copy link
Member

Issue fixed by #8784, will be in the next v1 release

@foxymiles
Copy link

This is affecting us too. Thanks for the fix! We're looking forward to the next release.

@Falke-Design
Copy link
Member

@foxymiles @michaelthoreau @Mushr0000m we just released 1.9.4 which includes the fix for this.

@foxymiles
Copy link

@Falke-Design Thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants
@IvanSanchez @michaelthoreau @Mushr0000m @Falke-Design @foxymiles and others