本文整理匯總了Java中com.tencent.mapsdk.raster.model.CircleOptions類的典型用法代碼示例。如果您正苦於以下問題:Java CircleOptions類的具體用法?Java CircleOptions怎麽用?Java CircleOptions使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
CircleOptions類屬於com.tencent.mapsdk.raster.model包,在下文中一共展示了CircleOptions類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onLocationChanged
import com.tencent.mapsdk.raster.model.CircleOptions; //導入依賴的package包/類
@Override
public void onLocationChanged(TencentLocation tencentLocation, int i, String s) {
if (i == tencentLocation.ERROR_OK) {
LatLng latLng = new LatLng(tencentLocation.getLatitude(), tencentLocation.getLongitude());
if (myLocation == null) {
myLocation = mTencentMap.addMarker(new MarkerOptions().position(latLng).icon(BitmapDescriptorFactory.fromResource(R.mipmap.arm)).anchor(0.5f, 0.8f));
}
if (accuracy == null) {
accuracy = mTencentMap.addCircle(new CircleOptions().center(latLng).radius(tencentLocation.getAccuracy()).fillColor(0x440000ff).strokeWidth(0f));
}
myLocation.setPosition(latLng);
accuracy.setCenter(latLng);
accuracy.setRadius(tencentLocation.getAccuracy());
mTencentMap.animateTo(latLng);
mTencentMap.setZoom(16);
search(latLng);
//取消定位
mLocationManager.removeUpdates(MyLocationActivity.this);
} else {
LogUtils.sf("location failed:" + i);
}
}