Call getUid once
This commit is contained in:
@@ -266,7 +266,7 @@ ol.renderer.canvas.VectorLayer.prototype.getFeaturesForPixel =
|
|||||||
}
|
}
|
||||||
|
|
||||||
var candidate, geom, type, symbolBounds, symbolSize, symbolOffset,
|
var candidate, geom, type, symbolBounds, symbolSize, symbolOffset,
|
||||||
halfWidth, halfHeight, coordinates, j;
|
halfWidth, halfHeight, uid, coordinates, j;
|
||||||
for (var id in candidates) {
|
for (var id in candidates) {
|
||||||
candidate = candidates[id];
|
candidate = candidates[id];
|
||||||
geom = candidate.getGeometry();
|
geom = candidate.getGeometry();
|
||||||
@@ -275,8 +275,9 @@ ol.renderer.canvas.VectorLayer.prototype.getFeaturesForPixel =
|
|||||||
type === ol.geom.GeometryType.MULTIPOINT) {
|
type === ol.geom.GeometryType.MULTIPOINT) {
|
||||||
// For points, check if the pixel coordinate is inside the candidate's
|
// For points, check if the pixel coordinate is inside the candidate's
|
||||||
// symbol
|
// symbol
|
||||||
symbolSize = symbolSizes[goog.getUid(candidate)];
|
uid = goog.getUid(candidate);
|
||||||
symbolOffset = symbolOffsets[goog.getUid(candidate)];
|
symbolSize = symbolSizes[uid];
|
||||||
|
symbolOffset = symbolOffsets[uid];
|
||||||
halfWidth = symbolSize[0] / 2;
|
halfWidth = symbolSize[0] / 2;
|
||||||
halfHeight = symbolSize[1] / 2;
|
halfHeight = symbolSize[1] / 2;
|
||||||
symbolBounds = ol.extent.boundingExtent([
|
symbolBounds = ol.extent.boundingExtent([
|
||||||
|
|||||||
Reference in New Issue
Block a user