Logicify / jquery-locationpicker-plugin

JQuery Location Picker plugin
MIT License
389 stars 260 forks source link

onlocationnotfound not working ? #104

Open gordielachance opened 7 years ago

gordielachance commented 7 years ago

Hi and thanks for this handy plugin !

Seems the onlocationnotfound event does not work :

        onlocationnotfound: function(locationName) {
            alert("not found");
        }

does nothing. Any idea ?

Sumragen commented 7 years ago

Hi @gordielachance!

It's very strange. I have been try to re-create that issue, but it's work fine. I can advice you first of all make sure that you enable autocomplete (property enableAutocomplete in locationpicker options) and check version of plugin;

Here is options of my similar locationpicker

$('#test').locationpicker({
    inputBinding: {
        locationNameInput: $('#test-address')
    },
    enableAutocomplete: true,
    onlocationnotfound: function(locationName) {
        alert("not found");
    }
});

test of locationnotfound