Android: new Google Maps Android API now part of Google Play services

Source: Internet
Author: User
03 December 2012

New Google Maps Android API now part of Google Play services Posted by Reto Meier, Evan Rapoport, and Andrew Foster

Google Play services is our new platform that offers you better integration with Google products, and which provides greater agility for quickly rolling out new capabilities for you to use within your apps. Today we're launchingGoogle
Play services V2.0
, Which includes two new APIs, including perhaps our most frequently requested upgrade:Maps.

Google Maps Android API

The new version of the API allows developers to bring versions of the recent features of Google Maps for Android
To your Android apps. We're excited to make this API available as part of Google Play services supporting devices from froyo onwards (API Level 8 + ).

The new API usesVector-based mapsThat support2D and 3D views, And allow usersTilt and rotateThe map with simple gestures. Along
The layers you 've come to know from Google maps such as satellite, hybrid, terrain and traffic, the new API lets you include indoor
Maps for your major airports and shopping centers in your app.

One of most common feature requests we 've heard on Android is supportMap fragments. With this new API, adding a map to your activity is as simple:

<fragment  android:id="@+id/map"  android:layout_width="match_parent"  android:layout_height="match_parent"  class="com.google.android.gms.maps.MapFragment" />

Check out this image from updated trulia Android app (which goes live tomorrow), that users can use
To search for a place to buy or rent in 3D.

The new API is simpler to use, so that creating markers and info windows is easy. polylines, polygons, ground overlays and tile overlays can all now be added to the map with just a few lines of code.

To get started follow the Getting Started instructions to obtain an API key. ThenDownload and configure the Google Play Services SDKUsing the SDK manager. Check the Google Maps for Android API documentation for more
Details. If you haven't got it already, you'll need to download the android SDK first.

More than 800,000 sites around the world already use our mapping APIs to create amazing and useful apps. we hope you enjoy using this new addition to the Google Maps API family, and Building Mapping experiences that were never before possible on a mobile device.

Photo sphere

In Android 4.2, we introducedPhoto sphereMode in the camera, which you can use to create amazing, immersive panoramas just like you see in street view on Google Maps. Today we're excited to announceNew
APIs and documentation
That empower developers, businesses, and photographers to emerge e new uses of photo sphere for work and for play.

We 've made photo sphereOpen formatSo anyone can create and view them on the web or on mobile devices.

A photo sphere is simply an image file (like a JPG) that has in it text-based Metadata, an open format created by Adobe called XMP. the metadata describes the photo Sphere's dimensions and how it shoshould be rendered within the interactive photo sphere Viewer
You see in Android, Google +, and Google Maps.

If you 'd like to programmatically or manually add the XMP metadata into panoramic images not created by the photo sphere camera in Android, stay tuned today for more details on the metadata and how to apply it to your photos programmatically later.

In the new Google Play services, we 've added APIs to give you the ability
To check whether an image is a photo sphere and then open it up in the photo sphere viewer.

// This listener will be called with information about the given panorama.OnPanoramaInfoLoadedListener infoLoadedListener =  new OnPanoramaInfoLoadedListener() {    @Override    public void onPanoramaInfoLoaded(ConnectionResult result,                                     Intent viewerIntent) {        if (result.isSuccess()) {            // If the intent is not null, the image can be shown as a            // panorama.            if (viewerIntent != null) {                // Use the given intent to start the panorama viewer.                startActivity(viewerIntent);            }        }                // If viewerIntent is null, the image is not a viewable panorama.    }};// Create client instance and connect to it.PanoramaClient client = ......// Once connected to the client, initiate the asynchronous check on whether// the image is a viewable panorama.client.loadPanoramaInfo(infoLoadedListener, panoramaUri);

To learn more about Google Play services and the APIs available to you through it, visit the new Google
Services area of the Android Developers site.

Join
The discussion on
+ Android
Developersposted by Android
Developers at 10: 41
AM
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.