Panoramio
Posted on Minggu, 12 Agustus 2012 by Admin
The Panoramio web site has a great collection of photos from all over the world, and they also have a very convenient web API. I thought it would be a lot of fun to use Android to access this content while you are out walking around – and especially to have Android find interesting photos based on your current location. The resulting open source application is now available in the apps-for-android project.
The application starts by showing your current location in a custom MapView. You can pan and zoom this map to choose the area you want to search.
Intent i = new Intent("com.google.android.radar.SHOW_RADAR");
i.putExtra("latitude", 37.422f);
i.putExtra("longitude", -122.084f);
startActivity(i);
The code for these applications is not very long, but they are a good example of how to use a number of Android's location APIs:- Using an embedded MapView along with a MyLocationOverlay to plot your current location. The is also a custom class which extends Overlay to draw the Panoramio pushpin.
- Using the SensorManager to get our compass heading.
- Using the LocationManager to determine our current location
Category Article Apps