rezzza/google-geocoder 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

rezzza/google-geocoder

最新稳定版本:v2.1

Composer 安装命令:

composer require rezzza/google-geocoder

包简介

Easy wrap Google geocoder web service

README 文档

README

Build Status Simple lib to wrap Google geocoder Web Service

Installation

$ composer require rezzza/google-geocoder

Usage

You should build on your own the repository :

$googleAddressRepository = new Rezzza\GoogleGeocoder\GoogleAddressRepository(
    new Rezzza\GoogleGeocoder\GoogleGeocodeClient(
        new Ivory\HttpAdapter\CurlHttpAdapter(),
        'YOUR_GOOGLE_API_KEY'
    ),
    new Rezzza\GoogleGeocoder\Model\AddressFactory
);

Then you can use all methods available in the repository :

  • findByPlaceIdWithLanguage($placeId, $language)
  • findByCoordinatesWithLanguage($latitude, $longitude, $language)
  • findByAddressWithLanguage($address, $language)
  • findByLocalityAndCountryCodeWithLanguage($locality, $countryCode, $language)
  • findByLocalityAndCountryCodeAndAministrativeAreaWithLanguage($locality, $countryCode, $administrativeArea, $language)

All these methods will return a Rezzza\GoogleGeocoder\Model\AddressCollection except the first one that will return directly a Rezzza\GoogleGeocoder\Model\Address (as a placeId is uniq).

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 5
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-10