Skip to content

[Android] Error while updating property reactStyle #10

Closed

Description

@EugenePisotsky

Hello!

I've got a problem on Android when updating iconRotate style dynamically. Is this a bug or I can fix it somehow?

<MapboxGL.ShapeSource
    id="symbolLocationSource"
    shape={this.route.coordinate}
>
    <MapboxGL.Animated.SymbolLayer
        id="symbolLocationSymbols"
        minZoomLevel={1}
        style={[styles.icon, { iconRotate: this.rotationValue }]}
    />
</MapboxGL.ShapeSource>

...

const styles = MapboxGL.StyleSheet.create({
    icon: {
        iconImage: require('assets/images/[email protected]'),
        iconAllowOverlap: true,
        iconSize: 1,
    },
});

Screenshot_1556449415

This code works if iconRotate value is not changing

Versions (please complete the following information):

  • Platfrom: Android
  • React Native Version [e.g. 0.59.1]

Activity

  1. whiteHatCip commented on May 30, 2019

    @whiteHatCip
    Contributor

    It is probably saying that you are passing a string value to the style property iconrotate, but the value is supposed to be a double, and the OS is saying that you are trying to cast that string value to the expected double.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions