X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fgeoloc.inc.php;h=8511a4ee671ae3ce8306fce6efa44cce0df616e8;hb=de1b96b68c519bc3242429b8020d5f9fefe47b89;hp=3069c8ca12981c66a92770e786a38c1726616c34;hpb=de0485fd001e8ed3f8649016d22332a9f01ad269;p=platal.git diff --git a/include/geoloc.inc.php b/include/geoloc.inc.php index 3069c8c..8511a4e 100644 --- a/include/geoloc.inc.php +++ b/include/geoloc.inc.php @@ -1,6 +1,6 @@ next()) { + foreach($cityres as $c) { if ($c['pop'] > 0) { $city = $c; $city['x'] = geoloc_to_x($c['x'], $c['y']); @@ -494,8 +494,8 @@ function geoloc_getData_subcountries($mapid, $sin, $minentities) 'NULL'); $maxpop = 0; - $nbentities = $nbcities + $countryres->total(); - while ($c = $countryres->next()) { + $nbentities = $nbcities + count($countryres); + foreach ($countryres as $c) { $c['latPop'] /= $c['nbPop']; $c['lonPop'] /= $c['nbPop']; $c['rad'] = size_of_territory($c['nbPop']);