osm-p2p-server
Advanced tools
Comparing version 1.12.1 to 1.12.2
@@ -40,3 +40,3 @@ var h = require('./h.js') | ||
var q = [[bbox[1],bbox[3]],[bbox[0],bbox[2]]] // left,bottom,right,top | ||
var r = osm.queryStream(q) | ||
var r = osm.queryStream(q, { order: 'type' }) | ||
r.once('error', function (err) { res.end(err + '\n') }) | ||
@@ -43,0 +43,0 @@ res.setHeader('content-type', 'text/xml; charset=utf-8') |
{ | ||
"name": "osm-p2p-server", | ||
"version": "1.12.1", | ||
"version": "1.12.2", | ||
"description": "serve osm http endpoints over a p2p db", | ||
@@ -38,4 +38,4 @@ "main": "index.js", | ||
"memdb": "^1.3.1", | ||
"osm-p2p": "^1.1.0", | ||
"osm-p2p-db": "^3.7.0", | ||
"osm-p2p": "^1.4.0", | ||
"osm-p2p-db": "^3.9.1", | ||
"tape": "^4.4.0" | ||
@@ -42,0 +42,0 @@ }, |
@@ -112,3 +112,3 @@ var test = require('tape') | ||
test('bbox', function (t) { | ||
t.plan(6 + SIZE*3) | ||
t.plan(7 + SIZE*3) | ||
var href = base + 'map?bbox=-123,63,-120,66' | ||
@@ -124,2 +124,6 @@ var hq = hyperquest(href) | ||
t.equal(xml.root.children[0].name, 'bounds') | ||
t.ok(orderedTypes(xml.root.children.map(function (c) { | ||
return c.name | ||
})), 'ordered types') | ||
var ui = 0 | ||
@@ -147,1 +151,9 @@ for (var i = 1; i < xml.root.children.length; i++) { | ||
}) | ||
function orderedTypes (types) { | ||
var order = { bounds: 0, node: 0, way: 1, relation: 2 } | ||
for (var i = 1; i < types.length; i++) { | ||
if (order[types[i-1]] > order[types[i]]) return false | ||
} | ||
return true | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
112801
3472