【问题标题】:React Native Mapview component into Expo project将 Native Mapview 组件反应到 Expo 项目中
【发布时间】:2019-06-27 03:08:47
【问题描述】:

我希望将React Native MapView Component 添加到我使用expo 创建的新项目中。说明说明我需要修改 iOS 和 Android 文件夹中的文件,但是 expo 不会生成 iOS 和 Android 文件夹,对吧?

我可以在我的项目中使用这个组件吗?

【问题讨论】:

    标签: react-native expo react-component


    【解决方案1】:

    根据https://docs.expo.io/versions/latest/sdk/map-view/包含它

    “在 Expo 应用程序或 iOS 独立应用程序中使用无需设置。”

    import React from 'react';
    import MapView from 'react-native-maps';
    
    export default class App extends React.Component {
      render() {
        return (
          <MapView style={{flex: 1}} />
        );
      }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2018-12-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多