Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 74026 invoked from network); 3 Sep 2010 21:41:00 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Sep 2010 21:41:00 -0000 Received: (qmail 21078 invoked by uid 500); 3 Sep 2010 21:40:59 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 20943 invoked by uid 500); 3 Sep 2010 21:40:59 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Delivered-To: moderator for user@couchdb.apache.org Received: (qmail 85728 invoked by uid 99); 3 Sep 2010 10:54:47 -0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bestvista@gmail.com designates 74.125.82.54 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=HuqiqktTSPHC+YC1tJCkP9J5oxUWdsV45DUMyiVI5Sg=; b=mWcK6RmETHQF8/Zc/7MiinA3HRk6ipuv0YqLBp0MOrmrJf9Y68KXo7wQKBDcQLQXCS 8tNYvwOZ31W91L6dVe7HIyQgsJlcP3tck63HjHOpi6K4UG52c03fOFTLL7J+8FWtgrfF vg9QU37vcZEFE7kCLl+OS5tBm8XZU39rCN5RU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=GfRVxCBn1OQmbKHFfSR9GXBBJP5vsErDEyc3/eScK+sq4igE8UatJIi05JGyFjYlbE wTwCD0liWZuo0YStByrTsCACKf5TeU3VbjtnCNvH4zjvFRvLxIzdoUsAARCeoU7XS4X9 zoHA19cI8NLsIjo9Gdf1qH/8+gjQokGeNysCY= MIME-Version: 1.0 Date: Fri, 3 Sep 2010 18:54:19 +0800 Message-ID: Subject: how can i pass my custom parameter to couchdb??? From: god To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=0016364d1da1ab36fd048f58c07e --0016364d1da1ab36fd048f58c07e Content-Type: text/plain; charset=ISO-8859-1 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~~ --0016364d1da1ab36fd048f58c07e--