Maps: Understanding SymbolLayer

Created on 10 Jul 2019  路  5Comments  路  Source: react-native-mapbox-gl/maps

I have a hard time trying to understand how the SymbolLayer works, especially the style prop, especially the properties iconSize and iconImage seen in the ShapeSourceIcon example.
I understand that there is a lot of WIP in this library, especially regarding the doc, and if I have some time I would be glad to help, but in the meantime I need to sort out my transition from PointAnnotation to SymbolLayer, and I feel it quite hard to understand the way the whole machinery works without documentation...

Thanks for your help !

wontfix

Most helpful comment

I'm a bit confused too ... would appreciate some explanation on how this new component works as compared to PinAnnotation

All 5 comments

I'm having trouble too. Willing to help update the docs once I get a better understanding of how the SymbolLayer works. I was using the PointAnnotation to render a custom view that was loading an external image from a uri. It's not clear how to do this via the SymbolLayer.

@jimjeffers Can you tell me how you changed from the PointAnnotation to the SymbolLayer? My app is working with annotations and i want to change since its deprecated. Having a hard time, since i have a lot of points on the map. Thanks

I'm a bit confused too ... would appreciate some explanation on how this new component works as compared to PinAnnotation

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Do we have any update on that one ?
In the documentation It's write that iconSize is a number and in the example (ShapeSourceIcon) there is that case :

 iconSize: [
      'match',
      ['get', 'icon'],
      'example',
      1.2,
      'airport-15',
      1.2,
      /!* default *!/ 1,
    ]

Following the actual docution, I have difficulties to understand how this one should work...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lukemcgregor picture lukemcgregor  路  5Comments

alexisrougnant picture alexisrougnant  路  3Comments

jayhaluska picture jayhaluska  路  5Comments

andrei-tofan picture andrei-tofan  路  5Comments

calypsow777 picture calypsow777  路  5Comments