Add message to assertions.

This commit is contained in:
Marc Jansen
2015-03-30 22:50:15 +02:00
parent 2c40d74a15
commit fb9ba22c30
45 changed files with 394 additions and 221 deletions

View File

@@ -60,7 +60,8 @@ ol.tilecoord.createFromQuadKey = function(quadKey) {
*/
ol.tilecoord.createFromString = function(str) {
var v = str.split('/');
goog.asserts.assert(v.length === 3);
goog.asserts.assert(v.length === 3,
'must provide a string in "z/x/y" format, got "%s"', str);
v = goog.array.map(v, function(e, i, a) {
return parseInt(e, 10);
});