For this to be useful (i.e. so listeners can see/modify the tile url), a change in Tile.Image is required so we do not fire the loadstart event before we have the url to load.
Having to call two methods to get complete feature information (id and data) is cumbersome. The `getFeatureInfo` method returns an object with both feature id and data.
The tile now has responsibility for resolving feature ids and fetching feature data given x, y pixel offsets with getFeatureId and getFeatureData methods. The layer has corresponding getFeatureId and getFeatureData methods that take a map location, lookup the appropriate tile, and delegate to the tile for the rest of the work.
To get IE7 support, the OpenLayers.Format.JSON parser should be used. This leverages the native JSON.parse method where available. It does add extra weight to UTFGrid builds. However, as of this commit date, we lose large portions of US govt agencies when we exclude IE7.
I would think there would still be an error thrown here. Will put together a test to determine for sure, but I'd think that the default GeoJSON parser used by the protocol would choke on the UTFGrid json.
Since draw is the only tile operation that we defer, the tile queue can be an array of tiles and queue handling can be simplified. We now use the beforedraw event to defer drawing, and remove all occurrences of a tile from the tile queue when we draw it.
Instead of layers that want to defer tile drawing having to override the tile's draw method, layers can now abort drawing by returning false from a beforedraw listener, and later call draw(true) to draw the tile directly, without clearing it first.
Instead of giving the function a bound, a scope, a property to update
and a callback, only give the bound and a callback.
When the url is retrieved by getUrlAsync, simply call the callback
with the url as argument and let the caller manage this.
A problem introduced with 5fda8835da can easily be solved by re-adding a check for imgDiv and a strict type check for useIFrame. Thanks @elemoine for pointing out that there could be a problem.