mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Mapping should be complete
This commit is contained in:
@@ -427,7 +427,7 @@ function location_to_latlng($device) {
|
||||
$bad_loc = false;
|
||||
$device_location = $device['location'];
|
||||
if (!empty($device_location)) {
|
||||
$device_location = preg_replace("/ /","+",$device_location);
|
||||
$new_device_location = preg_replace("/ /","+",$device_location);
|
||||
// We have a location string for the device.
|
||||
$loc = dbFetchRow("SELECT `lat`,`lng` FROM `coordinates` WHERE `location`=? LIMIT 1", array($device_location));
|
||||
if (is_array($loc) === false) {
|
||||
@@ -436,7 +436,7 @@ function location_to_latlng($device) {
|
||||
case "google":
|
||||
default:
|
||||
d_echo("Google geocode engine being used\n");
|
||||
$api_url = "https://maps.googleapis.com/maps/api/geocode/json?address=$device_location";
|
||||
$api_url = "https://maps.googleapis.com/maps/api/geocode/json?address=$new_device_location";
|
||||
break;
|
||||
}
|
||||
$curl_init = curl_init($api_url);
|
||||
|
Reference in New Issue
Block a user