Sunday, June 23, 2024
No menu items!
HomeCloud ComputingLearn about our updated renderer for the Maps SDK for Android

Learn about our updated renderer for the Maps SDK for Android

We’re always looking for ways to improve your Google Maps Platform development experience on Android, so  we’ve been working on an updated renderer for the Maps SDK for Android to give you access to more features and better performance.

Thanks to those developers  who opted in to use our updated renderer back in October 2021. Your feedback on what worked well and what needed improvement was implemented in the latest version ready for you to try out now. The upgraded map renderer is available as of version 18.0.0 of the Maps SDK for Android. We encourage you to opt-in to use it and let us know how it’s working.

Benefits of the new map renderer include:

Reduced network load, processing demand, and memory consumption

Faster cold starts than the previous renderer

A more stable and improved user experience

Improved gesture handling for better animations, plus smoother panning and zooming

More fluid transitions and clearly positioned map labels

Cloud-based maps styling feature

Advanced polyline customizations

Devices that can use the new renderer:

Android 5.0 (API level 21) or later

2 GB or more of data storage

Using Google Play services version 21.39.14 or later

Devices using Android 4.4W (API level 20) and earlier; 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 upgrade to the new map renderer

Update your app dependencies to use or higher.

Update your code to explicitly import MapsInitializer, and MapsInitializer.Renderer.

Update your code to call MapsInitializer.initialize(), to request Renderer.LATEST.

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.


Here are two code samples for how to call MapsInitializer.initialize() to request a renderer version.

code_block[StructValue([(u’code’, u’import;rnimport;rnimport;rnrnclass MapRendererOptInApplication extends Application implements OnMapsSdkInitializedCallback {rnrn @Overridern public void onCreate() {rn super.onCreate();rn MapsInitializer.initialize(getApplicationContext(), Renderer.LATEST, this);rn }rnrn @Overridern public void onMapsSdkInitialized(MapsInitializer.Renderer renderer) {rn switch (renderer) {rn case LATEST:rn Log.d(“MapsDemo”, “The latest version of the renderer is used.”);rn break;rn case LEGACY:rn Log.d(“MapsDemo”, “The legacy version of the renderer is used.”);rn break;rn }rn }rn}’), (u’language’, u”), (u’caption’, <wagtail.wagtailcore.rich_text.RichText object at 0x3e54ecb184d0>)])]
code_block[StructValue([(u’code’, u’import class MapRendererOptInApplication : Application(), OnMapsSdkInitializedCallback {rn override fun onCreate() {rn super.onCreate()rn MapsInitializer.initialize(applicationContext, Renderer.LATEST, this)rn }rnrn override fun onMapsSdkInitialized(renderer: MapsInitializer.Renderer) {rn when (renderer) {rn Renderer.LATEST -> Log.d(“MapsDemo”, “The latest version of the renderer is used.”)rn Renderer.LEGACY -> Log.d(“MapsDemo”, “The legacy version of the renderer is used.”)rn }rn }rn}’), (u’language’, u”), (u’caption’, <wagtail.wagtailcore.rich_text.RichText object at 0x3e54ecf59590>)])]

We’re here to help

Not working right? Need help? Please let us know what’s going on by submitting an issue to our issue tracker, and we’ll help you out as soon as possible. Check out the docs for complete details on how to opt-in and start to use the new Maps renderer for Android. We look forward to hearing your feedback on how it works for you. Already upgraded to the new renderer? Please take a moment to fill in this short survey to help us make it even better! Thanks!

For more information on Google Maps Platform, visit our website.

Cloud BlogRead More



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments