google maps using viewpager(in a tab) and getMapAsync()

i want to put google maps in a tab using viewPager ,thus viewPager uses fragments, i found multiple solutions that use the deprecated getMap, so android studio wouldn't even compile it, is there any up to date solution to get the map with viewPager ?