Your comments are welcome. Please post new comments below this line.
This module is marked as (uncertain) and I don't think it still works.
The embedded map option [[ GMap:ll=48.853213,2.349116&z=15 | MyMap ]] does display an interactive map, but regardless of the co-ordinates I change this to, the map is always centered in the ocean below West Africa at latitude 0 and longitude 0. The test urls were,
[[ GMap:=-27.6709942,27.2345927 | Kroonstad ]]
[[ GMap:=51.7529414,-1.2576448 | Oxford UK ]]
Also worth noting is that the zoom paramaters on Google maps seem to have changed and is no longer part of the URL after the question mark. ( <Google Maps URL followed by latitude,longitude>,16.25z?hl=en )
The conclusion is that this plugin is no longer functioning, and since the Ape plugin does not appear to support embedded Google Maps and the Google Map API is also flagged as not working, PMWiki may effectively be without support for Google Maps.
25/1 - 12:31 Hi Petko, thanks for your reply. I will take another look at Ape, which I could not get working with GMaps yesterday. There was something, somewhere about GMaps having too many elements for Ape to handle, but I will investigate again and provide feedback.
After years of suffering through the plugin hell of the Drupal environment, my philosophy is that any plugin should perform a single function, but to do it well. That does not mean that there is no place for implementing features of the GMaps API, but that should be a separate extension offering either a container/placeholder, or an API in which manipulate maps. - casperl
The current solution is to log into your Google Maps console, create a new "public" map with all the bells and whistles, markers, icons, directions, then embed this public map into your page with Ape -- should be good enough. This is really less painful than editing a wiki-definition-list with coordinates in a wikitext page. For a map with a single pin this is too much work, use OpenStreetMaps instead. For a multiple-features map create one either at Google Maps, or at uMap.OpenStreetMap.fr then place the share link into the page so Ape can embed it. If this is not enough, and you have the time to write a new GMaps-only plugin and to support it, please do. Sorry I relied on a vendor, and they broke their public API, and people trusted them. --Petko January 25, 2018, at 06:47 AM
Hi Petko, firstly, thank you for your sterling work with PMWiki and this module. Hardly a day goes by where PM-Wiki does not amaze me in some new way.
For the benefit of other users, copying the line "$GMap['Key'] = "ABQIAAAA...GWA"; # your own key" from the GMap Cookbook page and then using the clipboard to paste that line into the local/config.php (I used VIM) will cause a to be added before #your own key.
$GMap['Key'] = "ABQIAAAA...GWA" # your own key
Deleting that will also delete the semicolon at the end the line of PHP which in turn will give you a blank screen in your browser instead of a PMWiki page.
Hopefully this will save someone else the "sudden moment of mortal shock" that I experienced when all my hard work changed into a blank page.
Thank you for mentioning this: I had not experienced it (I copy and paste the other way around: from config.php to the wiki ;-). I've now moved the comment on the previous line. --Petko January 24, 2018, at 05:05 AM
Hi Petko. I'm having trouble with maps that don't have a specific ll=.... For instance, i have a map that is for a town/zipcode:
... and when GMap replaces the code, it returns nothing but the zoom factor:
in addition, i have a personal google map:
... and when GMap replaces the code, it again returns something that breaks:
is there a way to embed these kinds of maps with GMap? and a way for the ROEPattterns to successfully convert them from their natural
overtones99 October 18, 2009, at 07:55 PM
With both locations, if you just move the map a little, or zoom in-out, then the links will obtain a
ll= parameter and the GMap should display fine. The latest version 20091022 will use an existing
sll= parameter if the link doesn't have the required
ll= parameter. About the personal multimap (the first one I see!),
there are two problems: without the (Should be fixed from 20091025.) --Petko October 21, 2009, at 06:18 PM
ll= parameter it doesn't work, but with it, it displays an additional red pin on that location. I'll try to fix it as soon as possible.
hi petko thanks for your work on the gmap recipe. it's fun to play with! and thanks for addressing my recent questions.
here are some more comments and questions:
- your suggestions (& the new recipe) worked - thanks!
- i see what you're talking about with the extra center pin showing up on personal maps. i look forward to that disappearing : )
GMap:ll=...&msid=..."nomarker". You still need the
- it took me awhile to figure it out, but these maps are very persnickety, and can malfunction very easily when other maps are on the same wikipage - i.e. an error in one very often short-circuits the rest. for instance i fiddled with the personal multimap for over an hour (which wasn't working), and it didn't start to work until i finally removed other test maps from the page. i don't know what changed, or what the situation was, but i had run into a similar problem a couple days before, and thought i had "solved" the earlier problem and could continue working simultaneously with these test maps. i wonder if you've run into the same problems? if so, perhaps the recipe page could use a note suggesting only working on one map at a time to prevent problems?
- for some reason the current method of designating a list of points with
%gmap%took a long time to click for me, and i foresee users of gmap on my site(s) probably running into the same problem. i wonder if it's possible to instead wrap the pins in a
>>gmap<<instead? so, instead of:
: %gmap% GMap:ll=33.966142,-117.965698&z=8 : center & zoom of entire map : GMap:ll=34.170038,-118.047581&z=16 : # 1 : GMap:ll=34.187613,-118.131244&z=16 : # 2
>>gmap< : GMap:ll=33.966142,-117.965698&z=8 : center & zoom of entire map : GMap:ll=34.170038,-118.047581&z=16 : # 1 : GMap:ll=34.187613,-118.131244&z=16 : # 2 >><<
- with the following map (for the white house), is it possible to automatically display the google-pin-info without having to type it in? for instance, the pin on google reads:
White House 1600 Pennsylvania Ave NW Washington, DC 20500-0004 (202) 456-1414 whitehouse.gov
- and finally, i know this may be like asking for too many bells and whistles, but i'm just thinking ahead to user-questions/frustration on my pages - i wonder if the ROEPattern could somehow detect that someone's adding a pin to a map, and then provide the :list:definition: markup instead? (sorry if this is too much to ask for!)
: %gmap%GMap:ll=33.966142,-117.965698&z=8 : center & zoom of entire map : GMap:ll=34.170038,-118.047581&z=16 : # 1 : GMap:ll=34.187613,-118.131244&z=16 : # 2 http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode= &q=the+white+house&sll=34.140083,-118.214264&sspn=0.07175,0.133381&ie=UTF8 &hq=The+White+House&hnear=The+White+House,+Washington,+DC&ll=38.904459,-77.036562 &spn=0.032061,0.06669&z=14&iwloc=A
: %gmap%GMap:ll=33.966142,-117.965698&z=8 : center & zoom of entire map : GMap:ll=34.170038,-118.047581&z=16 : # 1 : GMap:ll=34.187613,-118.131244&z=16 : # 2 : GMap:ll=38.904459,-77.036562&z=14 : #3
%gmap%located in the first line or 2b) a bare Gmap: indicator. seems like there could be a simple ROE rule to differentiate. maybe i'll look into it...
<iframe-- see the EnableHTML, IncludeUrl and IncludeSite recipes. And again, the GoogleMapsAPI recipe has probably all the features a person may need. --Petko October 24, 2009, at 05:00 PM
thanks petko! overtones99 October 24, 2009, at 10:19 PM
I added these lines to cookbook/gmap.php
$LinkFunctions['GMapKML:'] = 'LinkIMap';
$IMap['GMapKML:'] = '$1';
$IMapLinkFmt['GMapKML:'] = "<a class='gmaplink' title='kml' href='\$LinkUrl' rel='nofollow'>\$LinkText</a>";
after the ones that set up the GMap markup.
Then in my wiki page I can have:
: %gmap% GMap:ll=54.454073,-3.015747&z=9 : center & zoom of entire map : GMapKML:http://www.pacificbulbsociety.org/pbswiki/maps/lakes.kml :
where the second line contains the URL of my KML file and adds it to the map.
HTH, David Pilling