React Native Maps是Airbnb开发的一组组件,用于在Android和iOS上使用React Native框架渲染地图组件。基础开发人员指南和示例项目可在以下网址获得:https://github.com/airbnb/react-native-maps
我正在使用 fitToSuppliedMarkers() 作为我的标记,并且需要向我的地图添加一些填充。我尝试实施这个解决方案,但没有成功。我无法使用 fitToCoordinates() 因为我需要创建...
如何修复 iPhone 上的 EAS 版本的 Google 地图错误?
我将我的 Expo SDK 43 托管工作流程项目迁移到 EAS 构建。 我使用 Google 地图作为 Android 和 iOS 的默认地图选择,但在导航到带有地图的屏幕时收到此错误:
React Native 地图 - Android 上的街道变黑
我有一个带有React Native Maps的React Native应用程序,在iOS上一切都工作得很好,但在应用程序的Android版本中,由于某种原因街道是黑色的: 黑色街道 我以为我...
每当我们尝试在特定位置(纬度、经度)上放大或缩小时,它都不会粘在该位置上,并且会在这里和那里稍微移动。我们希望实现与 Zo 类似的功能...
我正在尝试优化react-native-maps性能。 这是我定制的标记 导出函数 usePrevious(value) { const ref = React.useRef(); React.useEffect(() => { 参考电流 = v...
React Native Maps Mapview 仅在 iOS 上显示灰色背景
地图之前显示得很好,现在才出现这种情况。我已经添加了 API 密钥并进行了样式设置,所以我不确定还有什么可能是造成这种情况的原因。请帮忙。 输入图片描述...
如何在 Android 上通过 React Native 使用 OpenStreetMap 图块
我目前正在尝试将 OSM(OpenStreetMap)添加到我的使用 React Native 构建的 Android 应用程序中。然而它仍然显示带有react-native-maps的Google地图 这是我的代码 我目前正在尝试将 OSM(OpenStreetMap)添加到我的使用 React Native 构建的 Android 应用程序中。然而它仍然显示带有react-native-maps的Google地图 这是我的代码 <View> <MapView style={styles.map} initialRegion={{ latitude: 37.78825, longitude: -122.4324, latitudeDelta: 12, longitudeDelta: 12, }} rotateEnabled={false} zoomEnabled={false}> <UrlTile urlTemplate="https://c.tile.openstreetmap.org/{z}/{x}/{y}.png" shouldReplaceMapContent={true} maximumZ={19} flipY={false} /> </MapView> </View> 有人可以帮助我在 Android 应用程序上使用 React Native 来显示 OSM 吗? 另外,package.json是 "dependencies": { "@expo/html-elements": "latest", "@gluestack-style/react": "latest", "@gluestack-ui/themed": "latest", "@legendapp/motion": "latest", "@react-native-community/geolocation": "^3.1.0", "@react-navigation/native": "^6.1.8", "@react-navigation/native-stack": "^6.9.14", "expo-font": "^11.6.0", "expo-location": "^16.3.0", "install": "^0.13.0", "leaflet": "^1.9.4", "npm": "^10.1.0", "react": "18.2.0", "react-dom": "18.2.0", "react-native": "0.72.3", "react-native-geocoding": "^0.5.0", "react-native-keyboard-aware-scroll-view": "^0.9.5", "react-native-maps": "1.7.1", "react-native-paper": "^5.10.6", "react-native-safe-area-context": "^4.7.2", "react-native-screens": "^3.25.0", "react-native-svg": "13.4.0", "react-native-vector-icons": "^10.0.0" }, 嗨,你能解决这个问题吗?我也有同样的问题
我目前正在从事一个业余爱好项目,该项目涉及使用自定义标记实现地图系统。我遇到的挑战是地图上的每个标记都会重新渲染,即使......
react-native-maps 中的自定义地图样式不渲染,恢复为基本/标准地图样式
正在开发 ReactNative 应用程序,我正在尝试编辑地图样式。 我按照“https://github.com/react-native-community/react-native-maps”上的说明进行操作。 对于 IOS,文档建议...
地图视图(谷歌地图)中标注内的图像不会显示整个图像。 起初,标注中没有显示图像。所以我更改了代码,将图像放入 .现在
所以我有一个带有自定义标记的 MapView 所以我有一个带有自定义标记的 MapView <MapView ref={mapRef} provider={PROVIDER_GOOGLE} style={{ width: '100%', height: '100%', borderRadius: 10, }} initialRegion={{ latitude: location?.coords.latitude || 1.290270, longitude: location?.coords.longitude || 103.851959, latitudeDelta: 0.0922, longitudeDelta: 0.0421, }} zoomEnabled={true} minZoomLevel={16} maxZoomLevel={18} mapType={'standard'} showsBuildings={false} showsTraffic={false} showsIndoors={false} showsPointsOfInterest={false} showsIndoorLevelPicker={false} customMapStyle={Theme.maps.lightMode} > <> {isEnabled && ( <Marker key={'currentUserLocation'} coordinate={{ latitude: location?.coords.latitude || 1.290270, longitude: location?.coords.longitude || 103.851959, }} style={{zIndex: 9999}} > <MyProfileMarker/> </Marker> )} </> </MapView> 还有一个具有自定义设计的轮廓标记: export default function MyProfileMarker() { return ( <View style={styles.container}> <Icon name="map-marker-outline" size={wp('9%')} color={theme.colors.danger['600']}/> </View> ); } 但是Marker没有正确放置在位置坐标中: const styles = StyleSheet.create({ container: { width: wp('80%'), height: wp('80%'), // Full circle borderRadius: wp('40%'), alignItems: 'center', justifyContent: 'center', padding: 2, backgroundColor: 'rgba(183,56,68,0.1)', // 'rgba(255,255,255,0.2) }, }); 看起来像这样 作为参考,这是标记应该所在的位置,红色圆圈来自图钉 尝试添加这个对我有用的锚点
无法调用 RNfusedlocation.getCurrentPosition -react-native-geolocation-service
react-native-geolocation-service(^5.3.1) 在调用 Geolocation.getCurrentPosition() 时抛出此错误或应用程序崩溃。我添加react-native-maps(^1.8.0) lib后开始出现错误...
react-native-maps 覆盖图像在 iOS 中放大时消失
我正在使用react-native-maps(https://github.com/react-native-community/react-native-maps)库来显示地图。使用的MapType是卫星,我还使用了overlay api来显示overlay im...
我正在将标记渲染到react-native-map应用程序中。所以我在后端 API 中为每个标记定义了一个类型。现在我想使用自定义图标显示它们。 目前我单独渲染每种类型...
我的 容器中有多个 图标。我想更改标记的 on onPress={locationTapped} 操作。不过,就算我强迫……
我正在制作一个反应本机应用程序,在其中显示公交车的实时位置。我正在使用反应本机地图。标记和实时位置工作正常,但我无法找到标记......
使用react-native地图时从AndroidManifest.xml中删除Google地图api密钥
我们在 React Native 应用程序中使用 React-Native 地图。我们的 PenTesting 团队在从 jadx 中提取 apk 后要求删除 AndroidManifest.xml 文件中的 Google 地图 api 密钥 - https://github.com/skylot/
react-native-maps - 你可以关闭一个事件吗?
在 MapView 事件中,例如 onRegionChange,有没有办法消除它——也就是说,让它不执行?
React-native 风格“transform:rotate”不同的行为 iOS 和 Android
我正在使用 React Native 开发一个移动应用程序,在地图上显示车辆。每辆车都用箭头图像表示,并指示车辆的方向,我通过应用来做到这一点...
React Native MapViewDirections:强制整个路线保持在视图中?
我正在按照本指南使用 React Native 中的 MapViewDirections 在地图上的两点之间绘制路线。我可以通过指定纬度将起点和终点保留在视图内...