定制 cvilleger/geo-gouv 二次开发

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

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

cvilleger/geo-gouv

Composer 安装命令:

composer require cvilleger/geo-gouv

包简介

Simple Geo Gouv Library. Query geographic reference data.

关键字:

README 文档

README

GitHub Actions Workflow Status Packagist Version Packagist Downloads GitHub License

cvilleger/geo-gouv

About

Query geographic reference data using offline data from 🇫🇷 Gouv administrative division API.

Features

  • Query all departments data
  • Query all municipalities by department code

Requirements

  • PHP 8.5 or above

Installation

Install this package as a dependency using Composer.

  composer require cvilleger/geo-gouv

Note that this package has zero composer dependencies.

Usage

Retrieve departments

use Cvilleger\GeoGouv\Client;

print_r(new Client()->getDepartements()[0]);

/*
Cvilleger\GeoGouv\Model\Departement Object
(
    [nom] => Ain
    [code] => 01
    [codeRegion] => 84
    [coordinates] => 46.06551335, 5.28478031423462
    [region] => Cvilleger\GeoGouv\Model\Region Object
        (
            [nom] => Auvergne-Rhône-Alpes
            [code] => 84
        )

)
*/

Retrieve municipalities by department code

use Cvilleger\GeoGouv\Client;

print_r(new Client()->getCommunesByDepartementCode('01')[0]);

/*
(
    [nom] => L'Abergement-Clémenciat
    [code] => 01001
    [codesPostaux] => Array
        (
            [0] => 01400
        )

    [coordinates] => Array
        (
            [0] => 4.9306
            [1] => 46.1517
        )

    [surface] => 1564.5
    [population] => 832
    [departement] => Cvilleger\GeoGouv\Model\CommuneDepartement Object
        (
            [nom] => Ain
            [code] => 01
        )

    [region] => Cvilleger\GeoGouv\Model\CommuneRegion Object
        (
            [nom] => Auvergne-Rhône-Alpes
            [code] => 84
        )
)
*/

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-27

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固