Hi,
I have an issue with the geolocation of my users.
The extension HelloMaps from Gotour WebSolutions does'nt find the datas in the appropriate database for the geolocation.
Here is their answer the team of Gotour gives me.
Can you please tell me how to fix this?
From GoTour
"We just saw your database, and the latitude and longitude values are not stored in the table # _community_users. (see attachment)
The latitude and longitude values are generated automatically by JomSocial, when the user fills in the fields: STATE / COUNTRY / CITY / ADDRESS.
Our map receives the values from this table, and if users are properly geolocated will be displayed on the map. "
Thank you for your answer,
Best regards
Hi Nathalie,
I confirmed this is a valid bug. for temporary fixes please follow this steps:
1. edit /components/com_community/models/profile.php
2. find function at line 495:
public function updateLocationData($userid)
// Build the address string
$address = $user->getAddress();
$address = str_replace('COM_COMMUNITY_LANG_NAME_', '', $address);
Hi,
I did as you said and it worked fine for a while but then,
I did two things :
I changed a birthdate on one user,
and I went on a profile to make the "address field" visible only by me
and then it didn't worked anymore even after if I put it back as before.
The map doesn't find anymore the new members I add...
??
Best regards
Hi Nathalie,
I want have a look at your site. seem your site info not valid. I want to know what address, city, state, country
here the explanation about how to jomsocial get lat lang value:
1. jomsocial will send value by using address, state, country value from profile to
maps.google.com/maps/api/geocode/json?address=
[ADDRESS]%2C[CITY]%2C[STATE]%2C[COUNTRY]&sensor=false
2. If the return not false, the lat lang value will put into that user table and if false / address not found at google maps, it will return 255.0000 to user table
Could you please make sure your credential information is valid at site info?
Regards,
Albert
Hi Albertus
I created a new user with an adress which is for sure recognise by google map:
10 rue des Bordes, Sâone-et-Loire, Louhans, France
and it gives by default the value 255.00000
even the adress I was using before was recognise since it found it on the map once and then it disappear from the map after the change.
Hope we can find a solution,
Best regards
Hi Nathalie,
the return from google:
"You have exceeded your daily request quota for this API"
let wait until tomorrow, don't know why this happen.
and I found something with jomsocial toolbar. your template css make the toolbar disappear. but I already fixed for you.
I put new css rule at template custom.css
#community-wrap .navbar-inner .collapse {
display: block !important;
}
Hi Nathalie,
please follow the step to get an API key (at answer section)
salesforce.stackexchange.com/questions/2...hen-trying-to-get-la
and let me know the API key. after that I will try to put it in the google request code.
Regards,
Albert
Hi Nathalie,
Done... it works now.
here the changes:
/components/com_community/libraries/mapping.php line 41:
From
$url = CMapping::GEOCODE_URL . 'address='.urlencode($address) .'&sensor=false';
To
$url = 'https://'.CMapping::GEOCODE_URL . 'key=AIzaSyALaLRi2VqlFaB8Bf3J4uvDVHA-1oj5eBA&address='.urlencode($address) .'&sensor=false';
Hi Albertus,
I don't know what is the relation with geolocation issue but now when I create a new user he doesn't receive the activation link for his account... neither I receive a message to tell that a new account has been created...
??