Map does not show in article

Phoca Maps - displaying maps in Joomla! CMS
User avatar
MartijnM
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 29 Apr 2012, 16:04

Map does not show in article

Post by MartijnM »

I wanted to start using Phoca Maps on my new Joomla 4 website.
I do use the plugin.
When I do use {phocamaps view=map|id=1} the map does not show, just an empty box.
I did read all the problems others had with not showing the map. At last I found the solution.
I do think that when I use a pagebreak (<hr class="system-pagebreak" title="Text" />, even when it is after the map) the map is not shown. My articles are big, so without pagebreaks is not the solution.
I do think the plugin for J3 has the same problem.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48400
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Map does not show in article

Post by Jan »

Hi, there can be two problems:

- the plugin is not transformed (not installed, not enabled, used in place which does not support content plugins)

or

- the plugin is rendered but the map not display due to a) Javascript problem or b) CSS problem

So check a) (displaying the JS console if there is no error) or try to check the website for CSS - if e.g. the map box is large enough, etc. :idea:

Jan
If you find Phoca extensions useful, please support the project
User avatar
MartijnM
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 29 Apr 2012, 16:04

Re: Map does not show in article

Post by MartijnM »

You can discover it yourself:
Make a new Joomla4 or Joomla 3 website.
Install PhocaMaps and plugin. Activate plugin. Create a map. Use a Google map. Create an article and add {phocamaps view=map|id=1}
The map shows. Now add <hr class="system-pagebreak" title="Text" />
On the frontend the map does not show. When you hit in the Article Index: 'All pages', the map will show.
I did not install anything but Joomla and PhocaMaps.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48400
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Map does not show in article

Post by Jan »

Hi,
Now add <hr class="system-pagebreak" title="Text" />
Where should I add this code? Below or above the map?

Jan
If you find Phoca extensions useful, please support the project
User avatar
MartijnM
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 29 Apr 2012, 16:04

Re: Map does not show in article

Post by MartijnM »

It is below the map.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48400
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Map does not show in article

Post by Jan »

Hi, I see now.

What is interesting, displaying OpenStreetMap is no problem.

Image


Image


The solution for Google maps is to reordering of the plugins in Joomla administration. Just order Phoca Maps plugin before Page Navigation and Page Break plugin

Image

Then even Google Maps will be displayed.

Jan
If you find Phoca extensions useful, please support the project
User avatar
MartijnM
Phoca Newbie
Phoca Newbie
Posts: 9
Joined: 29 Apr 2012, 16:04

Re: Map does not show in article

Post by MartijnM »

For me the solutions was to make the order of the Plugin 'Last'
https://imgur.com/u2FHIOx

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

Re: Map does not show in article

Post by Jan »

Ok, thank you for the info.

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