Skip to content

Commit

Permalink
Merge pull request #17 from mapbox/layer-type
Browse files Browse the repository at this point in the history
Promote render `type` property to parent layer
  • Loading branch information
mourner committed Jul 8, 2014
2 parents 73ca80f + 8b85a6c commit edb12c5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions migrations/v4.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,15 @@ function convertLayer(layer) {

if (!render) return;

layer.type = render.type;
delete render.type;

if (layer.filter && layer.filter.$type) {
layer.filter.$type = newTypes[layer.filter.$type];
}

if (render.type === 'text' || render.type === 'icon') {
render.type = 'symbol';
if (layer.type === 'text' || layer.type === 'icon') {
layer.type = 'symbol';

rename(render, 'icon-spacing', 'symbol-min-distance');
rename(render, 'text-min-distance', 'symbol-min-distance');
Expand Down

0 comments on commit edb12c5

Please sign in to comment.