All Projects → kimmelsg → Cj Google Geocoder

kimmelsg / Cj Google Geocoder

Licence: mit

Projects that are alternatives of or similar to Cj Google Geocoder

History Tracker
Laravel Model history tracking made easy
Stars: ✭ 46 (-6.12%)
Mutual labels:  laravel, laravel-package
Laravel Multilang
Package to integrate multi language (multi locale) functionality in Laravel 5.x.
Stars: ✭ 47 (-4.08%)
Mutual labels:  laravel, laravel-package
Chatify
A Laravel package that allows you to add a complete user messaging system into your new/existing Laravel application.
Stars: ✭ 885 (+1706.12%)
Mutual labels:  laravel, laravel-package
Blade Migrations Laravel
An intelligent alternative version of Laravel 5/6 Database Migrations - uses raw-sql syntax, transactions, auto-rollback, UP-DOWN-UP testing
Stars: ✭ 25 (-48.98%)
Mutual labels:  laravel, laravel-package
Laravel Translatable
It's a Laravel database translations manager
Stars: ✭ 47 (-4.08%)
Mutual labels:  laravel, laravel-package
Laravel Mailguneu
Allow customising the Mailgun server URL to use EU servers.
Stars: ✭ 13 (-73.47%)
Mutual labels:  laravel, laravel-package
Laravel Database Logger
Log database query sql in Laravel Application, support Guard,Auth to multiple file record
Stars: ✭ 31 (-36.73%)
Mutual labels:  laravel, laravel-package
Laravel Log
Simple API to write logs for Laravel.
Stars: ✭ 19 (-61.22%)
Mutual labels:  laravel, laravel-package
Laravel Qrcode Ecommerce
This is a complete laravel project that handles qrcodes, payments, api/microservices, and ecommerce
Stars: ✭ 36 (-26.53%)
Mutual labels:  laravel, laravel-package
Laravel Weather
🌤️ A wrapper around Open Weather Map API (Current weather)
Stars: ✭ 36 (-26.53%)
Mutual labels:  laravel, laravel-package
Laravel Aws Sns
Laravel package for the AWS SNS Events
Stars: ✭ 24 (-51.02%)
Mutual labels:  laravel, laravel-package
Laravel Settings
Simple Settings package for a laravel application
Stars: ✭ 45 (-8.16%)
Mutual labels:  laravel, laravel-package
Eloquent Ldap
A Laravel 5.1 package that first tries to log the user against the internal database if that fails, it tries against the configured LDAP/AD server.
Stars: ✭ 19 (-61.22%)
Mutual labels:  laravel, laravel-package
Laravel Async
Package provide simple way to run code asynchronously for your Laravel application.
Stars: ✭ 49 (+0%)
Mutual labels:  laravel, laravel-package
Simple Cache
An easy to use Caching trait for Laravel's Eloquent Models.
Stars: ✭ 19 (-61.22%)
Mutual labels:  laravel, laravel-package
Doorman
Limit access to your Laravel applications by using invite codes
Stars: ✭ 913 (+1763.27%)
Mutual labels:  laravel, laravel-package
Laravel Blade Directives
A collection of nice Laravel Blade directives
Stars: ✭ 813 (+1559.18%)
Mutual labels:  laravel, laravel-package
Package Skeleton
📦 My base for PHP packages.
Stars: ✭ 6 (-87.76%)
Mutual labels:  laravel, laravel-package
Cms
Statamic 3: The Core Composer Package
Stars: ✭ 965 (+1869.39%)
Mutual labels:  laravel, laravel-package
Laravel Compass
A REST client inside your Laravel app
Stars: ✭ 1,002 (+1944.9%)
Mutual labels:  laravel, laravel-package

Circle CI Code Climate

Google Geocoding

Provides an abstraction for requests to Google Maps geocoding service.

Installation

You can install this package via Composer using this command:

composer require ConstructionJobs/google-geocoder

Laravel Installation

This package comes with a service provider for use with Laravel. You will not need to do anything if you're using laravel version 5.5 and up.

If you are using laravel 5.4 or below, to install the service provider:

// config/app.php
'providers' => [
    // other providers
    'ConstructionJobs\GoogleGeocoder\GoogleGeocoderServiceProvider'
];

Also you must publish the config file:

php artisan vendor:publish --provider="ConstructionJobs\GoogleGeocoder\GoogleGeocoderServiceProvider"

The config file allows you to set your api key, language and region.

Usage

There are three ways that you may use this package.

// Geocode an address
$geocoder = new Geocoder;
$geocoder->geocode('New York, NY');

// Reverse geocode from coordinates
$geocoder = new Geocoder;
$geocoder->reverseByCoordinates(40.7127837, -74.0059413);

// Reverse geocode from a Google place id.
$geocoder = new Geocoder;
$geocoder->reverseByPlaceId('ChIJOwg_06VPwokRYv534QaPC8g');

All of these methods return a standard response format as follows:

[
    'address' => 'New York, NY, USA',
    'latitude' => 40.7127837,
    'longitude' => -74.0059413,
    'place_id' => ChIJOwg_06VPwokRYv534QaPC8g,
    'types' => [
        'locality',
        'political'
    ]
    $bounds = [
        'northeast' => [
            'latitude' => 40.9152555,
            'longitude' => -73.7002721,
        ],
        'southwest' => [
            'latitude' => 40.496044,
            'longitude' => -74.255735,
        ]
    ];
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].