Skip to content

Commit

Permalink
Use geometry from request.
Browse files Browse the repository at this point in the history
Newer versions of GeoCouch always contain the geometry,
there's no need to emit it anymore.
  • Loading branch information
vmx committed Jul 7, 2011
1 parent 976de1d commit cbfa248
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions README.md
Expand Up @@ -165,8 +165,7 @@ Open a tool capable of handling KML feeds and import your query link: `http://lo
#### geojson.js

This function outputs a GeoJSON FeatureCollection (compatible with
OpenLayers). The geometry is stored in the `geometry` property, all
other properties in the `properties` property.
OpenLayers).

Examples:

Expand Down
3 changes: 1 addition & 2 deletions couchapp/lists/geojson.js
Expand Up @@ -16,8 +16,7 @@ function(head, req) {

send('{"type": "FeatureCollection", "features":[');
while (row = getRow()) {
out = '{"type": "Feature", "geometry": ' + JSON.stringify(row.value.geometry);
delete row.value.geo;
out = '{"type": "Feature", "geometry": ' + JSON.stringify(row.geometry);
out += ', "properties": ' + JSON.stringify(row.value) + '}';

send(sep + out);
Expand Down

0 comments on commit cbfa248

Please sign in to comment.