Created
April 13, 2015 23:05
-
-
Save tmcw/7819223a348ff2907b13 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function joiner(data, joinRules) { | |
return function(tile) { | |
if (shouldJoin(joinRules, tile, data)) { | |
return joinData(joinRules, tile, data); | |
} | |
} | |
} | |
var countryJoiner(someData, ['country', '=', 'country']); | |
map.getSource('foo').addPipe(function(tile, callback) { | |
callback(countryJoiner(tile)) || tile) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment