apptreesoftware / flutter_google_map_view

A flutter plugin for Google Maps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

example not working properly

eddynaka opened this issue · comments

Hi,

i have downloaded the example from the master branch and updated with my googleapi key.

i got the maps working, but, somethings not:

  1. the marker isn't showing
  2. when you tap the map it goes to a blank page

Have you properly set your 3 google maps API keys? (IOS, Android, Google Map Static), also have you made sure that your API key is truly activated?

commented

Any way we can check the API is truly activated ...i have deleted and re-created in order to test .But it still says not a valid key .

commented

no i havn't really ...i just cancel and go to the project tab.Also is the apptree plugin broken with the latetes upgrades in dart and flutter

You can try your app key by pasting the link into a navigator with your app key, if no image show up, then you haven't properly setup your key

commented

The link into your navigator ...sorry i dont really understand...
I tried something like this ...but no really change in content

http://maps.google.com/maps?file=api&v=2&hl=en&key=XXXXXXXXXXXXXXXXXXX
any hints

Map_view is only a wrapper that does something like this:

new Image.network(
        "https://maps.googleapis.com/maps/api/staticmap?center=${_currentLocation["latitude"]},${_currentLocation["longitude"]}&zoom=18&size=500x500&key=" +
            API_KEY,
        width: mapSize,
        height: mapSize,
);

so you can test your key in the navigator with this link, if your key is valid, you will get an image of the chosen location:

https://maps.googleapis.com/maps/api/staticmap?center=48.427470,-71.181980&zoom=18&size=500x500&key=YOUR_API_KEY

don't forget to place your API key in the link!

If this is working, then the problem is not your API key

Debug with navigator

Also, check your navigator request, if there's an error, Google will return a 405 error if you've exceeded your call limit