Map not showing in Joomla 4

Phoca Maps - displaying maps in Joomla! CMS
gelauff
Phoca Member
Phoca Member
Posts: 11
Joined: 19 Jan 2022, 16:50

Map not showing in Joomla 4

Post 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?

Tags:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Map not showing in Joomla 4

Post by Jan »

Hi, did you check the Javascript console, is there some error? Can I see the site where this occurs?

Jan
If you find Phoca extensions useful, please support the project
gelauff
Phoca Member
Phoca Member
Posts: 11
Joined: 19 Jan 2022, 16:50

Re: Map not showing in Joomla 4

Post 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.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Map not showing in Joomla 4

Post 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
If you find Phoca extensions useful, please support the project
gelauff
Phoca Member
Phoca Member
Posts: 11
Joined: 19 Jan 2022, 16:50

Re: Map not showing in Joomla 4

Post 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.
chrishoefliger
Phoca Member
Phoca Member
Posts: 16
Joined: 19 Aug 2017, 09:29

Re: Map not showing in Joomla 4

Post 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.
christine
Phoca Hero
Phoca Hero
Posts: 2819
Joined: 28 Nov 2010, 17:20

Re: Map not showing in Joomla 4

Post 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
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9449
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: Map not showing in Joomla 4

Post 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
gelauff
Phoca Member
Phoca Member
Posts: 11
Joined: 19 Jan 2022, 16:50

Re: Map not showing in Joomla 4

Post 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!
User avatar
Benno
Phoca Hero
Phoca Hero
Posts: 9449
Joined: 04 Dec 2008, 11:58
Location: Germany
Contact:

Re: Map not showing in Joomla 4

Post by Benno »

@gelauff
thanks for feedback

Kind regards,
Benno
Post Reply