You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The animation effect on appearing/disappearing clusters works fine on iOS simulator with standard maps but not with Google maps provider which I would like to use. Does anyone know the reason and know how to fix that?
Here is the demonstration
Standard iOS map
Google map
Here is the code to reproduce the issue:
App.js
importReact,{useState}from'react';importMapViewfrom'react-native-map-clustering';import{Marker,Region,PROVIDER_GOOGLE}from'react-native-maps';import{Dimensions,StyleSheet,View}from'react-native';exportdefaultfunctionMap({navigation}){const[markers,setMarkers]=useState([]);constinitialRegion: Region={latitude: 39.466667,longitude: -0.375,latitudeDelta: 0.0922,longitudeDelta: 0.0421,};React.useEffect(()=>{// generate a bunch of random coordinates near to initialRegionconstmarkers=[ ...Array(1000).keys()].map(i=>{constmin=0.0001constmax=0.0500return{latitude: initialRegion.latitude+Math.random()*(max-min)+min,longitude: initialRegion.longitude-Math.random()*(max-min)+min}});setMarkers([...markers]);},[]);return(<Viewstyle={styles.container}><MapViewradius={50}provider={PROVIDER_GOOGLE}// comment this to see animation workingstyle={styles.mapStyle}initialRegion={initialRegion}>{markers.map((marker,i)=><Markerkey={i}coordinate={marker}/>)}</MapView></View>);}conststyles=StyleSheet.create({container: {flex: 1,backgroundColor: '#fff',alignItems: 'center',justifyContent: 'center',},mapStyle: {width: Dimensions.get('window').width,height: Dimensions.get('window').height,},});
The animation effect on appearing/disappearing clusters works fine on iOS simulator with standard maps but not with Google maps provider which I would like to use. Does anyone know the reason and know how to fix that?
Here is the demonstration
Here is the code to reproduce the issue:
App.js
package.json
The text was updated successfully, but these errors were encountered: