React-native-mapbox-gl: iconSize Inconstancies

Created on 6 Nov 2018  路  8Comments  路  Source: nitaliano/react-native-mapbox-gl

Hi,

I just upgraded to the latest version of the library and I ran into a little bit of a inconsistency between debug and release compared to the older version. The way the iconSize style on the SymbolLayer seems to behaving strangely.

My icon is around 77x77 and then I was using iconSize: 0.35 to make the icon smaller.

Now after upgrading I am seeing the following:

iOS Debug:
ios-pin-dev

iOS Release
ios-pin-prod

Android Debug
pin-dev

Android Release
pin-prod

As you can see the size difference is quite different between debug and release. I was wondering if I am doing wrong with the iconSize or if it is a bug?

Anyone seeing something similar?

Thanks,
Stephen

Most helpful comment

Hello,

I've exactly the same issue (test on Android only for now).

Android Release
android_release

Android Debug
android_debug

Image size : 41x41
iconSize: 0.8
"@mapbox/react-native-mapbox-gl": "6.1.2"
"react-native": "0.56.0"

All 8 comments

Hello,

I've exactly the same issue (test on Android only for now).

Android Release
android_release

Android Debug
android_debug

Image size : 41x41
iconSize: 0.8
"@mapbox/react-native-mapbox-gl": "6.1.2"
"react-native": "0.56.0"

What version of react-native-mapbox-gl you used before?

  • With 6.1.1 and react-native 0.52, I didn't experience this bug
  • With 6.1.1 and react-native 0.57.3, the iconSize attribute doesn't work in dev or release
  • With 6.1.3 and react-native 0.57.3, the behavior is the same as yours (dev works, release doesnt)
  • With 6.1.3 and react-native 0.57.8, the behavior is the same as yours (dev works, release doesnt)

These files have changed between versions 6.1.1 and 6.1.3:
https://pastebin.com/raw/gW9aGZFc

I found a commit possibly related to this issue. The commit is in versions 6.1.2 and 6.1.3 published in npm.
Anyone experiencing this bug with iOS (the change is Android specific)?

https://github.com/mapbox/react-native-mapbox-gl/commit/d8fb1b8b2d4979d6f8f3a31cc785f1c736aae4fd#diff-01be14636c2db27fdec07f486b439e33

I found a commit related to this issue. The commit is in versions 6.1.2 and 6.1.3 published in npm.
Anyone experiencing this bug with iOS (the change is Android specific)?

Yes, it is happening now for me on iOS with mapbox 6.1.2 and RN 0.57.7. Icon sizes are about 2x bigger in release compared to debug.

What version of react-native-mapbox-gl you used before?

I upgraded from 6.1.0 with RN 0.55.2 to 6.1.2 with RN 0.56.0 (worked fine in 6.1.0 with RN 0.55.2)

Hello,

I have the same issue, do you have a solution ?7

Mapbox 6.1.3
RN 0.57.7

+1, experiencing the same issue with RN 0.57.8 and Mapbox 6.1.3

As a workaround I use 3 times smaller iconSize if not in development environment (I have a environment variable for that).

Not tested in iOS.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alexisohayon picture alexisohayon  路  4Comments

EugenePisotsky picture EugenePisotsky  路  4Comments

Craytor picture Craytor  路  3Comments

EwanValentine picture EwanValentine  路  3Comments

digitaldavenyc picture digitaldavenyc  路  4Comments