com.baidu.mapapi
类 MKLocationManager

java.lang.Object
  继承者 com.baidu.mapapi.MKLocationManager

public class MKLocationManager
extends java.lang.Object

定位服务类


字段摘要
static int MK_GPS_PROVIDER
           
static int MK_NETWORK_PROVIDER
           
 
方法摘要
 boolean disableProvider(int provider)
          禁用provider
 boolean enableProvider(int provider)
          启用provider
 Location getLocationInfo()
          返回定位信息
 Bundle getNoitifyInternal()
          返回通知间隔
 void removeUpdates(LocationListener listener)
          移除位置监听listener
 void requestLocationUpdates(LocationListener listener)
          注册位置监听listener
 boolean setNoitifyInternal(int iMaxSecond, int iMinSecond)
          设置通知间隔
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

MK_GPS_PROVIDER

public static final int MK_GPS_PROVIDER
另请参见:
常量字段值

MK_NETWORK_PROVIDER

public static final int MK_NETWORK_PROVIDER
另请参见:
常量字段值
方法详细信息

enableProvider

public boolean enableProvider(int provider)
启用provider

参数:
provider - MK_GPS_PROVIDER, MK_NETWORK_PROVIDER

disableProvider

public boolean disableProvider(int provider)
禁用provider

参数:
provider - MK_GPS_PROVIDER, MK_NETWORK_PROVIDER

setNoitifyInternal

public boolean setNoitifyInternal(int iMaxSecond,
                                  int iMinSecond)
设置通知间隔

参数:
iMaxSecond - 最大通知间隔,单位:秒
iMinSecond - 最小通知间隔,单位:秒

getNoitifyInternal

public Bundle getNoitifyInternal()
返回通知间隔

返回:
bundle,字段分别为"max", "min"

getLocationInfo

public Location getLocationInfo()
返回定位信息


requestLocationUpdates

public void requestLocationUpdates(LocationListener listener)
注册位置监听listener


removeUpdates

public void removeUpdates(LocationListener listener)
移除位置监听listener