Information Technology Reference
In-Depth Information
Separation of duties : While it's convenient to use a single service to
do everything, you may find that you want to separate the aspects of
retrieving raw map data around a given location, and the rendering of
a relevant image (map tile) for that location. Abstracting your mapping
means you can mix and match to suit your needs.
Possibly the most important reason to abstract your map data and image provider(s) is
that the field is rapidly evolving and changing, and good software engineering should
lead you to isolate all of your other code from such volatile dependencies where you are
able. This volatility can also be the result of version upgrades and changes by the
providers themselves.
Here are some useful data providers, map tile providers, all-in-one services, and even
ready-made mapping abstraction JavaScript libraries, that you might also like to
consider along with the usual suspects:
Open Street Map (openstreetmap.org)—one of the original open data
providers, now also providing other services on top of the crowd-
sourced base geolocation data
CloudMade (cloudmade.com)—a map tile provider for use with Open
Street Map data. Also the providers of Leaflet, an open source tile set
service.
Mapnik (mapnik.org)—a map renderer that is often found in other tools
(including some of the others listed here).
CartoDB (cartodb.com)—a cloud based geospatial database
Mapstraction (mapstraction.com)—a ready-to-use JavaScript library
that provides abstraction of mapping services and data providers.
Wax (mapbox.com/wax)—another ready-to-use abstraction layer. And
from the same company, TileMill for tile generation.
This list could fill pages, but you get the idea. Even more exciting is the realization that
dozens of such companies and service providers are cropping up every week.
Gaming Your Location
Even though you're developing a mobile app, don't forget the tools available to you to
help test and refine your geolocation code. For instance, DDMS in the Android
Developer Tools plug-in for Eclipse provides you with the ability to set arbitrary
coordinates/location data for your emulator device. With a running project in your
emulator, you can switch to DDMS mode, and open the Emulator Console tab. You'll
see the ability to set raw coordinates, or provide GMX or KML data directly, as shown in
Figure 9-8, which your emulator browser can then use.
 
Search WWH ::




Custom Search