Posts

Showing posts with the label maps

React Native Maps library

I have problems with installing react native maps library, when I type: npm install react-native-maps --save error shows: react-native-maps error dependencies: "react": "15.3.2", "react-native": "0.36.0" As Rishabh says, you should upgrade to the latest versions of react, react-native and react-native-maps. Depending on how complex your project is, I often find the easiest way to upgrade is to create a brand new, clean project: react-native init MyProjectName and then install react-native maps (and another other dependencies) npm install --save react-native-maps react-native link and then copy across all your Javascript source code into the new project. It seems that I had some problems with build.gradle and settings.gradle, corrected those parts and now its working You can upgrade it to following dependency "react": "15.4.1", "react-native": "^0.39.0" T...

react native maps clustering

I am new to react-native and I want to integrate maps in my app, I am using the “react-native-maps” library for that https://github.com/airbnb/react-native-maps I want to use clustering but I am unable to find proper documentations related to that. Please help me to find documentation of how to integrate maps with clustering and also tell which library is best for the implementation of clustering for both platforms, iOS and Android. You can use mapbox/supercluster repo, and here's a gist showing how to implements supercluster to React Native. It's initially developed for browser/node applications but you can still simply npm install and use it (javascript is javascript everywhere). Add the clustered markers into your MapView (originally shared here): <MapView ref={ref => { this.map = ref; }}> { this.state.markers.map((marker, index) => { return ( <MapView.Marker coordinate={{ latitude: marker.geometry.coordinates[1], longitud...