anchor.diff:  
   First, let's start storing the coordinates in the browser in PouchDB. Add PouchDB support by including the Javascript library in the web page, which you can do by putting this line right before your ending </head> tag: 
   
  - <script src="http://cdn.jsdelivr.net/pouchdb/3.0.6/pouchdb.min.js"></script> 
  +[source,html]
  +----
  +<script src="http://cdn.jsdelivr.net/pouchdb/3.0.6/pouchdb.min.js"></script> 
  +----
   
   Then, in your `<script>` code, right after `‘watchID = null'`, add this line: 
   
  - var db = new PouchDB('localdb'); 
  +[source,javascript]
  +----
  +var db = new PouchDB('localdb'); 
  +----
   
   You could actually call this database anything you want. I just chose `localdb` to show that you didn't have to use the same name as the remote Cloudant database name. You'll always refer to the variable name, `db`, from here on out. 
   
  
positive.code: 
   $ cd locationtracker/_attachments
  
  and type Listing 2  into a file called index.html.
  
  .Listing 2. HTML user interface
  [source,html]
  
negative.code: === Step 1: CouchApp Setup
  We're going to write a very simple location recording client using modern Javascript and HTML5. We could accomplish this with a single, short web page that didn't require any special server platform other than your favorite HTTP server of choice. However, we'll eventually want to save the location data in Cloudant using Javascript, and we don't want to get into the complications of http://en.wikipedia.org/wiki/Cross-origin_resource_sharing[CORS (cross-origin resource sharing)], so we need to put our web page on the same server as our Cloudant database.  
  
  The best way to do this is to take advantage of the fact that Cloudant/CouchDB can act as a simple web server in addition to its database serving capabilities. So we'll build our application as a CouchApp.  
  
  ****
  NOTE: _CouchApps are web applications served directly from CouchDB, mostly driven by JavaScript and HTML5. If you can fit your application into those constraints, then you get CouchDB's scalability and flexibility "for free" (and deploying your app is as simple as replicating it to the production server)._  -- http://couchdb.org[Couchdb.org]
  ****
  
  If you're not familiar with setting up a CouchApp, https://github.com/couchapp/couchapp[follow these instructions] and come back when you're done. Or for a more extensive CouchApp introduction, follow this excellent tutorial on IBM developerWorks, http://www.ibm.com/developerworks/opensource/tutorials/os-couchapp/[Building CouchApps]. 
  
  _insert your favorite elevator music here…_ 
  
  OK, great. Now you've got CouchApp set up and you're ready to start writing code. Get to a command line prompt in your favorite terminal emulator, and create the skeleton CouchApp with this command:
  
  