You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
779 B

  1. <?php
  2. namespace App\JsonRpc;
  3. use Hyperf\Di\Annotation\Inject;
  4. use Hyperf\RpcServer\Annotation\RpcService;
  5. /**
  6. *@RpcService(name="LocationService", protocol="jsonrpc-http", server="jsonrpc-http", publishTo="")
  7. * Class LocationService
  8. * @package App\JsonRpc
  9. */
  10. class LocationService implements LocationServiceInterface
  11. {
  12. /**
  13. * @Inject
  14. * @var \App\Service\v3\Interfaces\LocationServiceInterface
  15. */
  16. protected $locationService;
  17. /**
  18. * @param $lng1
  19. * @param $lat1
  20. * @param $lng2
  21. * @param $lat2
  22. */
  23. public function getDistanceByTencent($lng1, $lat1, $lng2, $lat2)
  24. {
  25. // TODO: Implement getDistanceByTencent() method.
  26. return $this->locationService->getDistanceByTencent($lng1, $lat1, $lng2, $lat2);
  27. }
  28. }