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

SymbolLayer iconImage incorrect Scale in Release Build #40

Open
ferologics opened this issue Apr 18, 2023 · 1 comment
Open

SymbolLayer iconImage incorrect Scale in Release Build #40

ferologics opened this issue Apr 18, 2023 · 1 comment

Comments

@ferologics
Copy link

Steps to Trigger Behavior

  1. create a MGLSymbolStyleLayer with some image
  2. observe image size differs based on build configuration

Minimal Reproducible Example

const point_icon = require('@assets/icons/point/Group.png');
<MapLibreGL.SymbolLayer id={id + '_layer'} style={{   iconImage: point_icon }} />

where @assets/icons/point/Group.png has [email protected] and [email protected] variants
point_asset_image.zip

Expected Behavior

Image stays same size as in debug build

Actual Behavior

Image is @3x.png scale size instead

Screenshots (if applicable)

release debug
IMG_2910 image

Version(s) affected

  • Platform: iOS
  • OS version: 16.4.1
  • Device type: iPhone 14 Pro Max
  • Development OS: macOS 13.3.1 (22E261)
  • maplibre-react-native Version 9.0.1
  • React Native Version: 0.71.6

Additional context

Maybe related to facebook/react-native#28670

@ferologics
Copy link
Author

ferologics commented Apr 19, 2023

workaround: remove @2 and @3 scales of the asset, make the @3 size default, but multiply iconSize by 0.3.
image

@KiwiKilian KiwiKilian changed the title MGLSymbolStyleLayer incorrect scale in release build SymbolLayer iconImage incorrect Scale in Release Build Nov 24, 2024
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