Open ErikTillberg opened 5 years ago
It seems that adding a marker with a shape source and symbol layer from an asset is fairly straightforward:
<MapboxGL.ShapeSource id="allNotes" images={{ assets }} shape={{ type: 'FeatureCollection', features: notesFetched, }} cluster={false} onPress={this.notePressed} > <MapboxGL.SymbolLayer id="noteId" style={styles.msgIcon} / </MapboxGL.ShapeSource>
However, what if I wanted to load a custom component as the marker instead of some asset, let's say for example, what I have accomplished with point annotations:
<MapboxGL.PointAnnotation key = "key" id="id" title="End Location" coordinate={loc}> <EntypoIcon name="location-pin" size={40} color="green" /> </MapboxGL.PointAnnotation>
Is there a way to replicate this with the shape source and symbol layer components?
Also interested to know if it is possible 👍
It seems that adding a marker with a shape source and symbol layer from an asset is fairly straightforward:
However, what if I wanted to load a custom component as the marker instead of some asset, let's say for example, what I have accomplished with point annotations:
Is there a way to replicate this with the shape source and symbol layer components?