Last active
September 22, 2015 05:55
-
-
Save juliaogris/e0231b994946ef8bbcf6 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
/** | |
* @param {!Array<!TileFactory>} factories | |
* @constructor | |
* @struct | |
* @final | |
* @implements {TileFactory} | |
*/ | |
FallbackTileFactory = function(compositeFacotry, fallbackFactory, fallbackBounds) { | |
/** @override */ | |
this.createTile = function(coord, zoom, size, div, opt_options) { | |
// in Korea | |
if (inBounds(coord, zoom, fallbackBounds)) { | |
return fallbackFactory.createTile(coord, xoom, size, div, opt_options); | |
} | |
// outside Korea | |
return compositeFactory.createTile(coord, xoom, size, div, opt_options); | |
}; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment