Skip to content

Instantly share code, notes, and snippets.

@anathematic
Created March 7, 2011 05:14
Show Gist options
  • Select an option

  • Save anathematic/858105 to your computer and use it in GitHub Desktop.

Select an option

Save anathematic/858105 to your computer and use it in GitHub Desktop.
Suggested way to present queries on resources based on longitude / latitude?
/api/stores/long/50/lat/50
/api/stores?long=50,lat=50
/api/stores/by-geo/50/50 (long should always be first by convention anyway?)
@juliocesar
Copy link
Copy Markdown

/api/stores?coords=50,50

@anathematic
Copy link
Copy Markdown
Author

I assume commas are fine in urls, right?

@jasoncodes
Copy link
Copy Markdown

+1 for /api/stores?latlong=-27.467778,153.027778. Commas are perfectly fine within query parameters.

@DanielHeath
Copy link
Copy Markdown

Comma separated looks pretty good to me.
Could be confusing for eurozone users who use commas in place of periods for decimal points.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment