• Resolved kitkat13

    (@kitkat13)


    Hi Timjin:

    i updated all my plugins including Store Locator for wp this a.m. Before the update I had custom markers for the store locations. When i went to the map after the update my custom locators are gone and are no longer an option in the choices i see in the admin. Is there a reason why?

    also, is there a way to specify an alternate marker size?

    Thanks.

    https://www.ads-software.com/plugins/wp-store-locator/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    You probably added them to the /img/marker folder? If you update a plugin the files are removed and then replaced with the new ones, so you will loose any custom changes you made.

    If you place the custom marker back in the correct folder, then it should show up.

    I will add a filter for this in the next release, so you can specify a custom folder outside of the plugin folder for your markers. That way you won’t loose any changes when you update.

    If you open the wpsl-gmap.js file in the js folder and search for ‘function addMarker’. Then you will see this piece of code, you can change the number to define the correct marker format.

    mapIcon = {
        url: markerPath,
        scaledSize: new google.maps.Size( 24,35 ),
        origin: new google.maps.Point( 0,0 ),
        anchor: new google.maps.Point( 12,35 )
    };
    Thread Starter kitkat13

    (@kitkat13)

    Hi:

    Haven’t had time to follow up until now. Thank you so much for the prompt reply. Went in and placed the icons back in the folder. I am able to see and select them in the setting menu but they don’t display on the live site. Instead the map shows, but no marker. If I switch the choice back to one of your markers it, shows again. Could this be a conflict with the latest wp upgrade or something else?

    thank you!!!

    ps. eagerly awaiting the premium version.

    Hey where abouts can I go to change the markers? I would like to use the logo of a company as the store markers.

    Thanks in advance!

    Plugin Author Tijmen Smit

    (@tijmensmit)

    @kitkat13 if you select your custom marker, then go the locator page and do view source ( ctrl + u in Firefox ), then search for ‘var wpslSettings’ ( ctrl + f ). Does the name it says after startMarker and storeMarker match with the filename of your custom marker?

    You did create two version? marker.png and [email protected]?

    @dave9966 did you read my first answer? You can place it in the /img/marker folder in the store locator plugin folder. Then it should show up on the setting page.

    Thread Starter kitkat13

    (@kitkat13)

    Hi Timjin:

    My markers show up on the settings page which is why it is very weird. When I did this last time, it displayed.

    I named my markers marker.png and [email protected]; I put them in the directory as follows: public_html/wp-content/plugins/wp-store-locator/img/markers

    Here is what i see when i go into the file as you directed above:

    var wpslSettings = {“startMarker”:”marker@[email protected]”,”storeMarker”:”marker@[email protected]”,”markerClusters”:”0″,”autoLocate”:”0″,”autoLoad”:”1″,”mapType”:”roadmap”,”zoomLevel”:”3″,”zoomLatlng”:”40.463667,-3.74922″,”streetView”:”0″,”panControls”:”0″,”controlPosition”:

    you can see the page here: https://cervezagoose.com/donde/

    Plugin Author Tijmen Smit

    (@tijmensmit)

    The file name is wrong, there shouldn’t be two @2 in the file name. Not sure why it breaks but you can hardcode the file name in the js file.

    If you open the js/wpsl-gmap.js file, and then search for

    markerPath = wpslSettings.path + "img/markers/"

    Instead of this.

    if ( storeId === 0 ) {
       markerPath = wpslSettings.path + "img/markers/" + wpslSettings.startMarker;
    } else {
       markerPath = wpslSettings.path + "img/markers/" + wpslSettings.storeMarker;
    }

    Change it into this, where ‘yourfilename’ is whatever your marker is named.

    if ( storeId === 0 ) {
       markerPath = wpslSettings.path + "img/markers/yourfilename.png";
    } else {
       markerPath = wpslSettings.path + "img/markers/yourfilename.png";
    }
    Thread Starter kitkat13

    (@kitkat13)

    The good news is I got it working in Firefox and IE using the fix above. That is a start. The bad news is that I still don’t see the fix in chrome. Getting closer. It is weird that the file is adding the extra @2. Do you think it makes sense to re-install the plug in from scratch. Any thoughts?

    Plugin Author Tijmen Smit

    (@tijmensmit)

    Did you delete your browser cache in Chrome? It works fine in Chrome for me.

    I will have a look in the code tomorrow to see why it adds @2@2 in the filename when you add a custom marker, it shouldn’t happen.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘custom markers’ is closed to new replies.