Class LatLngBounds

java.lang.Object
com.baidu.mapapi.model.LatLngBounds
All Implemented Interfaces:
android.os.Parcelable

public final class LatLngBounds extends Object implements android.os.Parcelable
地理范围数据结构, 由西南以及东北坐标点确认
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    地理范围构造器

    Nested classes/interfaces inherited from interface android.os.Parcelable

    android.os.Parcelable.ClassLoaderCreator<T extends Object>, android.os.Parcelable.Creator<T extends Object>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final android.os.Parcelable.Creator<LatLngBounds>
     
    final LatLng
    该地理范围东北坐标
    final LatLng
    该地理范围西南坐标

    Fields inherited from interface android.os.Parcelable

    CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    LatLngBounds(android.os.Parcel in)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    返回该地理范围的互补地理范围
    boolean
    判断该地理范围是否包含一个地理位置
    int
     
    获取该地理范围的中心地理坐标
    void
    setCenter(LatLng _center)
    Deprecated.
    V8.1及之后废弃
     
    void
    writeToParcel(android.os.Parcel dest, int flags)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • northeast

      public final LatLng northeast
      该地理范围东北坐标
    • southwest

      public final LatLng southwest
      该地理范围西南坐标
    • CREATOR

      public static final android.os.Parcelable.Creator<LatLngBounds> CREATOR
  • Constructor Details

    • LatLngBounds

      protected LatLngBounds(android.os.Parcel in)
  • Method Details

    • contains

      public boolean contains(LatLng point)
      判断该地理范围是否包含一个地理位置
      Parameters:
      point - 被判断的地理位置
      Returns:
      该地理范围是否包含一个地理位置
    • setCenter

      @Deprecated public void setCenter(LatLng _center)
      Deprecated.
      V8.1及之后废弃
      设置该地理范围的中心地理坐标
      Parameters:
      _center - 该地理范围的中心地理坐标
    • getCenter

      public LatLng getCenter()
      获取该地理范围的中心地理坐标
      Returns:
      该地理范围的中心地理坐标
    • complementBounds

      public LatLngBounds complementBounds()
      返回该地理范围的互补地理范围
      Returns:
      互补地理范围
    • describeContents

      public int describeContents()
      Specified by:
      describeContents in interface android.os.Parcelable
    • writeToParcel

      public void writeToParcel(android.os.Parcel dest, int flags)
      Specified by:
      writeToParcel in interface android.os.Parcelable
    • toString

      public String toString()
      Overrides:
      toString in class Object