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.
32 lines
779 B
32 lines
779 B
<?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);
|
|
}
|
|
}
|