Logicify / jquery-locationpicker-plugin

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

Allow Special "Autocomplete"/Unchanged Format #146

Open Haravikk opened 5 years ago

Haravikk commented 5 years ago

Title mostly says it all, but I'd like when a user selects an item from the autocomplete list for the entry to be entered into my input field exactly as shown in their selection.

For example: if I enter "Queen Street Station" into the field, and choose "Queen Street Station, Glasgow, UK" from the autocomplete list, I'd like exactly that to be stored in the input field. Instead I end up with "26 Dundas St, Glasgow G1 2AQ, UK" which a user may not immediately realise is the same as what they were trying to enter, and is far too much specificity.

For my purposes anything shown in autocomplete is sufficient, as it should be specific enough that I can obtain it using a separate geocoding query on my server to confirm the user's input.

I'd like to propose that a new option be added named something like useAutocompleteLocationName, if set to true, whatever entry the user chose in the autocomplete list will override any values returned by geocoding when setting the location name field, but the geocoding values will be returned in callbacks etc. as normal.