liodali / osm_flutter

OpenStreetMap plugin for flutter
https://pub.dev/packages/flutter_osm_plugin
MIT License
240 stars 98 forks source link

Gray screen on mobile web unless "Desktop site" is turned on. #495

Closed ReinisSprogis closed 10 months ago

ReinisSprogis commented 10 months ago

Hi. I tried out extension, and with provided example code it works on web as intended. Then I tried to run it on mobile web browser through localhost, and I get gray screen. Then I enabled desktop site in browser settings and map appears. I tried it on tablet and phone and get same result. I did remote inspection and discovered that in mobile view this error comes up. When switching to desktop site it goes away. darterror

ReinisSprogis commented 10 months ago

Ahh, I rushed opening issue. I should've started web server with --web-renderer canvaskit And it works. So full command to start localhost server and try out web app in mobile device is flutter run -d web-server --web-port 8080 --web-hostname 0.0.0.0 --web-renderer canvaskit Maybe helps someone.