Do not run the query twice when exporting to KML

This commit is contained in:
Sandro Santilli 2013-03-26 12:46:05 +01:00
parent eb011269bb
commit 41dd23b429
2 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,7 @@
----- -----
* Fix parsing of numeric arrays (#88) * Fix parsing of numeric arrays (#88)
* node-pool upgraded to 2.0.3 * node-pool upgraded to 2.0.3
* Reduce memory use on KML export
1.3.6 (DD/MM/YY) 1.3.6 (DD/MM/YY)
----- -----

View File

@ -215,7 +215,9 @@ function handleQuery(req, res) {
// see https://github.com/Vizzuality/CartoDB-SQL-API/issues/80 // see https://github.com/Vizzuality/CartoDB-SQL-API/issues/80
sql += ' where ' + gn + ' is not null'; sql += ' where ' + gn + ' is not null';
} }
} else if (format === 'shp') { } else if (format === 'shp' || format === 'kml' ) {
// These format are implemented via OGR2OGR, so we don't
// need to run a query ourselves
return null; return null;
} else if (format === 'svg') { } else if (format === 'svg') {
var svg_ratio = svg_width/svg_height; var svg_ratio = svg_width/svg_height;