Hi Andre,
This is a pretty good idea. Likely Mike will want to incorporate this when he's back. I don't really touch the geolocation stuff, so it's best if he looks at it!
adam.
Sent from Mailbird [http://www.getmailbird.com/?utm_source=Mailbird&utm_medium=email&utm...] On 18/07/2017 21:26:07, Mamitzsch,André a.mamitzsch@ccgmbh.de wrote: Hello We are constantly running into issues with the geolocation service and the automated detection of the coordinates – people tend to set additional information in the sysLocation which finally cause the geo api’s to fail. I would like to suggest a small format / code change here to make the geo location detection more usable and reliable. SysLocation should be set up in the form: <Business Name / Rack Location> Street No., ZIP Code City, Country The <Business Name / Rack Location> is still stored in observium but ignored when querying the api. --- geolocation.inc.php.org 2017-07-18 22:09:56.994896291 +0200 +++ geolocation.inc.php 2017-07-18 22:09:40.082938507 +0200 @@ -20,9 +20,14 @@ function get_geolocation($address, $geo_db = array(), $dns_only = FALSE) { global $config; + /* $address parsing, allow business names or additional information */ + /* address line should be: <ACME INC> Test Street 42, 823456 Somewhere */ + $address_orig = $address; + $address = preg_replace("/^<?.*>/","",$address); + $ok = FALSE; - $location = array('location' => $address); // Init location array + $location = array('location' => $address_orig); // Init location array $location['location_geoapi'] = strtolower(trim($config['geocoding']['api'])); if (!isset($config['geo_api'][$location['location_geoapi']])) { -- Mit freundlichen Grüßen, Best regards, André Mamitzsch