Page 1 of 1

Use numbers on icons markers with openstreetmap

Posted: 04 Jul 2022, 15:27
by xillibit
Hello,

On a map which is set with phocamaps 3.0.12 on Joomla! 3.10.10, i'am using openstreetmap with fontawesome icons. The issue is that i want to set a number in the icon instead the one taken from fontawesome. I have 17 icons on this map, so i need to numbered these icons from 1 to 17.

Is-there a way to achieve that when using openstreetmap ?

Is-this a way to use fontawesome 5.x with openstreetmap on phocamaps ?

Thanks by advance

Re: Use numbers on icons markers with openstreetmap

Posted: 04 Jul 2022, 15:49
by Jan
Hi, in fact you don't need to use fontawesome only, with another prefix, etc. you can even use another library, but I think, you need to do specific icon for each number version. There is no some dynamic script to create the numbers. :idea:

Jan

Re: Use numbers on icons markers with openstreetmap

Posted: 04 Jul 2022, 16:38
by xillibit
I don't figure out with openstreetmap how to load just an image for the icon or just set a number instead the icon or directly on the icon.

Image

Re: Use numbers on icons markers with openstreetmap

Posted: 04 Jul 2022, 17:16
by Jan
Hi, openstreetmap only works with icons defined in CSS

Re: Use numbers on icons markers with openstreetmap

Posted: 07 Nov 2022, 11:49
by AlainR
Thanks for this discussion.
One way would be to define an "Additional Icon Class" in "Design Settings (OpenStreetMap)" tab for each marker: one, two, etc.
Then, in the site CSS, define the content of the classes:

Code: Select all

.one.fa::before {
	content: "1";
}
.two.fa::before {
	content: "2";
}
etc.

You've to remove or replace ".fa" from the above code if you don't use "Icon Prefix".
Please note that this will delete the circle or any icon defined in "Marker Icon".