diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2021-08-21 22:41:47 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2021-08-21 22:41:47 -0700 |
commit | 2744b305b48d1d1215e326b3858a18f32d485eef (patch) | |
tree | 79b4e44dc7fbc45dfa6f3c71f3be2a5a1aeb9c7c /src/main/java/org/traccar/geocoder/JsonGeocoder.java | |
parent | d47b07999d38881ec2a8fee3be6683d3e0a724d5 (diff) | |
download | trackermap-server-2744b305b48d1d1215e326b3858a18f32d485eef.tar.gz trackermap-server-2744b305b48d1d1215e326b3858a18f32d485eef.tar.bz2 trackermap-server-2744b305b48d1d1215e326b3858a18f32d485eef.zip |
Implement MapTiler geocoder
Diffstat (limited to 'src/main/java/org/traccar/geocoder/JsonGeocoder.java')
-rw-r--r-- | src/main/java/org/traccar/geocoder/JsonGeocoder.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/traccar/geocoder/JsonGeocoder.java b/src/main/java/org/traccar/geocoder/JsonGeocoder.java index 3cd5b596e..f20aa79d6 100644 --- a/src/main/java/org/traccar/geocoder/JsonGeocoder.java +++ b/src/main/java/org/traccar/geocoder/JsonGeocoder.java @@ -97,7 +97,9 @@ public abstract class JsonGeocoder implements Geocoder { } } - Main.getInjector().getInstance(StatisticsManager.class).registerGeocoderRequest(); + if (Main.getInjector() != null) { + Main.getInjector().getInstance(StatisticsManager.class).registerGeocoderRequest(); + } Invocation.Builder request = Context.getClient().target(String.format(url, latitude, longitude)).request(); |