Layer and tile API update.
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.
This commit is contained in:
@@ -180,7 +180,7 @@ OpenLayers.Control.UTFGrid = OpenLayers.Class(OpenLayers.Control, {
|
||||
for (var i=0, len=layers.length; i<len; i++) {
|
||||
layer = layers[i];
|
||||
idx = this.map.layers.indexOf(layer);
|
||||
dataLookup[idx] = layer.getData(lonLat);
|
||||
dataLookup[idx] = layer.getFeatureData(lonLat);
|
||||
}
|
||||
this.callback(dataLookup); // perhaps pass tile, lonLat?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user