- 前言
- 使用
- 实例
- Github
- 完事
常用的经纬度数据的处理逻辑封装。
使用1 Add it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
2 Add the dependency
dependencies {
// 经纬度工具
implementation 'com.github.D10NGYANG:DLLatLngUtil:1.1'
}
3 混淆
-keep class com.d10ng.latlnglib.** {*;}
-dontwarn com.d10ng.latlnglib.**
实例
fun DLatLng.convert(from: CoordinateSystemType, to: CoordinateSystemType): DLatLng fun Double.isEastLongitude(): Boolean fun Double.isNorthLatitude(): Boolean fun Double.toLongitudeNoPre(): Double fun Double.toLatitudeNoPre(): Double fun Double.toFullLongitude(isEast: Boolean, isPositive: Boolean = true): Double fun Double.toFullLatitude(isNorth: Boolean, isPositive: Boolean = true): Double fun Double.toLatLngString(isLongitude: Boolean, pattern: String = "CHFd°m′S.ss″"): String fun Double.toLongitudeString(pattern: String = "CHFd°m′S.ss″"): String fun Double.toLatitudeString(pattern: String = "CHFd°m′S.ss″"): String fun String.toLatOrLng(pattern: String): Double fun String.toLongitude(pattern: String): Double fun String.toLatitude(pattern: String): Double fun Double.ddmmpmmmm2LatOrLng(): DoubleGithub
https://github.com/D10NGYANG/DLLatLngUtil
完事


