• Hello,
    I’ve noticed an issue where multiple start markers appear if a user first drags the start marker and then uses the get location button.

    I’ve had a look in the wpsl-gmap.js and tested out adding deleteStartMarker() to the click function at line 761 like so:

    // Bind the direction button to trigger a new geolocation request.
    $( ".wpsl-icon-direction" ).on( "click", function() {
        $( this ).addClass( "wpsl-user-activated" );
        deleteStartMarker();
        checkGeolocation( settings.startLatLng, infoWindow );
    });

    I was wondering if this is a known issue or something I have created somehow? (I’ve removed all custom code and tested and seem to get the same result)

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi there,

    Yes, I have been able to reproduce the issue as well. It is a bit of an edge case, but I’ll make sure to let the dev team know about this so they can prevent this from happening in the upcoming 3.0 version.

    Thanks for spotting that!!
    Regards,

    Thread Starter southafricanrob

    (@southafricanrob)

    No problem. Could you advise how to update the wpsl-gmap.min.js if I add that code above to the unminified file?

    I have minified wpsl-gmap.js using an online js minifier tool but your version seems much smaller and seems to have a lot less functions than the unminified version?
    Thanks

    Hi again,

    Well, the truth is that minification nowadays is not such a big deal. Yes, we do include a minified copy of the wpsl-gmap.js file, but bear in mind that the reduction in size is from 88kb to 27kb, a mere 61kb… what is 61kb these days? Any given image in your website is going to be ten times bigger at least.

    Minification used to make some of sense some years ago, but nowadays even the most pro cache and performance plugins in wordpress have ditched minification altogether (I am talking about WP Rocket, for instance).

    Having said that, any online compressor will do the trick, but as I said, the end result will not be substantially more performant than the non-minified version.

    I am thinking about jscompress or freeformatter.com. These will give you very similar results to our own internal compression method. But there are dozens more.

    Once again, minifying is really not important nor especially more performant ??

    Regards,

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Multiple Start Markers’ is closed to new replies.