Chapter 5. Saving Geographic Information
Many applications do more than display a geolocation on a map once it has been acquired. In many cases, the location is saved for later use—possibly displaying a history of where a user has been, or showing where many users are at any given time. In these cases, the browser application will need to collect the geolocation of the device and then send that information to a server for further processing. Most of this backend processing is beyond the scope of this book, but most likely a web server will be used with a server-side language like PHP, Python, C# or VB.NET, Java, etc. The language used does not really matter, but how the information is saved does matter.
For more information on server-side scripting languages, check out some of these titles to get you started: PHP and MySQL Development, 4th Edition by Luke Welling and Laura Thomson (Addison-Wesley Professional), Programming Python, Fourth Edition by Mark Lutz (O’Reilly Media), Head First Java, Second Edition by Kathy Sierra and Bert Bates (O’Reilly Media), and Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars (Wrox).
Since I want to concentrate more on what to do with the geographic information once it has been collected by the browser than how to manipulate it on the server, I will talk specifications more than implementation in the sections to come. There are many ways that geolocation information can be saved for later use: text files, CSV files, XML files, JSON files, KML ...