superdry/geolocation
Composer 安装命令:
composer require superdry/geolocation
包简介
Geolocation class that connects to Google Maps API
README 文档
README
Table of Contents
Installation
Install Composer
$ php -r "readfile('https://getcomposer.org/installer');" | php && php composer.phar install
$ composer require superdry/geolocation
Then include Composer's generated vendor/autoload.php to enable autoloading:
Usage
require 'vendor/autoload.php'; use superdry\geolocation\GeolocationService;
example
getCoordinates
Get latitude/longitude coordinates from address.
$street = 'Koningin Maria Hendrikaplein'; $streetNumber = '1'; $city = 'Gent'; $zip = '1'; $country = 'belgium'; $geolocation = new GeolocationService(); $result = $geolocation->getCoordinates( $street, $streetNumber, $city, $zip, $country );
getAddress
Get address from latitude/longitude coordinates.
$latitude = 51.0363935; $longitude = 3.7121008; $geolocation = new GeolocationService(); $result = $geolocation->getAddress( $latitude, $longitude );
Maintainers
License
MIT © SuperdryPlc
统计信息
- 总下载量: 1.51k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-02