User map [Deleted]

OK, just found this.

Server key: Google Maps Geocoding API
https://developers.google.com/maps/web-services/
Click on Get a Key button and follow the steps.

Browser key: Google Maps Geocoding API
https://developers.google.com/maps/documentation/javascript/
Select the same project you created beforehand and create a javaScript key in there

Now I can see the map.

I then updated the mass update to have all members show on the map.

Mass-update

1- Enable "Fallback to Registration IP address if user location is blank?"

2- Go to http://www.Your_domain/usermap/massupdate
The mass-update will go through all users and re-encode their location. It does this based on the value of Map Location / Location / IP address*

I leave this here for future reference, maybe I'm not the only one who faced this initial bump.

Cheers!

Andre
 
I have limited knowledge of APIs, and maybe Google changed their page since, but if you could help I'd be grateful.

* At https://developers.google.com/maps/documentation/geocoding/get-api-key scroll down to 'Detailed guide for users of the standard Google Maps Geocoding API' with steps 1 to 7.
* Follow steps 1 thru 4

Capture-API.webp

* Ensure you have 2 API keys as shown above, 1 with restriction: IP address, and another with restriction: Referrer
* The restriction: Referrer Key goes into the ACP Maps option for Browser Key
* The restriction: IP address Key goes into the ACP Maps option for Server Key

Voila! The add-on's maps should now work and display.

Once confirmed working, I then suggest you edit (the Name is hyperlinked), within Google API console, the options for each of these keys and set the respective server ip address(es) and website URL(s)
 
Thanks Mouth, OK, so it's not displaying the EDIT I made to ADD the restrictions. Even though it says 5 min to propagate. Not sure if I should just start over...

6c33a32a35467f1b0b42433161476c90.webp
Once confirmed working, I then suggest you edit (the Name is hyperlinked), within Google API console, the options for each of these keys and set the respective server ip address(es) and website URL(s)

You lost me here... :(
 
OK, so here it is today, nothing has changed, even if I selected HTTP and IP a couple days ago. Still shows "None."

5631ef481dbcfc3269f0099fe17655ff.webp

Assume I have no idea what is what. Here is the EDIT screen. "Pass it" means nothing to me. What does it mean?

869b2e4a6eee24879537c5c49fb7f6a5.webp
 
"Pass it" means nothing to me. What does it mean?
Ignore it, it's for the add-on developer when coding the add-on to communicate with the Google geo servers.

even if I selected HTTP and IP a couple days ago. Still shows "None."
Do it again to make sure. Screenshot and show what you're submitting. Never had a problem with this. Probably safe to assume you're not doing it quite correctly rather than Google having a bug :)

In either case, the add-on should be working for you if you've entered in the two seperate API keys within ACP options.
Defining your restrictions shouldn't be necessary, it should still work without them, just that the restrictions ensure that no-one else uses or abuses your API 'account'
 
I am actually having the same issue as @creativeforge, but only on two of my four sites where I have the map located. Can't figure out why. The map STARTS to load and you can even see user pins, and then it crashes with this:
Capture.webp

No idea why this is happening on some of my sites and not others since I have worked very hard to setup all of my sites exactly the same.
 
I am actually having the same issue as @creativeforge, but only on two of my four sites where I have the map located. Can't figure out why. The map STARTS to load and you can even see user pins, and then it crashes with this:
View attachment 154681

No idea why this is happening on some of my sites and not others since I have worked very hard to setup all of my sites exactly the same.

Hi,

Sorry you're having issues too.

Make sure you follow these steps:

Server key: Google Maps Geocoding API
https://developers.google.com/maps/web-services/
Click on Get a Key button and follow the steps.

Browser key: Google Maps Geocoding API
https://developers.google.com/maps/documentation/javascript/
Select the same project you created beforehand and create a javaScript key in there

Now I can see the map.

I then updated the mass update to have all members show on the map.

Mass-update

1- Enable "Fallback to Registration IP address if user location is blank?"

2- Go to http://www.Your_domain/usermap/massupdate
The mass-update will go through all users and re-encode their location. It does this based on the value of Map Location / Location / IP address*

I leave this here for future reference, maybe I'm not the only one who faced this initial bump.

It's the only way I was able to resolve this.

Hope this helps!
 
Ignore it, it's for the add-on developer when coding the add-on to communicate with the Google geo servers.
Do it again to make sure. Screenshot and show what you're submitting. Never had a problem with this. Probably safe to assume you're not doing it quite correctly rather than Google having a bug :)
In either case, the add-on should be working for you if you've entered in the two seperate API keys within ACP options.
Defining your restrictions shouldn't be necessary, it should still work without them, just that the restrictions ensure that no-one else uses or abuses your API 'account'

Thanks for your help, Mouth. It does work without the restrictions, but my client has a high demand for privacy.

Did you enter anything in the field marked "(optional)":

"Accept requests from these server IP addresses"
 
Thanks for your help, Mouth. It does work without the restrictions, but my client has a high demand for privacy.

Did you enter anything in the field marked "(optional)":

"Accept requests from these server IP addresses"
Your server API key should be IP Address restricted, with the ip address(es) (mine is a /29 subnet) of your XF server. Don't forget to also add you IPv6 address range too, if you have one.
Your browser API key should be referrer restricted, with the URL(s) of your XF server
 
Your server API key should be IP Address restricted, with the ip address(es) (mine is a /29 subnet) of your XF server. Don't forget to also add you IPv6 address range too, if you have one.
Your browser API key should be referrer restricted, with the URL(s) of your XF server
I get strange things, probably I put something that I should not.
Coud you please give examples for both?
 
Your server API key should be IP Address restricted, with the ip address(es) (mine is a /29 subnet) of your XF server. Don't forget to also add you IPv6 address range too, if you have one.
Your browser API key should be referrer restricted, with the URL(s) of your XF server

Oh boy, for some reason I wasn't able to connect the dots. BUT, this was really helpful, Mouth. THANKS!

Here is the result:

abae9e6db43144e95c64df55efc8ed03.webp

And in Options, in the forum's admin panel:

c0ae19ff4d16854572f2ab7759733157.webp

All good? Is there another way to have this happen besides using the fallback to registration IP, or are the restrictions enough to protect?

Thanks!
 
I have tried all this and been very careful, but I still get the error. :(

1- Login your Gmail account.

2- Prepare this information:
- your website address (for ex: http://www.myforum.com).
- your hosting server IP address (for ex: 192.168.0.1).
- your city's coordinates (Google your town with the term "coordinates." For example, Los Angeles coordinates = 34.0522° N, 118.2437° W).

3- Then in your browser, Access Google API creation via these links. The process will be the same for both.

Browser key: https://developers.google.com/maps/documentation/javascript/

Server key: https://developers.google.com/maps/documentation/geocoding/get-api-key

Click GET A KEY.
7ff1a5a91e9ff0787595839f7ad7dc35.webp

A pop-up window will open. Click on the down arrow beside Select or Create project.

7f61ccd1bc092c3ea276936cca50db79.webp

A new menu will appear, select Create a new project (unless you've already done this. If so, then select the project name you created earlier). Here I'll assume that you are creating a new project.

704a9096addb85201e957e8b6689fa4a.webp

Click on Create New project. Enter a name for your project. Here I entered Project New. (If you create a new project, you will see "ENABLE API" beside CANCEL on the bottom, it will change to "CREATE AND ENABLE API").

fef48c00a109cf67da371d08a8d8119a.webp

Then click on CREATE AND ENABLE API. This confirmation window opened. Here you need to copy your key so it cane be "pasted" in the API field in the next step.

Next, click on API CONSOLE to access the Credentials screen so you can enter "Restrictions" for better protection. (Don't click on FINISH, as clicking on the API CONSOLE will take you to the next step where you will finish).

allset.webp

A new page will open. Here you will see your API key entered. Now you need to address the KEY RESTRICTION (there's a yellow warning icon beside it).

87f0891871968ac41fd97e5e81e2c9cd.webp

So now, I have this new key, and another one I had created before. I will edit the one I created earlier to identify it as the server key. I click on the little pencil on the right, or on the term API Key.

758911529040162d661b35284b9c85ac.webp

After clicking, I get this page.

16407f22136571c208bc435d56d69a1f.webp

Here I will identify the API Key as a "server" key, by adding a "s" after the name API Key. And then I will "assign" this key to the IP address of my hosting server (you could ask your hosting company for it, or check in your hosting CPanel). Finally, enter that IP address.

9cd_server.webp

Once this is done, you will be taken to this page. Now you can see, there are no more warnings. And you will notice that under Restriction, one key is for Referrer (another word for URL) and for IP Address.

483de660abfb6cd0000dc0b69bdd3ee2.webp

Now that you have two keys, each one assigned to its proper function (browser/server), it's time to enter them in your Xenforo Options panel.

4- Login you Xenforo install. Got to Home/Options. Here I had to make sure a few basic options were setup. Look at this screenshot to find out which ones.

Default Map Center:
for your city's coordinates, enter your search results like so: xx.xxxx,-xx.xxxx (for ex: 34.0522,-118.2437). This will show your own city as the center of the map that will result.)

82a830df5e93062967be13846ae108b5.webp


Now scroll down and find the API keys fields. Post each of the API keys you created in their appropriate field.

(Also enable Allow Mass Geo-location Updates.)

apikeys9.webp

Now SAVE the page, and do a Mass-update to refresh the map with all the IPs located on the server from your present members.

5- MASS UPDATE: To do so, enter your forum's URL and add this at the end: /usermap/massupdate.
The mass-update will go through all users and re-encode their location. It does this based on the value of Map Location / Location or IP addresses from your members profile info.

And you're done!

Hope this helps! Let me know if I missed something or have the wrong info.
 

Attachments

  • 9cd_2.webp
    9cd_2.webp
    68.2 KB · Views: 5
Last edited:
Well, after all this...
9f10aa06fe7c31d9ba41a46a18d4cee4.webp

It was working yesterday. So I regenerated the key but have to wait to find a solution why there are no users to mass update...

ARRRRRRRGGHHHH!!!!
 
sorry folks, I am away in the Italian mountainside (it's tough...) on holiday. I'll be back in a couple of weeks and will jump back on the issues. I've only got really patchy signal when I drive into the local village.
 
Italian mountainside
Great area, was there for 2 weeks on a rent car. Hope you enjoy it too!

I have a strange bug or not:
When I enable your add on - I can't save changes to 20% of users... and that's why they won't appear on the map too. For 80% of users changes save and users appear on the map.

If I disable "Enable automatic geo-location on user profile save?" - the issue doesn't reoccur. So it happens for automatic geo-location of some users during profile save.

Any ideas? The latest version.
 
Last edited:
Quick question as I'm away from a laptop to try this. If you uncheck use default location field and introduce the custom map location field what's the behaviour of existing users who do not opt to populate the custom field? Does it fall back to default location field if custom field is empty?

Thanks in advance.
 
Top Bottom