首页 > 解决方案 > Ionic5 上的 GoogleMaps 弄乱了滑动模式

问题描述

标签: ionic-frameworkionic5

解决方案


我解决了这个问题。解决方案非常简单。背景颜色可以Environment在 GoogleMaps 的类上设置。

确保Environment在您的组件上导入并执行以下操作:

// If you're following the documentation, there should be more things imported here, because I'm focusing on the Environment, I will only use this one.
import { Environment } from '@ionic-native/google-maps/ngx';

ngOninit() {
   Environment.setBackgroundColor('black'); // Or whatever color you want.
}

而已!这是供参考的文档链接:

https://github.com/ionic-team/ionic-native-google-maps/blob/master/documents/environment/README.md


推荐阅读