Hi,
I recently have a strange problem when any photos with geo-tagging unable to load into Google Maps.
From Javascript console, the error message was clear: MissingKeyMapError (see file attached)
I try to delete /share folder but still no luck.
Following are my Alfresco version (installed on CentOS 7):
Hi,
Google Maps needs API Key to consume this services.
In my case, I solved this issue as follows:
First we have to generate our APIKey form Google. More information:
https://developers.google.com/maps/documentation/javascript/get-api-key?hl=ES
After that, the quick solution (maybe not the best) is to modify this files (the best option is to extend share):
[Alfresco]\tomcat\webapps\share\components\geographic\google-map.js
[Alfresco]\tomcat\webapps\share\components\geographic\google-map-min.js
In both files, when we make a request to Google Maps, we will add a parameter "key=OUR_API_KEY", so the url will be:
script.src = window.location.protocol + "//maps.google.com/maps/api/js?sensor=false&key=OUR_API_KEY&callback=Alfresco.component.GoogleMap.Callback";
Regards,
Hi calvo _
On my previous/other installation -- and I was thought it was default configuration -- that API Key is not required, until this happened.
Actually the correct map was loaded for a milliseconds, and then switched to error page.
This View a file on Google Maps | Alfresco Documentation also not mention about the API Key to view a file on Google Maps.
Anyway thanks for your tricks.
[bayu]
Hi Bayu Widyasanyata,
Me too. I had the same behaviour "the correct map was loaded for a milliseconds, and then switched to error page", so I changed that couple of files and it works (version 201704).
Anyway, I will appreciate any other solutions from the community :-)
Thank you so much
Regards,
Hi calvo _,
Following some points after my little research on my platform:
Here are the results:
I haven't known yet why IP address and NginX has the right-answer for the problem. :-(
Thank you,
[bayu]
I want to update my latest research regarding this issues:
I then add nginx onto one of my installation (201704) which I expect will solve the issue. The result is fail. URI accessed is alfresco.dev.
But when I changed to same uri/hostname (alfrescoecm.dev) with another alfresco which successfully loaded Google Maps, then the photo can be loaded normally. (point #2 on my answer above)
So, it looks my hostname (alfrescoecm.dev) is already "white-listed" by Google Maps to access without key ("anonymous").
For my another machine hosted on Internet, this problem is not affected.
Hence, summarizing: problems found on localdomain hostname which hasn't been "registered"/"whitelisted" to Google Maps API key.
If anyone has another experiences and solutions, pls share... Thanks,
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.