selezneva/geocoding

地理编码包

2.2.1 2017-12-22 21:45 UTC

This package is not auto-updated.

Last update: 2024-10-01 19:05:40 UTC


README

地理编码是将地址(如“1600 Amphitheatre Parkway, Mountain View, CA”)转换为地理坐标(如纬度37.423021和经度-122.083739)的过程,您可以使用这些坐标在地图上放置标记或定位地图。

反向地理编码是将地理坐标转换为可读地址的过程。Alt text

安装

此包可以通过 Composer 安装。

composer require selezneva/geocoding
sudo apt-get install redis-server
php artisan vendor:publish
in config/geocoding.php put your api key
in your ENV. file CACHE_DRIVER = redis
clear routes/web.php file to avoide routes conflicts
npm run dev
the project is available by "your-domain-name" in your browser 

如何使用功能

地理编码

http://your-domain-name.local/geo/?language=en&address=Paris&formatted=true

反向地理编码

http://your-domain-name.local/rev/?language=en&longitude=40.7155809802915&latitude=40.7155809802915&postalCode=true

许可证

MIT