PHP code example of luffyzhao / php-amap-web
1. Go to this page and download the library: Download luffyzhao/php-amap-web 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/ */
luffyzhao / php-amap-web example snippets
use \luffyzhao\amapWeb\Georegeo;
$data = [['name' => '深圳市南山区科苑北路科兴科学园A4栋501室'], ['name' => '深圳市光明新区高新路研祥智谷研发楼']];
$geore = new Georegeo($data, ['addressKey' => 'name']);
$geore->setAmapKey('your key')->solve();
print_r($geore->toArray());
composer