Advertisement

Phoca Map - two different Google Maps on one website

This forum is for general questions about extensions for Joomla! 5.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
slonecznik2
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Jan 09, 2025 4:44 pm

Phoca Map - two different Google Maps on one website

Post by slonecznik2 » Thu Jan 09, 2025 5:07 pm

I have a website where I have placed two different Google Maps: https://ewa.mcmbaluty.pl. Neither of them displays correctly (although each displays correctly as soon as I remove the other map). When I place OpenStreetMap, both maps display correctly. How do I display both Google Maps correctly?

Advertisement
User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2967
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: Phoca Map - two different Google Maps on one website

Post by ceford » Thu Jan 09, 2025 6:31 pm

Use your browser Developer Tools to look for errors. Using the same JavaScript on two maps may be the issue. Or...

slonecznik2
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Jan 09, 2025 4:44 pm

Re: Phoca Map - two different Google Maps on one website

Post by slonecznik2 » Thu Jan 09, 2025 6:53 pm

How to use two javascripts for two maps? Is it possible? Is there any plugin for this?

rgtr
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: Phoca Map - two different Google Maps on one website

Post by rgtr » Sun Jan 12, 2025 11:35 am

Hi

tdocgmap displays more than one map - by using a kml file to define the content of the map
see here: https://tdocplus.co.uk/0a_Empty502/

please note: I am updating the installation at the moment and in particular the update.
the tdocgmap_update.xml is NOT reading the ini files for naming, but displaying the item name not its translation. see attached screen shot

maybe phoca map needs to be updated . . .

richard
You do not have the required permissions to view the files attached to this post.

slonecznik2
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Jan 09, 2025 4:44 pm

Re: Phoca Map - two different Google Maps on one website

Post by slonecznik2 » Fri Jan 17, 2025 2:05 pm

I did a clean new installation. I installed Phoca Maps.

I inserted 2 Google maps into one article. It displays correctly. I inserted 5 different maps. It displays correctly.

On the https://ewa.mcmbaluty.pl website I inserted 2 maps into an article using a plugin. It displays correctly.

The maps are broken by Joomla modules. When I insert a map into a module and this module into an article, I can only display one map. Even a map inserted using a plugin does not display when I insert a second map in the module.

On https://ewa.mcmbaluty.pl there are 2 maps inserted (a map of all branches and a map of the headquarters) into 4 modules (2 modules for computers and 2 for mobile devices). When I insert 2 modules, it sucks on the computer and sucks on the mobile device.

How can I get around this? I need to insert a map of branches and a map of the headquarters on the computer and another map of the headquarters and another map of branches on mobile devices.

rgtr
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: Phoca Map - two different Google Maps on one website

Post by rgtr » Fri Jan 17, 2025 3:28 pm

slonecznik2

Please see here: https://tdocplus.co.uk/0a_Empty502/inde ... ks?start=2

You might suppose that my plugin is broken by Joomla. Any plugin for Google Maps, has to have two scripts to display a map. One to generate the [one or more] Google Maps, and one to obtain Google Maps Authority.

A plugin cannot call just one script. It is the way Joomla parses an article with page breaks that means that page breaks [which are very old methodology] are not fully parsed.

Fact of life as far as I can see. So see https://magazine.joomla.org/all-issues/ ... eak-plugin. If you choose a mode which allows a full parsing all is ok.

So it is not Phoca [or TDOCGmap], not google maps, not Joomla !

Can you make a test site to show the problem please ?

Richard

slonecznik2
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Jan 09, 2025 4:44 pm

Re: Phoca Map - two different Google Maps on one website

Post by slonecznik2 » Fri Jan 17, 2025 8:43 pm

On the page https://test.mcmbaluty.pl there are 2 Google maps inserted from the plugin. They are displayed correctly. Please go to modules and enable both modules with the same maps. The maps will not be displayed.
Login details:
https://test.mcmbaluty.pl/administrator
User:
joomla
Password:
PhocaMap1234

gws
Joomla! Champion
Joomla! Champion
Posts: 6536
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: Phoca Map - two different Google Maps on one website

Post by gws » Fri Jan 17, 2025 9:05 pm

FYI, maps don't show in Firefox 134.0.1 64 byt? Ok in chrome and Edge.

rgtr
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: Phoca Map - two different Google Maps on one website

Post by rgtr » Fri Jan 17, 2025 10:50 pm

Hi
Sadly I cannot read your language
So i cannot help
Richard

slonecznik2
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Jan 09, 2025 4:44 pm

Re: Phoca Map - two different Google Maps on one website

Post by slonecznik2 » Sat Jan 18, 2025 12:25 am

I changed the backend language to English

slonecznik2
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Jan 09, 2025 4:44 pm

Re: Phoca Map - two different Google Maps on one website

Post by slonecznik2 » Sat Jan 18, 2025 12:27 am

gws wrote: Fri Jan 17, 2025 9:05 pm FYI, maps don't show in Firefox 134.0.1 64 byt? Ok in chrome and Edge.
Maps are not displayed if we enable them in the backend via modules.

rgtr
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: Phoca Map - two different Google Maps on one website

Post by rgtr » Sat Jan 18, 2025 9:30 am

slonecznik2
There is too much on the site to understand the problem . . . we need a very simple site of a few articles and a few maps to demonstrate the problem.
Richard

slonecznik2
Joomla! Apprentice
Joomla! Apprentice
Posts: 9
Joined: Thu Jan 09, 2025 4:44 pm

Re: Phoca Map - two different Google Maps on one website

Post by slonecznik2 » Sat Jan 18, 2025 12:53 pm

The problem currently occurs on the home page.

The number of articles does not matter. Only the home page matters.
You do not have the required permissions to view the files attached to this post.

rgtr
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: Phoca Map - two different Google Maps on one website

Post by rgtr » Sat Jan 18, 2025 2:52 pm

slonecznik2

I removed two {loadmodule} in the home page and now two maps show . . .

WHY do you NOT use a kml file ? You have total control, and it goes direct into an article with a simple call. places, names, icons, descriptions routes etc etc. and put wherer and how you want in an article.

WHY make life complicated by loading a MODULE into an ARTICLE ???

see https://tdocplus.co.uk/linnpark/walking-in-linn-park select for example "Snuff Mill to White Bridge" two maps with tabs and accordions.

I tried Phoca after I used other programs, and was so confused that I wrote TDOCGmap. All done in kml files.
So simple: see here: https://developers.google.com/kml/documentation/kml_tut

Richard

rgtr
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: Phoca Map - two different Google Maps on one website

Post by rgtr » Sun Jan 19, 2025 9:40 am

slonecznik2

The two loadmodule calls means that you were asking Google for two authorities in the same article, and that is not satisfactory for Google so one map will fail.

I think Google designed the kml solution to be as flexible as possible, and in my view it is.

Thus my wring tdocgmap for my the needs of the linnpark web site.

One has to design ones web site within the constraints of those providers who one is using.

Hope that helps.

Richard

rgtr
Joomla! Explorer
Joomla! Explorer
Posts: 260
Joined: Tue Sep 01, 2009 11:31 am
Location: Glasgow
Contact:

Re: Phoca Map - two different Google Maps on one website

Post by rgtr » Wed Jan 22, 2025 10:48 am

slonecznik2

Hi please see https://tdocplus.co.uk/0a_Empty400/kml- ... age-breaks

I have added a link to second test site to show the normal page break settings.
This shows that two sets of calls in the same article fails.

It is NOT a Joomla fault, but the way that Google Maps authority works.

Richard

Advertisement

Post Reply

Return to “Extensions for Joomla! 5.x”