From user-return-12442-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Fri Sep 03 21:56:33 2010 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 76079 invoked from network); 3 Sep 2010 21:56:32 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Sep 2010 21:56:32 -0000 Received: (qmail 33320 invoked by uid 500); 3 Sep 2010 21:56:31 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 33248 invoked by uid 500); 3 Sep 2010 21:56:31 -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 Received: (qmail 33240 invoked by uid 99); 3 Sep 2010 21:56:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Sep 2010 21:56:30 +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 randall.leeds@gmail.com designates 209.85.161.52 as permitted sender) Received: from [209.85.161.52] (HELO mail-fx0-f52.google.com) (209.85.161.52) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Sep 2010 21:56:26 +0000 Received: by fxm10 with SMTP id 10so2001340fxm.11 for ; Fri, 03 Sep 2010 14:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:received :in-reply-to:references:date:message-id:subject:from:to:content-type; bh=QmYacGqq5KG6eJHurWAfoAG+uG9/narjVZbZScY0QeM=; b=Ai4Y0srksHulL5mRprzW/CHYBmHh8oErC6lgXQGZPZ961fN16aQ8tPwTJhoEhlxAgG gyNDUOfHtfDEDGepGYHxfDAQxwW/nNpjiK9Q4bmoFGcb4WxYu0lsbSjnVmq9Dvx8PdUE giZ8QNFCvGWyzEfNWC8yyLEBwup1wB0wYC4cY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=nOKvqAZF1tTSTNmGw9lOAm83HPDVvZR4WpRrMc2Y3tKDdBi2x0wouokFadb7sbZ5UY 5gk07vnBvkaEEJ7YbIJXT6cVQC1g221Abwh7KMxx8ITWlc7Y6dbYW8Lfzht7vDb10MZo dVRZg2yPiBmET21efCMkCj/b78tPPV3Icfpcc= MIME-Version: 1.0 Received: by 10.223.115.73 with SMTP id h9mr650265faq.46.1283550964431; Fri, 03 Sep 2010 14:56:04 -0700 (PDT) Received: by 10.223.110.76 with HTTP; Fri, 3 Sep 2010 14:56:04 -0700 (PDT) Received: by 10.223.110.76 with HTTP; Fri, 3 Sep 2010 14:56:04 -0700 (PDT) In-Reply-To: References: Date: Fri, 3 Sep 2010 14:56:04 -0700 Message-ID: Subject: Re: how can i pass my custom parameter to couchdb??? From: Randall Leeds To: user@couchdb.apache.org Content-Type: multipart/alternative; boundary=001636c59977493d17048f61ff7c --001636c59977493d17048f61ff7c Content-Type: text/plain; charset=UTF-8 Sounds like you'll want to look at http://github.com/vmx/couchdb On Sep 3, 2010 2:41 PM, "god" 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~~ --001636c59977493d17048f61ff7c--