Step 1. Add the JitPack repository to your build file
Add it in your root settings.gradle at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
Add it in your settings.gradle.kts at the end of repositories:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}
Add to pom.xml
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Add it in your build.sbt at the end of resolvers:
resolvers += "jitpack" at "https://jitpack.io"
Add it in your project.clj at the end of repositories:
:repositories [["jitpack" "https://jitpack.io"]]
Step 2. Add the dependency
dependencies {
implementation 'com.github.maptalks:proj4m:v1.0.5'
}
dependencies {
implementation("com.github.maptalks:proj4m:v1.0.5")
}
<dependency>
<groupId>com.github.maptalks</groupId>
<artifactId>proj4m</artifactId>
<version>v1.0.5</version>
</dependency>
libraryDependencies += "com.github.maptalks" % "proj4m" % "v1.0.5"
:dependencies [[com.github.maptalks/proj4m "v1.0.5"]]
proj 4 mapresty
+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs
+proj=longlat +datum=WGS84 +no_defs
+proj=longlat +dataum=GCJ02
+proj=merc +datum=GCJ02
+proj=longlat +datum=BD09
+proj=bmerc +datum=BD09
Proj4 proj = new Proj4("GCJ02", "+proj=merc +datum=GCJ02");
proj.forward(new double[]{120.0, 30.0});