O'Reilly logo

KnockoutJS by Example by Adnan Jaswal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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" /> ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required