下沉经纬度公用信息实体

Signed-off-by: 董宏宇 <martindhy@gmail.com>
This commit is contained in:
董宏宇
2021-09-17 17:40:45 +08:00
parent b8b5cf29a7
commit 4556727d23
185 changed files with 241 additions and 270 deletions

View File

@@ -1,9 +1,9 @@
package com.zhidao.roadcondition.model
import com.mogo.map.MogoLatLng
import com.mogo.eagle.core.data.map.MogoLatLng
fun LocationInfo.toLatLngPoint():MogoLatLng{
return MogoLatLng(latitude,longitude)
fun LocationInfo.toLatLngPoint(): com.mogo.eagle.core.data.map.MogoLatLng {
return com.mogo.eagle.core.data.map.MogoLatLng(latitude, longitude)
}
class LocationInfo {

View File

@@ -2,7 +2,7 @@ package com.zhidao.roadcondition.util
import android.util.Log
import com.mogo.commons.AbsMogoApplication
import com.mogo.map.MogoLatLng
import com.mogo.eagle.core.data.map.MogoLatLng
import com.mogo.map.location.MogoLocation
import com.mogo.map.search.geo.IMogoGeoSearchListener
import com.mogo.map.search.geo.MogoRegeocodeAddress
@@ -13,7 +13,7 @@ import com.zhidao.roadcondition.model.LocationInfo
private fun toLocInfo(
address: MogoRegeocodeAddress,
latlngPoint: MogoLatLng
latlngPoint: com.mogo.eagle.core.data.map.MogoLatLng
): LocationInfo {
return LocationInfo(
address.province,
@@ -110,7 +110,7 @@ class LocationUtil private constructor() {
//如果获取到的location address为空可以通过高德逆地理编码获得
fun geoCodeLocation(
latlngPoint: MogoLatLng,
latlngPoint: com.mogo.eagle.core.data.map.MogoLatLng,
locGeoCode: (((locInfo: LocationInfo) -> Unit)),
onError: ((msg: String) -> Unit)
) {