Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; GmaLine has a deprecated constructor in /home/pmwiki/pmwiki/cookbook/GoogleMapAPI/GoogleMapAPI.php on line 58

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; GmaMap has a deprecated constructor in /home/pmwiki/pmwiki/cookbook/GoogleMapAPI/GoogleMapAPI.php on line 107

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; GmaPoint has a deprecated constructor in /home/pmwiki/pmwiki/cookbook/GoogleMapAPI/GoogleMapAPI.php on line 164

Warning: Cannot modify header information - headers already sent by (output started at /home/pmwiki/pmwiki/cookbook/GoogleMapAPI/GoogleMapAPI.php:58) in /home/pmwiki/pmwiki/pmwiki.php on line 478

Warning: Cannot modify header information - headers already sent by (output started at /home/pmwiki/pmwiki/cookbook/GoogleMapAPI/GoogleMapAPI.php:58) in /home/pmwiki/pmwiki/pmwiki.php on line 1847
PmWiki | GoogleMapAPI / Talk
Recent Changes - Search:

PmWiki

pmwiki.org

Talk


Hey, it would be cool to have language support natively in this receipe. I've just added the required parameter (hl=XX, with XX being the language code) to the URL in <script src='http://...' but upon upgrading this would get lost.

Further details can be found in this post from the Google Maps API blog: [(approve links) edit diff]

Best regards, and thanks for this great receipe. Fritz Webering April 20, 2008, at 09:03 AM


Hi - echoing below, nice recipe. However, I'm having a problem in that I cannot seem to support two maps on the same page at the same time, and use markers. When I try to apply markers, very bizarre behavior occurs.

After looking at the code, it appears the markers array gets reused between both maps, and that's causing some of the problems. I made a quick kludge to separate the variables into different scopes, but the fromhere() and tohere() tags still get messed up.

Are multiple maps on the same page currently supported? If not, do you suppose I could create a context class for each map, containing the markers and so on arrays, and working that into the PHP code? If you are still reading this, please e-mail me at russ at finalscoretrivia dot com. Thanks, RussFink 10Jan2008

  • Thanks for the interest. Multiple maps are not presently supported, but there has been interest in it. If I get the chance, I'll try to solve it. BenWilson January 24, 2008, at 04:37 PM

Hello! Very nice recipe. One question. Has anyone managed to include a KML file in the Google Map on your Wiki? I have walking trails in a KML file that I would like to place 'on top of' the Google Map. In HTML this is done by adding this code
var kml = new GGeoXml("[(approve links) edit diff]")
map.addOverlay(kml);
Right below the map.setCenter tag. Can this be done using this recipe?
Tnx! DJ -> mailto:pmwiki [snail] nldj [period] com


Hi Ben. Great recipe. Just wondering if there is any way to drive points on the map using variables as input? For example, I want to use PageTextVariables to drive some inputs to the "addr" field of a point. Is this possible? Has anyone gotten points on the map to be driven via variables either from a PageListTemplate, or PageTextVariables? --lordmundi April 20, 2007, at 10:11 PM

ok... i figured out how to get this to work pretty easily. I opened up the recipe (GoogleMapAPI.php) and changed the Markup line so that it was processed as part of the "inline" processing rather than at the beginnging. I.e., I changed the line from:

 Markup('gma', '_begin', '/\(:gma-(\S+)\s?(.*?):\)/ie',"gmaMarkup('$1','$2');");

to:

 Markup('gma', 'inline', '/\(:gma-(\S+)\s?(.*?):\)/ie',"gmaMarkup('$1','$2');");

That seems to do the trick for me... --lordmundi April 25, 2007, at 09:49 PM


Is it just me or does the pre5 version that is linked directly below the stable 2.1 version of the code lack the vast majority of files needed for the project? - Jared

I noticed this myself. Wondering how that happened as I have an automated script. I will try to find what happened and republish. BenWilson March 12, 2007, at 08:16 AM


(April 2, 2007) I hope I'm writing in the right place... I looked all over where was the appropriate place to put bug reports and this is as close as I can find...
It appears that the 'marker=3:20' option for a point doesn't work. If it does can somebody point me to a working example? Here's what I tried (I'm aiming for something that looks like a house):
(:gma-point lat=41.336155 lon=19.822029 text='Peter & Melodye' marker='3:56':)

Any help greatly appreciated... - Peter


Give me a couple days to review and try to fix BenWilson April 24, 2007, at 02:54 PM


Howdy all, I just wanted to let ya'll know that this recipe isn't valid XHTML 1.0 Transitional (what PmWiki is). So, I made some changes to the code, and I thought I would share:

In 'GoogleMapAPI.php'
from:
------------------------------
line 261:     =  '<style type=\'text/css\'>v:* { behavior:url(#default#VML); }</style>'
line 262:       ."\n<script src='http://maps.google.com/maps?file=api&v=2.70&key="
line 265:     =  "\n<script language='javascript' src='\$FarmPubDirUrl/scripts/gmaJs.js'>"
line 326:  //<![CDATA[
------------------------------
to:
------------------------------
line 261:     =  "<!--[if IE]>\n<style type=\'text/css\'>v:* { behavior:url(#default#VML); }</style>\n<![endif]-->"
line 262:       ."\n<script src='http://maps.google.com/maps?file=api&amp;v=2.70&amp;key="
line 265:     =  "\n<script type='text/javascript' language='javascript' src='\$FarmPubDirUrl/scripts/gmaJs.js'>"
line 326:  //[CDATA]
------------------------------

Of course, since 'Benjamin C. Wilson' holds all the rights to this code, I can't technically write what I just did above. Please release your code under open source (if you already did, then I apologize). I am releasing this patch under the GPLv3.
-Diafygi 2007/07/12


So, the Google Map API recently released the ability to show driving directions. I was wondering if it was planned to add this feature to the GoogleMapAPI recipe. Thanks.
-Diafygi 2007/07/12


Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 05:58 PM