无法与Flutter Web上的Google Maps互动(google_maps) [英] Cannot interacted with Google Maps on Flutter Web (google_maps)

查看:76
本文介绍了无法与Flutter Web上的Google Maps互动(google_maps)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是了解有关网站的 Flutter .

I am just learn about Flutter for website.

我需要添加一些Google Map javascript API,并在 pub.dev

I need to add some google map javascript API and using google_maps dependencies on pub.dev

我遵循此处的示例,但是在使用 VSCode 进行调试之后,我发现我根本无法与地图进行交互.无需手动工具即可拖动地图,甚至无需单击地图模式(卫星或地图模式)即可.

I follow the example from here, but after debugging with VSCode, i found that I cannot interact with the map at all. No hand tools to drag the map, ore even just to click the maps mode (satellite or map mode).

我已经尝试了示例链接中的一些示例,从基础知识到受控示例.但是我仍然无法与之互动.终端和Web浏览器控制台上没有错误.任何人都可以给我一些线索以使其正常工作吗?

I have tried several example from the example link, from the basics to the controlled example. But I still cannot interact with it. No error on terminal, and the web browser console. Anyone can give me some clue to make this work properly?

这是 google_maps 示例:

https://github.com/a14n/dart-google-maps/tree/master/example

谢谢,干杯

推荐答案

在我检查了一个 flt-ruler-host 元素是否出现在由flutter渲染的html上方之后,我在地图上添加了z-index画布ID,一切正常工作

after i checked that a flt-ruler-host element appeared above the html rendered by flutter, i add z-index on maps canvas id, and everything working properly

这篇关于无法与Flutter Web上的Google Maps互动(google_maps)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆