GeoDjango and mobile app. Finding an address and geoposition - django-rest-framework

I'm a newbie.
There is a mobile application and a backend for Django Rest Framework
The user should be able to select their home on the map or find it using the search bar.
The database must contain the full address (street, house and apartment separately from the rest of the address) and geolocation (probably longitude and latitude, because later it will be necessary to search for users' homes within a certain radius from the user's current location).
Questions:
Which of these should be implemented on the server? What is needed for this? Examples are desirable
What should the model look like to save the address and geolocation in the database?
I would be grateful if the answers also contain links to the documentation I need.

I made tutorial on basic usage of geodjango. Try this
https://hvitis.dev/geolocation-tutorial-geodjango-demo-and-gis-postgis-data-to-build-app-using-rest-api/#calculate-points-distance

Related

Google Place API, advanced place details: amenities, crowd, accessibility

I'm successfully using Google Places API to get details like name, address, phone, lat/lng, opening hours, etc. No problem with that.
However, the data I can't get a hold of is the deeper data.
For example, if you open up a McDonald's, and click on its short description, it will show things like Amenities, Crowd, Atmosphere, Accessibility.
Question is - is it possible to access this information via Places API?
Thanks
According to the documentation. That information is not returned by the API. You can link directly to that place on Google Maps to show your users that information though.
Remember that APIs like this usually don't return all of the information available to the native service so that the native service (in this case Google Places) retains a competitive advantage.

Getting nearby places based on the User's current location

Can any one please suggest me to use any standard API to get the nearby hotel list based on the User GPS location.
Thanks in advance
Using the Google Places API you could perform a Places Search Request where location is the users lat,lng and types=lodging to search for hotels:
https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&radius=500&types=lodging&sensor=false&key=YOUR_API_KEY
You will need to follow the instructions here to obtain an API Key to use the service.

Is it possible to get all new checkins at specified location?

I'm developing a windows phone application based on foursquare API, here is a scenarios like this: A user is walking on the road with a phone. He uses my application to find out who just check-in (including strange's check-in) in foursquare around his location, is it possible to implement this request? Thanks!
A quick check of the foursquare API indicates that there appears to be a way to get just what you're after.
Simply get a list of nearby venues and then find out who is at each:
https://developer.foursquare.com/docs/venues/search
https://developer.foursquare.com/docs/venues/herenow

Use Google Places API to autocomplete input in subscribe form

For a commercial website, I would like users to fill out a field with their shop name, and if the shop is found by google, fill out the subscription form (for example: phone number, address, logo, etc).
My question: is it possible to use this Api with that? I find that the terms of use are not clear.
PS : Sorry about my english :/
In short a few of the important terms of use are:
http://code.google.com/apis/maps/terms.html#section_9_1
You must not charge access to use your implementation of the Places Autocomplete API and it must be freely accessible to the public. Unless its part of a Mobile Application or you have a Google Enterprise agreement or obtained Google's written permission.
http://code.google.com/apis/maps/documentation/places/autocomplete.html#requirements
You must show a "Powered by Google" logo with any data accessed using the Places Autocomplete API if you do no show this data with a Google Map
If the Places Autocomplete API responses contains Listing provider information it must be displayed to the user.
If your implementation adheres to the terms of use, than it is possible for you to use the Places Autocomplete API for the purpose described.

How can i get list of domain users from Google Apps account without administrative access?

This is a similar question to How can i get list of Domain user's from Google Apps account?
However, I'd like to use a normal account (not an administrative account) to retrieve the user list. It seems like this should be possible as the gmail autocomplete returns domain contacts not listed in the user's contact store. I've looked at the autocomplete Ajax call, but it requires something in the beginning of the string (and no, I don't really want to loop through a-z one by one - that is just way to hacky). For example:
https://mail.google.com/mail/c/u/0/data/contactstore?ac=true&ct=true&gp=true&hl=en&id=domain&max=15&out=js&tok=beginningOfUsersName&type=4
Both versions of the Google contacts API seem to omit domain users unless you have them imported into your own contacts list. I've also looked at querying users in the "Coworkers" system group, all to no avail. I also find it interesting that "add a coworker's calendar" on Google calendar does not provide autocomplete - they use a popup instead.
I'm working on a C# project, but this is a general Google API question, so any pointers in any language would help.
Update
It looks like this is feasible now with admin/directory google api endpoints
see: https://developers.google.com/admin-sdk/directory/v1/guides/manage-users?authuser=0#retrieve_users_non_admin
Original answer
I was able to work around this issue, so I'll document the workaround, even if it doesn't involve Google. I wrote a program (in C#) to query the internal Active Directory (LDAP) store and pick up all the users from there instead. At that point I could get their email addresses and query Google with it. Not the best method, but it worked for my needs.
The C# was roughly patterned from this powershell script, although I pulled out the computers query and added in the capture of the user's email address: http://www.visualbasicscript.com/List-all-users-or-computers-in-the-default-domain-m35650.aspx
The LDAP property I included to get the proper email address for Google was 'proxyAddresses', although this will not be correct for all environments.

Resources