react-native-maps

react native maps clustering

假装没事ソ 提交于 2019-12-03 05:01:05
问题 I want to integrate maps in my react-native 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. 回答1: You can use mapbox/supercluster repo, and here's a gist showing how to

React Native Maps: Markers image doesn't show using Custom Marker in react-native-maps

烈酒焚心 提交于 2019-12-03 02:40:43
I'm using react-native-maps but I faced a problem that after a lot of googling without answer makes me ask it here. I'm trying to use Custom Marker for the marker in the map as the following picture as I searched I found out that needed to use Custom Marker to accomplish the maker's design, then I created a Custom Marker component import React, { Component } from "react"; import { View } from "react-native"; import { Text, Left, Right, Thumbnail, } from "native-base"; const defaultEmployeeLogo = require("../../../assets/defualtEmployee.png"); class CustomMarker extends Component { render() {

React Native : Task :react-native-maps:compileDebugRenderscript FAILED

一笑奈何 提交于 2019-12-02 03:43:26
I am trying to implement React Native MapView for Android. I did follow github installation instruction but i am facing compilation error when i try to run using react-native run-android command. Task :react-native-maps:compileDebugRenderscript FAILED FAILURE: Build failed with an exception. What went wrong: Could not resolve all files for configuration ':react-native-maps:debugCompileClasspath'. Could not resolve com.android.support:support-compat:26.1.0. Required by: project :react-native-maps Cannot find a version of 'com.android.support:support-compat' that satisfies the version

Wrong Geolocation with React Native and iOS simulator

为君一笑 提交于 2019-12-01 09:03:37
I am working with react-native-maps and using the react-native api for geolocation. When I am using location through the api what comes back on the simulator shows me in San Francisco not in Denver, CO where I am located. Is there a reason as to why my location would not show where I am at? my function that runs the location // Get current users locaiton on load componentDidMount() { navigator.geolocation.getCurrentPosition((position) => { console.log(position); let newLat = parseFloat(position.coords.latitude); console.log("newLat", newLat); let newLng = parseFloat(position.coords.longitude);

React Native : Task :react-native-maps:compileDebugRenderscript FAILED

我与影子孤独终老i 提交于 2019-12-01 07:34:22
问题 I am trying to implement React Native MapView for Android. I did follow github installation instruction but i am facing compilation error when i try to run using react-native run-android command. Task :react-native-maps:compileDebugRenderscript FAILED FAILURE: Build failed with an exception. What went wrong: Could not resolve all files for configuration ':react-native-maps:debugCompileClasspath'. Could not resolve com.android.support:support-compat:26.1.0. Required by: project :react-native

Get current location, latitude and longitude in ReactNative using react-native-maps

北城余情 提交于 2019-11-29 23:09:46
I am developing a map location. When I click in some particular place I get the latitude and longitude, but not the current location, latitude and longitude. I don't know how to find out. How can I get them and how can I put the marker at that position? Here is my code: class Maps extends React.Component { constructor(props) { super(props); this.state = { region: { latitude: LATITUDE, longitude: LONGITUDE, latitudeDelta: LATITUDE_DELTA, longitudeDelta: LONGITUDE_DELTA, }, marker: { latlng:{ latitude: null, longitude: null, latitudeDelta: LATITUDE_DELTA, longitudeDelta: LONGITUDE_DELTA } } } }

Android Emulator not showing Google Maps on Screen

旧时模样 提交于 2019-11-29 07:55:38
I have been trying to follow this https://github.com/airbnb/react-native-maps tutorial I tried everything they said but getting a blank screen on my emulator of android studio. My Code: import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; import MapView from 'react-native-maps'; export default class ReactNativeMaps extends Component { render() { const { region } = this.props; console.log(region); return ( <View style ={styles.container}> <MapView style={styles.map} region={{ latitude: 39.1329, longitude: 84.5150, latitudeDelta: 0.015,

Get current location, latitude and longitude in ReactNative using react-native-maps

徘徊边缘 提交于 2019-11-28 17:33:24
问题 I am developing a map location. When I click in some particular place I get the latitude and longitude, but not the current location, latitude and longitude. I don't know how to find out. How can I get them and how can I put the marker at that position? Here is my code: class Maps extends React.Component { constructor(props) { super(props); this.state = { region: { latitude: LATITUDE, longitude: LONGITUDE, latitudeDelta: LATITUDE_DELTA, longitudeDelta: LONGITUDE_DELTA, }, marker: { latlng:{

How to zoom in/out in react-native-map?

寵の児 提交于 2019-11-28 08:20:18
I am using react-native to build a map application. The api I am using is from this link: https://github.com/lelandrichardson/react-native-maps . Below is the code I bring the map on my app. I wander how I can give a zoom value on that map. And how I can change the zoom value when user click a button on the map. What is the zoom API I should use to achieve this? import React, { AppRegistry, Component, StyleSheet, Text, View, Image, ListView, TextInput, TouchableHighlight, Dimensions, //MapView, } from 'react-native'; import MapView from 'react-native-maps'; const styles = StyleSheet.create({

Android Emulator not showing Google Maps on Screen

断了今生、忘了曾经 提交于 2019-11-27 19:00:22
问题 I have been trying to follow this https://github.com/airbnb/react-native-maps tutorial I tried everything they said but getting a blank screen on my emulator of android studio. My Code: import React, { Component } from 'react'; import { AppRegistry, StyleSheet, Text, View } from 'react-native'; import MapView from 'react-native-maps'; export default class ReactNativeMaps extends Component { render() { const { region } = this.props; console.log(region); return ( <View style ={styles.container}