[6.1.0][Opt]添加全览视角切换的日志
This commit is contained in:
@@ -874,22 +874,31 @@ class OverMapView @JvmOverloads constructor(
|
||||
private fun realDisplayOverView() {
|
||||
Log.d(TAG, "realDisplayOverView被调用")
|
||||
val linePointsLatLng = allPoints
|
||||
if (linePointsLatLng != null && linePointsLatLng.size > 1 && mLocation != null) {
|
||||
//圈定地图显示范围
|
||||
//存放经纬度
|
||||
val boundsBuilder = LatLngBounds.Builder()
|
||||
val sitePoints = sitePointsTmp
|
||||
if (!sitePoints.isNullOrEmpty()) {
|
||||
for (i in sitePoints.indices) {
|
||||
boundsBuilder.include(sitePoints[i])
|
||||
}
|
||||
} else {
|
||||
var isOnlyCarLocation = true
|
||||
//圈定地图显示范围
|
||||
//存放经纬度
|
||||
val boundsBuilder = LatLngBounds.Builder()
|
||||
val sitePoints = sitePointsTmp
|
||||
if (!sitePoints.isNullOrEmpty()) {
|
||||
for (i in sitePoints.indices) {
|
||||
boundsBuilder.include(sitePoints[i])
|
||||
}
|
||||
isOnlyCarLocation = false
|
||||
Log.d(TAG, "realDisplayOverView#地图视角包含站点")
|
||||
} else {
|
||||
if (linePointsLatLng != null && linePointsLatLng.size > 1) {
|
||||
for (i in linePointsLatLng.indices) {
|
||||
boundsBuilder.include(linePointsLatLng[i])
|
||||
}
|
||||
isOnlyCarLocation = false
|
||||
Log.d(TAG, "realDisplayOverView#地图视角包含自驾轨迹")
|
||||
}
|
||||
}
|
||||
if (!isOnlyCarLocation) {
|
||||
if (mLocation != null) {
|
||||
val currentLatLng = LatLng(mLocation!!.latitude, mLocation!!.longitude)
|
||||
boundsBuilder.include(currentLatLng)
|
||||
}
|
||||
val currentLatLng = LatLng(mLocation!!.latitude, mLocation!!.longitude)
|
||||
boundsBuilder.include(currentLatLng)
|
||||
val cameraPosition = CameraPosition.Builder().tilt(mTilt).build()
|
||||
//第二个参数为四周留空宽度
|
||||
if (mAMap != null) {
|
||||
@@ -903,7 +912,6 @@ class OverMapView @JvmOverloads constructor(
|
||||
)
|
||||
)
|
||||
mAMap!!.moveCamera(CameraUpdateFactory.newCameraPosition(cameraPosition))
|
||||
Log.d(TAG, "切换视角展示轨迹点和车!")
|
||||
}
|
||||
} else {
|
||||
if (mLocation != null && mAMap != null) {
|
||||
@@ -986,6 +994,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
for (i in coordinates.indices) {
|
||||
boundsBuilder.include(coordinates[i])
|
||||
}
|
||||
Log.d(TAG, "realIncludeSitePointsAndRefresh#地图视角包含站点")
|
||||
sitePointsTmp = coordinates
|
||||
isOnlyCarLocation = false
|
||||
} else {
|
||||
@@ -994,6 +1003,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
for (i in linePointsLatLng.indices) {
|
||||
boundsBuilder.include(linePointsLatLng[i])
|
||||
}
|
||||
Log.d(TAG, "realIncludeSitePointsAndRefresh#地图视角包含自驾轨迹")
|
||||
isOnlyCarLocation = false
|
||||
}
|
||||
}
|
||||
@@ -1096,6 +1106,7 @@ class OverMapView @JvmOverloads constructor(
|
||||
siteMarkerList = null
|
||||
}
|
||||
sitePointsTmp = null
|
||||
Log.d(TAG, "realClearSiteMarkers")
|
||||
}
|
||||
|
||||
private fun getBitmap(count: Int): Bitmap {
|
||||
|
||||
Reference in New Issue
Block a user