On a side note, I’ll occasionally get an error saying my website doesn’t have access to the Geocode API. I haven’t detected a pattern or figured out why it stops working. I usually log into the Google Console look at the server and client APIs and then it’s fixed. I never actually do anything.
My billing information is also set up correctly. I saw this could cause an error as well.
If anyone has any ideas on how to get this to work constantly instead of intermittently, I would appreciate it!
The application restriction is set to websites and the API Restrictions are not restricted for both the server and client APIs
I wish I had time for such an interesting case.
Try to debug it step-by-step.
Look at how your data is returned from the server and how frequently it happens. Maybe your users make just a few swipes, and it results in over 100 requests.
From my initial observations, it seems the reason it’s taking so many of my workload units is that I populate the map with the restaurant markers when the map is shown. - I think this is the best/only way to do this. I could possibly limit it to 10 addresses at a time, but I’m not 100% sure this is something I want to do yet.
I have my map set up so that when a marker is pressed on the map it shows the business name and the address in a small popup. The address can be pressed and this action takes the user to Google Maps which plans the route accordingly.
The problem is when the user leaves Google Maps and comes back to my app the map reloads all of the address markers. So, when one user is looking at restaurants near them and looking at where they are located they are potentially loading the map several times in one sitting.
For example, a user’s actions can look something like this:
Open the map
Choose Restaurant A
Google Map Loads and they see it’s a bit further than they wanted
Go back to the app
The app reloads all of the address markers
Choose Restaurant B
And so on
If you have any recommendations or the time to respond, I’d really appreciate it!
I believe the problem is when they come back from the Google Maps app on their phone because the map in my app is shown again which loads all of the map address markers.
Okay I have work to do now , but I am highly interested in this topic . I will come back and tell you things for you to test.Maybe by then someone would solve your problem.