PHP code example of alphathinkyyl / tianditu-sdk

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

    

alphathinkyyl / tianditu-sdk example snippets


use Tianditu\TiandituService;

public function search(TiandituService $sdk)
{
    $data = $sdk->place()->searchNormal('天安门');
    return response()->json($data);
}
bash
php artisan vendor:publish --tag=config