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) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Map: want to try to improve for european addresses
Pages: [1]

Author Topic: Map: want to try to improve for european addresses  (Read 2358 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Map: want to try to improve for european addresses
November 16, 2007, 10:27:51 am
Hello,

The map feature (based against google) doesn't work very well with the european addresses I've tried. If I read the template code properly, you can either put the lat/lon (something I doubt my users know by heart for most of their contacts ;) or fill the address and state for the geolookup.

The problem is that in some/most countries in europe, the state isn't a very common nor useful notion. However on maps.google.com if you put the {address}, {city}, {country} it does display the map.

I wanted to test more seriously, but I can't find the template used for the map as displayed in
civicrm.dev?q=civicrm/contact/map&reset=1&cid=105&lid=92

I looked in templates/CRM/Contact/Page/View/ to try to find a template, but didn't find any template.

Could you point me to where they are ?

Assuming I can find a better solution to display the european maps, I'd like to contribute back, Could tell me what's the best way to submit this (tiny) enhancement to hopefully be accepted and added to the core ?

Thanks in advance,

Xavier
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

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: Map: want to try to improve for european addresses
November 16, 2007, 11:13:14 am

1. the code is in: CRM/Contact/BAO/Contact.php, function getMapInfo, line 1233

2. Based on your observations, maye we should omit the state if the country is not US or CA

3. can u hack the code and try omitting state and see if it is better.

thanx

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

itsreally

  • Guest
Re: Map: want to try to improve for european addresses
November 29, 2007, 05:09:49 pm
Xavier,

did you have much success with your efforts in hacking the code?

I want to map addresses in Australia and have hit a similar problem

I have found that the import function lets you choose country as a field yet fails on the actual import.

[on further investigation i found the import worked on my installation of civicrm but not on the demo site]

cheers
« Last Edit: December 02, 2007, 05:27:53 pm by itsreally »

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Map: want to try to improve for european addresses
January 01, 2008, 11:04:18 pm
Hi,

Sorry, didn't see your question.

I haven't had the time to do it yet (haven't understood the location vs address and when the lookup is done), but definitely on my 2008 good resolutions list

I'll post when I've solved it.
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Map: want to try to improve for european addresses

This forum was archived on 2017-11-26.