Download the PHP package geocoder-php/mapquest-provider without Composer
On this page you can find all versions of the php package geocoder-php/mapquest-provider. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download geocoder-php/mapquest-provider
More information about geocoder-php/mapquest-provider
Files in geocoder-php/mapquest-provider
Package mapquest-provider
Short Description Geocoder MapQuest adapter
License MIT
Homepage http://geocoder-php.org/Geocoder/
Informations about the package mapquest-provider
MapQuest Geocoder provider
This is the MapQuest provider from the PHP Geocoder. This is a READ ONLY repository. See the main repo for information and documentation.
Install
Geocode with more exact addresses
The MapQuest Provider allows you to create and pass geocode queries based on a full Address object of
class Geocoder\Model\Address
or any other object that implements Geocoder\Location
.
This will take advantage of what MapQuest calls the 5-box Input address format. Quote from MapQuest Developer: Specifying Locations:
The 5-Box Input address format (which is compatible with JSON and XML), allows for a higher degree of address specification by entering the full address in its individual location parameters. The 5-Box Input format is beneficial as it bypasses the parsing functionality of the single-line request.
If you have an object of a class that implements Geocoder\Location
stored in the variable $address
,
this new type of GeocodeQuery can be created with:
If you want the GeocodeQuery to also work fine with all the other providers,
you will need to convert the $address
object to a text string first.
Say you have stored this text string in the variable $addressAsString
, the the example will read as follows:
Here is a more complete example with use statements, and building of the address object:
Example
Contribute
Contributions are very welcome! Send a pull request to the main repository or report any issues you find on the issue tracker.
All versions of mapquest-provider with dependencies
geocoder-php/common-http Version ^4.0
willdurand/geocoder Version ^4.0