PHP code example of bakeoff / geospatial

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

    

bakeoff / geospatial example snippets


$this->addBehavior('Bakeoff/Geospatial.Geospatial');

$data = $this->getRequest()->getData();
// Provide the POINT information as array with two elements
$data['position'] = array($position_x, $position_y);
$entity = $myTable->patchEntity($entity, $data);
$result = $myTable->save($entity);