Page 1 of 1
Only first tile of OSM loaded
Posted: 18 Mar 2021, 17:06
by Herzlich Nordisch
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
Re: Only first tile of OSM loaded
Posted: 20 Mar 2021, 23:20
by Jan
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
)
Jan
Re: Only first tile of OSM loaded
Posted: 20 Mar 2021, 23:35
by Jan
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:
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
Jan
Re: Only first tile of OSM loaded
Posted: 21 Mar 2021, 00:05
by Jan
This is really interstesting, the problematic part on my test server is displaying the map inside tab:
but not in first tab, which is displayed:
So the problematic part is displaying it in part which is hidden when the map is loaded.
Jan
Re: Only first tile of OSM loaded
Posted: 21 Mar 2021, 00:28
by Jan
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:
The problematic part is that this needs to be customized for each part of the site and it cannot be set generally
Jan
Re: Only first tile of OSM loaded
Posted: 30 Mar 2021, 13:07
by Herzlich Nordisch
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 :(
Re: Only first tile of OSM loaded
Posted: 02 Apr 2021, 18:06
by Jan
Hi, it is not only about tabs but about not displayed part at start. Is the map displayed directly after visiting the website?
Jan