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
Showing
3 changed files
with
57 additions
and
0 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
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 +1,2 @@ | ||
from .core import address, batch, latlng, reverse | ||
from .geo import Geo |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
""" | ||
Simplified methods for calling Mapquest's Geocoding API. | ||
""" | ||
|
||
from .geo import Geo | ||
|
||
|
||
def address(name): | ||
"""Geocode an address.""" | ||
return Geo().address(name) | ||
|
||
|
||
def batch(*locations): | ||
"""Batch geocode multiple addresses.""" | ||
return Geo().batch(*locations) | ||
|
||
|
||
def latlng(address): | ||
"""Get the latitude and longitude coordinates for an address.""" | ||
return Geo().latlng(address) | ||
|
||
|
||
def reverse(lat, lng): | ||
"""Reverse geocode lat/lng coordinates.""" | ||
return Geo().reverse(lat, lng) |