PHP code example of m165437 / igc2kmz-php

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

    

m165437 / igc2kmz-php example snippets


$igc2kmz = new Igc2Kmz('vendor/bin/igc2kmz');

public function __construct(Igc2Kmz $igc2kmz)
{
    $this->igc2kmz = $igc2kmz;
}

return [
    'binary' => 'alternative/path/igc2kmz'
];

$igc2kmz
    ->igc('path/to/flight.igc')
    ->output('path/to/output.kmz')
    ->run();

$igc2kmz
    ->igc('path/to/flight.igc')
    ->output('path/to/output.kmz')
    ->pilotName('Jane Doe')
    ->gliderType('NOVA Mentor 5')
    ->run();

$igc2kmz
    ->igc('path/to/flight.igc')
    ->output('path/to/output.kmz')
    ->addPhoto('https://domain.tld/photo_1.jpg', 'Comment on first image')
    ->addPhoto('https://domain.tld/photo_2.jpg', 'Comment on second image')
    ->run();

$process = $igc2kmz
    ->igc('path/to/flight.igc')
    ->output('path/to/output.kmz')
    ->build();

// do stuff with the process

$igc2kmz
    ->run($process);
bash
$ composer