我正在尝试在MongoDB中存储和查询地理坐标。我使用的是带有忍者-mongodb模块的忍者框架,特别是使用Morphia。@Entity @Index(fields = @Field(value="coordinates", type = IndexType.GEO2DSPHERE))public class Place { public ObjectId id; public String name;
我想实现类似于airbnb上的地图拖动搜索() user.lat = float(lat) user.geoLocation = ndb.GeoPt(float(lat),float(lon)) def get(self): This is an ajax function. It gets the place name, north_east, and south_west