Page 1 of 2

Map not showing in Joomla 4

Posted: 19 Jan 2022, 17:02
by gelauff
Installed Phocamaps 4 Alpha on Joomla 4.0.6.
Map is not showing.
Description shows, Directions shows, source code looks OK including api key.
I've been using Phoca Maps for ages, but this is the first time on Joomla 4.
Anyone has a clue?

Re: Map not showing in Joomla 4

Posted: 23 Jan 2022, 21:28
by Jan
Hi, did you check the Javascript console, is there some error? Can I see the site where this occurs?

Jan

Re: Map not showing in Joomla 4

Posted: 24 Jan 2022, 04:22
by gelauff
Hi Jan,

Warning:
This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”.
Error:
Uncaught SyntaxError: function statement requires a name
Error:
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://maps.googleapis.com/maps/api/ma ... _test=true. (Reason: CORS request did not succeed). Status code: (null).
Warning:
Loading failed for the <script> with source “https://maps.googleapis.com/maps/api/js ... ken=125861”. nous-trouver-2:1:1

The site is not public yet, can I send you a login somehow?

Thank you.

Re: Map not showing in Joomla 4

Posted: 27 Jan 2022, 00:46
by Jan
Hi, unfortunately hard to say what can be wrong there. This is maybe much more a question on server provider or google maps developers - to ask why it is blocked. Only for test, when you display the Open Street Map, do you get the same problems?

Jan

Re: Map not showing in Joomla 4

Posted: 27 Jan 2022, 03:44
by gelauff
Hi Jan,
Yes, same problem with Open Street Map, same error in the console.
Tried in Firefox, Chrome and Edge.
In Firefox console a link is provide, maybe it can bring you further: https://developer.mozilla.org/en-US/doc ... _statement
On the same server the problem doesn't occur on Joomla 3 sites.

Re: Map not showing in Joomla 4

Posted: 28 Jan 2022, 13:38
by chrishoefliger
I have the problem as well. Inserting the map as a link works fine, view=map does not. I can see it in the source code, but somehow it doesn't get rendered. No JS errors in the console.

Re: Map not showing in Joomla 4

Posted: 28 Jan 2022, 14:06
by christine
Hi gelauff, Hi Chris,

No idea, but I see an Update from Jan,25th. Just give it a try?
https://www.phoca.cz/download/category/ ... -component

Kind regards
Christine

Re: Map not showing in Joomla 4

Posted: 28 Jan 2022, 15:00
by Benno
Hi Chris,
Supplementary question:
Did you enter values in the fields for width and height of the map?
backend --> Components --> Phoca Maps --> Maps
If yes, there must be also size units behind them (e.g. px, %)
If you do not set any size units but values, you will see a narrow gray horizontal bar instead of the map in the frontend.

Kind regards,
Benno

Re: Map not showing in Joomla 4

Posted: 28 Jan 2022, 16:13
by gelauff
Hi Benno,

Yes, that's it, thank you!
This, the units, is new in Phoca Maps 4.
Just one remark: in my case there was no horizontal bar instead of the map in the frontend.
Just letting you know.

Thanks again and have a nice day!

Re: Map not showing in Joomla 4

Posted: 30 Jan 2022, 00:01
by Benno
@gelauff
thanks for feedback

Kind regards,
Benno