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 componentAdd 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" /> <title>Knockout : Maps Application</title> <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css"> <script type="text/javascript" src="javascript/jquery-2.1.3.min.js"...