Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.osmdroid.samples;
 
Sample code to show how easy it is to contribute to the OpenStreetMap Project.

Author(s):
Nicolas Gramlich
public class SampleOSMContributor extends SampleMapActivity {

Called when the activity is first created.
	public void onCreate(final Bundle savedInstanceState) {
		/*
		 * You need to do exactly nothing, to contribute to the OSM-Project, except extending from
		 * OpenStreetMapActivity and passing true to its onCreate(...) .
		 */
		super.onCreate(savedInstanceStatefalse);
		final TextView tv = new TextView(this);
		tv.setText("While reading this, your GPS position is recorded and when you exit this application, your route will get uploaded to the OpenStreetMap-Project.");
		this.setContentView(tv);
	}
	public void onLocationChanged(final Location loc) {
		// Nothing to do...
	}
	public void onLocationLost() {
		// Nothing to do...
	}
New to GrepCode? Check out our FAQ X