Capturing address using autocomplete
The first feature of this chapter is about capturing address using the autocomplete
feature of places library provided by the Google Maps APIs. To implement this feature, we will:
- Add reference to the Google Maps APIs library in the view
- Create the model to hold the address information
- Create custom binding handler for the address
autocomplete
input component - Add the
autocomplete
input components to the view and bind them to use the custom binding handler
Let's get started by adding reference to the Google Maps APIs to the view. Open the view in the mapsapplication.html
file and add the highlighted line of code in the HTML header:
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html" /> ...
Get KnockoutJS by Example now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.