couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randall Leeds <randall.le...@gmail.com>
Subject Re: how can i pass my custom parameter to couchdb???
Date Fri, 03 Sep 2010 21:56:04 GMT
Sounds like you'll want to look at http://github.com/vmx/couchdb

On Sep 3, 2010 2:41 PM, "god" <bestvista@gmail.com> wrote:
> hello everyone,
>
> I'm so confused , in traditional way , i just post parameters to server(eg
> php java ), the server will accept and handle it, but in couchdb , i just
> can pass the "key", "startkey"..............?
>
> my couchdb data as follows, its some geo infomation
> {
> {"id": "101", "latitude": 50, "longitude": 100},
> {"id": "102", "latitude": 60, "longitude": 110},
> {"id": "103", "latitude": 70, "longitude": 80},
> {"id": "104", "latitude": 40, "longitude": 90},
> ..............................................................
> ..............................................................
> ..............................................................
> {
>
>
>
> I want to pass some parameters eg: my currentlocation["mylatitude": 100,
> "mylongitude": 60], radius = 100(km) into couchdb, then i want to get the
> data records whos location is in a circle(radius 100) around my
> currentlocation
>
> there is a fuction can get the distance between two location, thempt that
> distance = getLoation(lat1, lon1, lat2, lon2), if i couchdb can get my
> parameter, then i can use
>
> if( getLoation(mylatitude, mylongitude, data[i].latitude,
data[i].lonitude)
> < radius)
> {
> result.push(data);
> }
> return result;
> ...
> what should i do, please give me a hand~~

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message