PHP code example of sapistudio / sapimaps

1. Go to this page and download the library: Download sapistudio/sapimaps 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/ */

    

sapistudio / sapimaps example snippets


composer 

use Sapistudio\SapiMaps\Handler;
$here = Handler::Here(Config::HERE_API_KEY());

$address =$here->revGeocode($coordinates);
// $coordinates can be an array of lat,lon , or passed as arguments

$mapRoute =$here->mapRoute($coordinates);
// $coordinates must be an array of coordinates. ex: [[lat1,lon1],[lat2,lon2]..etc]