X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fgeoloc.inc.php;h=51fc43c38c15162c975cd45180257fde0d0389c1;hb=e6bf921624e50f7abdd9a1862d0b7ef4f1053090;hp=89ecd450531206731487a6bf63fd488900f157dd;hpb=6457b5e4040d5110ec52d42afa9ea9ee2f4cff78;p=platal.git diff --git a/include/geoloc.inc.php b/include/geoloc.inc.php index 89ecd45..51fc43c 100644 --- a/include/geoloc.inc.php +++ b/include/geoloc.inc.php @@ -1,6 +1,6 @@ numRows()) { + list($glat, $glng) = $res->fetchOneRow(); + $infos['precise_lat'] = $glat; + $infos['precise_lon'] = $glng; + } + } + } return $infos; } // }}} @@ -225,7 +239,9 @@ function empty_address() { "region" => "", "regiontxt" => "", "country" => "00", - "countrytxt" => ""); + "countrytxt" => "", + "precise_lat" => "", + "precise_lon" => ""); } // create a simple address from a text without geoloc @@ -501,7 +517,7 @@ function geoloc_getData_subcountries($mapid, $sin, $minentities) } foreach ($countries as $i => $c) { - if ($c['nbPop'] > 0) { + if (@$c['nbPop'] > 0) { $lambda = pow($c['nbPop'] / $maxpop,0.3); $countries[$i]['color'] = 0x0000FF + round((1-$lambda) * 0xFF)*0x010100; }