栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Java

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

Java 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

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

完事
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/458881.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号