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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] Huge markers in react-native-maps and bundled assets #7665

Closed
moxorama opened this issue Apr 5, 2020 · 3 comments
Closed

[iOS] Huge markers in react-native-maps and bundled assets #7665

moxorama opened this issue Apr 5, 2020 · 3 comments

Comments

@moxorama
Copy link

moxorama commented Apr 5, 2020

馃悰 Bug Report

Environment

Expo CLI 3.17.11 environment info:
System:
OS: macOS 10.15.3
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 10.16.3 - /usr/local/opt/node@10/bin/node
Yarn: 1.21.1 - ~/.yarn/bin/yarn
npm: 6.9.0 - /usr/local/opt/node@10/bin/npm
IDEs:
Android Studio: 3.3 AI-182.5107.16.33.5314842
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
npmPackages:
expo: ~37.0.3 => 37.0.4
react: ~16.9.0 => 16.9.0
react-native: https://github.com/expo/react-native/archive/sdk-37.0.0.tar.gz => 0.61.4
npmGlobalPackages:
expo-cli: 3.17.11

Target: Managed ios

Steps to Reproduce

  1. Build standalone app expo build:ios -t simulator
  2. Open app in simulator (I'm using iPhone 7)
  3. Marker icon is HUGE

When I'm using expo as development environment - all ok, this bug is only in production builds.
I think this is related to this bug - #1182

Expected Behavior

Marker icon should have correcrt size

Actual Behavior

Marker icon has correct size in development environment, but has big size in production standalone App. If application gets new marker icon with OTA, marker size also become correct.

Reproducible Demo

https://github.com/moxorama/ios-huge-initial-markers-bugreport

@moxorama moxorama changed the title iOS - Huge markers in react-native-maps and bundled assets [iOS] - Huge markers in react-native-maps and bundled assets Apr 5, 2020
@moxorama moxorama changed the title [iOS] - Huge markers in react-native-maps and bundled assets [iOS] Huge markers in react-native-maps and bundled assets Apr 5, 2020
@brentvatne
Copy link
Member

brentvatne commented Apr 5, 2020

it seems like an issue with react-native-maps:

perhaps a solution (workaround) could be to explicitly specify the dimensions of the image?

@moxorama
Copy link
Author

moxorama commented Apr 5, 2020

Ok, maybe this is bug in react-native-maps, but

  • When I'm not bundling asset with my app, and not preloading image during splash with Asset.loadAsync()- everything is ok. Looks like Asset.loadAsync does something strange with image with 2x/3x variants.

  • I have to use icon attribute of marker because it's the fastest way to render marker with image :( Is there any way to specify explicit icon size? Maybe using native props?

  • Is there any way to "unload" asset?

@brentvatne
Copy link
Member

i don't think this is anything about expo-asset - those links i shared to issues on react-native-maps indicate that in 'release mode' (so when the assets are on the local filesystem path because they are bundled in the app bundle rather than served from development service at a web url) this is an ongoing issue for folks who don't use expo-asset.

another workaround you could probably use is to just use web urls for the images rather than using require. or another way to do this is to ensure that the images you want to use here specifically don't match assetBundlePatterns and don't use Asset.loadAsync, then they will be loaded over http

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

No branches or pull requests

3 participants