flutter_map icon indicating copy to clipboard operation
flutter_map copied to clipboard

fix: calculate `LayerHitResult.coordinate` correctly

Open JaffaKetchup opened this issue 6 months ago • 2 comments

Fixes #2092.

Also added .coordinate demo to Polygons example.

I also removed FeatureLayerUtils.origin in favour of MapCamera.pixelOrigin. I'm not 100% if this is correct, but it seems to make sense.

JaffaKetchup avatar May 16 '25 10:05 JaffaKetchup

@monsieurtanuki I believe it was while we were messing about with the feature layer painting that origin ended up in FeatureLayerUtils. In this PR, I've removed it because I couldn't see a difference to MapCamera.origin. They seem to work the same, but maybe you had something in mind to put origin in FeatureLayerUtils as well (caching messing something up?)? Does this change seem OK to you?

JaffaKetchup avatar May 16 '25 10:05 JaffaKetchup

@JaffaKetchup I'll try to have a look at it this week. Sorry about the delay.

monsieurtanuki avatar May 27 '25 16:05 monsieurtanuki