marleysidapple / geoaddress by marleysidapple

Geo-address api for laravel. Get latitude and longitude from location
23
1
2
Package Data
Maintainer Username: marleysidapple
Maintainer Contact: bsiddhartha25@gmail.com (Siddhartha)
Package Create Date: 2016-09-08
Package Last Update: 2016-09-08
Language: PHP
License: MIT
Last Refreshed: 2024-11-23 03:13:29
Package Statistics
Total Downloads: 23
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 2
Total Forks: 1
Total Open Issues: 0

Google geoaddress coordinates

Get coordinates of the place by passing address as a string.

Prerequisities

this will require guzzle. so first make sure you have installed guzzle.

"guzzlehttp/guzzle": "~4.0"

Installing

To install, edit your composer.json and add the line mentioned below.

"marleysidapple/geoaddress": "dev-master"

Then run composer update

Configuration

After installation, go to config/app.php. Add

 Marleysid\Geoaddress\GeoaddressServiceProvider::class,

in provider array. Add alias as well in alias array

 'Geoaddress'=> Marleysid\Geoaddress\Facade\GeoaddressFacade::class,

For publishing configuration. Run following command

php artisan vendor:publish

Once publish is completed open config/geo-address.php and set applicationkey

##Example

include use Marleysid\Geoaddress\Geoaddress; in the controller

$response  = \Geoaddress::latlng('Berlin, Germany');

$lat = $response['lat'];
$lng = $response ['lng'];

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • alexpechkarev/google-geocoder