[pmwiki-users] Looking for Gmap fix

Daniel dkml at xs4all.nl
Mon Nov 25 14:19:07 CST 2013


Hello, yesterday I wrote the following.

And a couple of hours later I noticed all my maps were working again! :)
Somehow Google reverted their decision to stop supporting the V2 API.

Please ignore what I wrote yesterday, problem solved (by now...)

Daniel

-------- Origineel bericht --------
Onderwerp: Looking for Gmap fix
Datum: Sun, 24 Nov 2013 10:42:26 +0100
Van: Daniel <dkml at xs4all.nl>
Aan: pmwiki-users at pmichaud.com

Hello,
I am still desperately looking for a fix for the GMAP recipe.

The problem is that I have 100+ pages with lines like

[[ GMap:ll=52.357,4.865&z=15&t=k | Ooievaarsnest in het Vondelpark ]]

Changing all these pages to match with another recipe is no option.
Petko's suggested solution to use Site.InterMap and in it add
GMap: http://maps.google.com/maps?q=$1
does not work.

After a lot of experimenting I came up with a solution that is satifactory:

%lframe%http://googlemaps.com/maps/api/staticmap?center=52.357,4.8655&zoom=15&markers=52.357,4.865&size=640x300&sensor=false&maptype=hybrid&format=.png
| [-''Ooievaarsnest in het Vondelpark''-]%%

(Note the trailing 'format=.png' which is added to trick pmwiki to think
this is a png file!)

I thought about using sed on the sources, but that is too risky and
would makes reverting impossible if Petko would come up with a fix for Gmap.

I think the best would be something with Markup, but couldn't get it
working right:

Markup("gm", "directives", "/GMap:ll=something here,something
here&z=15&t=k/", "<img
src=http://googlemaps.com/api/staticmap?center=$1,$2&markers=$1,$2>");

(simplified)

Can somebody help, my site is totally dependent of Gmaps, and statistics
are tumbling down...

Thanks
Daniel





More information about the pmwiki-users mailing list