couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex P <apede...@kolosy.com>
Subject Re: get item by longitude and latitude inside a square
Date Mon, 15 Mar 2010 16:32:06 GMT
more than likely it's an issue with actual collation vs what you're
expecting. care to show some sample view output?

2010/3/15 St├ęphane Mourey <stephane.mourey@gmail.com>

> Hi all,
>
> I have a database where cities (villes in french) are stored, with
> longitude
> and latitude values. I'm trying to get some of them, inside a square.
> Here is one request:
>
>
> /sofitex/_design/all/_view/getVillesByLatAndLong?startkey=%5B6.84505190241%2C47.6459660001%5D&amp;endkey=%5B8.64494809759%2C49.4624339999%5D&amp;include_docs=true
>
> Here is the view code:
>
>   "getVillesByLatAndLong": {
>       "map": "function(doc) {if (doc.type=='ville')
> {emit([doc.lat,doc.long], doc);};}"
>   }
> The result is empty, but I know I have some cities that match. Could anyone
> tell what's wrong?
>
> Best regards,
>
> Stephane Mourey
>

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