java.lang.Object | |
↳ | com.google.android.gms.maps.GoogleMapOptions |
Defines configuration GoogleMapOptions for a GoogleMap
. These options can be used when
adding a map to your application programmatically (as opposed to via XML). If you are using a
MapFragment
, you can pass these options in using the static factory method
newInstance(GoogleMapOptions)
. If you are using a MapView
, you can
pass these options in using the constructor MapView(Context, GoogleMapOptions)
.
If you add a map using XML, then you can apply these options using custom XML tags.
[Expand]
Inherited Constants | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
android.os.Parcelable
|
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CREATOR |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new GoogleMapOptions object.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Specifies a the initial camera position for the map.
| |||||||||||
Specifies whether the compass should be enabled.
| |||||||||||
Creates a GoogleMapsOptions from the attribute set
| |||||||||||
Specifies a change to the initial map type.
| |||||||||||
Specifies whether rotate gestures should be enabled.
| |||||||||||
Specifies whether scroll gestures should be enabled.
| |||||||||||
Specifies whether tilt gestures should be enabled.
| |||||||||||
When using a
MapFragment , this flag specifies whether the lifecycle of the map
should be tied to the fragment's view or the fragment itself. | |||||||||||
Control whether the map view's surface is placed on top of its window.
| |||||||||||
Specifies whether the zoom controls should be enabled.
| |||||||||||
Specifies whether zoom gestures should be enabled.
|
[Expand]
Inherited Methods | |||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||||||||||||||||||||||||
From interface
android.os.Parcelable
|
Creates a new GoogleMapOptions object.
Specifies a the initial camera position for the map.
Specifies whether the compass should be enabled. See
setCompassEnabled(boolean)
for more details. The default value is
true
.
Creates a GoogleMapsOptions from the attribute set
Specifies whether rotate gestures should be enabled. See
setRotateGesturesEnabled(boolean)
for more details. The default value
is true
.
Specifies whether scroll gestures should be enabled. See
setScrollGesturesEnabled(boolean)
for more details. The default value
is true
.
Specifies whether tilt gestures should be enabled. See
setTiltGesturesEnabled(boolean)
for more details. The default value is
true
.
When using a MapFragment
, this flag specifies whether the lifecycle of the map
should be tied to the fragment's view or the fragment itself. The default value is
false
, tying the lifecycle of the map to the fragment.
Using the lifecycle of the fragment allows faster rendering of the map when the fragment is detached and reattached, because the underlying GL context is preserved. This has the cost that detaching the fragment, but not destroying it, will not release memory used by the map.
Using the lifecycle of a fragment's view means that a map is not reused when the fragment
is detached and reattached. This will cause the map to re-render from scratch, which can
take a few seconds. It also means that while a fragment is detached, and therefore has no
view, all GoogleMap
methods will throw NullPointerException
.
Control whether the map view's surface is placed on top of its window. See
setZOrderOnTop(boolean)
for more details. Note that this
will cover all other views that could appear on the map (e.g., the zoom controls, the my
location button).
Specifies whether the zoom controls should be enabled. See
setZoomControlsEnabled(boolean)
for more details. The default value is
true
.
Specifies whether zoom gestures should be enabled. See
setZoomGesturesEnabled(boolean)
for more details. The default value is
true
.