-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
xolf
committed
Jan 14, 2017
1 parent
79a540e
commit ffeaede
Showing
3 changed files
with
35 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,23 @@ | ||
# locationiq-php | ||
Php Wrapper for https://locationiq.org | ||
|
||
## Install | ||
`composer require xolf/locationiq` | ||
|
||
## Make first request | ||
```php | ||
$search = new \Xolf\LocationIQ\Search($apiKey); | ||
$result = $search->get("Empire State Building"); | ||
|
||
// 40.7487727 | ||
$result[0]->lat; | ||
|
||
// -73.9849336 | ||
$result[0]->lon; | ||
|
||
// "node" | ||
$result[0]->osm_type; | ||
|
||
// "Empire State Building, 362, 5th Avenue, Diamond District, Manhattan, New York County, New York City, New York, 10035, United States of America" | ||
$result[0]->osm_type; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters