aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/geocoder
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2024-06-14 21:08:21 -0600
committerIván Ávalos <avalos@disroot.org>2024-06-14 21:08:21 -0600
commit471dc4ca7b6cfd656cc2c04c526fe56ee538991c (patch)
tree4766fa7209e2eaab65269db456cf0436e6a64a49 /src/main/java/org/traccar/geocoder
parent447c7e15fcec8fc72d0457bb7dbf166cbea84acd (diff)
parent64528b96da4a742070d5845a876b07ca66ad0be3 (diff)
downloadtrackermap-server-471dc4ca7b6cfd656cc2c04c526fe56ee538991c.tar.gz
trackermap-server-471dc4ca7b6cfd656cc2c04c526fe56ee538991c.tar.bz2
trackermap-server-471dc4ca7b6cfd656cc2c04c526fe56ee538991c.zip
Merge tag 'v6.2'
Diffstat (limited to 'src/main/java/org/traccar/geocoder')
-rw-r--r--src/main/java/org/traccar/geocoder/PlusCodesGeocoder.java (renamed from src/main/java/org/traccar/geocoder/TestGeocoder.java)7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/geocoder/TestGeocoder.java b/src/main/java/org/traccar/geocoder/PlusCodesGeocoder.java
index 259f13c6c..5d003192f 100644
--- a/src/main/java/org/traccar/geocoder/TestGeocoder.java
+++ b/src/main/java/org/traccar/geocoder/PlusCodesGeocoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022 Anton Tananaev (anton@traccar.org)
+ * Copyright 2022 - 2024 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,9 +15,10 @@
*/
package org.traccar.geocoder;
+import com.google.openlocationcode.OpenLocationCode;
import org.traccar.database.StatisticsManager;
-public class TestGeocoder implements Geocoder {
+public class PlusCodesGeocoder implements Geocoder {
@Override
public void setStatisticsManager(StatisticsManager statisticsManager) {
@@ -25,7 +26,7 @@ public class TestGeocoder implements Geocoder {
@Override
public String getAddress(double latitude, double longitude, ReverseGeocoderCallback callback) {
- String address = String.format("Location %f, %f", latitude, longitude);
+ String address = new OpenLocationCode(latitude, longitude).getCode();
if (callback != null) {
callback.onSuccess(address);
return null;