Description
I am using react-native-maps to draw about 750 markers on the map. Each marker is using same Image
Reproduction Steps and Sample Code
const markerImage = <Image source={images.marker} />;
export default class Main extends Component {
render() {
return (
<MapView style={StyleSheet.absoluteFill}>
{ coordinates.map(coordinate => {
return (
<Marker
key={coordinate.id}
coordinate={coordinate}
children={markerImage}
/>
);
})}
</MapView>
)
}
}
Possible Solution
Re-using UIImage Optimising custom marker image performance with Google Maps SDK for iOS
However, I do not know how to do this in React Native as React abstracts away the view layer.
Additional Information
- React Native version: ["0.41.2"]
- react-native-maps: ["^0.13.0"]
- Platform: [both]
- Development Operating System: [MacOS]
- Dev tools: [Xcode: 8.3, iPhone 7(10.3), GalaxyS6(6.0.1)]