New Map Renderer

An upgraded map renderer is available as of version 18.2.0 of the Maps SDK for Android. This renderer brings many improvements, including support for Cloud-based maps styling.

The new renderer provides the following benefits:

  • Cloud-based maps styling features are available with the new renderer.
  • Advanced Polyline Customizations 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.

Rollout schedule

In October 2021, Google began the rollout of the upgraded map renderer. At that time, you could decide to opt-in to start using the upgraded renderer in your app.

With the release of version 18.2.0 of the Maps SDK for Android, Google switched the default renderer from the legacy renderer to the upgraded map renderer. With version 18.2.0, the map renderer used when you build a new app or rebuild an existing app becomes the upgraded map renderer.

What happens when the default renderer changes?

The default renderer becomes the upgraded renderer with the release of version 18.2.0 of the Maps SDK for Android. To take advantage of the upgraded renderer, you must build any new apps, or rebuild any existing apps, using the new SDK version.

However, you can decide to opt-out of the change. If you opt-out, your app continues to use the legacy renderer. See Opt-out of using the upgraded renderer for example code on how to opt-out.

Supported devices

To use the upgraded map renderer, devices must meet these criteria:

  • Android 5.0 (API level 21) or later
  • Using Google Play services version 21.39.14 or later

Devices using Android 4.4W (API level 20) and earlier, or using Google Play services versions 21.39.13 or earlier, continue to use the legacy renderer even after your default renderer changes to the upgraded map renderer.

Opt-out of using the upgraded renderer

By default, apps built using version 18.2.0 of the Maps SDK for Android use the upgraded renderer. If necessary, you can explicitly opt-out of using the upgraded renderer to use the legacy renderer in your app.

To opt-out:

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 opt-out to use the legacy map renderer.

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.LEGACY, 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.")
    }
  }
}

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.LEGACY, 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;
    }
  }
}