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
Custom marker icons are too big on release #1422
Comments
+1 have the same issue |
Got the same problem. Found this issue that seems to contain a workaround Haven't had the time to test it yet. |
I have same issue too. |
it's August.. im still waiting for the fix. |
Finally had the time to play around more with React native and this plugin. http://facebook.github.io/react-native/releases/0.45/docs/images.html#images Edit:I linked to the apple docs. But this works with React native on Android as well. |
This workaround works for this issue too: #924 (comment) Here's what I'm currently using class PinImage extends React.Component {
render() {
return (
<View>
<Image
onLoad={() => this.forceUpdate()}
resizeMode="contain"
source={this.props.source}
style={{
width: 50,
height: 50,
}}
/>
<Text
style={{
width: 0,
height: 0,
}}
>
{Math.random()}
</Text>
</View>
);
}
} |
You must use @2x, @3x https://facebook.github.io/react-native/docs/images.html. Otherwise try putting image in a View within the Marker. (I know there's a bug on Android #1518, we are working on that) |
@alvelig I do not think this is correct. RN convention is to use @2x and @3x not @x2 or @X3. (https://facebook.github.io/react-native/docs/images.html) On trying your solution it simply breaks the packager even using my 2x/3x images so what I get is the original icon at its original size. This means while it is not "oversized" it also does not have the correct density and therefore has aliasing. I think this issue should be re-opened. |
@joelbowen excuse me please, you are right about @2x and @3x. Edited my comment. But this definitely solves this particular issue. As far as this issue is concerned, if you use If you see a different problem in your case, I kindly welcome you to open a new issue according to the template and we will surely find a solution for that. Maybe you should delete your |
Getting same problem |
still same issue |
I have a problem with custom markers.
When I use them in dev mode everything is ok, but when I build my app for release, then out of nowhere markers are about 2/3 times bigger and look very bad. I think it's not it is supposed to work. I also attach code responsible for markers
The text was updated successfully, but these errors were encountered: