spistudio/sapimaps

地图API提供商

3.0.4 2020-06-18 09:46 UTC

This package is auto-updated.

Last update: 2024-09-12 07:42:24 UTC


README

在控制台中执行以下命令

composer require sapistudio/sapimaps

用法

在此处启动提供商

use Sapistudio\SapiMaps\Handler;
$here = Handler::Here(Config::HERE_API_KEY());

获取反向地理编码地址

$address =$here->revGeocode($coordinates);
// $coordinates can be an array of lat,lon , or passed as arguments

获取带有路线绘制的静态地图图片URL

$mapRoute =$here->mapRoute($coordinates);
// $coordinates must be an array of coordinates. ex: [[lat1,lon1],[lat2,lon2]..etc]