Code example for MapFragment

Methods: getMap

0
	String provider = LocationManager.NETWORK_PROVIDER;
 
	@AfterViews 
	void init() { 
		manager.requestLocationUpdates(provider, 10000, 50, this);
		map = mapFragment.getMap();
		map.getUiSettings().setMyLocationButtonEnabled(true);
	} 
 
	@UiThread 
	void makeText(String text) {
		Toast.makeText(this, text, Toast.LENGTH_LONG).show();
	} 
 
	@Click 
	void getLocation() { 
		Location l = manager.getLastKnownLocation(provider);
		if (l != null) {
			MarkerOptions marker = new MarkerOptions();
			LatLng ll = new LatLng(l.getLatitude(), l.getLongitude());
Experience pair programming with AI  Get Codota for Java