alexs/googleplaces

Google Places

Installs: 13

Dependents: 0

Suggesters: 0

Security: 0

Type:php-classes

1.0.6-stable 2017-09-21 12:14 UTC

This package is auto-updated.

Last update: 2024-04-27 15:31:49 UTC


README

Google places

Example

<?php
$api_key = 'YOUR_API_KEY';
$language = 'ru';
$latitude = 51.509865;
$longitude = -0.118092;
$radius = 20000; // 20 km
$types = 'campground|lodging';

$Fetcher = new Fetcher($api_key, $language);
$Places = new Places($Fetcher);
$result = $Places->findNearest($latitude, $longitude, $radius, $types);
var_dump($result);