Commented out location manager map

32 views
Skip to first unread message

Thomas

unread,
Jul 17, 2019, 5:23:23 AM7/17/19
to CodenameOne Discussions
I have seen you commented out the google map api key for the location manager because google changed its policy regarding api key usage without billing information.
Just wanted to say than rather than doing this, you should probably just have capped the google map api associated to this key on your google account so that you can't exceed the free quota (this way, the risk of theft remains the same as previously as, even if someone stole and use your api key, he won't be able to exceed the free quota and induce a billing)
This is probably an easier solution than having to rewrite the manager to use OSM.

Shai Almog

unread,
Jul 17, 2019, 11:18:00 PM7/17/19
to CodenameOne Discussions
I don't see a way to restrict billing for a specific key. Only for the entire account which unfortunately we can't do as we made the mistake of using google services.
If you can generate a key for that you can easily submit a PR to replace the commented out code.

Thomas

unread,
Jul 18, 2019, 4:06:35 AM7/18/19
to CodenameOne Discussions
Indeed, I don't know if you can have quotas for a specific key but you can for a specific API and a specific project (wich is pretty much the same):  https://console.cloud.google.com/quotas?project=_&_ga=2.1801017.-925146160.1563354749. So you can have restrictions for the google map javascript API of the CN1 simulator project without impacting the rest of the google services you are using (see the "manage your cost of use" section: https://developers.google.com/maps/documentation/javascript/usage-and-billing).

Shai Almog

unread,
Jul 18, 2019, 11:56:51 PM7/18/19
to CodenameOne Discussions
I tried looking at that but the interface is just misleading enough to give me pause. As a person who already lost thousands of dollars due to Google Cloud over billing with no help from those a*holes I'm unwilling to risk it. If you think it's simple create a key and submit it. It can't be restricted though since it needs to run on the client side.
Reply all
Reply to author
Forward
0 new messages