Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Showing with 3 additions and 0 deletions.
  1. +1 −0 
  2. +1 −0  index.js
  3. +1 −0  server.js
1 
@@ -103,6 +103,7 @@ The only requirement for a carmen MBTiles file is that it contains grids and fea
- `lat` - latitude of the feature. If omitted, `lat` is calculated from the UTFGrid.
- `type` - type of feature. If omitted, the index key is used.
- `score` - numeric score. If present, used by the default `sortBy` function to sort results.
+- `bounds` - comma-separated coordinates that bound the feature in order: w,s,e,n. If present, carmen will split and format this field into an array of values.
Note that the UTFGrid-based centroid calculation for polygon features is currently very rough. Providing a more accurate lon/lat pair for these features is more performant and recommended.
1  index.js
@@ -74,6 +74,7 @@ function Carmen(options) {
delete data.rank;
data.type = data.type || dbname;
+ if (data.bounds) data.bounds = data.bounds.split(',').map(parseFloat);
return data;
1  server.js
@@ -17,3 +17,4 @@ server.get('/geocode/:query', function(req, res, next) {
server.use(express['static'](__dirname + '/static'));
+console.log('carmen: http://localhost:3000')

No commit comments for this range

Something went wrong with that request. Please try again.