nbolender/mapkit-web-snapshot
最新稳定版本:v1.0.0
Composer 安装命令:
composer require nbolender/mapkit-web-snapshot
包简介
Generate a signed URL to an Apple MapKit Web Snapshot.
关键字:
README 文档
README
PHP library that generates a signed URL to an Apple Maps Web Snapshot.
Install
composer require nbolender/mapkit-web-snapshot
Usage
use NBolender\MapKit\WebSnapshot; $teamId = 'XXXXXXXXXX'; // Apple Developer Team ID $keyId = 'XXXXXXXXXX'; // Apple MapKit Key ID $private_key = '-----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY-----'; // Contents of, or path to, private key file $center = 'One Apple Park Way, Cupertino, CA 95014'; // The center of the map, specified as either coordinates or an address // (Optional) A keyed array of any additional map parameters; JSON parameters will be automatically encoded $additional_parameters = [ 'z' => 12, 'size' => '300x300', 't' => 'standard', 'colorScheme' => 'dark', 'annotations' => [ [ 'color' => 'ff0000', 'markerStyle' => 'balloon', 'point' => 'center', ], ], ]; $url = WebSnapshot::signedURL($teamId, $keyId, $private_key, $center, $additional_parameters); echo $url;
Apple Documentation
License
This project is open-source software and licensed under the MIT license.
Credits
This project is developed by Nathan Bolender. Special thanks to Thomas Schoffelen and his MapKit JWT library, which was referenced for this project.
统计信息
- 总下载量: 5.55k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-02-03