guard against null tileInfo

This commit is contained in:
Matthew Perry
2013-01-10 10:45:02 -08:00
parent 0412410be0
commit b54faf222c

View File

@@ -148,7 +148,7 @@ OpenLayers.Layer.UTFGrid = OpenLayers.Class(OpenLayers.Layer.XYZ, {
getFeatureInfo: function(location) {
var info = null;
var tileInfo = this.getTileData(location);
if (tileInfo.tile) {
if (tileInfo && tileInfo.tile) {
info = tileInfo.tile.getFeatureInfo(tileInfo.i, tileInfo.j);
}
return info;