To Use Tencent Map SDK, simply:
$ composer require khs1994/tencent-map
For latest commit version:
$ composer require khs1994/tencent-map @dev
<?php
require __DIR__.'/vendor/autoload.php';
use TencentMap\{
Error\TencentMapError,
TencentMap
};
const APP_KEY = 'GTOBZ-63LW6-7N6SX-MRRVB-LECGJ-XXXXX';
$map = TencentMap::tencentMap(APP_KEY);
// must try-catch
try {
$search = $map->search();
$search->setBoundaryRegion('北京');
$output = $search->exec('酒店');
} catch (TencentMapError $e) {
die($e->getMessage());
}
var_dump($output);
Powered By khs1994-docker/lnmp