marchdev-tk / flutter_google_maps

A Flutter plugin for integrating Google Maps in iOS, Android and Web applications. It is a wrapper of google_maps_flutter for Mobile and google_maps for Web.
BSD 3-Clause "New" or "Revised" License
87 stars 57 forks source link

TargetPlatform.macOS is not yet supported when opening in browser #42

Open yannickvg opened 4 years ago

yannickvg commented 4 years ago

When i use the plugin, it works fine on iOS and Android. When i use flutter web to deploy to the browser, i get the error message "TargetPlatform.macOS is not yet supported by the maps plugin". I get that desktop is not yet supported but I'm running in the browser, not on desktop

Steps to Reproduce

you can see an example here:

https://fitz-test.netlify.app/

If you select any city you go to a screen where normally there would be a map but you see the error.

Expected results:

See a google maps screen

Actual results:

The message: "TargetPlatform.macOS is not yet supporte by the maps plugin"

niklasbartsch commented 4 years ago

Hey @yannickvg, you have to activate the 'Maps JavaScript API' Key in your Google Cloud Console

yannickvg commented 4 years ago

Hi, I don't think that is the problem. The key I was using was not restricted to any API. I created a new key with, restricted just to the 'Maps JavaScript API', and it still gives the same result.

Screenshot 2020-06-28 at 23 28 05
abumoallim commented 4 years ago

Did you find any solution to this? I am facing the same problem.

ulusoyca commented 4 years ago

Hi, @yannickvg did you enable maps sdk for javascript? image

yevgeniaronov commented 1 year ago

you may have forgotten to add js sdk script in web/index.html? https://pub.dev/packages/google_maps_flutter_web#usage