Address.php 866 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace Joypack\Tencent\Map\Bundle;
  3. use Joypack\Tencent\Map\Response;
  4. use Joypack\Tencent\Map\Bundle;
  5. /**
  6. * 地址解析(地址转坐标)
  7. * 本接口提供由地址描述到所述位置坐标的转换
  8. * 与逆地址解析的过程正好相反。
  9. */
  10. class Address extends Bundle
  11. {
  12. /**
  13. * 地址解析(地址转坐标)
  14. * @param boolean $using_sig 使用签名方式校验
  15. * @return Response
  16. */
  17. public function request($using_sig=false)
  18. {
  19. $uri = '/ws/geocoder/v1';
  20. if($using_sig) {
  21. $this->option->setSig($uri);
  22. }
  23. $data = $this->option->getAll();
  24. //$this->request->logger->print($data, true);
  25. $this->request->uri($uri);
  26. $this->request->query($data);
  27. return $this->request->get();
  28. }
  29. }