jeroendesloovere/geolocation-bundle 问题修复 & 功能扩展

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

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

jeroendesloovere/geolocation-bundle

最新稳定版本:1.0.0

Composer 安装命令:

composer require jeroendesloovere/geolocation-bundle

包简介

This Geolocation Symony2 Bundle uses the geolocation-php-api class which finds latitude/longitude from an address or reverse using Google Maps API.

README 文档

README

This Geolocation Symony2 Bundle uses the geolocation-php-api class using Google Maps API which finds latitude/longitude from an address or reverse.

Usage

Installation

{
    "require": {
        "jeroendesloovere/geolocation-bundle": "1.0.*"
    }
}

Adding this code in your composer.json file will get the [latest :package_name Packagist package](https://packagist.org/packages/jeroendesloovere/geolocation-bundle using Composer.

and in app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...,
        new JeroenDesloovere\Bundle\GeolocationBundle\JeroenDesloovereGeolocationBundle()
    );
}

Example

$geolocation = $this->get('jeroendesloovere.geolocation');

// define result
$result = $geolocation::getCoordinates('Koningin Maria Hendrikaplein', '1', 'Gent', '9000', 'belgië');

// dump result
echo 'Coordinates = ' . $result['latitude'] . ', ' . $result['longitude'] . '<br/>';

// define result: @return array(label, street, streetNumber, city, cityLocal, zip, country, countryLabel)
$result = $geolocation::getAddress(51.0363935, 3.7121008);

// define result
echo 'Address = ' . $result['label'] . '<br/>';

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-06-09