Skip to content

Commit

Permalink
bump to v0.6.11 with back compatibility fix for layer_by_index - refs…
Browse files Browse the repository at this point in the history
… mapbox/tilemill#2210
  • Loading branch information
Dane Springmeyer committed Feb 7, 2014
1 parent 3294c8c commit 9a04363
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
## CHANGELOG

#### 0.6.11

* Fixed back-compatibility with previous `layer_by_index` behavior - not using it only when `layer` is not set by TileMill. This avoids breaking projects from older TileMill versions.

#### 0.6.10

* Fixed projection handling for topojson
Expand Down
3 changes: 3 additions & 0 deletions lib/millstone.js
Expand Up @@ -942,6 +942,9 @@ function resolve(options, callback) {
l.srs = SRS.WGS84;
break;
}
if (d.type === 'ogr' && !d.layer) {
d.layer_by_index = 0;
}
// at this point if we do not know the 'type' of mapnik
// plugin to dispatch to we are out of luck and there is no
// need to check for the projection
Expand Down
3 changes: 2 additions & 1 deletion test/markers.test.js
Expand Up @@ -61,7 +61,8 @@ it('correctly localizes zipped json', function(done) {
"name": "polygons-zipped",
"Datasource": {
"file": path.join(__dirname, 'zipped-json/layers/polygons-zipped/7e482cc8-polygons.json.json'),
"type": "ogr"
"type": "ogr",
"layer_by_index":0
},
"srs": '+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs'
}
Expand Down
3 changes: 2 additions & 1 deletion test/nosymlink.test.js
Expand Up @@ -71,7 +71,8 @@ it('correctly handles files without symlinking', function(done) {
"name": "four",
"Datasource": {
"file": path.join(__dirname, "nosymlink/points.vrt"),
"type": "ogr"
"type": "ogr",
"layer":"points"
},
"srs": "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
},
Expand Down
3 changes: 2 additions & 1 deletion test/nosymlink/project.mml
Expand Up @@ -24,7 +24,8 @@
{
"name": "four",
"Datasource": {
"file": "points.vrt"
"file": "points.vrt",
"layer": "points"
}
},
{
Expand Down
9 changes: 6 additions & 3 deletions test/test.js
Expand Up @@ -178,7 +178,8 @@ it('correctly caches remote files', function(done) {
"name": "local-json",
"Datasource": {
"file": path.join(__dirname, 'cache/layers/local.json'),
"type": "ogr"
"type": "ogr",
"layer_by_index":0
},
"srs": "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
},
Expand All @@ -194,7 +195,8 @@ it('correctly caches remote files', function(done) {
"name": "absolute-json",
"Datasource": {
"file": path.join(__dirname, 'cache/layers/absolute-json.json'),
"type": "ogr"
"type": "ogr",
"layer_by_index":0
},
"srs": "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
},
Expand All @@ -210,7 +212,8 @@ it('correctly caches remote files', function(done) {
"name": "polygons",
"Datasource": {
"file": path.join(__dirname, 'cache/layers/polygons.json'),
"type": "ogr"
"type": "ogr",
"layer_by_index":0
},
"srs": "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"
},
Expand Down

0 comments on commit 9a04363

Please sign in to comment.