Download the PHP package imphinite/gaode-maps without Composer
On this page you can find all versions of the php package imphinite/gaode-maps. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download imphinite/gaode-maps
More information about imphinite/gaode-maps
Files in imphinite/gaode-maps
Package gaode-maps
Short Description This is a php package for Gaode Web Services API
License MIT
Informations about the package gaode-maps
Collection of Gaode Web Services API for Laravel 5
DEVELOPMENT IN PROGRESS
Provides convenient way of setting up and making requests to Gaode Web Services API from Laravel application.
For services documentation, API key and Usage Limits visit Gaode Web Services API and Gaode Web Services API Usage Limits And Restrictions.
**Note that this package is under development. Most Features are not implemented yet. Feel free to collaborate on this project!
**SPECIAL THANKS TO Alexpechkarev. Web Services Engine is borrowed from Alexpechkarev/google-maps.
Features
Features TO-DO List
- Geocoding/Reverse Geocoding API
- Directions API
- District Query API
- Geolocation API
- Roads API
- Static Maps API
- Coordinate Convert API
- Weather API
- Auto Complete API
- Traffic API
- Geofence API
Dependency
Installation
Issue following command in console:
Alternatively edit composer.json by adding following line and run composer update
Configuration
Register package service provider and facade in 'config/app.php'
Publish configuration file using php artisan vendor:publish --tag=gaodemaps --force
or simply copy package configuration file and paste into config/gaodemaps.php
Open configuration file config/gaodemaps.php
and add your service key
If you like to use different keys for any of the services, you can overwrite master API Key by specifying it in the service
array for selected web service.
Usage
Here is an example of making request to Places Search API:
Alternatively parameters can be set using setParamByKey()
method. For deeply nested array use "dot" notation as per example below.
Another example showing request to Batch Request service when requesting multiple places' details:
Available methods
load( $serviceName )
setParamByKey( $key, $value )
setParam( $parameters )
getBatchUrl()
get()
load( $serviceName )
- load web service by name
Accepts string as parameter, web service name as specified in configuration file.
Returns reference to it's self.
setParamByKey( $key, $value )
- set request parameter using key:value pair
Accepts two parameters:
key
- body parameter namevalue
- body parameter value
Deeply nested array can use 'dot' notation to assign value.
Returns reference to it's self.
setParam( $parameters )
- set all request parameters at once
Accepts array of parameters
Returns reference to it's self.
getBatchUrl()
- generate a Url of this service for Batch Request web service
Returns Batch Request url of this service.
get()
- perform web service request (irrespectively to request type POST or GET )
Returns web service response in the format specified by setEndpoint()
method, if omitted defaulted to JSON
.
Use json_decode()
to convert JSON string into PHP variable. See Processing Response for more details on parsing returning output.
MIT License
Collection of Gaode Web Services API for Laravel 5 is released under the MIT License.