|
@@ -39,6 +39,11 @@ public class TencentLocationHandler implements LocationHandler {
|
|
|
*/
|
|
|
private static final String LOCATION2ADDRESS_URL = "https://apis.map.qq.com/ws/geocoder/v1/?location=%s&key=%s";
|
|
|
|
|
|
+ /**
|
|
|
+ * 地址解析接口地址
|
|
|
+ */
|
|
|
+ private static final String ADDRESS_ANALYSE_URL = "https://apis.map.qq.com/ws/geocoder/v1/?address=%s&key=%s";
|
|
|
+
|
|
|
private final String key;
|
|
|
|
|
|
public TencentLocationHandler(@NonNull String key) {
|
|
@@ -127,6 +132,11 @@ public class TencentLocationHandler implements LocationHandler {
|
|
|
.collect(Collectors.toList());
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Address analyse(@NonNull String address) {
|
|
|
+ return this.locate(ADDRESS_ANALYSE_URL, address);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public Address ip2address(@NonNull String ip) {
|
|
|
return this.locate(IP2ADDRESS_URL, ip);
|