Only first tile of OSM loaded

Phoca Maps - displaying maps in Joomla! CMS
Herzlich Nordisch
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 18 Mar 2021, 16:40

Only first tile of OSM loaded

Post by Herzlich Nordisch » 18 Mar 2021, 17:06

Hi there!

I'm helping a client to adjust a website (mostly CSS).

There is a problem with showing phocamaps. Only the first tile of the leaflet is shown. The rest is loaded (following the sourcecode) but doesn't show up.

This seems to be a conflict between the template (theme 3400 by Templatemonster) and the component. I shortly switched to Beez and it works.

A request at Templatemonster was made parallel by the siteowner. Do you have an idea what could cause this behaviour?

The addresses are

https://www.weishauptorgeln.de/index.php/de/kontakt
(map at the bottom)

https://www.weishauptorgeln.de/index.ph ... jekt-karte
(multiple markers)

Thanks in advance!

Regards
Michael

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

Re: Only first tile of OSM loaded

Post by Jan » 20 Mar 2021, 23:20

Hi, hmmm, hard to say, I don't have any experiences with this. The problem is, this should not be influenced by Phoca Maps, as this is a part of OSM map which is rendered in browser - loaded from OSM server (so in fact the map part cannot be somehoe influenced by the component)

The question is, what does Beez load differently to your template? (Maybe some specific Javascript library :idea: )

Jan
If you find Phoca extensions useful, please support the project

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

Re: Only first tile of OSM loaded

Post by Jan » 20 Mar 2021, 23:35

EDIT:

I get the same problem by accident in one of my Joomla! 4 test site:

- the OSM map is displayed normally when the map is displayed on standard website
- but if it is displayed inside tabs, the same problem:

Image

This happens inside tab in Phoca Gallery in Cassiopeia template.

I will try to find out, what can cause this problem. What problematic is, is, that it displays correctly on whole website but not correctly inside tab :idea:

Jan
If you find Phoca extensions useful, please support the project

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

Re: Only first tile of OSM loaded

Post by Jan » 21 Mar 2021, 00:05

This is really interstesting, the problematic part on my test server is displaying the map inside tab:
Image

but not in first tab, which is displayed:
Image

So the problematic part is displaying it in part which is hidden when the map is loaded.

Jan
If you find Phoca extensions useful, please support the project

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

Re: Only first tile of OSM loaded

Post by Jan » 21 Mar 2021, 00:28

I can solve this in Phoca Gallery when I add this code to the OSM Javascript code:

Code: Select all

$o[]= 'jQuery(\'.phTabs ul li a\').click(function(){ setTimeout(function() { map'.$this->name.$this->id.'.invalidateSize(); }, 0);});';
This in fact means:

- when the tab is clicked
- then the OSM map updates - so all tiles are loaded:

Image

The problematic part is that this needs to be customized for each part of the site and it cannot be set generally :idea: :-(

Jan
If you find Phoca extensions useful, please support the project

Herzlich Nordisch
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 18 Mar 2021, 16:40

Re: Only first tile of OSM loaded

Post by Herzlich Nordisch » 30 Mar 2021, 13:07

Hm - in my case it's not tabs.

I simply used the plugin to

- show the map within a module (contact)
- show a project map within an article

In both cases only the first tile is loaded :(

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

Re: Only first tile of OSM loaded

Post by Jan » 02 Apr 2021, 18:06

Hi, it is not only about tabs but about not displayed part at start. Is the map displayed directly after visiting the website?

Jan
If you find Phoca extensions useful, please support the project

Post Reply