Skip to content

Instantly share code, notes, and snippets.

@tav
Created December 2, 2010 01:32
Show Gist options
  • Select an option

  • Save tav/724584 to your computer and use it in GitHub Desktop.

Select an option

Save tav/724584 to your computer and use it in GitHub Desktop.
@register_service('places.json', [json])
def places_json(
ctx, north=None, east=None, south=None, west=None, bounds=None,
id=0, deadline=None, soon=None, verified=None, auto=None,
zoom=None, order=None, via=None
):
if bounds:
(south, west), (north, east) = [
[float(_part) for _part in part.split(', ')]
for part in bounds[2:-2].split('), (')
]
else:
north, east, south, west = map(float, [north, east, south, west])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment