LatTest.java 628 B

123456789101112131415161718192021222324252627
  1. package com.yihu.jw.test;
  2. import com.yihu.jw.util.common.LatitudeUtils;
  3. import org.junit.Test;
  4. import java.util.Map;
  5. /**
  6. * Created with IntelliJ IDEA.
  7. *
  8. * @Author: yeshijie
  9. * @Date: 2021/4/28
  10. * @Description:
  11. */
  12. public class LatTest {
  13. @Test
  14. public void testLat(){
  15. try {
  16. Map<String, String> json = LatitudeUtils.getGeocoderLatitude("厦门海沧区新阳海新阳光公寓15梯304");
  17. System.out.println("经度 : " + json.get("lng"));
  18. System.out.println("纬度 : " + json.get("lat"));
  19. }catch (Exception e ){
  20. e.printStackTrace();
  21. }
  22. }
  23. }