bjorn2404 / jQuery-Store-Locator-Plugin

A store locator plugin using Google Maps API version 3
MIT License
495 stars 235 forks source link

Destroy function #170

Closed 77656233 closed 7 years ago

77656233 commented 7 years ago

Hello,

i just found the reset function that can be triggered with the class"bh-sl-reset".

Is there a way to delete the generated map and results? I would love to give the option to close the map after its loaded.

Greetings, Chris

bjorn2404 commented 7 years ago

@ChristianGrieger destroy is a public method:

$('#bh-sl-test').on('click', function(e) {
    e.preventDefault();

    $('#bh-sl-map-container').storeLocator( 'destroy' );
});