Sunday, December 29, 2019

Re: How to get Latitude and Longitude of a user

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.


On Sat, Dec 28, 2019 at 6:02 AM Yash Garg <gargyash512@gmail.com> wrote:
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.

--
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+unsubscribe@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.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALLhV5QTTV6DYiUyAtC2SG4Rrv6jqAubpNbskg0Ody0k6_20wA%40mail.gmail.com.

No comments:

Post a Comment