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.
Automatic update status
In March of 2024, Google began automatically updating all deployed apps to use the upgraded renderer. Automatic updates have been applied to all apps running on devices that meet the minimum device requirements, regardless of the version of the Maps SDK for Android used by the app. This rollout is now complete.
The automatic updates did not apply to:
Apps that have already updated to use the upgraded renderer.
Apps that have explicitly opted out of the upgrade.
Apps running on devices that don't meet the minimum device requirements.
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.
Opt-out of using 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:
Upgrade Maps SDK for Android to v18.0 or greater.
Update your code to explicitly import MapsInitializer and MapsInitializer.Renderer.
Update your code to call
MapsInitializer.initialize()
, passingRenderer.LEGACY
to opt-out and use the legacy renderer.Use OnMapsSdkInitializedCallback to determine which version of the renderer was returned.
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; } } }