Get all points within certain radius in Django

前端 未结 1 1133
自闭症患者
自闭症患者 2021-02-06 09:02

For a Google Maps application, I need to create a query that selects all items in my database that fall within a certain radius from a given latitude/longitude, given the lat/ln

1条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-06 09:08

    Django has GeoDjango for this

    http://docs.djangoproject.com/en/dev/ref/contrib/gis/db-api/#distance-queries

    0 讨论(0)
提交回复
热议问题