PHP code example of h-ishak / ors-api-service

1. Go to this page and download the library: Download h-ishak/ors-api-service library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

h-ishak / ors-api-service example snippets


    $ORS = new OpenRouteService();
    $response = $ORS->getDirectionsWithGpx(OpenRouteService::PROFIL_DRIVING_CAR,[[8.681495,49.41461],[8.687872,49.420318]]);
    return $response;