Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
If no bounding box is supplied, assume Norfolk.
Browse files Browse the repository at this point in the history
  • Loading branch information
wbprice committed Jan 14, 2015
1 parent 7d0688e commit b8784f8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,13 @@ server.route({
if (request.url.query.bbox) {
bbox = request.url.query.bbox;
query = '[out:json];node(' + bbox + ')[tourism=artwork];out;'
}
} else if (!request.url.query.bbox) {
// If no bounding box is provided, assume Norfolk.
// tk do some response limiting here with query string in app
// or by getting long/lat from request source IP.
bbox = '36.75,-76.44,36.98,-76.13';
query = '[out:json];node(' + bbox + ')[tourism=artwork];out;'
};

// Alternatively, use latitude and longitude.
if (request.url.query.longitude &&
Expand Down

0 comments on commit b8784f8

Please sign in to comment.