0.0.127 • Published 6 months ago
jr-util v0.0.127
安装说明
npm i jr-util
文档
经纬度转化
- wgs84ToGcj02 WGS84 转 GCJ02(火星坐标系 高德)
- wgs84ToBd09 WGS84 转 BD09
- bd09ToWgs84 BD-09 转 WGS-84
- gcj02ToWgs84 GCJ-02 转 WGS-84
- gcj02ToBd09 GCJ02 转 BD09(百度坐标系)
- bd09ToGcj02 BD-09 转 GCJ-02
- generateRandomPoints 这个区间内的随机坐标 (右上 坐下坐标)
- calcDistance 计算两个坐标距离 (lat1: number, lon1: number, lat2: number, lon2: number) return 米
常用正则
localStorage 简易存储
随机数
发布订阅模式解耦
- Emitter.on('name',(val)=>{})
- Emitter.emit('name',(val)=>{})
随机 GeoData 数据
- generatePolygonPointGeoJSON区域内随机生成点
- generatePolygonGeoJSON区域内随机生成多边形区域
格式化 html 数据
- formatRichText格式化 html 数据
创建一个动画效果
- animation(from: number, to: number, duration: number, onProgress: Function=>{value:1,percent:0.01})
颜色方法
- 将十六进制颜色转换为RGBA格式的颜色字符串 colorHexToRgba(hexColor: string, alpha: number = 1)
- 生成一个随机的颜色代码 colorRandom() -> #110033
umd 连接
- js 引用地址 打开地址
0.0.127
6 months ago
0.0.126
6 months ago
0.0.125
6 months ago
0.0.120
7 months ago
0.0.124
6 months ago
0.0.123
6 months ago
0.0.122
6 months ago
0.0.121
7 months ago
0.0.119
11 months ago
0.0.118
11 months ago
0.0.117
11 months ago
0.0.116
12 months ago
0.0.115
12 months ago
0.0.114
12 months ago
0.0.113
12 months ago
0.0.112
1 year ago
0.0.111
1 year ago
0.0.108
2 years ago
0.0.110
2 years ago
0.0.107
2 years ago
0.0.106
2 years ago
0.0.105
2 years ago
0.0.104
2 years ago
0.0.103
2 years ago
0.0.102
2 years ago
0.0.101
2 years ago
0.0.100
2 years ago
0.0.3
2 years ago
0.0.2
2 years ago
0.0.1
2 years ago