Cannot interacted with Google Maps on Flutter Web (google_maps)

耗尽温柔 提交于 2021-01-28 07:34:34

问题


I am just learn about Flutter for website.

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

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).

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?

Here is the google_maps example:

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

Thank You, Cheers


回答1:


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



来源:https://stackoverflow.com/questions/63761689/cannot-interacted-with-google-maps-on-flutter-web-google-maps

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!