By Alexandre Cayer on Wednesday, 25 June 2014
Posted in Technical Issues
Replies 17
Likes 0
Views 892
Votes 0
Hi Guys,

While making some registering test for dummy user BUT with real address, I realize that the Geolocalization wasn't kicking in properly with my Canadian addresses.

Can someone tell me a little bit about the process so we can get where this error is coming from !

Thanks

Alex
Hello Alex,

May I know what did you mean with Geolocalization? How to replicate your issue? Perhaps, you can provide us your backend and FTP so we can have a clear view on your issue.
·
Wednesday, 25 June 2014 11:56
·
0 Likes
·
0 Votes
·
0 Comments
·
Here is a screenshot of the "Members worldwide" Module form Dashboard.
Geocode address is activate. Got 5 users and only one pops out and it shall not be in US hehehe.
I gave you the site info tomorrow. Left stackideas password for ftp at work.

Alex
·
Wednesday, 25 June 2014 12:22
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Alexandre,

Sure, keep us updated then.
·
Wednesday, 25 June 2014 12:28
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Nik,

All details provided. Thanks and let me know. My guess is that my address is not properly formated and the geolocalization doesn't kick in properly and therefore doesn't convert and then doesn't display. (any link with the fact that I don't use the "address2" field ?)

Thanks

Alex
·
Wednesday, 25 June 2014 22:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Alex,

I've tried to replicate in your site by registering an user from Malaysia, and the map is displayed correctly: http://screencast.com/t/KT85OvtDIUM . (If this helps: I've also filled in the Address 2 field). Have you tried with other address? Please advise.
·
Thursday, 26 June 2014 16:47
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Nik,

I knew that the issue wasn't on the whole thing. My customer are gonna be mostly canadian, therefore at some point, canadian address would need to work.

Therefore, once we establish that it working in Malaysia, we can say that if the geocode doesn't translate, it is because of the way the address is pass.

If we would just relate on Zip/Postal for Canada, this provide me a 98% correct area from the original address. As an example, see: https://goo.gl/maps/Y42DU

Which is triggered only with the Postal code: J3L2A4. Our correct address is 2400 rue Bourgogne (address1: number + str name), Chambly (city), Quebec(province/state), J3L2A4 (postal), Canada (country).

Is there a way to check for the result of the geocode and if unsuccess, apply the geocode to the postal alone ?

Thanks
·
Thursday, 26 June 2014 20:44
·
0 Likes
·
0 Votes
·
0 Comments
·
Nik,

How that goes ?

Alex
·
Monday, 30 June 2014 21:31
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Alex,

I am really sorry for the delay of this reply, we might have missed your post earlier I have applied a temporary fix on your site and it should now be pulling Canada correctly. The problem is because the country short code is "CA" and for some reasons, Google maps is thinking that CA represents California, USA instead
·
Tuesday, 01 July 2014 00:34
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Mark,

Actually true, now it is coming up in Canada. However, :/ my 2400, rue Bourgogne, Chambly, Québec, J3L2A4 is ending up in Saskastechen instead than Quebec.
What file and table this module is looking up into ? There might be another issue ... what file is it looking up right now ?

Thanks
·
Tuesday, 01 July 2014 02:21
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Alexandre,

I have actually modified the file /administrator/components/com_easysocial/controllers/easysocial.php
·
Tuesday, 01 July 2014 12:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Mark,

Any hint right now at why it is still not working ? I don't see any model which would relate to the google geo decoder dho. I wanna try to see how the data is fetch and make some test but I don't know where to look.

What have you change to the controller ( i suppose in getCountries which relate to the helper).

Alex
·
Tuesday, 01 July 2014 13:14
·
0 Likes
·
0 Votes
·
0 Comments
·
Yes, I have modified the controller method getCountries to remap the short country code with the helper file so that we can get the correct country value. The google geocoder is found in /administrator/components/com_easysocial/themes/default/easysocial/widget.maps.js
·
Tuesday, 01 July 2014 23:27
·
0 Likes
·
0 Votes
·
0 Comments
·
Mark,
Is the purpose of "Member Worldwide" to display only the country (with mark in the center) or to display a marker at the specific address and then display then number of user per country ?

I have remplace line 27 (value) of widjet.map.js with my address and this worked for the marker. Obviously this as screw up the rest but the issue is the value returned. Can we just return the whole address field then get the country and display the marker with the whole address?
·
Wednesday, 02 July 2014 12:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Mark,

Whatsoever my last post. I currently have 6 user with more than 1 in Canada AND the module Member Worldwide only says:
Canada 1
1
Malaysia 1

Therefore, one not showing and what about the rest... :/
·
Wednesday, 02 July 2014 12:26
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Alexandre,

The map at the back end doesn't display the user by address but only based on countries. The purpose of this widget is to display users by country and not exact location. I have applied some fixes and it should display correct values now.
·
Thursday, 03 July 2014 12:51
·
0 Likes
·
0 Votes
·
0 Comments
·
Hey Mark,

Worked fine, pull that fix for next release please
Obviously, a state or per address would be a good feature request for next version too since when your clients are mostly one country, this becomes a little bit useless

Thanks Again
·
Thursday, 03 July 2014 13:00
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Alexandre,

Yes, this will be fixed in the next release but we'll still need to wait for 1.3 because we have changed the structure in 1.3 so that the country would be stored as "Canada" instead of "CA". Storing it as "CA" seems to cause Google to think that it's California for some odd reasons.
·
Thursday, 03 July 2014 13:10
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post