定制 juskiewicz/geolocation 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

juskiewicz/geolocation

Composer 安装命令:

composer require juskiewicz/geolocation

包简介

Biblioteka obsługująca Geocoding API firmy Google

README 文档

README

Latest Stable Version License

Klasa Geolocation łączy się z Google Maps API i wyszukuje współrzędne lub adres.

Instalacja

Composer

Za pomocą Composer możesz zawsze pobrać najnowszą wersję.

composer require juskiewicz/geolocation

Sprawdź w Packagist.

Przykłady użycia

getCoordinatesByObject

Pobiera obiekt Coordinates za pomocą obiektu Address.

$streetName = 'Maltańska';
$streetNumber = '1',
$postalCode = '61-131',
$locality = 'Poznań',
$country = 'Polska',

$address = new Address(
    null,
    $streetName,
    $streetNumber,
    $postalCode,
    $locality,
    $country
);

$geolocation = new Geolocation('YOUR_GOOGLE_MAPS_API_KEY', 'pl', 'pl');
$coordinates = $coordinates = $geolocation->getCoordinatesByObject($address);

// Współrzędne
$latitude = $coordinates->getLatitude();
$longitude = $coordinates->getLongitude();
$tablica = $coordinates->toArray();

getCoordinatesByString

Pobiera obiekt Coordinates za pomocą stringu.

$address = "Maltańska 1, 61-131 Poznań, Polska";
$geolocation = new Geolocation('YOUR_GOOGLE_MAPS_API_KEY', 'pl', 'pl');
$coordinates = $geolocation->getCoordinatesByString($address);

getAddress

Pobiera obiekt Address za pomocą obiektu Coordinates.

$latitude = 51.8990865;
$longitude = 17.7863699;

$coordinates = new Coordinates($latitude, $longitude);

$geolocation = new Geolocation('YOUR_GOOGLE_MAPS_API_KEY','pl', 'pl');
$address = $geolocation->getAddress($coordinates);

Sprawdź źródło klasy Geolocation. Sprawdź źródło klasy Address. Sprawdź źródło klasy Coordinates.

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-11-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固