2011-09-14 Sancho Lerena <slerena@artica.es>
* lib/PandoraFMS/DataServer.pm: Fixed a weird problem resolving GPS coordinates with OpenStreet. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@4950 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
bfe2652f92
commit
66cd5d1481
|
@ -1,6 +1,8 @@
|
|||
|
||||
2011-09-14 Sancho Lerena <slerena@artica.es>
|
||||
|
||||
* lib/PandoraFMS/DataServer.pm: Fixed a weird problem resolving GPS
|
||||
coordinates with OpenStreet.
|
||||
|
||||
* lib/PandoraFMS/NmapParser.pm: Avoid warning messages.
|
||||
|
||||
2011-09-12 Sancho Lerena <slerena@artica.es>
|
||||
|
|
|
@ -235,11 +235,14 @@ sub process_xml_data ($$$$$) {
|
|||
# Change here URL to make request to a local openstreetmap server
|
||||
my $content = get ('http://nominatim.openstreetmap.org/reverse?format=csv&lat='.$latitude.'&lon='.$longitude.'&zoom=18&addressdetails=1&email=info@pandorafms.org');
|
||||
|
||||
# Yep, I need to parse the XML output.
|
||||
|
||||
my $xs1 = XML::Simple->new();
|
||||
my $doc = $xs1->XMLin($content);
|
||||
$position_description = safe_input ($doc->{result}{content});
|
||||
if ((defined($content)) && ($content ne "")){
|
||||
# Yep, I need to parse the XML output.
|
||||
my $xs1 = XML::Simple->new();
|
||||
my $doc = $xs1->XMLin($content);
|
||||
$position_description = safe_input ($doc->{result}{content});
|
||||
} else {
|
||||
$position_description = "";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue