Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -231,11 +231,12 @@ class MainServiceController {
|
|||||||
latitude: Double,
|
latitude: Double,
|
||||||
customSend: ((Boolean) -> Unit)? = null
|
customSend: ((Boolean) -> Unit)? = null
|
||||||
) {
|
) {
|
||||||
Log.d(TAG, " sendInformationMessage poiType = $poiType");
|
Log.d(TAG, " sendInformationMessage poiType = $poiType")
|
||||||
//删除测试数据
|
//删除测试数据
|
||||||
var locationInfo = LocationUtil.getInstance().getLocationInfo();
|
var locationInfo = LocationUtil.getInstance().getLocationInfo()
|
||||||
if (locationInfo.address.isNullOrEmpty()) {
|
if (locationInfo.address.isNullOrEmpty()) {
|
||||||
Log.d(TAG, " sendInformationMessage locationInfo.address = $locationInfo.address");
|
Log.d(TAG, " sendInformationMessage locationInfo.address = $locationInfo.address")
|
||||||
|
trackUploadGeo(1)
|
||||||
geoLocation(type, url, locationInfo, isCustom,trafficInfoType, isShare, customSend,poiType,mainInfoId,longitude,latitude)
|
geoLocation(type, url, locationInfo, isCustom,trafficInfoType, isShare, customSend,poiType,mainInfoId,longitude,latitude)
|
||||||
} else {
|
} else {
|
||||||
postInformationMessage(
|
postInformationMessage(
|
||||||
@@ -271,8 +272,10 @@ class MainServiceController {
|
|||||||
//转换失败的情况下再重试一次
|
//转换失败的情况下再重试一次
|
||||||
geoRetryed = if (!geoRetryed) {
|
geoRetryed = if (!geoRetryed) {
|
||||||
geoLocation(type, url, locationInfo, isCustom, trafficInfoType, isShare, customSend, poiType,mainInfoId,longitude,latitude)
|
geoLocation(type, url, locationInfo, isCustom, trafficInfoType, isShare, customSend, poiType,mainInfoId,longitude,latitude)
|
||||||
|
|
||||||
true
|
true
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -311,4 +314,11 @@ class MainServiceController {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//上传
|
||||||
|
private fun trackUploadGeo(type: Int) {
|
||||||
|
trackNormalEvent(
|
||||||
|
CarNet_Geo, mutableMapOf("type" to type)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -33,6 +33,8 @@ const val CarNet_Servers_Upload:String = "CarNet_Servers_Upload" //上传服务
|
|||||||
const val CarNet_Voice_Search:String = "CarNet_Voice_Search" //语音搜索路况,type=1 成功,type=2 失败
|
const val CarNet_Voice_Search:String = "CarNet_Voice_Search" //语音搜索路况,type=1 成功,type=2 失败
|
||||||
const val CarNet_USER_SHOW:String = "CarNet_user_show" //情报展示时长,showtime 加载列表时长
|
const val CarNet_USER_SHOW:String = "CarNet_user_show" //情报展示时长,showtime 加载列表时长
|
||||||
const val CarNet_USER_LOAD:String = "CarNet_user_load" //情报加载时长,type=1 视频,2图片
|
const val CarNet_USER_LOAD:String = "CarNet_user_load" //情报加载时长,type=1 视频,2图片
|
||||||
|
const val CarNet_Geo:String = "CarNet_Geo_Location" //上传服务端, type=1开始 ,type=2 成功, type=3 失败
|
||||||
|
|
||||||
|
|
||||||
const val CarNet_live_broadcast = "CarNet_live_broadcast" // 地图页面点击直播(在线可直播车机)
|
const val CarNet_live_broadcast = "CarNet_live_broadcast" // 地图页面点击直播(在线可直播车机)
|
||||||
//自定义埋点
|
//自定义埋点
|
||||||
|
|||||||
@@ -183,12 +183,14 @@ class LocationUtil private constructor() {
|
|||||||
geocoderSearch.setOnGeocodeSearchListener(object : GeocodeSearch.OnGeocodeSearchListener {
|
geocoderSearch.setOnGeocodeSearchListener(object : GeocodeSearch.OnGeocodeSearchListener {
|
||||||
override fun onRegeocodeSearched(p0: RegeocodeResult?, p1: Int) {
|
override fun onRegeocodeSearched(p0: RegeocodeResult?, p1: Int) {
|
||||||
if (p1 == 1000) {
|
if (p1 == 1000) {
|
||||||
|
trackUploadGeo(2);
|
||||||
var regeocodeAddress = p0?.regeocodeAddress
|
var regeocodeAddress = p0?.regeocodeAddress
|
||||||
regeocodeAddress?.let {
|
regeocodeAddress?.let {
|
||||||
var locInfo = regeocodeAddress.toLocInfo(regeocodeAddress, latlngPoint)
|
var locInfo = regeocodeAddress.toLocInfo(regeocodeAddress, latlngPoint)
|
||||||
locGeoCode.invoke(locInfo)
|
locGeoCode.invoke(locInfo)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
trackUploadGeo(3);
|
||||||
onError.invoke("geoCode -> $p1")
|
onError.invoke("geoCode -> $p1")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -198,6 +200,13 @@ class LocationUtil private constructor() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//上传
|
||||||
|
private fun trackUploadGeo(type: Int) {
|
||||||
|
trackNormalEvent(
|
||||||
|
CarNet_Geo, mutableMapOf("type" to type)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
fun getSpeed():Float{
|
fun getSpeed():Float{
|
||||||
return speed
|
return speed
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user