I was preparing presentation about Sitecore Experience Accelerator (SXA) and as always I wanted to showcase also awesome Map component.
To my surprise, I have seen this when I added Map component to page:
I remembered that previously this was working without any further setup.
I found this article in SXA documentation on how to set authorization key for map provider. This was not required to do before but I have tried that.
I have followed instructions from that article. Therefore I went to Settings/Maps Provider under my current tenant, and in the Properties section, in the Key field, I entered the authorization key that I have generated with my Google account as it was missing:
Unfortunately this did not solve the issues completely:
I was scratching my head first and tried to remember what I have done to authorization key in Google Maps setup. Maps were working just as expected in the past with or without that key.
I have then went to browser console and saw this exception:
And it just hit me. I instantly remembered some news regarding changing in Google Maps in June 2018 and some 200$ limit that you can spent free of charge every month and was sure that this is definitely the case, the root cause of this issue.
I headed to my project api list:
https://console.cloud.google.com/google/maps-apis/api-list?project_name
but I was redirected to a page with list of apis:
https://console.cloud.google.com/google/maps-apis/new?project=project_name
which looked like this:
I have then enabled all APIs, with “API” at the end of their name + Places API for Web, like this:
with this list of enabled APIs at the end:
After these changes finally SXA map component with Google Maps started to work:
Have no worries enabling all of those APIs. You have 200$ month budget to spent and you are paying only for services that you use. You are not paying by number of enabled APIs!
More about SXA map component in one my next blog posts.
Stay tuned!
Thanks for reading this article which is my 50th blog post and 49th this year!
One comment