Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

close

- - Get Started
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
    - Get the SDK
  - Google Services
- - Google Play
  - Publishing
  - Promoting
  - App Quality
  - Spotlight
  - Open Distribution

## Results

Loading...
Summary: Methods | Inherited Methods | [Expand All]
public final class

# MapsInitializer

extends Object

java.lang.Object
↳ | com.google.android.gms.maps.MapsInitializer

## Class Overview

Use this class to initialize the Google Maps Android API if features need to be used before obtaining a map. It must be called because some classes such as BitmapDescriptorFactory and CameraUpdateFactory need to be initialized.

If you are using `MapFragment` or `MapView` and have already obtained a (non-null) `GoogleMap` by calling `getMap()` on either of these classes, then you do not need to worry about this class. See the sample application for some examples.

## Summary

Public Methods
static int | initialize(Context context) Initializes the Google Maps Android API so that its classes are ready for use.

[Expand] Inherited Methods

From class java.lang.Object

Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)

## Public Methods

#### public static int initialize (Context context)

Initializes the Google Maps Android API so that its classes are ready for use. If you are using `MapFragment` or `MapView` and have already obtained a (non-null) `GoogleMap` by calling `getMap()` on either of these classes, then it is not necessary to call this.

##### Parameters

context | Required to fetch the necessary API resources and code. Must not be null.

##### Returns

- A ConnectionResult error code.