- M19101 Kabaty
- M19102 Natolin
- M19103 Imielin
| [ | |
| { | |
| "id": 1, | |
| "name": "Eiffel Tower", | |
| "lat": 48.8584, | |
| "lng": 2.2945, | |
| "description": "The iconic iron landmark of Paris." | |
| }, | |
| { | |
| "id": 2, |
| def nearby_spots_old(request, lat, lng, radius=5000, limit=50): | |
| """ | |
| WITHOUT use of any external library, using raw MySQL and Haversine Formula | |
| http://en.wikipedia.org/wiki/Haversine_formula | |
| """ | |
| radius = float(radius) / 1000.0 | |
| query = """SELECT id, (6367*acos(cos(radians(%2f)) | |
| *cos(radians(latitude))*cos(radians(longitude)-radians(%2f)) | |
| +sin(radians(%2f))*sin(radians(latitude)))) |