Firefox PHP

Module: Google Maps

Posted by Maurice Makaay 
Re: Module: Google Maps
December 21, 2010 03:46AM
I'm not sure what you are asking for.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Google Maps
December 21, 2010 10:41AM
At this moment only the google map markers are showing up indicating the geocode of each user. You need to click these markers in order to find out whose geocode it is. It would be handy to click a specific user from a list or to select a user by entering his username and to get his geocode as a result. I hope this makes more sense. Thanks for your thoughts!
Re: Module: Google Maps
December 21, 2010 10:44AM
You could surely build/add this but the module shows the location of the user already in his own profile, nothing else need IMO.


Thomas Seifert
Re: Module: Google Maps
December 27, 2010 10:52PM
Thanks, Thomas. I was referring to usermap.tpl. It is not very helpful to see 100's of red markers. It'd be great to pick users from a list in order to immediately see where they are located. I tried to add a list using {LOOP MOD_GOOGLE_MAPS_USERS} but this loop only seems to work in the javascript of usermap.tpl. How would you approach this task?
Re: Module: Google Maps
December 28, 2010 04:03AM
Thomas' point is that there is no use in selecting users from that map. The whole purpose of that map is to see all users or to do things like looking up other users that live in your area. If you want to know where a user lives, then go to his profile.

For what you want, it would be better to write a whole different addon page for the module, which would provide a user search interface and which would only retrieve geolocation information after searching a user. You are now doing the equivalent of "SELECT * FROM table" in a database and filtering the results from code afterwards. Not a great approach for the use case.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Google Maps
December 28, 2010 11:47AM
Thanks Maurice! I understand. But why do I encounter problems with using {LOOP MOD_GOOGLE_MAPS_USERS} within usermap.tpl? It only seems to work within the javascript of this template.
Re: Module: Google Maps
December 28, 2010 03:14PM
I have no idea what you are trying to do or how you are trying to do that. If it works within one place of usermap.tpl, it must work in any place.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Google Maps
December 28, 2010 03:33PM
When I add these lines below the JS in usermap.tpl I do not receive any username:
{LOOP MOD_GOOGLE_MAPS_USERS}
{MOD_GOOGLE_MAPS_USERS->username}
{/LOOP MOD_GOOGLE_MAPS_USERS}
Re: Module: Google Maps
December 28, 2010 03:50PM
Oh right, that javascript generation code does not work either. That is some old bit of code from the previous version of the module. The usermap javascript code is fully generated from the maptool/plotter.php script in this new module version. Therefore, the MOD_GOOGLE_MAPS_USERS variable is no longer available for use in the usermap template.

I removed the code from the template and it will be in the next release.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Google Maps
December 28, 2010 04:32PM
Thank you! Too bad, I wanted to remove the entire code in order to see the impact but I didn't :(

Do you by any chance know how to make the connection between a marker and a listing? I found this sample online but I haven't been successful yet to implement it.

[gmaps-samples-v3.googlecode.com]
Sorry, only registered users may post in this forum.

Click here to login