How to get Latitude and Longitude of a user

31 views
Skip to first unread message

Yash Garg

unread,
Dec 27, 2019, 2:02:26 PM12/27/19
to Django users
I want to get Latitude and Longitude of a user to store in my data model fields-
    latitude    = models.FloatField(default=0.0)
    longitude   = models.FloatField(default=0.0)

How can i do this without using Google API.

carlos

unread,
Dec 27, 2019, 2:25:18 PM12/27/19
to django...@googlegroups.com

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/26e603af-05a5-47f4-82d7-35f8bd1f3f6c%40googlegroups.com.


--
att.
Carlos Rocha

Dominick Del Ponte

unread,
Dec 29, 2019, 9:43:01 PM12/29/19
to django...@googlegroups.com
Don't know if it is ideal, but, assuming you have a form on the page you could use the geolocation API and put the values in hidden form fields to send to your DB.


--
Reply all
Reply to author
Forward
0 new messages