-3

I have yet another problem, :( I saw in some tutorials that we have to use the getMap () method of the calsse SupportMapFragment to retrieve the reference of the map object. The problem is that I do not find this method in the SupportMapFragment object (Android studio does not know this method) is there another way to get my goal ? thank u guys ^^ enter image description here

  • Perhaps they removed it. They certainly have been pushing developers to use `getMapAsync()` for a couple of years. – CommonsWare Jul 07 '16 at 15:45

2 Answers2

0

You should use supportMapFragment.getMapAsync(OnMapReadyCallback).

Relevant documentation link here.

Meetarp
  • 2,331
  • 1
  • 23
  • 31
0

You have to use getMapAsync in the new version. If you look at the documentation, getMap is no longer available: https://developers.google.com/android/reference/com/google/android/gms/maps/SupportMapFragment

The getMapAsync is nothing difficult or boring to use, here you are a snippet: https://stackoverflow.com/a/31371950/4120431

Community
  • 1
  • 1
N Dorigatti
  • 3,482
  • 2
  • 22
  • 33