A Django powered web application that finds places near you.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
locationapp
static
staticfiles
thingsnearyou
Procfile
README.md
db.sqlite3
manage.py
requirements.txt

README.md

Things Near You

Overview

Things Near You is a simple python/django-powered application that automatically detects a user's location and displays it on an interactive map created with jQuery Mapael and allows user's to search for places near their location.

The application takes advantage of the freegeoip API to determine each user's location and the Google Places API to return the name and logo of locations within a user's specified radius.

The application is available at https://thingsnearyou.herokuapp.com/

Things Near You REST API

Things Near You also provides a JSON based REST API that allows anyone to request the name and logo of places within a given radius of any location.

API Documentation

Resource URL

https://thingsnearyou.herokuapp.com/api/locations

Resource Information

Response format : JSON

Paramaters

Name Description
latitude The value for the latidude of the specific location that you are trying to search around.
longitude The value for the longitude of the specific location that you are trying to search around.
radius The radius (meters) that you are trying to search within.

Example Request

data = {
            "latitude": "-33.867",
            "longitude" :"151.195",
            "radius": "500"
}

Example Response

response = {
                {
                    'picture_url': 'https://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png', 
                    'name': 'Sydney'
                    }, 
                {
                    'picture_url': 'https://maps.gstatic.com/mapfiles/place_api/icons/lodging-71.png', 
                    'name': 'Astral Tower & Residences'
                    }, 
                ...
}

Code Example

Python 2.7

import requests
url = "https://thingsnearyou.herokuapp.com/api/locations"
data = {
        "latitude": "-33.867",
        "longitude" : "151.195",
        "radius": "500"
}
headers = {"Content-Type": "application/json"}
locations = requests.get(url=url, params=data, headers=headers)
print locations.json()

This request will return the example response.