/php-mapbox

A PHP Wrapper for the MapboxJS cURL API

Primary LanguagePHPMIT LicenseMIT

php-mapbox

A PHP Wrapper for the MapboxJS cURL API

Latest Version on Packagist Software License Build Status

This package aims to take the API provided by Mapbox and create a simple PHP wrapper that allows you to call various different endpoints and return the results in various formats.

At the moment this API will only return Geocoding results. Additional elements will be built on an as needed basis.

Install

Via Composer

$ composer require zakclayton/php-mapbox

Usage

$query        = 'The Statue of Liberty';
$mapbox       = new MapboxApi(MAPBOX_ACCESS_TOKEN);
$geoCodingApi = $mapbox->createGeoCodingApi($query);
$json         = $geoCodingApi->getJson();
$entity       = $geoCodingApi->call();

Parameters

Coming soon.

Testing

Tests are currently being written. Use this package with caution!

$ composer test

Security

If you discover any security related issues, please email zak@24kdesign.co.uk instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.