Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Mod Requests => Topic started by: JF3000 on August 24, 2016, 05:47:55 AM

Title: Google Member Map Help
Post by: JF3000 on August 24, 2016, 05:47:55 AM
Is there a member map using the Google API anywhere on this forum that works? The member map's that I can find here and on the Github don't seem to work and are extremely out of date, surprised something like this would just end up not being supported anymore. Can anyone shed some light please.

Thank you
Title: Re: Google Member Map Help
Post by: Tonyvic on August 24, 2016, 06:22:42 AM
I installed Spuds Google Member Map 4 years ago, it still works well for me.
https://github.com/Spuds/SMF-Google-Member-Map (https://github.com/Spuds/SMF-Google-Member-Map)
Title: Re: Google Member Map Help
Post by: JF3000 on August 24, 2016, 06:28:25 AM
But it doesn't work now. I keep getting:

Oops! Something went wrong. This page didn't load Google Maps correctly. See the JavaScript console for technical details.

I've created a key yet the Map thats created was well before June 2016 since the map needs the script ot be updated to include a key.
Title: Re: Google Member Map Help
Post by: JF3000 on August 28, 2016, 02:30:27 AM
The member map you installed 4 years ago is different because the API changed in June this year. So the files you uploaded would be different to what is on the GitHub. Just have no idea how to fix this.
Title: Re: Google Member Map Help
Post by: Tonyvic on August 28, 2016, 04:32:55 AM
Quote from: JF3000 on August 28, 2016, 02:30:27 AM
The member map you installed 4 years ago is different because the API changed in June this year. So the files you uploaded would be different to what is on the GitHub. Just have no idea how to fix this.
My apologies I didn't know that the API had changed and as the last commit was May 2014 that the files were the same. :-[
Title: Re: Google Member Map Help
Post by: JF3000 on August 28, 2016, 05:41:57 AM
I guess when the api changed they allowed the people using the old api to not have to worry about updating to the new api and thus still works. Disappointing because the map goes to load then comes up with the error and I can't work it out. I've tried a non godaddy host as well and I get the same issue. I am just not good enough with the coding to insert whatever is needed to fix the issue.
Title: Re: Google Member Map Help
Post by: kak2z on November 24, 2016, 01:09:28 PM
file GoogleMap.template.php
line 166

echo '
<script type="text/javascript" src="https://maps.google.com/maps/api/js?sensor=false"></script>


need add google map api key https://developers.google.com/maps/documentation/javascript/get-api-key?hl=ru


echo '
<script type="text/javascript" src="https://maps.google.com/maps/api/js?key=XXXXXXXXXXXXXXXXXXXX&sensor=false"></script>
Title: Re: Google Member Map Help
Post by: vbgamer45 on November 24, 2016, 11:27:36 PM
Updated version with that and other fixes