//convert wgs84 to gcj02 LatLng wgs = new LatLng(31.1695941, 121.3926092); LatLng gcj = LatLngConvert(wgs, LatLngType.WGS84, LatLngType.GCJ02); //convert gcj02 back to wgs84 LatLng wgs2 = LatLngConvert(gcj, LatLngType.GCJ02, LatLngType.WGS84); //they are expect to nearly equal // wgs == wgs2
Please file feature requests and bugs at the issue tracker.
Copyright 2015 Michael Mitterer (email@example.com), IT-Consulting and Development Limited, Austrian Branch Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Add this to your package's pubspec.yaml file:
dependencies: latlngconv: ^0.0.1
You can install packages from the command line:
$ flutter packages get
Alternatively, your editor might support
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|0.1.0||Dec 28, 2018|
|0.0.1||Dec 27, 2018|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Feb 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
lib/latlngconv.dart. (-4.89 points)
lib/latlngconv.dart reported 10 hints, including:
line 71 col 6: Name non-constant identifiers using lowerCamelCase.
line 80 col 1: This function has a return type of 'LatLng', but doesn't end with a return statement.
line 80 col 8: Name non-constant identifiers using lowerCamelCase.
line 94 col 8: Name non-constant identifiers using lowerCamelCase.
line 106 col 8: Name non-constant identifiers using lowerCamelCase.
Maintain an example. (-10 points)
Create a short demo in the
example/ directory to show how to use this package.
Common filename patterns include
latlngconv.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.
Package is pre-v0.1 release. (-10 points)
While nothing is inherently wrong with versions of
0.0.*, it might mean that the author is still experimenting with the general direction of the API.
|Dart SDK||>=2.0.0-dev.68.0 <3.0.0|