Location-aware websites are one of the hottest trends in the present day web development scenario. A location-aware web application takes the user's geographic location as an input, and renders output to that user (or provides some sort of service to him) based on his location. Take Foursquare for example, a hugely popular social networking website that lets you "explore" interesting venues around your location, gives you badges when you "check in" at a venue, shows where your friends are checking in, and so on. Applications like this require databases that have special capabilities for storing, querying, and comparing geographic position parameters (latitude, longitude, and so on). MongoDB has Geospatial Indexing, which makes it efficiently perform location-based queries. In this chapter, we are going to work with geospatial indexing and learn how to use it to develop location-aware applications with PHP.
So in this...