Thursday, October 31, 2013

Ghost markers in your neighborhood? New features for the Google Maps Android API v2

A new version of Google Play services is currently rolling out to devices. You can start developing for it now using the latest Google Play services SDK along with the new Android 4.4 (KitKat) emulator. Read on to find out about the new features added for the Google Maps Android API v2.

Whether your app tracks ghost sightings, shows witch flight paths, or guides users to the nearest zombie-proof safehold, sometimes the best way to highlight important information is to de-emphasise some elements of your app. The new alpha property for Markers allows you to fade markers in and out as they become more or less important.

You can further tailor the map to your use case using the new setBuildingsEnabled() method to control the visibility of 3D buildings. This is especially useful when you want to highlight your own content. We’ve also made it possible to easily change ground overlay images with the new setImage() method.

Lastly, we’ve added an OnMapLoadedCallback callback interface to notify you when the map has finished rendering. The following example code shows how this callback can be combined with the snapshot feature to ensure the snapshot captures the fully rendered map:

We’re always interested to hear how you’re using the Maps APIs, so let us know if you’ve got something cool to show by tagging +Google Maps API on your posts (or comment right here!). For technical questions that aren’t answered in the developer documentation, check out the Google Maps developer community on Stack Overflow. Don’t forget to tell us what you’d like to see in the next release using the Google Maps API issue tracker.

Posted by Daniel Schramm, Associate Product Manager, Google Maps Mobile APIs