android - error: The method 'setMapStyle' isn't defined for the type 'Completer'
问题描述
I'm getting this error when I'm trying to change ma Google maps Color
error: The method 'setMapStyle' isn't defined for the type 'Completer'.
解决方案
首先定义Controller
为GoogleMap
GoogleMapController mapController;
现在添加它Controller
以在您的 GoogleMap 小部件中设置地图的地图样式。
onMapCreated: (GoogleMapController controller) {
mapController = controller;
mapController.setMapStyle(mapStyle);
// _controller.complete(controller);
},
推荐阅读
- wordpress - 从购物车页面店面主题中删除页眉/页脚
- javascript - 如何保存包含图像的画布?
- excel - 从超链接打开的文件中提取数据
- python - ciscoconfparse BGP 在其中一个邻居上没有描述
- python - 如何在 Python 中用分钟绘制 x 轴?
- api - 使用空手道进行双向 api 测试
- node.js - 当我从角度形式发送数据时,在 node.js 中获取“未定义”
- javascript - 使用 laravel api 和 vue js 为折线图格式化 json
- java-8 - JHipster RedirectingEurekaHttpClient 请求执行错误
- xamarin - 从 ContentView 访问 App.xaml 中的全局资源