简体   繁体   English

无法在 Flutter Web (google_maps) 上与 Google 地图交互

[英]Cannot interacted with Google Maps on Flutter Web (google_maps)

I am just learn about Flutter for website.我刚刚了解网站的Flutter

I need to add some google map javascript API and using google_maps dependencies on pub.dev我需要添加一些 google map javascript API 并在pub.dev上使用google_maps依赖pub.dev

I follow the example from here, but after debugging with VSCode , i found that I cannot interact with the map at all.我按照这里的示例进行操作,但是在使用VSCode进行调试后,我发现我根本无法与地图进行交互。 No hand tools to drag the map, ore even just to click the maps mode (satellite or map mode).没有手动工具来拖动地图,甚至只是点击地图模式(卫星或地图模式)。

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.终端和 Web 浏览器控制台上没有错误。 Anyone can give me some clue to make this work properly?任何人都可以给我一些线索以使其正常工作吗?

Here is the google_maps example:这是google_maps示例:

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

Thank You, Cheers谢谢,干杯

在我检查flt-ruler-host元素出现在 flutter 渲染的 html 上方之后,我在地图画布 id 上添加了 z-index,并且一切正常

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM