Google map not working

Why I get this message when i use native.newMapView() in my applications. How can I solve it.

Can you provide more information? 

What version of Corona are you using?
Are you on a Mac or Windows?

What message are you getting?

Can you share your code where you’re creating your mapView()?

Please help us help you.

Rob

maCMs.png

I got error similar this.

and here is my code to use map 

 map = native.newMapView( myApp.centerX, y, myApp.width, myApp.height - (myApp.tabMenuHeight + 55 \* myApp.stdHeight) - y ) if map ~= nil then map.anchorY = 0 map.mapType = "standard"

I still don’t see an error. There needs to be more information like where you’re centering the map (latitude, longitude). Please answer the rest of the questions as well. 

Rob

4714108f6be03add194814cea1482671.png

This is my application and I got this error sometimes. Other project is the same problem. I cannot solve it.

Can you translate that to English for me?

Can you please answer all the questions?

Can you post more of your code? You are clearly selecting a location and adding pins. 

Can you post your device’s console log?

Without this information, we cannot help you.

Rob

Hi all

We are facing a similar situation with our application since last week

I think It has to do with the recent changes in Google Maps API as the problem only appears on Android not iOS devices.

Apparently we have everything well configured in google side and our google-services.json is the correct one but everyday we get the message as soon as we reach certain number of requests.

Watching the device logs with adb tool we can see a message coming from Google saying that we have reached our daily quota.

As i said everything seems fine in our Google side configuration so perhaps mapview is not adding API key on the requests?

Kind regards and thanks in advance

Here we are also suffering with the same difficulty, how to add the Google Key API to Maps Native?

We are investigating the situation.

Rob

Hi there! Glad to announce that the issue is gone with Corona daily build 2018.3387. You can download daily build through this link

Best regards,
Tim

Quick update here.  You will need to grab today’s daily build:  http://developer.coronalabs.com/release/2018/3387/

You will add a table to config.lua that will have your Google Maps API Key in it. You can look up the Licensing APIs for an example of setting that up while we get the native.newMapView documentation set up.

Here is an example:

application = { content = { width = 320, height = 480, scale = "letterbox", fps = 60, imageSuffix = { ["@2x"] = 1.5, ["@4x"] = 3.0, }, }, license = { google = { mapsKey = "your Google Maps API key here", } } }

Google now requires you to have a personal API key for maps and there are fees involved. But the credit you get allows you quite a few map loads before fees kick in.

Rob

Hello Rob,

I ran tests with the version 2018.3387, I added the Google key, the first request to the Map works, but if you request again (exit and enter the screen) it starts to fail and terminate the application, in the version that is in the store this does not occur, only with the build generated with the version 2018.3387, can you check?

We will look into it!

Rob

It works like a charm for us

Thank you guys for the quick response and fix

Hi all again

Our users have reported that they have to remove the app from the device and download again from Google Play in order to Google Maps gets the API key.

We have also checked that this behavior is happening overwriting the apk in our development devices

We are build with Version 2018.3387 (2018.9.28) on MacOS Mojave

Does this make any sense to you?

Kind regards

Hey. It should be fixed in next daily build (est 2018.3390)

Please, give it a try

Hi Rob,

I test with version 2018.3391 . Google Maps  problem is not solved. Can you check again?

Hey guys, 

Just want to make sure that the API key being used are from a project with enabled billing. An API key from a project with no billing account will surely return a degraded/darkened map.

ok. I will check it. Thanks.