Open yansusanto opened 7 years ago
Hi @yanseo! Thank you :)
First: It seems like issue #11; Code example:
$('#map').locationpicker({
inputBinding: {
locationNameInput: $('#input-address')
},
oninitialized : function (component) {
$('#input-address').val('');
}
});
Second: If i have fully understood your issue, that you need initialize another input field and grab just their value, but question consist of 'how i can programmatically autocomplete location' or 'what is correct behavior of program on accidentally press Enter' ?
Thanks, Sumragen for your reply.
This doesn't work though, the map disappeared and no autosuggestion ;(
$('#map').locationpicker({ inputBinding: { locationNameInput: $('#input-address') }, oninitialized : function (component) { $('#input-address').val(''); } enableAutocomplete: true, onchanged: function (currentLocation, radius, isMarkerDropped) { } });
Am I missing something here?
PS: This is the working code for me but I need to clear the field first before I could add another address which is of course not so user-friendly
$('#map').locationpicker({ location: { latitude: 3.139003, longitude: 101.68685499999992 }, radius: 300, inputBinding: { latitudeInput: $('#map-latt'), longitudeInput: $('#map-long'), radiusInput: $('#map-radius'), locationNameInput: $('#input-address') }, enableAutocomplete: true, onchanged: function (currentLocation, radius, isMarkerDropped) { } });
Anybody have a solution for this?
First of all, thank you for creating such an awesome script.
I'd like to know if
What would be the best practice if I'd like to accomplish the above.
Thanks & have a good day.
;)