LatLngBounds.Builder | Android Developers

Quicknav Quicknav
Links

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

Android Sites

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

Languages
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: Ctors | Methods | Inherited Methods | [Expand All]
public static final class

# LatLngBounds.Builder

extends Object

java.lang.Object
↳ | com.google.android.gms.maps.model.LatLngBounds.Builder

## Class Overview

This is a builder that is able to create a minimum bound based on a set of LatLng points.

## Summary

Public Constructors
| LatLngBounds.Builder()

Public Methods
LatLngBounds | build() Creates the LatLng bounds.
LatLngBounds.Builder | include(LatLng point) Includes this point for building of the bounds.

[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 Constructors

#### public LatLngBounds.Builder ()

## Public Methods

#### public LatLngBounds build ()

Creates the LatLng bounds.

##### Throws

IllegalStateException | if no points have been included.

#### public LatLngBounds.Builder include (LatLng point)

Includes this point for building of the bounds. The bounds will be extended in a minimum way to include this point.

More precisely, it will consider extending the bounds both in the eastward and westward directions (one of which may wrap around the world) and choose the smaller of the two. In the case that both directions result in a LatLngBounds of the same size, this will extend it in the eastward direction. For example, adding points (0, -179) and (1, 179) will create a bound crossing the 180 longitude.

##### Parameters

point | A `LatLng` to be included in the bounds.

##### Returns

- This builder object with a new point added.