当前位置: 首页>>代码示例>>Java>>正文


Java TencentLocationRequest.create方法代码示例

本文整理汇总了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()));
	}
 
开发者ID:tencentlocation,项目名称:TencentLocationDemo,代码行数:20,代码来源:DemoThreadActivity.java

示例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()));
	}
 
开发者ID:tencentlocation,项目名称:TencentLocationDemo,代码行数:22,代码来源:DemoThreadActivity2.java

示例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);
}
 
开发者ID:starryxp,项目名称:LQRWeChat-master,代码行数:12,代码来源:MyLocationActivity.java

示例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);
}
 
开发者ID:cheyiliu,项目名称:test4XXX,代码行数:14,代码来源:MainActivity.java

示例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����ȷ�����������ã�");
	}
}
 
开发者ID:SuperMap,项目名称:iMobile_MessageQueue_Android,代码行数:9,代码来源:TencentLocation.java

示例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());
}
 
开发者ID:tencentlocation,项目名称:TencentLocationDemo,代码行数:9,代码来源:DemoMapActivity.java

示例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()));
	}
 
开发者ID:tencentlocation,项目名称:TencentLocationDemo,代码行数:15,代码来源:DemoStatusActivity.java

示例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()));
	}
 
开发者ID:tencentlocation,项目名称:TencentLocationDemo,代码行数:15,代码来源:DemoWgs84Activity.java


注:本文中的com.tencent.map.geolocation.TencentLocationRequest.create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。