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

blurry labels for markers #103

Open
incanus opened this issue Aug 21, 2012 · 2 comments
Open

blurry labels for markers #103

incanus opened this issue Aug 21, 2012 · 2 comments

Comments

@incanus
Copy link

incanus commented Aug 21, 2012

Over in mapbox/DEPRECATED-mapbox-ios-sdk#87 we have noticed blurriness when setting a label which shows up on non-retina devices. As it turns out, RMMarker objects can have fractional coordinates and this is what causes it. If you snap them to integer pixel boundaries on click or otherwise before setting/showing the label, this is fixed.

Do you have any ideas where the best place to do this would be? Right in setLabel: seems odd since that doesn't necessarily come at interaction time. But in showLabel won't be caught on first set/show, only on successive ones. Maybe in the gesture handling in RMMapView?

@incanus
Copy link
Author

incanus commented Nov 6, 2012

I've been working on this in mapbox/DEPRECATED-mapbox-ios-sdk#62 and mapbox/DEPRECATED-mapbox-ios-sdk#87, which I've closed in favor of this. Putting a roundf() pixel fix in correctPositionOfAllAnnotations seems to work well, since this continually gets cancelled during repeated movement so it's not a performance hit. But the rounding is noticeable -- briefly after the map pan/zoom stops (0.1s, though I've tried other delays, include 0.0) you can see the markers move a fraction of a pixel. I'm not sure of a good way to remedy this. Any ideas?

@incanus
Copy link
Author

incanus commented Nov 6, 2012

I've got an attempted fix in the above commit on our pixel-aligned-layers branch. Any luck? /cc @russellquinn @nfarina

yarry pushed a commit to yarry/route-me that referenced this issue Jul 18, 2015
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

No branches or pull requests

1 participant