react-native-maps

React Native Maps - Custom Marker Image Not rendering in Higher Android Versions

旧街凉风 提交于 2019-12-21 05:14:13
问题 Images aren't shown on Markers. Hi, I'm developing an app for Android using the React-Native, that uses the react-native-maps package. All platforms run without any problem, except on Android 7.1+. All images contained on Markers are not shown/loaded In Marker Component there is prop called "image" which can be used only with local images. but in my case I need to render remote image Url so i am not able to use this props So i decided to use custom Marker It was working fine until I tested my

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

百般思念 提交于 2019-12-20 12:20:16
问题 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

Wrong Geolocation with React Native and iOS simulator

南笙酒味 提交于 2019-12-19 09:37:58
问题 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

Requiring unknown module “undefined” on react-native-maps

不羁的心 提交于 2019-12-12 13:16:30
问题 I want to implement react-native-maps from here. But when I import MapView above on App.js with the code import MapView from 'react-native-maps'; I get this error: Requiring unknown module "undefined".If you are sure the module is there, try restarting Metro Bundler. You may also want to run yarn , or npm install (depending on your environement). My package.json is { "name": "MyNewProject", "version": "0.0.1", "private": true, "scripts": { "start": "node node_modules/react-native/local-cli

React-native-maps limit panning area

佐手、 提交于 2019-12-12 09:46:59
问题 Is there a way to limit the map to a specific area so that panning and zooming is contained inside that area and everything outside is locked away? I would like to limit what area the user can see on the map. I am using Google Maps via react-native-maps https://github.com/react-community/react-native-maps and this is my code and currently there is no limit on how far out you can zoom or how much you can pan to either side <View style={styles.container}> <MapView style={styles.map} provider= {

React-native: How to Show the tooltip with out clicking on marker in react-native-maps

◇◆丶佛笑我妖孽 提交于 2019-12-12 09:38:35
问题 I am using react-native-maps module.I have given lat and long values and i have used MapView.Marker to show the Marker and tooltip when clicking on the marker. But, Now I want to show the tooltip with out clicking on the marker when the map loads initially. this is my code here: <View style={styles.page}> <MapView ref="map" style={styles.map} region={this.state.region} provider = {PROVIDER_DEFAULT} zoomEnabled={true} onRegionChange={this.onRegionChange.bind(this)} pitchEnabled={true}

To get Current Location Automatically in Reactnative

风流意气都作罢 提交于 2019-12-11 16:51:44
问题 I have this method to fetch current location by clicking button it will fetch current location . I want to fetch location without clicking that button . getLocationHandler = () =>{ navigator.geolocation.getCurrentPosition(pos =>{ const coordsEvent ={ nativeEvent :{ coordinate : { latitude : pos.coords.latitude, longitude : pos.coords.longitude } } }; this.pickLocationHandler(coordsEvent); }, err => { console.log(err); alert("Fetching the position failed,Please pick one manually") }) } 回答1:

make bezier curve control points at right place on the map

邮差的信 提交于 2019-12-11 14:22:11
问题 I wanna draw a bezier curve between two location points. I can draw some curve following some answers on stackoverflow, but the point for bezier control points are placed wrong for some cases although I'm using the same simple formula for a bezier curve. What I'm doing to put two bezier control points at right point, - make a line that is always supposed to cross the linear line between two locations orthogonally. - make two bezier control points(+ and -) that are in the middle of somewhere

navigator.geolocation.getCurrentPosition not triggering in iOS simulator with React Native

佐手、 提交于 2019-12-11 08:58:41
问题 In Android emulators, the below code works fine but in iOS, it doesn't even step into navigator.geolocation.getCurrentPosition. I've updated my simulator's custom location through the debug menu but if it's not even getting into navigator.geolocation.getCurrentPosition I'm a bit lost. constructor(props) { super(props); this.state = { focusedLocation: { latitude: 37.4219999, longitude: -122.0862462, latitudeDelta: 0.0022, longitudeDelta: Dimensions.get("window").width / Dimensions.get("window"

Attempt to invoke virtual method 'double java.lang.Double.doubleValue()' on a null object reference getDouble

 ̄綄美尐妖づ 提交于 2019-12-10 17:12:59
问题 I am using react-native-maps library to show google maps in react-native application. I am tracking user movement and want to rotate the map when location will be changed. For map rotation I am calculating rotation angle and using animateCamera trying to rotate the map like the following: this.map.animateCamera({ heading: rotation, center: {latitude: currentLocation.latitude, longitude: currentLocation.longitude}, pitch: this.state.currentAngle }, {duration: 1000}); I've checked and rotation,