【问题标题】:Google map shows blank in flutter谷歌地图在颤动中显示空白
【发布时间】:2021-09-03 14:12:02
【问题描述】:

谁能帮帮我,我正在尝试在我的颤振应用程序中实现谷歌地图,我面临的问题是谷歌地图仅显示平淡无奇的谷歌徽标。我已经生成了密钥,插入了插件,但似乎没有任何效果。

我真的需要帮助

【问题讨论】:

  • 你能告诉我你的代码吗?
  • class _MapAppState extends State { static const _initialCameraPosition = CameraPosition( target: LatLng(37.773972, -122.431297), zoom: 14.0, ); @override Widget build(BuildContext context) { return Scaffold( body: GoogleMap( myLocationButtonEnabled: false, zoomControlsEnabled: false, initialCameraPosition: _initialCameraPosition, )); } }
  • @Precious 您能否将代码添加到您的问题中,而不是作为评论?

标签: flutter google-maps google-maps-api-3 google-geolocation google-maps-flutter


【解决方案1】:

您需要根据 Google 地图 Flutter 文档在 AndroidManifest.xml 中添加您的 Google 地图 API 密钥。既然你说你已经生成了密钥。

【讨论】:

  • 我添加了密钥但仍然没有
  • 您在获得 API 密钥的项目上是否有 enabled billing
猜你喜欢
  • 1970-01-01
  • 2016-01-10
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-09-07
相关资源
最近更新 更多