fix: 修改多线数据在拍照界面不渲染的问题
This commit is contained in:
@@ -9,8 +9,8 @@ android {
|
|||||||
applicationId "com.navinfo.outdoor"
|
applicationId "com.navinfo.outdoor"
|
||||||
minSdkVersion 22
|
minSdkVersion 22
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 14
|
versionCode 16
|
||||||
versionName "8.220308"
|
versionName "8.220310"
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
lintOptions {
|
lintOptions {
|
||||||
|
|||||||
@@ -75,6 +75,8 @@ import com.tencent.tencentmap.mapsdk.maps.model.PolylineOptions;
|
|||||||
import com.umeng.commonsdk.internal.crash.UMCrashManager;
|
import com.umeng.commonsdk.internal.crash.UMCrashManager;
|
||||||
import com.umeng.umcrash.UMCrash;
|
import com.umeng.umcrash.UMCrash;
|
||||||
import com.vividsolutions.jts.geom.Geometry;
|
import com.vividsolutions.jts.geom.Geometry;
|
||||||
|
import com.vividsolutions.jts.geom.LineString;
|
||||||
|
import com.vividsolutions.jts.geom.MultiLineString;
|
||||||
import com.wanghong.webpnative.WebPNative;
|
import com.wanghong.webpnative.WebPNative;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
@@ -452,9 +454,17 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
|
|
||||||
private void initLine() {
|
private void initLine() {
|
||||||
if (geoWkt != null) {
|
if (geoWkt != null) {
|
||||||
|
List<LineString> lineStringList = new ArrayList<>();
|
||||||
String geo = Geohash.getInstance().decode(geoWkt);
|
String geo = Geohash.getInstance().decode(geoWkt);
|
||||||
Geometry geometry = GeometryTools.createGeometry(geo);
|
Geometry geometry = GeometryTools.createGeometry(geo);
|
||||||
if (geometry.getGeometryType().equals("LineString")) {//线
|
if ("MultiLineString".equals(geometry.getGeometryType())) {
|
||||||
|
MultiLineString multiLineString = (MultiLineString) geometry;
|
||||||
|
for (int i = 0; i < multiLineString.getNumGeometries(); i++) {
|
||||||
|
lineStringList.add((LineString) multiLineString.getGeometryN(i));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
lineStringList.add((LineString) geometry);
|
||||||
|
}
|
||||||
BitmapDescriptor bitmapLine = null;
|
BitmapDescriptor bitmapLine = null;
|
||||||
if (type != 0) {
|
if (type != 0) {
|
||||||
if (type == 3) {//poi录像
|
if (type == 3) {//poi录像
|
||||||
@@ -463,7 +473,8 @@ public class PicturesActivity extends BaseActivity implements View.OnClickListen
|
|||||||
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_arrows);
|
bitmapLine = BitmapDescriptorFactory.fromResource(R.drawable.poi_video_arrows);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<LatLng> latLineString = GeometryTools.getLatLags(geo);
|
for (LineString lineString: lineStringList) {
|
||||||
|
List<LatLng> latLineString = GeometryTools.getLatLags(lineString.toString());
|
||||||
assert latLineString != null;
|
assert latLineString != null;
|
||||||
startLatLine = latLineString.get(0);
|
startLatLine = latLineString.get(0);
|
||||||
endLatLine = latLineString.get(latLineString.size() - 1);
|
endLatLine = latLineString.get(latLineString.size() - 1);
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
package com.navinfo.outdoor.http;
|
package com.navinfo.outdoor.http;
|
||||||
|
|
||||||
public class HttpInterface {
|
public class HttpInterface {
|
||||||
public static final String IP1 = "http://172.23.139.127:9999/m4";//测试接口
|
public static final String IP = "http://172.23.139.129:9999/m4";//测试接口
|
||||||
public static final String IP = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
|
public static final String IP1 = "http://dtxbmaps.navinfo.com/dtxb/m4";//正式接口
|
||||||
public static final String USER_PATH = "/user/";//我的
|
public static final String USER_PATH = "/user/";//我的
|
||||||
public static final String MSG_LIST_PATH = "/msgList/";//发现
|
public static final String MSG_LIST_PATH = "/msgList/";//发现
|
||||||
public static final String USER_LOGIN_PATH = "/userlogin/";//登录
|
public static final String USER_LOGIN_PATH = "/userlogin/";//登录
|
||||||
|
|||||||
Reference in New Issue
Block a user