From 5ca6b5dd81032a98f041491e4286235d881f062e Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Thu, 18 Dec 2014 11:02:41 +0100 Subject: [PATCH] Use an API function to extend the extent --- examples/earthquake-clusters.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/earthquake-clusters.js b/examples/earthquake-clusters.js index 862963d5cc..0850960250 100644 --- a/examples/earthquake-clusters.js +++ b/examples/earthquake-clusters.js @@ -65,8 +65,7 @@ function calculateClusterInfo(resolution) { var originalFeatures = feature.get('features'); var extent = ol.extent.createEmpty(); for (var j = 0, jj = originalFeatures.length; j < jj; ++j) { - ol.extent.extendCoordinate(extent, - originalFeatures[j].getGeometry().getCoordinates()); + ol.extent.extend(extent, originalFeatures[j].getGeometry().getExtent()); } maxFeatureCount = Math.max(maxFeatureCount, jj); radius = 0.25 * (ol.extent.getWidth(extent) + ol.extent.getHeight(extent)) /