New Map Renderer

An upgraded map renderer is available as of version 18.0.0 of the Maps SDK for Android. This renderer brings many improvements, including support for Cloud-based maps styling. You can opt-in to try the new renderer before it becomes the default renderer for Android devices, through a progressive rollout starting in March 2022 at the earliest.

The new renderer provides the following benefits:

  • Cloud-based maps styling features are available with the new renderer.
  • Reduced network load, processing demand, and memory consumption.
  • Improved gesture handling for better animations, plus smoother panning and zooming.
  • More fluid transitions and clearly positioned map labels.
  • A more stable and improved user experience.

Supported devices

To use the new renderer, devices must meet these criteria:

  • Android 5.0 (API level 22) or later
  • 2 GB or more of data storage
  • using Google Play services version 21.39.14 or later

Devices using Android version 21 and earlier, or with less than 2 GB of data storage, or using Google Play services versions 21.39.13 or older, will continue to use the legacy renderer.

How to try the new renderer

To opt in to the new renderer, take the following steps:

Your code must call MapsInitializer.initialize() before any MapView, MapFragment, or SupportMapFragment has been created. We recommend calling this in onCreate for your app's Application, or Activity, before its content view is set.

The following example shows how to call MapsInitializer.initialize() to request a renderer version.

Java


import com.google.android.gms.maps.MapsInitializer;
import com.google.android.gms.maps.MapsInitializer.Renderer;
import com.google.android.gms.maps.OnMapsSdkInitializedCallback;

class MapRendererOptInApplication extends Application implements OnMapsSdkInitializedCallback {

  @Override
  public void onCreate() {
    super.onCreate();
    MapsInitializer.initialize(getApplicationContext(), Renderer.LATEST, this);
  }

  @Override
  public void onMapsSdkInitialized(MapsInitializer.Renderer renderer) {
    switch (renderer) {
      case LATEST:
        Log.d("MapsDemo", "The latest version of the renderer is used.");
        break;
      case LEGACY:
        Log.d("MapsDemo", "The legacy version of the renderer is used.");
        break;
    }
  }
}

      

Kotlin


import com.google.android.gms.maps.MapsInitializer
import com.google.android.gms.maps.MapsInitializer.Renderer
import com.google.android.gms.maps.OnMapsSdkInitializedCallback

internal class MapRendererOptInApplication : Application(), OnMapsSdkInitializedCallback {
  override fun onCreate() {
    super.onCreate()
    MapsInitializer.initialize(applicationContext, Renderer.LATEST, this)
  }

  override fun onMapsSdkInitialized(renderer: MapsInitializer.Renderer) {
    when (renderer) {
      Renderer.LATEST -> Log.d("MapsDemo", "The latest version of the renderer is used.")
      Renderer.LEGACY -> Log.d("MapsDemo", "The legacy version of the renderer is used.")
    }
  }
}