Package Data | |
---|---|
Maintainer Username: | MapTechnica |
Maintainer Contact: | steve@maptechnica.com (Steve Stringer) |
Package Create Date: | 2016-10-18 |
Package Last Update: | 2016-10-27 |
Home Page: | |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-19 03:23:55 |
Package Statistics | |
---|---|
Total Downloads: | 27 |
Monthly Downloads: | 2 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 0 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Note:
Please note the MapTechnica API system is now in Beta. If you would like to participate in the Beta program, you may sign up here:
https://www.maptechnica.com/beta-signup
If you wish to be notified when the API is formally launched, sign up to this list:
(We promise not to spam you.)
mtapi
is a composer package that lets you easily access the MapTechnica API from your Laravel application. The MapTechnica API ("MT API") lets you retrieve GIS boundary, meta, and centroid data for the following geotypes:
You can see this data in action and learn more about the MapTechnica API on MapTechnica.com.
Note:
Free use of this package is covered under the MIT license. However, to access the MT API, you will need to obtain a license key which is subject to its own use restrictions and fees. Visit the Developers seciton of MapTechnica.com for more information.
The API system is currently in Beta. If you would like to participate in the Beta program, please fill out the request form here:
https://www.maptechnica.com/beta-signup
While you're there, go ahead and register for an account:
https://my.maptechnica.com/register
If you are selected to participate in the Beta program, you will be contacted with API key information.
In a terminal, require the package from the root directory of your Laravel project:
composer require maptechnica\mtapi
After updating composer, add the ServiceProvider to the providers array in config/app.php:
MapTechnica\MTAPI\MTAPIServiceProvider::class,
Add an alias to config/app.php:
'MTAPI' => MapTechnica\MTAPI\MTAPIDataRetriever::class,
Next, move the config file into the config
directory. From your project's root directory, type:
php artisan vendor:publish
Now you have a choice. You can either directly alter the values in your config\mtapi.php
file as follows:
From:
'apiKey' => env('MAPTECHNICA_API_KEY', NULL),
To:
'apiKey' => env('MAPTECHNICA_API_KEY', '[YOUR_API_KEY]'),
Or, if you're in an environment that requires different keys based on your server location, leave config\mtapi.php
as-is and open your .env
file and add the following variable instead
MAPTECHNICA_API_KEY=[YOUR_API_KEY]
Once Composer has done its thing, and assuming your Laravel app is up and running, open...
http://yourapp/__mtapi
...in your browser. You should see a links page.
Click the "Check Installation" button to insure your variables are set correctly and the API is responding to your requests.
Click the "API Documentation" button to view a Swagger playground and documentation for the API.
There are several resources available to you if you run into trouble:
Project Home: https://github.com/maptechnica/mtapi
Git Repository: https://github.com/maptechnica/mtapi
API Documentation (Swagger): https://dev.maptechnica.com/apidocs/
The MapTechnica API makes it possible to access MapTechnica's boundary data directly into your mapping application.
This package is designed to work with Laravel 5+ or as a standalone package in your own composer-based project.