County entries Google vs MapQuest and their representation on the Location menu . [SEC=UNCLASSIFIED]
I saw a comment in "includes/geolocation.inc.php" about sorting the difference between county and states. I was looking cause i'd like a cleaner looking location menu.
so i hijacked a device on the test system and changed it's location to "10 Downing St, London SW1A 2AA, United Kingdom"
I see that we have different results depending on who we ask. Geolocation (MAPQUEST) -> [51.503440, -0.127708] United Kingdom (Country), England (State), Unknown (County), London (City) Geolocation (GOOGLE) -> [51.503363, -0.127625] United Kingdom (Country), Unknown (State), Greater London (County), London (City)
So a few questions. 1) Is google preferred (especially for people who have sites in a Country that has Counties). 2) Are people happy to have Counties and States on the same level in the menu. 3) Are there countries that have BOTH Counties and States or are they mutually exclusive. 4) Do people need/want the double name entries on the last location menu (two pictures attached to show the difference for what i mean). I have a simple system with ony 38 locations. People may have lots more where this has an advantage.
(Embedded image moved to file: pic36298.gif)
(Embedded image moved to file: pic21780.gif)
thanks
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.au
********************************************************************** The information contained in this e-mail (including any attachments) is for the exclusive use of the addressee. If you are not the intended recipient please notify the sender immediately and delete this e-mail. It is noted that legal privilege is not waived because you have read this e-mail. **********************************************************************
The problem is trying to find a one size fits all system.
The USA of course has counties and states! :)
It's weird that Mapquest returns the home country for the UK, but not the county, whereas google returns the home country but not the county!
There's probably some scope for rewriting the locations menu to be a little more flexible, it was a fairly quick hack several years ago :)
adam. On 05/08/2015 04:40:29, peter.hine@familycourt.gov.au peter.hine@familycourt.gov.au wrote:
I saw a comment in "includes/geolocation.inc.php" about sorting the difference between county and states. I was looking cause i'd like a cleaner looking location menu.
so i hijacked a device on the test system and changed it's location to "10 Downing St, London SW1A 2AA, United Kingdom"
I see that we have different results depending on who we ask. Geolocation (MAPQUEST) -> [51.503440, -0.127708] United Kingdom (Country), England (State), Unknown (County), London (City) Geolocation (GOOGLE) -> [51.503363, -0.127625] United Kingdom (Country), Unknown (State), Greater London (County), London (City)
So a few questions. 1) Is google preferred (especially for people who have sites in a Country that has Counties). 2) Are people happy to have Counties and States on the same level in the menu. 3) Are there countries that have BOTH Counties and States or are they mutually exclusive. 4) Do people need/want the double name entries on the last location menu (two pictures attached to show the difference for what i mean). I have a simple system with ony 38 locations. People may have lots more where this has an advantage.
(Embedded image moved to file: pic36298.gif)
(Embedded image moved to file: pic21780.gif)
thanks
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.au
********************************************************************** The information contained in this e-mail (including any attachments) is for the exclusive use of the addressee. If you are not the intended recipient please notify the sender immediately and delete this e-mail. It is noted that legal privilege is not waived because you have read this e-mail. **********************************************************************
_______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
"The problem is trying to find a one size fits all system." yes. if you like, try this. It results in the picture similar to the attached (one less menu depth for all of my locations at least). Check to see if other users like a different format.
(Embedded image moved to file: pic00475.gif)
for CE 0.15.6.6430 line 99 of /opt/observium/html/includes/cache-data.inc.php
replace the following 11 lines with the more complex set in the attached new.txt. $cache['locations']['entries'][$device ['location_country']]['entries'][$device['location_state']]['count']++; $cache['locations']['entries'][$device ['location_country']]['entries'][$device['location_state']]['level'] = 'location_state';
$cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device['location_county']]['count']++; $cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device['location_county']]['level'] = 'location_county'; $cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device ['location_county']]['entries'][$device['location_city']]['count']++; $cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device ['location_county']]['entries'][$device['location_city']]['level'] = 'location_city';
$cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device ['location_county']]['entries'][$device ['location_city']]['entries'][$device['location']]['count']++; $cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device ['location_county']]['entries'][$device ['location_city']]['entries'][$device['location']]['level'] = 'location';
add the following two lines to config.php $config['location_countries_with_counties'] = array('gb'); $config['location_countries_with_counties_and_states'] = array('us');
and set the following if not already $config['location_menu_geocoded'] = TRUE; $config['geocoding']['api'] = 'google';
thanks
Peter Hine
********************************************************************** The information contained in this e-mail (including any attachments) is for the exclusive use of the addressee. If you are not the intended recipient please notify the sender immediately and delete this e-mail. It is noted that legal privilege is not waived because you have read this e-mail. **********************************************************************
"The problem is trying to find a one size fits all system." yes. if you like, try this. It results in the picture similar to the attached (one less menu depth for all of my locations at least). Check to see if other users like a different format.
(Embedded image moved to file: pic48520.gif)
for CE 0.15.6.6430 line 99 of /opt/observium/html/includes/cache-data.inc.php
replace the following 11 lines with the more complex set in the attached new.txt.(See attached file: new.txt) $cache['locations']['entries'][$device ['location_country']]['entries'][$device['location_state']]['count']++; $cache['locations']['entries'][$device ['location_country']]['entries'][$device['location_state']]['level'] = 'location_state';
$cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device['location_county']]['count']++; $cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device['location_county']]['level'] = 'location_county'; $cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device ['location_county']]['entries'][$device['location_city']]['count']++; $cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device ['location_county']]['entries'][$device['location_city']]['level'] = 'location_city';
$cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device ['location_county']]['entries'][$device ['location_city']]['entries'][$device['location']]['count']++; $cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device ['location_county']]['entries'][$device ['location_city']]['entries'][$device['location']]['level'] = 'location';
add the following two lines to config.php $config['location_countries_with_counties'] = array('gb'); $config['location_countries_with_counties_and_states'] = array('us');
and set the following if not already $config['location_menu_geocoded'] = TRUE; $config['geocoding']['api'] = 'google';
thanks
Peter Hine
********************************************************************** The information contained in this e-mail (including any attachments) is for the exclusive use of the addressee. If you are not the intended recipient please notify the sender immediately and delete this e-mail. It is noted that legal privilege is not waived because you have read this e-mail. **********************************************************************
Hmm. That doesn't seem to make any difference at all to my menu?
I have devices in several countries, including the UK and USA, but it didn't seem to change anything oO
adam. On 05/08/2015 07:46:42, peter.hine@familycourt.gov.au peter.hine@familycourt.gov.au wrote:
"The problem is trying to find a one size fits all system." yes. if you like, try this. It results in the picture similar to the attached (one less menu depth for all of my locations at least). Check to see if other users like a different format.
(Embedded image moved to file: pic48520.gif)
for CE 0.15.6.6430 line 99 of /opt/observium/html/includes/cache-data.inc.php
replace the following 11 lines with the more complex set in the attached new.txt.(See attached file: new.txt) $cache['locations']['entries'][$device ['location_country']]['entries'][$device['location_state']]['count']++; $cache['locations']['entries'][$device ['location_country']]['entries'][$device['location_state']]['level'] = 'location_state';
$cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device['location_county']]['count']++; $cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device['location_county']]['level'] = 'location_county'; $cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device ['location_county']]['entries'][$device['location_city']]['count']++; $cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device ['location_county']]['entries'][$device['location_city']]['level'] = 'location_city';
$cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device ['location_county']]['entries'][$device ['location_city']]['entries'][$device['location']]['count']++; $cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device ['location_county']]['entries'][$device ['location_city']]['entries'][$device['location']]['level'] = 'location';
add the following two lines to config.php $config['location_countries_with_counties'] = array('gb'); $config['location_countries_with_counties_and_states'] = array('us');
and set the following if not already $config['location_menu_geocoded'] = TRUE; $config['geocoding']['api'] = 'google';
thanks
Peter Hine
********************************************************************** The information contained in this e-mail (including any attachments) is for the exclusive use of the addressee. If you are not the intended recipient please notify the sender immediately and delete this e-mail. It is noted that legal privilege is not waived because you have read this e-mail. **********************************************************************
_______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
Ahh. I see why. Your menu only has three entries in the top tier, so populates in a different way!
adam. On 05/08/2015 07:56:56, Adam Armstrong adama@memetic.org wrote: Hmm. That doesn't seem to make any difference at all to my menu?
I have devices in several countries, including the UK and USA, but it didn't seem to change anything oO
adam. On 05/08/2015 07:46:42, peter.hine@familycourt.gov.au peter.hine@familycourt.gov.au wrote:
"The problem is trying to find a one size fits all system." yes. if you like, try this. It results in the picture similar to the attached (one less menu depth for all of my locations at least). Check to see if other users like a different format.
(Embedded image moved to file: pic48520.gif)
for CE 0.15.6.6430 line 99 of /opt/observium/html/includes/cache-data.inc.php
replace the following 11 lines with the more complex set in the attached new.txt.(See attached file: new.txt) $cache['locations']['entries'][$device ['location_country']]['entries'][$device['location_state']]['count']++; $cache['locations']['entries'][$device ['location_country']]['entries'][$device['location_state']]['level'] = 'location_state';
$cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device['location_county']]['count']++; $cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device['location_county']]['level'] = 'location_county'; $cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device ['location_county']]['entries'][$device['location_city']]['count']++; $cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device ['location_county']]['entries'][$device['location_city']]['level'] = 'location_city';
$cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device ['location_county']]['entries'][$device ['location_city']]['entries'][$device['location']]['count']++; $cache['locations']['entries'][$device ['location_country']]['entries'][$device ['location_state']]['entries'][$device ['location_county']]['entries'][$device ['location_city']]['entries'][$device['location']]['level'] = 'location';
add the following two lines to config.php $config['location_countries_with_counties'] = array('gb'); $config['location_countries_with_counties_and_states'] = array('us');
and set the following if not already $config['location_menu_geocoded'] = TRUE; $config['geocoding']['api'] = 'google';
thanks
Peter Hine
********************************************************************** The information contained in this e-mail (including any attachments) is for the exclusive use of the addressee. If you are not the intended recipient please notify the sender immediately and delete this e-mail. It is noted that legal privilege is not waived because you have read this e-mail. **********************************************************************
_______________________________________________ observium mailing list observium@observium.org http://postman.memetic.org/cgi-bin/mailman/listinfo/observium
Adam, "Ahh. I see why. Your menu only has three entries in the top tier, so populates in a different way!"
once the line 'if (count($array['entries']) > "3")' in html/includes/navbar.inc.php activates, the unknowns start coming back (i had it set for 9 to stop the redundant submenus at the last tier)
(Embedded image moved to file: pic42467.gif)
thanks
Peter Hine Senior Technical Support Engineer (Servers) FCoA ITS peter.hine@familycourt.gov.au
********************************************************************** The information contained in this e-mail (including any attachments) is for the exclusive use of the addressee. If you are not the intended recipient please notify the sender immediately and delete this e-mail. It is noted that legal privilege is not waived because you have read this e-mail. **********************************************************************
participants (2)
-
Adam Armstrong
-
Peter.Hine@familycourt.gov.au