kotlin DLLatLngUtil 经纬度数据处理工具的使用 坐标系转换 度分秒转换

kotlin DLLatLngUtil 经纬度数据处理工具的使用 坐标系转换 度分秒转换,第1张

kotlin DLLatLngUtil 经纬度数据处理工具的使用 坐标系转换 度分秒转换

kotlin DLLatLngUtil 经纬度数据处理工具的使用 坐标系转换 度分秒转换
  • 前言
  • 使用
  • 实例
  • 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(): Double
Github

https://github.com/D10NGYANG/DLLatLngUtil

完事

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5434396.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-11
下一篇 2022-12-11

发表评论

登录后才能评论

评论列表(0条)

保存