Closed fas3r closed 6 years ago
Hi fas3r,
I appreciate you wanting to help contribute to this project!
Unfortunately this is not a valid PR as it makes changes to one of the compiled files instead of the source file. I haven't really given any guidelines for contributing so I apologize if that was not clear.
Also, I'm not sure I fully understand what your PR is aiming to accomplish. By turning fields into a function that gets passed the place details you are essentially duplicating the onChange event.
If you just need to get the place details without relying on the onChange event you can just call the get place method.
$("#myInput").geocomplete("get place");
not sure if that's helpful for someone else but I needed something more dynamic for the "field" options and it was better than using onChange event.
usage :
or only specific value.
it's also possible to change the function dynamically, it prevents to initiate a new geocomplete :
the argument is results. Where result will contain all the information from :
"results" will have all the value as follow :
source for the "each" function to parse the "address_components" https://stackoverflow.com/a/16429122/4167123 .
BR, fas3r