修改图片分辨率

This commit is contained in:
wangdongsheng 2021-08-31 16:39:50 +08:00
parent add1d841fe
commit e4d6924c9e
4 changed files with 22 additions and 42 deletions

View File

@ -288,7 +288,7 @@ public class MainActivity extends BaseActivity {
FileOutputStream fileOutputStream = null;
if (is != null) {
//对apk进行保存
File file = new File(Constant.NABISCO_APk +"DTXB.apk");
File file = new File(Constant.NABISCO_APk +"NVINFO.apk");
fileOutputStream = new FileOutputStream(file);
byte[] buf = new byte[1024];
int ch;

View File

@ -398,6 +398,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
initMapShort();
}
}
//小图
private void initMapBig() {
isMapSlide = false;
@ -408,6 +409,7 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE);
cbMapType.setChecked(false);
}
//大图
private void initMapShort() {
isMapSlide = true;
@ -500,4 +502,5 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
removables.add(marker);
FileUtils.writeFile(paperFile.getAbsolutePath(), sb.toString(), true);
}
}

View File

@ -89,7 +89,6 @@ public class TestActivity extends BaseActivity {
removables = new ArrayList<>();//存储网络数据的marker数据线
markerLatlng = new ArrayList<>();//存储网络数据的marker数据线
initList(Constant.currentLocation);
initNewMarker();
}
@ -212,7 +211,6 @@ public class TestActivity extends BaseActivity {
}
markerLatlng.add(latLng);
switch (list.get(i).getType()) {
case 1://poi
BitmapDescriptor poiDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_bg1);
//poiDescriptor.getForager().setScale(50);
@ -237,7 +235,6 @@ public class TestActivity extends BaseActivity {
stationMarker.setTag(listBean);
removables.add(stationMarker);
stationMarker.setClickable(true);
break;
case 3://poi录像
BitmapDescriptor poiVideoDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_poi_video_bg1);
@ -262,7 +259,6 @@ public class TestActivity extends BaseActivity {
roadMarker.setTag(listBean);
removables.add(roadMarker);
roadMarker.setClickable(true);
break;
case 5://其他
BitmapDescriptor otherDescriptor = BitmapDescriptorFactory.fromResource(R.drawable.marker_other_bg1);
@ -291,6 +287,7 @@ public class TestActivity extends BaseActivity {
}
}
}
initNewMarker();
Message obtain = Message.obtain();
obtain.what = Constant.JOB_SEARCH_WORD;
obtain.obj = response;
@ -298,9 +295,7 @@ public class TestActivity extends BaseActivity {
} else {
Toast.makeText(TestActivity.this, response.getMessage(), Toast.LENGTH_SHORT).show();
}
}
@Override
public void onError(Throwable e, int id) {
dismissLoadingDialog();
@ -313,9 +308,7 @@ public class TestActivity extends BaseActivity {
protected void initView() {
super.initView();
TextureMapView tvMap = findViewById(R.id.iv_map);
tencentMap = tvMap.getMap();
//获取地图UI 设置对象
UiSettings uiSettings = tencentMap.getUiSettings();
//设置logo的大小
@ -325,33 +318,21 @@ public class TestActivity extends BaseActivity {
//uiSettings.setAllGesturesEnabled(false);
setLocMarkerStyle(LOCATION_TYPE_LOCATION_ROTATE_NO_CENTER);
// initCluster();
}
private void initNewMarker() {
//添加圆
LatLng mapCenterPoint = tencentMap.getCameraPosition().target;
circle = tencentMap.addCircle(new CircleOptions().
// 圆心
center(mapCenterPoint).
// 半径
radius(1000d).
// 圆的填充色为蓝色
fillColor(0xff0000ff).
// 描边的颜色为黑色
strokeColor(0xff000000).
// 描边宽度
strokeWidth(1).
// 可点击性
clickable(true).
// 可见性
visible(true).
// 层级
zIndex(2));
// 设置圆的填充色为红色
circle.setFillColor(0xFF00ff00);
center(mapCenterPoint).// 圆心
radius(1000d).// 半径
fillColor(0xff0000ff).// 圆的填充色为蓝色
strokeColor(0xff000000).// 描边的颜色为黑色
strokeWidth(1).// 描边宽度
clickable(true).// 可点击性
visible(true).// 可见性
zIndex(2));// 层级
circle.setFillColor(0xFF00ff00);// 设置圆的填充色为红色
// 移除圆
// circle.remove();
//中心点的圆
@ -361,14 +342,9 @@ public class TestActivity extends BaseActivity {
// 点与多点直接形成的交叉点
if (multiPoint!=null){
Geometry intersection = geometry.intersection(multiPoint);
//
String geometryType = intersection.getGeometryType();
//
Log.d("ddddd", "initNewMarker: " + geometryType);
if (intersection.getGeometryType().equals("Point")){}
Log.d("ddddd", "initNewMarker: " + intersection);
}
}
private void initCluster() {
@ -441,7 +417,6 @@ public class TestActivity extends BaseActivity {
private void setLocMarkerStyle(int style) {
tencentMap.setLocationSource(new MyTecentLocationSource(this));
tencentMap.setMyLocationEnabled(true);
MyLocationStyle locationStyle = new MyLocationStyle();
locationStyle = locationStyle.myLocationType(style);
//创建图标
@ -480,8 +455,6 @@ public class TestActivity extends BaseActivity {
0, //目标倾斜角
tencentLocation.getBearing())); //目标旋转角 0~360° (正北方为0)
tencentMap.animateCamera(cameraSigma);
}
}
}

View File

@ -16,8 +16,12 @@
android:id="@+id/camera"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cameraPictureSizeMaxArea="1200000"
app:cameraPictureSizeMaxWidth="1080"
app:cameraPictureSizeMaxArea="1000000"
app:cameraPictureSizeMinArea="600000"
app:cameraPictureSizeMaxWidth="960"
app:cameraPictureSizeMinHeight="720"
app:cameraPictureSizeMinWidth="720"
app:cameraPictureSizeMaxHeight="960"
android:keepScreenOn="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />