mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
@@ -177,7 +177,7 @@ var greenMarker = L.AwesomeMarkers.icon({
|
||||
$icon = 'greenMarker';
|
||||
$z_offset = 0;
|
||||
$tmp_loc = parse_location($map_devices['location']);
|
||||
if (!empty($tmp_loc['lat']) && !empty($tmp_loc['lng'])) {
|
||||
if (is_numeric($tmp_loc['lat']) && is_numeric($tmp_loc['lng'])) {
|
||||
$map_devices['lat'] = $tmp_loc['lat'];
|
||||
$map_devices['lng'] = $tmp_loc['lng'];
|
||||
}
|
||||
|
@@ -1073,7 +1073,7 @@ function ceph_rrd($gtype)
|
||||
function parse_location($location)
|
||||
{
|
||||
preg_match('/(\[)(-?[0-9\. ]+),[ ]*(-?[0-9\. ]+)(\])/', $location, $tmp_loc);
|
||||
if (!empty($tmp_loc[2]) && !empty($tmp_loc[3])) {
|
||||
if (is_numeric($tmp_loc[2]) && is_numeric($tmp_loc[3])) {
|
||||
return array('lat' => $tmp_loc[2], 'lng' => $tmp_loc[3]);
|
||||
}
|
||||
}//end parse_location()
|
||||
|
Reference in New Issue
Block a user