【问题标题】:Map View in flutter颤动中的地图视图
【发布时间】:2018-08-26 16:31:10
【问题描述】:

有什么办法可以让普通的地图视图颤抖。当用户打开应用程序时,我需要准备好地图。我唯一看到的是apptree插件,但我只能在用户点击按钮后才显示地图(全屏,我需要将其放入容器中)。基本上我需要的是一些地图小部件,有吗?

【问题讨论】:

    标签: google-maps mobile view dart flutter


    【解决方案1】:

    你可以使用一些插件,比如

    https://github.com/apptreesoftware/flutter_google_map_view

    用于在 iOS 和 Android 上显示谷歌地图的颤振插件

    //Create an instance variable for the mapView
    var _mapView = new MapView();
    
    
    //Add a method to call to show the map.
    void showMap() {
        _mapView.show(new MapOptions(showUserLocation: true));
    }
    

    【讨论】:

      【解决方案2】:

      不幸的是,这是选择在 GPU 上渲染自己的组件而不是使用 OEM 解决方案的缺点之一,他们需要通过 Flutter API 烘焙 GMaps 渲染器,同时可能会尝试这种实现:https://github.com/apptreesoftware/flutter_map

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-11-27
        • 2019-01-16
        • 2018-12-18
        • 2019-01-29
        • 1970-01-01
        • 2021-11-25
        • 2020-06-19
        • 1970-01-01
        相关资源
        最近更新 更多