Replace the Map Pins with a Custom Image

Modified on Wed, 15 Nov, 2023 at 1:37 PM

Overview

Store Locator comes built in with pins that appear on each location of your map.

If you are looking for something more customized, you can replace Store Locator's default store and customer pins with your own images.


Setup

Alert

THIS WILL ONLY WORK FOR PROXY PAGE AND NOT APP BLOCK


This will only change the pins for your default store pin and default customer pin. Store groups cannot have a custom image.

  1. From the Shopify admin, select Content.
  2. Select Files.
  3. Select Upload files.
  4. Use the file manager to navigate to, select, and upload your custom image.
  5. Repeat Steps 3 & 4 until you have uploaded all custom images.

    Note: You will need the URLs for these images later so ensure you copy and paste them to notepad or do the next steps in another window so you can refer to them.

    Note:

    Copy the links

  6. From the Shopify admin, select Apps.
  7. Select Store Locator.
  8. Select Settings.

    select settings

  9. Select Display Settings.

    select display settings

  10. Copy and paste this code into the Page Footer HTML field:
    <script>
    old_add_markers = add_markers;
    add_markers = function (){
     // this is the default Icon image displayed on the map
     mainIcon = "####";
     // this is the icon used to display the users address
     youIcon = "!!!!";
     // this is a shadow used for both icons
     myshadow = "****";
     add_markers = old_add_markers;
     add_markers ();
    }
    </script>
    <style>
    #direction_destination, .addresses li {
    /*this should also be the default Icon image displayed on the map */
    background-image: url("####");
    }
    </style>
  11. Replace ####, !!!!, and **** with the URLs to the images. Please ensure you leave the double quotation marks. ("") (from Step 5)

    add the URLs to the images

  12. Select Save.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article