0%

Book Description

Today's mobile devices have GPS and standard APIs to give you access to coordinates—but what can you do with that data? With this concise book, application developers learn how to work with location data quickly and easily, using Node.js, CouchDB, and other open source tools and libraries.

Node.js makes it simple to run event code on the Web, and the CouchDB document-oriented database lets you store location data and perform complex queries on it quickly. You'll learn how to get started with these tools, and then use them together to build an example project called MapChat, using HTML and JavaScript code samples.

  • Learn how to serve dynamic content with Node.js, and use its asynchronous IO to handle several requests at once
  • Become familiar with GeoJSON, Geohash, and the Geospatial Data Abstraction Library (GDAL) for working with spatial data
  • Build geospatial indexes using the GeoCouch branch of CouchDB
  • Combine these tools to build a project that lets users post real-time chat messages tagged with their current map location

Book Description

Today's mobile devices have GPS and standard APIs to give you access to coordinates—but what can you do with that data? With this concise book, application developers learn how to work with location data quickly and easily, using Node.js, CouchDB, and other open source tools and libraries.

Node.js makes it simple to run event code on the Web, and the CouchDB document-oriented database lets you store location data and perform complex queries on it quickly. You'll learn how to get started with these tools, and then use them together to build an example project called MapChat, using HTML and JavaScript code samples.

  • Learn how to serve dynamic content with Node.js, and use its asynchronous IO to handle several requests at once
  • Become familiar with GeoJSON, Geohash, and the Geospatial Data Abstraction Library (GDAL) for working with spatial data
  • Build geospatial indexes using the GeoCouch branch of CouchDB
  • Combine these tools to build a project that lets users post real-time chat messages tagged with their current map location

Book Description

Today's mobile devices have GPS and standard APIs to give you access to coordinates—but what can you do with that data? With this concise book, application developers learn how to work with location data quickly and easily, using Node.js, CouchDB, and other open source tools and libraries.

Node.js makes it simple to run event code on the Web, and the CouchDB document-oriented database lets you store location data and perform complex queries on it quickly. You'll learn how to get started with these tools, and then use them together to build an example project called MapChat, using HTML and JavaScript code samples.

  • Learn how to serve dynamic content with Node.js, and use its asynchronous IO to handle several requests at once
  • Become familiar with GeoJSON, Geohash, and the Geospatial Data Abstraction Library (GDAL) for working with spatial data
  • Build geospatial indexes using the GeoCouch branch of CouchDB
  • Combine these tools to build a project that lets users post real-time chat messages tagged with their current map location

Table of Contents

  1. Preface
    1. Conventions Used in This Book
    2. Using Code Examples
    3. Safari® Books Online
    4. How to Contact Us
  2. 1. Node.js
    1. Getting Started with Node.js
      1. Asynchronous Callbacks
    2. Using Node.js on the Web
      1. ExpressJS
        1. Routes
        2. Templates
        3. Static Files
  3. 2. Geographic Data
    1. Geo Datasets
    2. GeoJSON
      1. Example Geometries
    3. GDAL
      1. Installing
      2. Grab Some Data
      3. Ogrinfo
      4. Ogr2ogr
    4. Geohash
  4. 3. CouchDB
    1. How Does CouchDB Work?
      1. Replication
      2. Indexes and Views
    2. Getting Started with CouchDB
      1. Creating a Database
      2. Creating a View
      3. View Options
      4. Using Reduce
      5. Using CouchApps…For Fun and Profit
      6. Load Shared Code
    3. GeoCouch
      1. Importing Data
      2. Using Cradle to Talk to Geocouch
        1. Add the Couchapp
      3. Bounding Box Queries
      4. Displaying the Data Using Node.js
    4. CouchDB Hosting Options
  5. 4. MapChat - Example Project
    1. Realtime Chat
      1. Socket.io
      2. Setting Up the Project
        1. Making chat subscriptions
        2. Handling Chat Messages
    2. Using Google Maps
      1. Getting User Location
        1. Grab browser location
        2. Center and Bounds
      2. Custom Overlays
    3. Chat Messages from CouchDB
    4. Clustering
      1. Using a List Function
      2. Notify Clients of Cluster Updates
      3. Display List of Clusters in the Client
  6. About the Author
  7. Colophon
  8. Copyright
18.118.37.240