Instantly share code, notes, and snippets.

Embed
What would you like to do?
public class MainActivity : AppCompatActivity, IOnMapReadyCallback
{
private GoogleMap m_map;
private MapView m_mapView;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SupportActionBar.Hide();
// Set our view from the "MainActivity" layout resource
SetContentView(Resource.Layout.MainActivity);
m_mapView = FindViewById<MapView>(Resource.Id.mainactivity_mapView);
m_mapView.OnCreate(bundle);
m_mapView.GetMapAsync(this);
}
public void OnMapReady(GoogleMap map)
{
m_map = map;
}
protected override void OnPause()
{
base.OnPause();
m_mapView.OnPause();
}
protected override void OnResume()
{
base.OnResume();
m_mapView.OnResume();
}
protected override void OnSaveInstanceState(Bundle outState)
{
base.OnSaveInstanceState(outState);
m_mapView.OnSaveInstanceState(outState);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment