-
Notifications
You must be signed in to change notification settings - Fork 1
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
Map pin icons are different sizes on iOS and Android; blurry on iOS #316
Comments
@paulschreiber can you look into this? i think the only relevant values should be in
i'm guessing one (hopefully not both 😱) of the values behaves differently per platform, so if you could find a set of values that creates the same size icon on android and iOS that should resolve the issue. See e.g. here in the design for the expected size. (We aren't displaying the cluster icons or increasing the icon size when it is selected yet). |
Filed rnmapbox/maps#3009 |
Please retest on build 24 or later. |
This is leading to a secondary issue of me not being able to select the correct pin when two are moderately close together Upload.from.GitHub.for.iOS.MOV |
huh that's weird, paul confirmed that this was working for both clients on his dev build 🤔 i will take a look at this this week! it does seem to confirm that the underlying issue is a style parameter that doesn't get correctly applied to the android build |
ok soooooo i have tried:
and nothing works perfectly. it seems that the reason nothing works perfectly is outlined in this little snippet buried in the mapbox docs:
while they mention earlier that SDFs are a raster format and so look terrible when scaled. in fact even in the official mapbox docs for SDFs the demo map they display has jagged pixelated icons. the inability to render vector icons also explains why even if i upload an svg to mapbox studio, it will look blurry so i think our only option is to programmatically pre-generate raster icons for each size and color we need at appropriate pixel densities for the running device. which will hopefully not be as difficult as it sounds because of RN's PixelRatio function and the existing vector icon i will attempt to implement this at a time that is later 👍 i do feel like i'm missing something because this seems ridiculous, but at the same time the docs are clearly stating that they can't render vector symbols (even though the entire core innovation of Mapbox as a company is rendering maps from vector data) |
This is looking good on both Android and iOS now! |
Description
The pins are enormous on iOS, but not on Android. The following screenshots have been taken on both iOS and Android at roughly the same scale, aka whatever scale the map is set to upon first opening the app.
Android
iOS
The text was updated successfully, but these errors were encountered: