Hello
Coming from C#…
I’ve created a Navigation drawer app and added a MapFragment.
Now how can I reference from the MainActivity to MapsFragement?
I want to set a marker as soon as I press on my FloatingActionButton
val fab: FloatingActionButton = findViewById(R.id.fab)
fab.setOnClickListener { view →
val swiss = LatLng(47.0,9.0)
map.addMarker(MarkerOptions().position(swiss).title(“Swiss”))
}
map cannot be referenced…
Thanks