Open street map - Marker - Forum | JoomShaper
Solved SP Page Builder

Open street map - Marker

Asked by FREESERVIS 5 years ago Last activity 5 years ago

Accepted answer

Marked as the solution
Pavel
5 years ago · edited

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

8 more replies

Rashida Rahman Staff

Hi there!

May I know where did you replace it, please?

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

Best Regards

FREESERVIS Asked this

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 :-(

Rashida Rahman Staff

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

FREESERVIS Asked this

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

FREESERVIS Asked this

Hello,

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

If I enter the code:

jQuery(function ($) {
       $('.leaflet-marker-icon').attr('src', 'https://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;
}
FREESERVIS Asked this

Thank you so much, it already works.
Regards Milan

Log in to reply.