CopyPastor

Detecting plagiarism made easy.

Score: 0.8017674088478088; Reported for: String similarity Open both answers

Possible Plagiarism

Plagiarized on 2016-06-09
by mdDroid

Original Post

Original - Posted on 2016-06-09
by antonio



            
Present in both answers; Present only in the new answer; Present only in the old answer;

you can do this using `getMapAsync` , and in `onMapReady` method you will get the map object.
public class YourMapActivity extends FragmentActivity implements OnMapReadyCallback {
@Override protected void onCreate(Bundle savedInstanceState) { // ...
((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMapAsync(this); }
@Override public void onMapReady(final GoogleMap googleMap) {
// you will get map object hare mGoogleMap = googleMap;
// now perform operations on that. } }
The `getMap` method is deprecated. You should use `getMapAsync`:
public class MapsActivity extends FragmentActivity implements OnMapReadyCallback {
@Override protected void onCreate(Bundle savedInstanceState) { // ...
((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMapAsync(this); }
@Override public void onMapReady(final GoogleMap googleMap) { mGoogleMap = googleMap;
// Do something with your map } }

        
Present in both answers; Present only in the new answer; Present only in the old answer;