Android and KML
This morning London Datastore announced that TFL had lifted all restrictions on commercial reuse of its data (via @retomeier). I love the idea of building a London transport application for Android so I started playing around with the station data which lead me to investigate how Keyhole Markup Language functions on the Android platform.
Launching the native Maps application from within a bespoke application with some KML data from the internet is really easy.
public class LoadActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Uri uri = Uri.parse("geo:0,0?q=http://paxmodept.com/files/office.kml");
Intent mapIntent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(mapIntent);
}
}
Best of all is that you can do the same thing by simply clicking on a KML file in the Android browser. You can try it from your Android device here. I can imagine plenty of use cases for this including store locations and favourite places.
~Add Comment~

