What would be the ideal way of keeping location coordinates as a model field inorder to use at Google Maps at Django?
Here's the code I use for storing Google's Lat/Lon
lat = models.FloatField(_('Latitude'), blank=True, null=True)
lon = models.FloatField(_('Longitude'), blank=True, null=True)
Possible a better idea is to store in decimal field
lat = models.DecimalField(_('Latitude'), max_digits=10, decimal_places=8)
lng = models.DecimalField(_('Longitude'), max_digits=11, decimal_places=8)
see https://stackoverflow.com/a/12504340/1977197
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With