Merge pull request #3058 from ahocevar/extend-coordinate
Use an API function to extend the extent
This commit is contained in:
@@ -65,8 +65,7 @@ function calculateClusterInfo(resolution) {
|
|||||||
var originalFeatures = feature.get('features');
|
var originalFeatures = feature.get('features');
|
||||||
var extent = ol.extent.createEmpty();
|
var extent = ol.extent.createEmpty();
|
||||||
for (var j = 0, jj = originalFeatures.length; j < jj; ++j) {
|
for (var j = 0, jj = originalFeatures.length; j < jj; ++j) {
|
||||||
ol.extent.extendCoordinate(extent,
|
ol.extent.extend(extent, originalFeatures[j].getGeometry().getExtent());
|
||||||
originalFeatures[j].getGeometry().getCoordinates());
|
|
||||||
}
|
}
|
||||||
maxFeatureCount = Math.max(maxFeatureCount, jj);
|
maxFeatureCount = Math.max(maxFeatureCount, jj);
|
||||||
radius = 0.25 * (ol.extent.getWidth(extent) + ol.extent.getHeight(extent)) /
|
radius = 0.25 * (ol.extent.getWidth(extent) + ol.extent.getHeight(extent)) /
|
||||||
|
|||||||
Reference in New Issue
Block a user