Closed aalainn closed 4 years ago
Sorry for my stupidness. By studying the Code of the script I descovered the "enableAutocompleteBlur" property. Setting it to "true" and knowing that you have to enter at least 6 characters for a locationname (I tried always with shorter citynames) solves my problem :-)
Hi Since "locationNameInput" seems not to work anymore I try a workaround with a google.maps.Geocoder Object.
Initialisation of the locationpicker:
Getting longitude and latitude for the address:
When the inputfield of the addressname changes, then callback the location coordinates:
The setMarkerPosition() function outputs the long/lat vaules of the entered address locationname:
The problem is, that the onchange event in the locationpicker object does not fire even if I trigger an onchange event with for example $('#task-location-long').val(lng).trigger('change'); When I enter some values manually into the textfield of for example #task-location-long then everything works.
My goal is to update the marker position not only when I enter lon/lat values into the fields but also when I enter a locationname into the locationNameField.
How do I have to do that?