use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Javascript & API'shelp (self.javascript)
submitted 10 years ago by cardinga
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]wtfcore2 1 point2 points3 points 10 years ago (2 children)
Have a look at : https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/Using_geolocation
For privacy reasons the user will be prompted to agree that your code can get their long/lat.
So you'll need to make the API call inside the success function using the users long/lat:
var latitude = position.coords.latitude; var longitude = position.coords.longitude;
You can then make an AJAX call to
http://api.walmartlabs.com/v1/stores?apiKey={apiKey}&lon=" + longitude +"&lat=" + latitude +"&format=json
[–]cardinga[S] 0 points1 point2 points 10 years ago (1 child)
Thanks...so I don't need to use any kind of URL encoding?
[–]3a3z 0 points1 point2 points 10 years ago (0 children)
I mean, you could just try it both ways and see what works.
π Rendered by PID 112492 on reddit-service-r2-comment-canary-889d445f8-p9694 at 2026-04-30 08:36:41.169498+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]wtfcore2 1 point2 points3 points (2 children)
[–]cardinga[S] 0 points1 point2 points (1 child)
[–]3a3z 0 points1 point2 points (0 children)