Open Street Map - Marker - Question | JoomShaper

Open Street Map - Marker

M

Milan

SP Page Builder 4 years ago

Hello,

I can't set the correct points on the map when using my own image - Marker.

How to insert an image into a template to overwrite the original image https://test1.webprofirmy.cz/components/com_sppagebuilder/assets/images/marker-icon-2x.png

I tried to replace the original image by pasting it into the template, but it doesn't work. https://test1.webprofirmy.cz/templates/shaper_helixultimate/html/com_sppagebuilder/assets/images/marker-icon-2x.png

Regards Milan

0
9 Answers
Pavel
Pavel
Accepted Answer
4 years ago #27882

it does not work for me

Yes, due to the fact that the map is not loaded immediately, and the script works immediately. Need a small time out. Try it:

jQuery(function ($) {
        setTimeout(function () {
            $('.leaflet-marker-icon').attr('src', '/images/marker.png');
        }, 2000);
    });

Domain name not need in the path

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 4 years ago #27709

Hi there!

May I know where did you replace it, please?

However, there is no default way to do this actually.

Best Regards

0
M
Milan
Accepted Answer
4 years ago #27710

How to replace this file with https://test1.webprofirmy.cz/components/com_sppagebuilder/assets/images/marker-icon-2x.png overwrite in graphic template?

I need the points (makers) on the map to be displayed as on https://www.daliinterier.cz/

On the web, I achieved that I played the original image https://www.daliinterier.cz/components/com_sppagebuilder/assets/images/marker-icon-2x.png. If I update the SP Page Builder Pro component, the image will be overwritten by the original :-(

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 4 years ago #27799

Hi,

Yes, you are right. You need to replace the image within the original file.

... / components / com_sppagebuilder / assets / images / marker-icon.png

Sorry to say that, there is no other way to override it as per my knowledge and yes SP Page Builder update will reset the changes.

Best Regards

0
M
Milan
Accepted Answer
4 years ago #27852

Hello,

why can't I upload a file directly to a template to avoid overwriting it when updating SP Builder Pro?

Example: templates/shaper_helixultimate/html/com_sppagebuilder/assets/images/marker-icon-2x.png

Replacing files in a graphic template must work in Joomla, could a programmer answer me?

Regards Milan

0
Pavel
Pavel
Accepted Answer
4 years ago #27859

follow

0
M
Milan
Accepted Answer
4 years ago #27877

Hello,

it does not work for me > https://prnt.sc/1nxqy16

If I enter the code:

jQuery(function ($) {
       $('.leaflet-marker-icon').attr('src', 'test1.webprofirmy.cz/images/marker.png');
   });

nothing happens to the template. If I enter my own image (50x82px) in the OpenStreet map module, it is displayed large and in the wrong place, because an element is automatically created in css:

element.style {
     margin-left: -30px;
     margin-top: -65px;
     transform: translate3d (414px, 152px, 0px);
     z-index: 152;
}
0
M
Milan
Accepted Answer
4 years ago #27884

Thank you so much, it already works. Regards Milan

0
Pavel
Pavel
Accepted Answer
4 years ago #27898

You are wellcome

0