migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Modules\RestaurantDelivery\Contracts;
|
||||
|
||||
interface MapsServiceInterface
|
||||
{
|
||||
/**
|
||||
* Get route between two points.
|
||||
*/
|
||||
public function getRoute(
|
||||
float $originLat,
|
||||
float $originLng,
|
||||
float $destLat,
|
||||
float $destLng,
|
||||
array $options = []
|
||||
): ?array;
|
||||
|
||||
/**
|
||||
* Get distance between two points.
|
||||
*/
|
||||
public function getDistance(
|
||||
float $originLat,
|
||||
float $originLng,
|
||||
float $destLat,
|
||||
float $destLng
|
||||
): ?array;
|
||||
|
||||
/**
|
||||
* Get ETA between two points.
|
||||
*/
|
||||
public function getETA(
|
||||
float $originLat,
|
||||
float $originLng,
|
||||
float $destLat,
|
||||
float $destLng
|
||||
): ?int;
|
||||
|
||||
/**
|
||||
* Geocode an address to coordinates.
|
||||
*/
|
||||
public function geocode(string $address): ?array;
|
||||
|
||||
/**
|
||||
* Reverse geocode coordinates to address.
|
||||
*/
|
||||
public function reverseGeocode(float $latitude, float $longitude): ?array;
|
||||
|
||||
/**
|
||||
* Calculate distance using Haversine formula.
|
||||
*/
|
||||
public function calculateHaversineDistance(
|
||||
float $lat1,
|
||||
float $lng1,
|
||||
float $lat2,
|
||||
float $lng2
|
||||
): float;
|
||||
|
||||
/**
|
||||
* Decode polyline to array of coordinates.
|
||||
*/
|
||||
public function decodePolyline(string $encodedPolyline): array;
|
||||
}
|
||||
Reference in New Issue
Block a user