Remove gratuitous debug assertions

This commit is contained in:
Andreas Hocevar
2016-08-04 11:01:40 +02:00
parent e0015b3d4e
commit e18d41b5e0
38 changed files with 12 additions and 102 deletions

View File

@@ -220,3 +220,7 @@ Unknown `tierSizeCalculation` configured.
### 54
Hex color should have 3 or 6 digits.
### 55
The `{-y}` placeholder requires a tile grid with extent.

View File

@@ -80,8 +80,6 @@ ol.format.EsriJSON.readGeometry_ = function(object, opt_options) {
}
}
var geometryReader = ol.format.EsriJSON.GEOMETRY_READERS_[type];
goog.DEBUG && console.assert(geometryReader,
'geometryReader should be defined');
return /** @type {ol.geom.Geometry} */ (
ol.format.Feature.transformWithOptions(
geometryReader(object), false, opt_options));
@@ -217,7 +215,6 @@ ol.format.EsriJSON.getGeometryLayout_ = function(object) {
* @return {ol.geom.Geometry} MultiPoint.
*/
ol.format.EsriJSON.readMultiPointGeometry_ = function(object) {
goog.DEBUG && console.assert(object.points, 'object.points should be defined');
var layout = ol.format.EsriJSON.getGeometryLayout_(object);
return new ol.geom.MultiPoint(object.points, layout);
};
@@ -229,7 +226,6 @@ ol.format.EsriJSON.readMultiPointGeometry_ = function(object) {
* @return {ol.geom.Geometry} MultiPolygon.
*/
ol.format.EsriJSON.readMultiPolygonGeometry_ = function(object) {
goog.DEBUG && console.assert(object.rings);
goog.DEBUG && console.assert(object.rings.length > 1,
'object.rings should have length larger than 1');
var layout = ol.format.EsriJSON.getGeometryLayout_(object);
@@ -575,7 +571,6 @@ ol.format.EsriJSON.prototype.readProjectionFromObject = function(object) {
*/
ol.format.EsriJSON.writeGeometry_ = function(geometry, opt_options) {
var geometryWriter = ol.format.EsriJSON.GEOMETRY_WRITERS_[geometry.getType()];
goog.DEBUG && console.assert(geometryWriter, 'geometryWriter should be defined');
return geometryWriter(/** @type {ol.geom.Geometry} */ (
ol.format.Feature.transformWithOptions(geometry, true, opt_options)),
opt_options);

View File

@@ -70,7 +70,6 @@ ol.format.GeoJSON.readGeometry_ = function(object, opt_options) {
return null;
}
var geometryReader = ol.format.GeoJSON.GEOMETRY_READERS_[object.type];
goog.DEBUG && console.assert(geometryReader, 'geometryReader should be defined');
return /** @type {ol.geom.Geometry} */ (
ol.format.Feature.transformWithOptions(
geometryReader(object), false, opt_options));
@@ -179,7 +178,6 @@ ol.format.GeoJSON.readPolygonGeometry_ = function(object) {
*/
ol.format.GeoJSON.writeGeometry_ = function(geometry, opt_options) {
var geometryWriter = ol.format.GeoJSON.GEOMETRY_WRITERS_[geometry.getType()];
goog.DEBUG && console.assert(geometryWriter, 'geometryWriter should be defined');
return geometryWriter(/** @type {ol.geom.Geometry} */ (
ol.format.Feature.transformWithOptions(geometry, true, opt_options)),
opt_options);

View File

@@ -249,7 +249,6 @@ ol.format.TopoJSON.readFeatureFromGeometry_ = function(object, arcs,
var geometry;
var type = object.type;
var geometryReader = ol.format.TopoJSON.GEOMETRY_READERS_[type];
goog.DEBUG && console.assert(geometryReader, 'geometryReader should be defined');
if ((type === 'Point') || (type === 'MultiPoint')) {
geometry = geometryReader(object, scale, translate);
} else {

View File

@@ -222,8 +222,6 @@ ol.geom.Circle.prototype.setFlatCoordinates = function(layout, flatCoordinates)
* @api
*/
ol.geom.Circle.prototype.setRadius = function(radius) {
goog.DEBUG && console.assert(this.flatCoordinates,
'truthy this.flatCoordinates expected');
this.flatCoordinates[this.stride] = this.flatCoordinates[0] + radius;
this.changed();
};

View File

@@ -16,8 +16,6 @@ ol.geom.flat.flip.flipXY = function(flatCoordinates, offset, end, stride, opt_de
dest = opt_dest;
destOffset = opt_destOffset !== undefined ? opt_destOffset : 0;
} else {
goog.DEBUG && console.assert(opt_destOffset === undefined,
'opt_destOffSet should be defined');
dest = [];
destOffset = 0;
}

View File

@@ -455,8 +455,6 @@ ol.Graticule.prototype.handlePostCompose_ = function(e) {
* @private
*/
ol.Graticule.prototype.updateProjectionInfo_ = function(projection) {
goog.DEBUG && console.assert(projection, 'projection cannot be null');
var epsg4326Projection = ol.proj.get('EPSG:4326');
var extent = projection.getExtent();
@@ -474,7 +472,6 @@ ol.Graticule.prototype.updateProjectionInfo_ = function(projection) {
var minLatP = worldExtentP[1];
var minLonP = worldExtentP[0];
goog.DEBUG && console.assert(extent, 'extent cannot be null');
goog.DEBUG && console.assert(maxLat !== undefined, 'maxLat should be defined');
goog.DEBUG && console.assert(maxLon !== undefined, 'maxLon should be defined');
goog.DEBUG && console.assert(minLat !== undefined, 'minLat should be defined');

View File

@@ -157,8 +157,6 @@ ol.Image.prototype.setImage = function(image) {
* @private
*/
ol.Image.prototype.unlistenImage_ = function() {
goog.DEBUG && console.assert(this.imageListenerKeys_,
'this.imageListenerKeys_ should not be null');
this.imageListenerKeys_.forEach(ol.events.unlistenByKey);
this.imageListenerKeys_ = null;
};

View File

@@ -164,8 +164,6 @@ ol.ImageTile.prototype.load = function() {
* @private
*/
ol.ImageTile.prototype.unlistenImage_ = function() {
goog.DEBUG && console.assert(this.imageListenerKeys_,
'this.imageListenerKeys_ should not be null');
this.imageListenerKeys_.forEach(ol.events.unlistenByKey);
this.imageListenerKeys_ = null;
};

View File

@@ -54,7 +54,6 @@ ol.interaction.DoubleClickZoom.handleEvent = function(mapBrowserEvent) {
var anchor = mapBrowserEvent.coordinate;
var delta = browserEvent.shiftKey ? -this.delta_ : this.delta_;
var view = map.getView();
goog.DEBUG && console.assert(view, 'map must have a view');
ol.interaction.Interaction.zoomByDelta(
map, view, delta, anchor, this.duration_);
mapBrowserEvent.preventDefault();

View File

@@ -96,11 +96,9 @@ ol.interaction.DragAndDrop.handleStop_ = function(event) {
ol.interaction.DragAndDrop.prototype.handleResult_ = function(file, event) {
var result = event.target.result;
var map = this.getMap();
goog.DEBUG && console.assert(map, 'map must be set');
var projection = this.projection_;
if (!projection) {
var view = map.getView();
goog.DEBUG && console.assert(view, 'map must have view');
projection = view.getProjection();
goog.DEBUG && console.assert(projection !== undefined,
'projection should be defined');

View File

@@ -644,7 +644,6 @@ ol.interaction.Draw.prototype.removeLastPoint = function() {
*/
ol.interaction.Draw.prototype.finishDrawing = function() {
var sketchFeature = this.abortDrawing_();
goog.DEBUG && console.assert(sketchFeature, 'sketchFeature expected to be truthy');
var coordinates = this.sketchCoords_;
var geometry = /** @type {ol.geom.SimpleGeometry} */ (sketchFeature.getGeometry());
if (this.mode_ === ol.interaction.DrawMode.LINE_STRING) {
@@ -712,7 +711,6 @@ ol.interaction.Draw.prototype.extend = function(feature) {
var geometry = feature.getGeometry();
goog.DEBUG && console.assert(this.mode_ == ol.interaction.DrawMode.LINE_STRING,
'interaction mode must be "line"');
goog.DEBUG && console.assert(geometry, 'feature must have a geometry');
goog.DEBUG && console.assert(geometry.getType() == ol.geom.GeometryType.LINE_STRING,
'feature geometry must be a line string');
var lineString = /** @type {ol.geom.LineString} */ (geometry);

View File

@@ -87,7 +87,6 @@ ol.interaction.KeyboardPan.handleEvent = function(mapBrowserEvent) {
keyCode == ol.events.KeyCode.UP)) {
var map = mapBrowserEvent.map;
var view = map.getView();
goog.DEBUG && console.assert(view, 'map must have view');
var mapUnitsDelta = view.getResolution() * this.pixelDelta_;
var deltaX = 0, deltaY = 0;
if (keyCode == ol.events.KeyCode.DOWN) {

View File

@@ -74,7 +74,6 @@ ol.interaction.KeyboardZoom.handleEvent = function(mapBrowserEvent) {
var delta = (charCode == '+'.charCodeAt(0)) ? this.delta_ : -this.delta_;
map.render();
var view = map.getView();
goog.DEBUG && console.assert(view, 'map must have view');
ol.interaction.Interaction.zoomByDelta(
map, view, delta, undefined, this.duration_);
mapBrowserEvent.preventDefault();

View File

@@ -841,7 +841,6 @@ ol.interaction.Modify.prototype.insertVertex_ = function(segmentData, vertex) {
this.setGeometryCoordinates_(geometry, coordinates);
var rTree = this.rBush_;
goog.DEBUG && console.assert(segment !== undefined, 'segment should be defined');
rTree.remove(segmentData);
this.updateSegmentIndices_(geometry, index, depth, 1);
var newSegmentData = /** @type {ol.ModifySegmentDataType} */ ({

View File

@@ -131,7 +131,6 @@ ol.interaction.MouseWheelZoom.prototype.doZoom_ = function(map) {
var delta = ol.math.clamp(this.delta_, -maxDelta, maxDelta);
var view = map.getView();
goog.DEBUG && console.assert(view, 'map must have view');
map.render();
ol.interaction.Interaction.zoomByDelta(map, view, -delta, this.lastAnchor_,

View File

@@ -478,9 +478,7 @@ ol.inherits(ol.Map, ol.Object);
* @api stable
*/
ol.Map.prototype.addControl = function(control) {
var controls = this.getControls();
goog.DEBUG && console.assert(controls !== undefined, 'controls should be defined');
controls.push(control);
this.getControls().push(control);
};
@@ -490,10 +488,7 @@ ol.Map.prototype.addControl = function(control) {
* @api stable
*/
ol.Map.prototype.addInteraction = function(interaction) {
var interactions = this.getInteractions();
goog.DEBUG && console.assert(interactions !== undefined,
'interactions should be defined');
interactions.push(interaction);
this.getInteractions().push(interaction);
};
@@ -516,9 +511,7 @@ ol.Map.prototype.addLayer = function(layer) {
* @api stable
*/
ol.Map.prototype.addOverlay = function(overlay) {
var overlays = this.getOverlays();
goog.DEBUG && console.assert(overlays !== undefined, 'overlays should be defined');
overlays.push(overlay);
this.getOverlays().push(overlay);
};
@@ -973,10 +966,7 @@ ol.Map.prototype.handleMapBrowserEvent = function(mapBrowserEvent) {
}
this.focus_ = mapBrowserEvent.coordinate;
mapBrowserEvent.frameState = this.frameState_;
var interactions = this.getInteractions();
goog.DEBUG && console.assert(interactions !== undefined,
'interactions should be defined');
var interactionsArray = interactions.getArray();
var interactionsArray = this.getInteractions().getArray();
var i;
if (this.dispatchEvent(mapBrowserEvent) !== false) {
for (i = interactionsArray.length - 1; i >= 0; i--) {
@@ -1199,9 +1189,7 @@ ol.Map.prototype.render = function() {
* @api stable
*/
ol.Map.prototype.removeControl = function(control) {
var controls = this.getControls();
goog.DEBUG && console.assert(controls !== undefined, 'controls should be defined');
return controls.remove(control);
return this.getControls().remove(control);
};
@@ -1213,10 +1201,7 @@ ol.Map.prototype.removeControl = function(control) {
* @api stable
*/
ol.Map.prototype.removeInteraction = function(interaction) {
var interactions = this.getInteractions();
goog.DEBUG && console.assert(interactions !== undefined,
'interactions should be defined');
return interactions.remove(interaction);
return this.getInteractions().remove(interaction);
};
@@ -1241,9 +1226,7 @@ ol.Map.prototype.removeLayer = function(layer) {
* @api stable
*/
ol.Map.prototype.removeOverlay = function(overlay) {
var overlays = this.getOverlays();
goog.DEBUG && console.assert(overlays !== undefined, 'overlays should be defined');
return overlays.remove(overlay);
return this.getOverlays().remove(overlay);
};

View File

@@ -430,9 +430,6 @@ ol.Overlay.prototype.panIntoView_ = function() {
* @private
*/
ol.Overlay.prototype.getRect_ = function(element, size) {
goog.DEBUG && console.assert(element, 'element should be defined');
goog.DEBUG && console.assert(size !== undefined, 'size should be defined');
var box = element.getBoundingClientRect();
var offsetX = box.left + ol.global.pageXOffset;
var offsetY = box.top + ol.global.pageYOffset;
@@ -494,11 +491,8 @@ ol.Overlay.prototype.updatePixelPosition = function() {
* @protected
*/
ol.Overlay.prototype.updateRenderedPosition = function(pixel, mapSize) {
goog.DEBUG && console.assert(pixel, 'pixel should not be null');
goog.DEBUG && console.assert(mapSize !== undefined, 'mapSize should be defined');
var style = this.element_.style;
var offset = this.getOffset();
goog.DEBUG && console.assert(Array.isArray(offset), 'offset should be an array');
var positioning = this.getPositioning();
goog.DEBUG && console.assert(positioning !== undefined,

View File

@@ -63,8 +63,6 @@ ol.render.Box.prototype.disposeInternal = function() {
ol.render.Box.prototype.render_ = function() {
var startPixel = this.startPixel_;
var endPixel = this.endPixel_;
goog.DEBUG && console.assert(startPixel, 'this.startPixel_ must be truthy');
goog.DEBUG && console.assert(endPixel, 'this.endPixel_ must be truthy');
var px = 'px';
var style = this.element_.style;
style.left = Math.min(startPixel[0], endPixel[0]) + px;
@@ -106,11 +104,6 @@ ol.render.Box.prototype.setPixels = function(startPixel, endPixel) {
* Creates or updates the cached geometry.
*/
ol.render.Box.prototype.createOrUpdateGeometry = function() {
goog.DEBUG && console.assert(this.startPixel_,
'this.startPixel_ must be truthy');
goog.DEBUG && console.assert(this.endPixel_,
'this.endPixel_ must be truthy');
goog.DEBUG && console.assert(this.map_, 'this.map_ must be truthy');
var startPixel = this.startPixel_;
var endPixel = this.endPixel_;
var pixels = [

View File

@@ -498,7 +498,6 @@ ol.render.canvas.Immediate.prototype.drawFeature = function(feature, style) {
return;
}
this.setStyle(style);
goog.DEBUG && console.assert(geometry, 'geometry must be truthy');
this.drawGeometry(geometry);
};
@@ -852,10 +851,7 @@ ol.render.canvas.Immediate.prototype.setImageStyle = function(imageStyle) {
var imageImage = imageStyle.getImage(1);
var imageOrigin = imageStyle.getOrigin();
var imageSize = imageStyle.getSize();
goog.DEBUG && console.assert(imageAnchor, 'imageAnchor must be truthy');
goog.DEBUG && console.assert(imageImage, 'imageImage must be truthy');
goog.DEBUG && console.assert(imageOrigin, 'imageOrigin must be truthy');
goog.DEBUG && console.assert(imageSize, 'imageSize must be truthy');
this.imageAnchorX_ = imageAnchor[0];
this.imageAnchorY_ = imageAnchor[1];
this.imageHeight_ = imageSize[1];

View File

@@ -116,8 +116,6 @@ ol.renderer.vector.renderFeature_ = function(
var simplifiedGeometry = geometry.getSimplifiedGeometry(squaredTolerance);
var geometryRenderer =
ol.renderer.vector.GEOMETRY_RENDERERS_[simplifiedGeometry.getType()];
goog.DEBUG && console.assert(geometryRenderer !== undefined,
'geometryRenderer should be defined');
geometryRenderer(replayGroup, simplifiedGeometry, style, feature);
};
@@ -135,8 +133,6 @@ ol.renderer.vector.renderGeometryCollectionGeometry_ = function(replayGroup, geo
for (i = 0, ii = geometries.length; i < ii; ++i) {
var geometryRenderer =
ol.renderer.vector.GEOMETRY_RENDERERS_[geometries[i].getType()];
goog.DEBUG && console.assert(geometryRenderer !== undefined,
'geometryRenderer should be defined');
geometryRenderer(replayGroup, geometries[i], style, feature);
}
};

View File

@@ -987,9 +987,6 @@ ol.render.webgl.ReplayGroup.prototype.getReplay = function(zIndex, replayType) {
var replay = this.replays_[replayType];
if (replay === undefined) {
var constructor = ol.render.webgl.BATCH_CONSTRUCTORS_[replayType];
goog.DEBUG && console.assert(constructor !== undefined,
replayType +
' constructor missing from ol.render.webgl.BATCH_CONSTRUCTORS_');
replay = new constructor(this.tolerance_, this.maxExtent_);
this.replays_[replayType] = replay;
}

View File

@@ -142,7 +142,6 @@ ol.renderer.canvas.TileLayer.prototype.prepareFrame = function(
if (!drawableTile(tile) && tile.interimTile) {
tile = tile.interimTile;
}
goog.DEBUG && console.assert(tile);
if (drawableTile(tile)) {
tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;
continue;

View File

@@ -172,7 +172,6 @@ ol.renderer.canvas.VectorLayer.prototype.forEachFeatureAtCoordinate = function(c
* @return {?} Callback result.
*/
function(feature) {
goog.DEBUG && console.assert(feature !== undefined, 'received a feature');
var key = ol.getUid(feature).toString();
if (!(key in features)) {
features[key] = true;

View File

@@ -306,7 +306,6 @@ ol.renderer.canvas.VectorTileLayer.prototype.forEachFeatureAtCoordinate = functi
* @return {?} Callback result.
*/
function(feature) {
goog.DEBUG && console.assert(feature, 'received a feature');
var key = ol.getUid(feature).toString();
if (!(key in features)) {
features[key] = true;

View File

@@ -128,7 +128,6 @@ ol.renderer.dom.TileLayer.prototype.prepareFrame = function(frameState, layerSta
if (!drawable && tile.interimTile) {
tile = tile.interimTile;
}
goog.DEBUG && console.assert(tile);
tileState = tile.getState();
if (tileState == ol.TileState.LOADED) {
tilesToDrawByZ[z][tile.tileCoord.toString()] = tile;

View File

@@ -190,7 +190,6 @@ ol.renderer.dom.VectorLayer.prototype.forEachFeatureAtCoordinate = function(coor
* @return {?} Callback result.
*/
function(feature) {
goog.DEBUG && console.assert(feature !== undefined, 'received a feature');
var key = ol.getUid(feature).toString();
if (!(key in features)) {
features[key] = true;

View File

@@ -135,7 +135,6 @@ ol.renderer.Map.prototype.forEachFeatureAtCoordinate = function(coordinate, fram
* @return {?} Callback result.
*/
function forEachFeatureAtCoordinate(feature, layer) {
goog.DEBUG && console.assert(feature !== undefined, 'received a feature');
var key = ol.getUid(feature).toString();
var managed = frameState.layerStates[ol.getUid(layer)].managed;
if (!(key in frameState.skippedFeatureUids && !managed)) {

View File

@@ -182,8 +182,6 @@ ol.renderer.webgl.Map.prototype.bindTileTexture = function(tile, tileSize, tileG
var tileKey = tile.getKey();
if (this.textureCache_.containsKey(tileKey)) {
var textureCacheEntry = this.textureCache_.get(tileKey);
goog.DEBUG && console.assert(textureCacheEntry,
'a texture cache entry exists for key %s', tileKey);
gl.bindTexture(ol.webgl.TEXTURE_2D, textureCacheEntry.texture);
if (textureCacheEntry.magFilter != magFilter) {
gl.texParameteri(

View File

@@ -258,7 +258,6 @@ ol.renderer.webgl.TileLayer.prototype.prepareFrame = function(frameState, layerS
if (!drawable && tile.interimTile) {
tile = tile.interimTile;
}
goog.DEBUG && console.assert(tile);
tileState = tile.getState();
if (tileState == ol.TileState.LOADED) {
if (mapRenderer.isTileTextureLoaded(tile)) {

View File

@@ -120,7 +120,6 @@ ol.renderer.webgl.VectorLayer.prototype.forEachFeatureAtCoordinate = function(co
* @return {?} Callback result.
*/
function(feature) {
goog.DEBUG && console.assert(feature !== undefined, 'received a feature');
var key = ol.getUid(feature).toString();
if (!(key in features)) {
features[key] = true;

View File

@@ -332,8 +332,6 @@ ol.reproj.Tile.prototype.load = function() {
* @private
*/
ol.reproj.Tile.prototype.unlistenSources_ = function() {
goog.DEBUG && console.assert(this.sourcesListenerKeys_,
'this.sourcesListenerKeys_ should not be null');
this.sourcesListenerKeys_.forEach(ol.events.unlistenByKey);
this.sourcesListenerKeys_ = null;
};

View File

@@ -168,7 +168,6 @@ ol.source.ImageVector.prototype.forEachFeatureAtCoordinate = function(
* @return {?} Callback result.
*/
function(feature) {
goog.DEBUG && console.assert(feature !== undefined, 'passed a feature');
var key = ol.getUid(feature).toString();
if (!(key in features)) {
features[key] = true;

View File

@@ -282,7 +282,6 @@ ol.source.Tile.prototype.getTileCoordForTileUrlFunction = function(tileCoord, op
var projection = opt_projection !== undefined ?
opt_projection : this.getProjection();
var tileGrid = this.getTileGridForProjection(projection);
goog.DEBUG && console.assert(tileGrid, 'tile grid needed');
if (this.getWrapX() && projection.isGlobal()) {
tileCoord = ol.tilecoord.wrapX(tileCoord, tileGrid, projection);
}

View File

@@ -604,9 +604,6 @@ ol.style.IconImage_.prototype.replaceColor_ = function() {
return;
}
goog.DEBUG && console.assert(this.canvas_ !== null,
'this.canvas_ must not be null');
this.canvas_.width = this.image_.width;
this.canvas_.height = this.image_.height;
@@ -634,8 +631,6 @@ ol.style.IconImage_.prototype.replaceColor_ = function() {
* @private
*/
ol.style.IconImage_.prototype.unlistenImage_ = function() {
goog.DEBUG && console.assert(this.imageListenerKeys_,
'we must have listeners registered');
this.imageListenerKeys_.forEach(ol.events.unlistenByKey);
this.imageListenerKeys_ = null;
};

View File

@@ -335,6 +335,5 @@ ol.style.createDefaultEditingStyles = function() {
* @return {ol.geom.Geometry|ol.render.Feature|undefined} Geometry to render.
*/
ol.style.defaultGeometryFunction = function(feature) {
goog.DEBUG && console.assert(feature, 'feature must not be null');
return feature.getGeometry();
};

View File

@@ -228,8 +228,6 @@ ol.tilegrid.TileGrid.prototype.getOrigin = function(z) {
if (this.origin_) {
return this.origin_;
} else {
goog.DEBUG && console.assert(this.origins_,
'origins cannot be null if origin is null');
goog.DEBUG && console.assert(this.minZoom <= z && z <= this.maxZoom,
'given z is not in allowed range (%s <= %s <= %s)',
this.minZoom, z, this.maxZoom);
@@ -458,8 +456,6 @@ ol.tilegrid.TileGrid.prototype.getTileSize = function(z) {
if (this.tileSize_) {
return this.tileSize_;
} else {
goog.DEBUG && console.assert(this.tileSizes_,
'tileSizes cannot be null if tileSize is null');
goog.DEBUG && console.assert(this.minZoom <= z && z <= this.maxZoom,
'z is not in allowed range (%s <= %s <= %s',
this.minZoom, z, this.maxZoom);

View File

@@ -34,8 +34,7 @@ ol.TileUrlFunction.createFromTemplate = function(template, tileGrid) {
.replace(dashYRegEx, function() {
var z = tileCoord[0];
var range = tileGrid.getFullTileRange(z);
goog.DEBUG && console.assert(range,
'The {-y} template requires a tile grid with extent');
ol.assert(range, 55); // The {-y} placeholder requires a tile grid with extent
var y = range.getHeight() + tileCoord[2];
return y.toString();
});