CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • Providing option for a 'manual override' checkbox for Lat / Long
Pages: [1] 2

Author Topic: Providing option for a 'manual override' checkbox for Lat / Long  (Read 3836 times)

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Providing option for a 'manual override' checkbox for Lat / Long
July 26, 2010, 08:01:57 pm
Hi - in some cases the Google Map via CiviCRM is not returning the same result as putting the same address directly in to Google Maps.

One workaround seems to be providing a checkbox next to the Lat Long fields in the Edit screen, so that when checked the GMap look up does not run, meaning that manually entered Lat Longs will not be overwritten.

Sound like a good plan?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Providing option for a 'manual override' checkbox for Lat / Long
July 27, 2010, 01:39:18 am
Seems like a good solution to me. Looking forward for the patch.

Kurund
Found this reply helpful? Support CiviCRM

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Providing option for a 'manual override' checkbox for Lat / Long
July 27, 2010, 09:58:44 am
I don't understand how the proposed fix addresses the problem (or exactly what is causing the difference between what you're seeing inside CiviCRM vs. entering an address directly). If the difference relates to what happens when the map display is based on a geocoding lookup via GMap api vs. map displayed based solely on address - then seems like the "checkbox" should do something different (i.e. Don't get or submit lat / long) ???
Protect your investment in CiviCRM by  becoming a Member!

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Providing option for a 'manual override' checkbox for Lat / Long
July 27, 2010, 10:54:24 am
Dave,

When google does geocoding calculations it uses their old db which are bit incorrect, where as Google maps uses latest geocode db.
So for same address lat/long will be different. Google maps will be more accurate.

Kurund
Found this reply helpful? Support CiviCRM

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Providing option for a 'manual override' checkbox for Lat / Long
July 27, 2010, 11:12:33 am
Peter - Is this the rationale? And if so, how does user get the more accurate lat/long to enter "manually" in the contact edit form?
Protect your investment in CiviCRM by  becoming a Member!

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Providing option for a 'manual override' checkbox for Lat / Long
July 27, 2010, 12:40:34 pm
Kurund - thanks for explaining why we have been hitting this problem.

Dave - I think we are talking about the same thing when you refer to 'do not get Lat Long'

What we are trying to achieve is that for contacts that the gooogle look up fails on, we should be able to manually enter the Lat Long, and have those coordinates be used for the Map.

Currently if we manually enter Lat Long they just get overwritten upon Save. Hope I am making things clearer  ::)
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

ericaordinary

  • Guest
Re: Providing option for a 'manual override' checkbox for Lat / Long
July 27, 2010, 11:42:14 pm
I'd also be interested in a fix for this (see http://forum.civicrm.org/index.php/topic,14830.0.html) as even the latest Google Maps isn't always correct!  I won't be any help at coding a solution but I'm happy to test anything that someone else comes up with.

Cheers,
Erica.

ericaordinary

  • Guest
Re: Providing option for a 'manual override' checkbox for Lat / Long
July 27, 2010, 11:51:45 pm
Also, re getting the accurate lat/long data I have been using https://egrants.com.au/geocoder/index.asp for Australian addresses because it supports "corners". 

There are also options for our government department that deals with place names/geographic information supplying geocoded data or giving our data to geomatics students as a project to tidy up inaccurate geocodes.  This might be an option for other NFPs who do need more accurate data and can garner a bit of in kind support.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Providing option for a 'manual override' checkbox for Lat / Long
July 28, 2010, 12:10:08 am

As kurund mentioned earlier, if u'd like to see this happen please submit a patch and/or sponsor a developer to write the needed code

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Providing option for a 'manual override' checkbox for Lat / Long
July 28, 2010, 01:15:27 am
Erica - on the other thread I asked if you could go halves on getting this done via WebAccess - Lobo any estimate or shall i ask Claudian?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Providing option for a 'manual override' checkbox for Lat / Long
July 28, 2010, 01:23:44 am
As I understand scope of this project is to add checkbox for Contact Edit form next to lat/long and handle processing / skip google auto calculation of geocode. Right? IMO this should be around 20 hours.

Kurund
« Last Edit: July 28, 2010, 04:33:14 am by Kurund Jalmi »
Found this reply helpful? Support CiviCRM

chriscant

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 4
    • PHDCC
  • CiviCRM version: 4.2.19
Re: Providing option for a 'manual override' checkbox for Lat / Long
July 28, 2010, 07:38:30 am
Hi everyone.  I've been researching why CiviCRM mapping Google geocoder isn't as accurate as Google Maps is itself.

The Geocode/Google.php code uses the Google Geocoding API web service:
http://code.google.com/apis/maps/documentation/geocoding/index.html

This is equivalent to the GClientGeocoder() JavaScript API which I've used.  I've found that this API isn't as accurate as their GlocalSearch() JavaScript API which seems to be spot on here in the UK - and must be what Google Maps uses itself.

So: everything could be made more accurate if you did the geocoding client-side in JavaScript, ie as follows:
http://www.tomanthony.co.uk/blog/geocoding-uk-postcodes-with-google-map-api/

However with the current technique, having an override checkbox would help.

In a quick search I couldn't see any other references to the ordinary Geocoder being inaccurate.  But it would be useful if Google improved it.

Chris

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Providing option for a 'manual override' checkbox for Lat / Long
July 28, 2010, 11:33:35 am
Given that there seem to be alternate web-service solutions that provide more accuracy (at least for specific locales), I'm wondering if it makes sense to include the ability to specify an alternate geocode lookup method as part of this project (via hook, config file or admin ui)??
Protect your investment in CiviCRM by  becoming a Member!

chriscant

  • I post occasionally
  • **
  • Posts: 66
  • Karma: 4
    • PHDCC
  • CiviCRM version: 4.2.19
Re: Providing option for a 'manual override' checkbox for Lat / Long
July 28, 2010, 01:47:38 pm
Is the Yahoo provider any more accurate?  I must look.
Is there a Microsoft web service?

The attached image shows what I do elsewhere using the Google maps API in JavaScript client-side (in a Freegle groups configuration page).  On this page you can either navigate and put down a marker or enter an address and search for it.  Once you're happy you can "Use search result" ie insert the lat/lng in the fields above.

I can pass on this code (or try to add it in the right place).  It should only be enabled if the Google geocoder is enabled.  There would still need to be an override default goecoder checkbox - using the search result would automatically check this box.

Chris

ericaordinary

  • Guest
Re: Providing option for a 'manual override' checkbox for Lat / Long
July 28, 2010, 08:24:18 pm
Peter, my apologies for not understanding what you meant in the previous forum.  I'm pretty new to all this and didn't quite know what you were referring to with going halves.  Unfortunately my organisation are not really in a position to donate to this project, as we have a very limited IT budget and the lat/long override functionality is not a crucial issue.  We may be able to contribute a few hundred dollars, but I'm pretty sure that's not going to cover anywhere near half of a 20 hour project.  I suspect a developer's hourly rate is a little more substantial than my community sector one!

I've been thinking a bit more about the issue, and wondering if a better strategy would be trying to improve the accuracy of the Google geocodes.  The only issue I've found in so far is to do with corner addresses in Australia, so if the Google geocoder were able to recognise those kinds of addresses I wouldn't have much of an issue.  I have no idea how to do this, however, as I don't know anything about how Google or its geocoding operates.  I'm probably getting very out of my depth here!

Also, I just switched my provider over to Yahoo (after a lengthy and confusing sign-up process) and the accuracy for corner addresses isn't any better than Google.

Pages: [1] 2
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Feature Requests and Suggestions (Moderator: Dave Greenberg) »
  • Providing option for a 'manual override' checkbox for Lat / Long

This forum was archived on 2017-11-26.