gcoord_dart 0.2.3

Dart native js
Flutter Android iOS web

A starting point for Dart libraries or applications.

Language: English

gcoord_dart #

.github/workflows/test.yml LICENSE pub support

gcoord_dart 是一个处理地理坐标系的 Dart 库,用来修正百度地图、高德地图及其它互联网地图坐标系不统一的问题。

本项目基于 hujiulong 的 gcoord 进行重写,实现了 WGS84, GCJ02, BD09 之间的转换。

Get started #

dependencies:
  gcoord_dart: 0.2.3

Usage #

import 'package:gcoord_dart/gcoord_dart.dart';

main() {
  final source = Position(114.0578659, 22.5431014);
  final result = transform(
      source,     // 源坐标
      CRS.GCJ02,  // 源坐标系
      CRS.WGS84   // 目标坐标系
  );
  print(result);  // { longitude: 114.05275829055421, latitude: 22.545827976721522 }
}
0
likes
70
pub points
0%
popularity

A starting point for Dart libraries or applications.

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

z375982123@gmail.com

License

MIT (LICENSE)

More

Packages that depend on gcoord_dart