Hello community,

during developing and web application using GeoCouch I came across a small bug. I'm actually unsure if it's a real bug or if maybe I did something wrong. If this is a known issue please apologize, I didn't find something similar.

My application provides the user the ability to mark their own location on an dynamic map, for which I use the OpenLayers framework to display and handle events. But after one has added a few locations suddenly GeoCouch only queries the last added feature. This happens as it seems, totally randomly as I didn't recognize any pattern till now. Even a plain curl spatial query with a 0,0,180,90 bounding box only returns the last added feature as if the rest wouldn't exist. But the other features still remain within the database and can be queried by CouchDB's normal views. Often a restart of the GeoCouch server helps to solve this problem.

This is only guess but it seems that this bug only occurs if there is a long interval between two adds.

The spatial map function I use is pretty simple and uses a GeoJSON point as key value:

function (doc) {
        if (doc.type == "news") {
                if (doc.geometry) {
                        var file;
                        if (doc._attachments) {
                                for (fname in doc._attachments) {
                                        file = fname;
                                }
                        }
                        else {
                                file = null;
                        }

                        emit(doc.geometry, {
                                'attachments': file,
                                'content': doc.content,
                                'type': doc.type
                        });
                }
        }
}

May someone else encountered a similar problem.

Best regards
Bernhard

Reply via email to