Addon Open Street Map Shows Icon On Wrong Position - Question | JoomShaper
🎃 Halloween Sale is Live! Get 35% OFF on all plans. Sale ends soon! Get Offer

Addon Open Street Map Shows Icon On Wrong Position

JB

Juergen Baisch

General 3 years ago

Hi,

Further down this page is the Open Street Map addon. https://water-for-africa.org/en/fields-of-activity.html Since Joomla 4 or the upgrade of the Helix Framework to 3.0.2, self-made icons like the taps no longer appear in the right position.

I have added a default marker for comparision. It is in the right position.

The self-created icons only approach the true position when you zoom in strongly. Comparison: the map shows that we have projects in South Sudan. This is wrong.

Thanks for your help.

Juergen

0
11 Answers
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 3 years ago #63231

Thanks all for your opinions and suggestions and solutions. I will note it down in our list.You can now close this post by accepting the answer.

Thanks.

0
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 3 years ago #63113

Hi

Apology for your experience with our product. Could you please give me that specific page linka and also screenshot? So that I can check.

-Regards.

0
JB
Juergen Baisch
Accepted Answer
3 years ago #63114

the screenshot is here: https://prnt.sc/kPYTTo9jgAqo

The website is: https://water-for-africa.org/en/fields-of-activity.html Just scroll down to the end. Then you will see it.

0
JB
Juergen Baisch
Accepted Answer
3 years ago #63152

Hi,

In the post https://www.joomshaper.com/forum/question/12923#qa-answer-62802 I pointed out that the icons are displayed distorted. Your colleague suggested the CSS code shown in the post. The icons no longer appear distorted, but in the wrong place. See: https://prnt.sc/kPYTTo9jgAqo https://water-for-africa.org/en/fields-of-activity.html (at the bottom of the page)

Since our website is trilingual, it also has 3 templates. In the German template I have now deleted the CSS code of your colleague from the post https://www.joomshaper.com/forum/question/12923#qa-answer-62802. The icons now appear distorted, but in the right place: https://prnt.sc/amBpPgFbat-J https://water-for-africa.org/de/arbeitsfelder.html (at the bottom of the page)

Probably the CSS code of the post https://www.joomshaper.com/forum/question/12923#qa-answer-62802 must be adapted. Anyway.

Thanks a lot.

Juergen

0
C
conshelf
Accepted Answer
3 years ago #63158

Hello,

Just to confirm, I have the same exact issue as Juergen.

The CSS below does fix the icon size, but as Juergen said, they now appear in the wrong place on the map.

.leaflet-marker-icon {
    height: auto !important;
}

Kind regards, John

0
C
conshelf
Accepted Answer
3 years ago #63159

Hello,

It looks like the inline styles are causing the issue. There's an inline style for height that is 95px, if that is changed to match the 38px width, then the issue is resolved.

<img src="/images/markers/pins/style4/map-icon.png" class="leaflet-marker-icon leaflet-zoom-animated leaflet-interactive" alt="" tabindex="0" style="margin-left: -22px; margin-top: -94px; width: 38px; height: 95px; transform: translate3d(1025px, 341px, 0px); z-index: 341;">

However, I'm not sure what is injecting the the height and width for the icons.

Kind regards, John

0
C
conshelf
Accepted Answer
3 years ago #63162

Ok, this would not be the recommended solution since it's modifying a core SP Page Buider JS file, but it gets the job done if you are looking for an immediate solution.

Need edit this file components/com_sppagebuilder/assets/js/leaflet-provider.js (file is minified, so you'll need to look for this line:

{for(var c=L.Icon.extend({options:{iconSize:[38,95],iconAnchor:[22,94]

And change the 95 to 38 and the 94 to 37.

Hopefully, Joomshaper has a more permenant fix coming. Just thought I'd share what I did to get the page looking nice while we wait.

Kind regards, John

0
JB
Juergen Baisch
Accepted Answer
3 years ago #63214

@conshelf: Your code works :-)

@Joomshaper support: please update your file as conshelf has suugested. Otherwise we have to change the file after every SP PageBuilder Update. That is not a good solution. Thanks.

0
C
conshelf
Accepted Answer
3 years ago #67181

Hello,

Just updated the latest version of SP Page Builder and the map issue still exists.

This really needs to be addressed.

Kind regards, John

0
D
digitalconnect
Accepted Answer
9 months ago #180857

Wy after all these years this si still not fixed??

0
Mehtaz Afsana Borsha
Mehtaz Afsana Borsha
Accepted Answer
Support Agent 9 months ago #180942

Hi

Sorry for this inconvenience. Could you please create a new forum post about your issue?

0