|
|
|
@ -0,0 +1,32 @@ |
|
|
|
<?php |
|
|
|
|
|
|
|
|
|
|
|
namespace App\JsonRpc; |
|
|
|
|
|
|
|
use Hyperf\Di\Annotation\Inject; |
|
|
|
use Hyperf\RpcServer\Annotation\RpcService; |
|
|
|
/** |
|
|
|
*@RpcService(name="LocationService", protocol="jsonrpc-http", server="jsonrpc-http", publishTo="") |
|
|
|
* Class LocationService |
|
|
|
* @package App\JsonRpc |
|
|
|
*/ |
|
|
|
class LocationService implements LocationServiceInterface |
|
|
|
{ |
|
|
|
/** |
|
|
|
* @Inject |
|
|
|
* @var \App\Service\v3\Interfaces\LocationServiceInterface |
|
|
|
*/ |
|
|
|
protected $locationService; |
|
|
|
|
|
|
|
/** |
|
|
|
* @param $lng1 |
|
|
|
* @param $lat1 |
|
|
|
* @param $lng2 |
|
|
|
* @param $lat2 |
|
|
|
*/ |
|
|
|
public function getDistanceByTencent($lng1, $lat1, $lng2, $lat2) |
|
|
|
{ |
|
|
|
// TODO: Implement getDistanceByTencent() method.
|
|
|
|
return $this->locationService->getDistanceByTencent($lng1, $lat1, $lng2, $lat2); |
|
|
|
} |
|
|
|
} |