Firefox PHP

Module: Google Maps

Posted by Maurice Makaay 
Re: Module: Google Maps
December 28, 2010 04:43PM
It is all very simple. Just follow the API docs. And all code that is needed for such connection is in the very example that you are referring to.

Please, do not abuse this thread any further for your personal hacking. This is going to be terribly off-topic.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Google Maps
January 02, 2011 09:06PM
My idea was to link local businesses to their locations who represent a user group on my phorum. I will share my findings in case other people should be interested. For now I am afraid that I encounter a problem with the <iframe> container which is not used with examples I found on the web. I am curious where I would place this code (currently in "plotter.php") in order to avoid "Break on Error: frame.google is undefined".
Language: Javascript
// This function picks up the click and opens the corresponding info window function myclick(a) { var frame = document.getElementById(';maptool_iframe';); frame.google.maps.event.trigger(gmarkers[a], "click"); }

I created the according list ("side_bar") with:
Language: Javascript
function onGoogleMapReady(frame, map) { : : // Create the marker object. var point = new frame.google.maps.LatLng(m[0], m[1]); frame.placeViewMarker(point, m[2]);   gmarkers.push(m); side_bar_html += ';<a href="javascript:myclick('; + (gmarkers.length-1) + ';)">'; + ';Hello'; + ';<\/a><br>';; } document.getElementById("side_bar").innerHTML = side_bar_html; frame.fluster.initialize(); : : }

I would like to hope that I haven't misused this thread with an option that hopefully is useful for other users, as well.
Thank you for a hint!
Re: Module: Google Maps
January 03, 2011 11:15AM
Quote
korsakov
I would like to hope that I haven't misused this thread with an option that hopefully is useful for other users, as well.
Thank you for a hint!

I'm afraid you might have misused this thread. If I was the module author I might be irritated to have a coding session forced upon me in my thread (a thread intended to support the installation and function of *my module*). Your idea could be the next sliced bread, but there are better places to take that conversation (Phorum Hack/Mod Requests would be my suggestion). Don't worry, Maurice seems to be present in all the forums here :-) he doesn't miss many threads.

-phil.
Re: Module: Google Maps
January 03, 2011 11:29AM
Phil, I am sorry that you feel that way. I did not intend to force any coding session on anybody. I was asking for a "hint" regarding the "iframe" issue, not more. Am I really so off the track with adding a listing to a google map, a feature that you see on many web applications nowadays? If yes, then I apologize for wasting your time and understand that my posts will be deleted.
Re: Module: Google Maps
January 03, 2011 12:19PM
When the module's author writes "Please, do not abuse this thread any further for your personal hacking." I would suggest that replying with a hack is not good etiquette :)
Re: Module: Google Maps
January 03, 2011 02:18PM
Being on vacation, I am only on line now and then (and for the next 10 days very likely not at all.) Thanks to Phil for writing up my feelings about abuse of this thread so clearly.

Korsakov, here's a hint: if you do not understand the workings of my module to start with, then do not try to hack it.

I will clean up this thread when I get back home.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce
Re: Module: Google Maps
January 03, 2011 04:00PM
I finally found the problem why my "hacks" hopefully are not necessary. The new "google_map(s)_user_info"-hook was missing an "s" in usermap.php. Also, should not the function "phorum_api_hook()" be named "phorum_hook()"?

Language: PHP
// Provide a hook for modules to influence the info window. if (isset($PHORUM[';hooks';][';google_map(s)_user_info';])) { // Add some extra data for the hook. $plot[';user';] = $user; $plot[';name';] = $name; $plot[';url';] = $url;   $plot = phorum_api_hook(';google_maps_user_info';, $plot); }



Edited 1 time(s). Last edit at 01/03/2011 04:38PM by korsakov.
Re: Module: Google Maps
January 04, 2011 05:19AM
I am not sure how you will be using that hook for your requirement, but you are right that it didn't function yet. I added the hook code, but didn't get around to using it in my own site code yet.

The phorum_api_hook() call is the new hook invocation call for Phorum 5.3. I updated it to phorum_hook() to make it work for 5.2 as well. The new module package 2.0.3 fixes the issue.


Maurice Makaay
Phorum Development Team
my blog linkedin profile secret sauce



Edited 1 time(s). Last edit at 01/04/2011 05:19AM by Maurice Makaay.
Re: Module: Google Maps
January 04, 2011 05:51AM
Hi Maurice,

I published a new version of my German Language Files Package which includes also translations for you module in two character sets iso-8859-1 and utf-8.

Please add the attached language files to the next release of your module and remove maybe existing old style files like german.php oder german-sie.php. Thanks!

Regards
Oliver

[Attached file removed. Now included in version 2.0.6]


Using Phorum since 7/2000: forum.langzeittest.de (actual version 5.2.23)
Modules "Made in Germany" for version 5.2: Author_as_Sender, CarCost, Close_Topic, Conceal_Message_Timestamp,
Format_Email, Index_Structure, Mailing_List, Pervasive_Forum, Spritmonitor, Terms_of_Service and German_Language_Files_Package.




Edited 1 time(s). Last edit at 08/05/2015 08:29AM by Oliver Riesen.
Re: Module: Google Maps
January 04, 2011 10:01AM
I also suspected phorum_API_hook to be a new function for 5.3. - You are right that the hook didn't help me to make progress. Btw, other experts couldn't help me either. I am afraid that at this moment you probably would be the only one who could direct me where to include a JS function in order to not break the call with an undefined frame.google.maps.event.trigger object. I am aware that I unluckily seem to be the only one with an application for linking a list of users to their according markers and I also know that you are on vacation ...
Sorry, only registered users may post in this forum.

Click here to login