本文整理汇总了Java中com.tencent.map.geolocation.TencentLocationRequest.create方法的典型用法代码示例。如果您正苦于以下问题:Java TencentLocationRequest.create方法的具体用法?Java TencentLocationRequest.create怎么用?Java TencentLocationRequest.create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.tencent.map.geolocation.TencentLocationRequest
的用法示例。
在下文中一共展示了TencentLocationRequest.create方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startLocation
import com.tencent.map.geolocation.TencentLocationRequest; //导入方法依赖的package包/类
public void startLocation(View view) {
// 创建定位请求
TencentLocationRequest request = TencentLocationRequest.create();
// 修改定位请求参数, 定位周期 3000 ms
request.setInterval(3000);
Looper otherLooper = mThread.getLooper();
if (mIndex == BG_THREAD) {
// 开始定位, 在 mThread 线程中
mLocationManager.requestLocationUpdates(request, this, otherLooper);
} else if (mIndex == MAIN_THREAD) {
// 开始定位, 在主线程中
mLocationManager.requestLocationUpdates(request, this);
}
updateLocationStatus("开始定位: " + request + ", 坐标系="
+ DemoUtils.toString(mLocationManager.getCoordinateType()));
}
示例2: startLocation
import com.tencent.map.geolocation.TencentLocationRequest; //导入方法依赖的package包/类
public void startLocation(View view) {
// 创建定位请求
final TencentLocationRequest request = TencentLocationRequest.create();
// 修改定位请求参数, 定位周期 3000 ms
request.setInterval(3000);
// 在 mThread 线程发起定位
mHandler.post(new Runnable() {
@Override
public void run() {
mLocationManager.requestLocationUpdates(request,
DemoThreadActivity2.this);
}
});
updateLocationStatus("开始定位: " + request + ", 坐标系="
+ DemoUtils.toString(mLocationManager.getCoordinateType()));
}
示例3: initView
import com.tencent.map.geolocation.TencentLocationRequest; //导入方法依赖的package包/类
@Override
public void initView() {
mBtnToolbarSend.setVisibility(View.VISIBLE);
setRlMapHeight(maxHeight);
mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);
mOritationSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ORIENTATION);
mLocationManager = TencentLocationManager.getInstance(this);
mLocationRequest = TencentLocationRequest.create();
mTencentMap = mMap.getMap();
mTencentSearch = new TencentSearch(this);
}
示例4: onCreate
import com.tencent.map.geolocation.TencentLocationRequest; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TencentLocationRequest request = TencentLocationRequest.create();
TencentLocationManager locationManager = TencentLocationManager
.getInstance(this);
int error = locationManager.requestLocationUpdates(request, this);
Log.i("test",
"MainActivity, onCreate, locationManager.requestLocationUpdates returns "
+ error);
}
示例5: startLocation
import com.tencent.map.geolocation.TencentLocationRequest; //导入方法依赖的package包/类
public void startLocation() {
TencentLocationRequest request = TencentLocationRequest.create();
request.setInterval(1000);
int errorNo = mLocationManager.requestLocationUpdates(request, this);
if (errorNo == 2) {
System.out.println("Key����ȷ�����������ã�");
}
}
示例6: startLocation
import com.tencent.map.geolocation.TencentLocationRequest; //导入方法依赖的package包/类
private void startLocation() {
TencentLocationRequest request = TencentLocationRequest.create();
request.setInterval(5000);
mLocationManager.requestLocationUpdates(request, this);
mRequestParams = request.toString() + ", 坐标系="
+ DemoUtils.toString(mLocationManager.getCoordinateType());
}
示例7: startLocation
import com.tencent.map.geolocation.TencentLocationRequest; //导入方法依赖的package包/类
public void startLocation(View view) {
// 创建定位请求
TencentLocationRequest request = TencentLocationRequest.create();
// 修改定位请求参数, 周期为 5000 ms
request.setInterval(5000);
// 开始定位
mLocationManager.requestLocationUpdates(request, this);
updateLocationStatus("开始定位: " + request + ", 坐标系="
+ DemoUtils.toString(mLocationManager.getCoordinateType()));
}
示例8: startLocation
import com.tencent.map.geolocation.TencentLocationRequest; //导入方法依赖的package包/类
public void startLocation(View view) {
// 创建定位请求
TencentLocationRequest request = TencentLocationRequest.create();
// 修改定位请求参数, 定位周期 3000 ms
request.setInterval(3000);
// 开始定位
mLocationManager.requestLocationUpdates(request, this);
updateLocationStatus("开始定位: " + request + ", 坐标系="
+ DemoUtils.toString(mLocationManager.getCoordinateType()));
}