Page 1 of 1
Open Maps Works GoogleMaps Does Not Joomla 4
Posted: 07 Sep 2022, 07:44
by tinwistle
Hi I've tried multiple ways of trying to get it to work and I only get a white scree, I have the correct API info in the app and I have tried even turning off the restrictions in the google API.
I can also create a Google map in another page using the same template but with the template software I use.
Examples:
https://sesdevelopment.com/ Working OSM
https://sesdevelopment.com/index.php/home Working Google Map (Not using PHOCA)
However I can not getthe google map to work where the OSM map is and have put the proper credentials into the OPTONS of PHOCA for the API Key
Any idea what may be the problem?
Re: Open Maps Works GoogleMaps Does Not Joomla 4
Posted: 09 Sep 2022, 00:51
by Jan
Hi, do you have a link to not working map, so I can see javascript error console?
Jan
Re: Open Maps Works GoogleMaps Does Not Joomla 4
Posted: 09 Sep 2022, 23:29
by tinwistle
OK, I changed in your app from OSM to Google maps and it should display at
https://sesdevelopment.com/
Re: Open Maps Works GoogleMaps Does Not Joomla 4
Posted: 10 Sep 2022, 12:33
by Jan
Hi, which version of component do you use? Which plugin version? When you disable the cookie banner for test, do you get the same problem? When you display the map with help of component, do you get the same problem?
Jan
Re: Open Maps Works GoogleMaps Does Not Joomla 4
Posted: 10 Sep 2022, 20:59
by tinwistle
OK, I've turned off the cookie bar.
Using 4.0 version of component and plugin.
Joomla 4.2.2
I do not understand this:
When you display the map with help of component, do you get the same problem?
Re: Open Maps Works GoogleMaps Does Not Joomla 4
Posted: 11 Sep 2022, 14:12
by Jan
The map is displayed with help of plugin but it is even possible to create a menu link to Phoca Maps component and display the map in the component view (Try to test it so we know, the problem only occurs in plugin or for all maps).
Jan
Re: Open Maps Works GoogleMaps Does Not Joomla 4
Posted: 13 Sep 2022, 01:49
by tinwistle
Re: Open Maps Works GoogleMaps Does Not Joomla 4
Posted: 16 Sep 2022, 00:37
by Jan
Hi, on the website with component, there is following Javascript error:
Code: Select all
index.php:1 Refused to load the script 'http://maps.googleapis.com/maps/api/js?callback=initMaps&key=AIzaSyD5uwQ2nTQ3lNWn29rmpb9MvplZL-8KAR4' because it violates the following Content Security Policy directive: "default-src https: data: 'unsafe-inline' 'unsafe-eval'". Note that 'script-src-elem' was not explicitly set, so 'default-src' is used as a fallback.
Do you use some specific security options on your site, or some system plugin which somehow changes the output of the website, etc?
Jan