defro / google-streetview
通过API提供的元数据请求,根据位置(地址)、全景ID或经纬度获取Google StreetView照片服务的静态图片URL
dev-master
2022-09-09 10:01 UTC
Requires
- php: >=8.1
- ext-json: *
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- phpunit/phpunit: ^8
- twig/twig: ^3.0
- vlucas/phpdotenv: ^2.4
This package is auto-updated.
Last update: 2024-09-09 14:24:49 UTC
README
此包可以使用Google的街景服务从任何地址到GPS坐标、位置或全景ID获取街景图像。以下是一个快速示例
$client = new \GuzzleHttp\Client(); $streetView = new \Defro\Google\StreetView\Api($client); $imgUrl = $streetView ->setApiKey('YOUR_GOOGLE_API_KEY') ->getImageUrlByLocation('Eiffel tower, Paris'); echo '<img src="' . $imgUrl . '" />';
文档
阅读如何安装、使用此包、定制照片位置以显示在文档页面上。
许可协议
MIT许可协议(MIT)。有关更多信息,请参阅许可文件。