We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mapbox
default
0.73.4
iOS
@rnmapbox/maps
10.1.19
/* eslint-disable react/prop-types */ import {View, Text, StyleSheet, Button} from 'react-native'; import React, {useEffect, useRef, useState} from 'react'; import Mapbox, {Callout, Camera} from '@rnmapbox/maps'; export default function MapsPage() { var mapRef = useRef(); const markers1 = [ { cord: [2.0, -2.9999], isFav: true, }, { cord: [5.044, -2.9999], isFav: true, }, { cord: [9.044, -3.999], isFav: false, }, ]; const markers2 = [ { cord: [3.0, -5.9999], isFav: true, }, { cord: [4.044, -9.9999], isFav: true, }, { cord: [9.044, -11.999], isFav: false, }, ]; var [markers, setmarkers] = useState(markers1); useEffect(() => { setmarkers(markers1); }, []); const MyTxt = ({item}) => { return ( <View style={{height: 20, backgroundColor: 'green'}}> <Text>Jam</Text> </View> ); }; return ( <View style={styles.page}> <View style={styles.container}> <Mapbox.MapView style={styles.map}> <Mapbox.Camera defaultSettings={{ centerCoordinate: [2.0, -2.9999], zoomLevel: 4, }} /> {markers.map(item => { return ( <Mapbox.PointAnnotation key={`long${item.cord[0]}`} id={`${item.cord[0] + item.cord[1]}`} coordinate={[item.cord[0], item.cord[1]]}> <MyTxt item={item} /> <Callout title="Place name" /> </Mapbox.PointAnnotation> ); })} </Mapbox.MapView> <Button title="Change markers" onPress={() => setmarkers(markers2)} /> </View> </View> ); } const styles = StyleSheet.create({ page: { flex: 1, justifyContent: 'center', alignItems: 'center', }, container: { height: '100%', width: '100%', }, map: { flex: 1, }, });
Issue seems to be similar to #3412
No response
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Mapbox Implementation
Mapbox
Mapbox Version
default
React Native Version
0.73.4
Platform
iOS
@rnmapbox/maps
version10.1.19
Standalone component to reproduce
Observed behavior and steps to reproduce
Issue seems to be similar to #3412
Expected behavior
No response
Notes / preliminary analysis
No response
Additional links and references
No response
The text was updated successfully, but these errors were encountered: