如何使用react-native-maps将地图集成到React Native中

by Mukhamed Khasanza 由Mukhamed Khasanza 如何使用react-native-maps将地图集成到React Native中 (How to integrate maps in React Native using react-native-maps)Nowadays, almost all mobile applications have a maps ...
摘要由CSDN通过智能技术生成

by Mukhamed Khasanza

由Mukhamed Khasanza

如何使用react-native-maps将地图集成到React Native中 (How to integrate maps in React Native using react-native-maps)

Nowadays, almost all mobile applications have a maps feature. I had to integrate Google Maps to my React Native application, and the only choice was react-native-maps by Airbnb (it’s the only one still supported by the React Native community).

如今,几乎所有移动应用程序都具有地图功能。 我必须将Google Maps集成到我的React Native应用程序中,唯一的选择是Airbnb的react-native-maps(这是React Native社区唯一仍支持的地图)。

I found several tutorials on how to set up this library, but none fully worked for me. This was because I had to run on both iOS and Android platforms and also support Google Maps for iOS.

我找到了一些有关如何设置该库的教程,但没有一个对我完全有用。 这是因为我必须同时在iOS和Android平台上运行,并且还必须支持iOS版Google Maps。

Let’s create a React Native application from scratch using react-native-cli to show, step by step, how everything is installed. If you want to integrate react-native-maps for your existing app, skip Step 1.

让我们使用react-native-cli从头开始创建一个React Native应用程序,以逐步展示所有安装方式。 如果要为现有应用程序集成react-native-maps,请跳过步骤1

步骤1:安装和设置React Native应用程序 (Step 1: Install and set up React Native application)

If you haven’t installed the React Native command line interface, run: npm install -g react-native-cli. Now you can create your project, simply using: react-native init ReactNativeMaps

如果尚未安装React Native命令行界面,请运行: npm install -g react-native-cli 。 现在,您只需使用以下命令即可创建您的项目: react-native init ReactNativeMaps

Here are the dependency versions at the time of building this project:

以下是构建此项目时的依赖项版本:

  • “react”: “16.6.1”

    “React”:“ 16.6.1”
  • “react-native”: “0.57.5”

    “本机”:“ 0.57.5”
  • “r
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值