React-native-mapbox-gl: [v6] SymbolLayer with style property textOffset

Created on 17 Oct 2017  路  6Comments  路  Source: nitaliano/react-native-mapbox-gl

Hi,

Trying to use the textOffset on a SymbolLayer and it does not work. Below is a screenshot of the error.

image

Here is my style object:

const styles = Mapbox.StyleSheet.create({
    clusterLabel: {
        textSize:12 ,
        textColor: BLACK,
        textHaloColor: WHITE,
        textHaloWidth: 1,
        textField: '{point_count}',
        textOffset: [2, 2],
    }
})

I wanted to test with the demo application, but I ran into issues with a babel-preset-react-native transformation trying to start it.

Thanks!

bug v6

All 6 comments

Theres's a bug with the version of babel-preset-react-native in the demo app, if you switch to node 8 it will run.

I'll look into textOffset and probably the rest of the SymbolLayer styles to make sure they're working correctly.

I already see the problem. Some offsets require NSValue that is a CGVector others require NSArray<NSNumber *> *.

Thanks @nitaliano ! Ready to test as soon as you have a patch.

@karlguillotte I added the fix for this on the PR that fixes the iconImage token not working. https://github.com/mapbox/react-native-mapbox-gl/pull/674. Let me know how it goes.

It is working! Thanks @nitaliano.

The fix has been merged into the v6 branch closing out

Was this page helpful?
0 / 5 - 0 ratings

Related issues

igor9silva picture igor9silva  路  3Comments

kristfal picture kristfal  路  3Comments

lernerbot picture lernerbot  路  3Comments

lucasbento picture lucasbento  路  3Comments

yaduc picture yaduc  路  3Comments