Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

GoogleMaps

Summary: How to add an interactive Google map into PmWiki
Version:
Prerequisites:
Status:
Maintainer:

Question

Is it possible to add an interactive google map into PmWiki complete with annotated and "pinned" areas as well as links on the PmWiki page that interact with the map?

Answer

This question is answered by both the GMap and MapWiki cookbook recipes. GMap enables embedding Google Maps into a PmWiki page through a link or the definition of geodata. MapWiki enables the embedding of Google Maps, or potentially any other digital map, into a PmWiki page, using the map's provided embed code. Additionally, a MySQL database enables these individual map points to be aggregated from across the wiki, into a single map view. Useful for collective generation of multi-point maps.

Notes

There are several sites to get started. Since I am writing this more to spark the project, I don't have much more than an idea. One thing I have researched is that to take advantage of the google maps API, you must download an api key. This helps google track who has it and make sure they don't break the license agreement I think.

Some explanations

Some quick tutorials

Mediawiki has a working google maps extension. see the link below.

Releases

  • Google Map API -- Adds Google Map API to PmWiki pages.
  • GMap -- Easy Google Maps integration

Comments

Hi :)

There's definitely a demand for a Google Map include or something for PmWiki:
http://reise.selbst-doku.de/Main/Afrika

Currently, PmWiki's EnableHtml won't allow enough tags/scripting to run it, so I had to use a plain vanilla html page to wrap Google Maps, followed by an IncludeSite, to make it work.



Since I'm building an online travel guide wiki, I'll have to use a Google Map on almost every page. Currently, I'm just hoping to find any easier way to do this. Ideas?

Thanks in advance,
Axel Groll
Munich


An easy means of incorporating the code to include the map API would be handy for those without the knowldege. I've just started to play with it, and as an experiment set up the google map on a bare web page and used the (:includeurl:) markup to include that page within a PmWiki page.

It seems to work fine, and the code I've been playing with for markers and overlays seems to work happily too. Des, Feb 06, 2005.


Just noticed the appearance of a markup that provides for the inclusion of javascript/html inside wiki pages, Javascript. Notice the warning about the potential hazard of using it without a passworded page though, so may not be solution if a user editable page is needed.

Unfortunately, neither the google map script, nor the alert box example, run when I add this markup. The page just shows the plain test of the scripts concerned. (PmWiki2.1beta20 and monobook skin used). Des, Feb 16, 2006.

Please see the Comments towards the bottom of the Javascript page. The markup given in the note referred to there allows the map code to be inserted directly into a wiki page (and worked first time), but has security issues if the site is open for user edits, so (:includeurl:) looks better, even if it means maintaining the map code on an external page. Des, Feb26, 2006.


There's a proble with gma-2.1.2 because it seems to ignore the default zoom level -- it works fine when I specifically set a zoom level for a map, but when I leave it out or set it to zero it shows nothing. Breyten


Does the Google Maps API recepi support the selection of KML files? I have build KML files that are on the internet and I want to see the GoogleMap + the KML file (route). I have succesfully incorporated google maps, including predefined .KML files in the PmWiki. The only thing I did was adding the (:html:) and (:htmlend:) tags which ofcourse is a dodgy solution. If you want more info email DJ -> mailto:pmwiki [snail] nldj [period] com.


Note that EnableHTML let me embedded a google map (pmwiki-2.2.35) . It's work well with the google autogenerated html (iframe + optional 'a' and 'small' tags). I replaced the '&' by '&' because pmwiki escape the & (without this modification, I got '&' in the final wiki page and a not well positionned map).

Example of google autogenerated html: <iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.ca/?ie=UTF8&t=m&vpsrc=0&ll=49.891235,-97.15369&spn=19.854333,37.353516&z=4&output=embed(approve links)"></iframe><br /><small><a href="http://maps.google.ca/?ie=UTF8&t=m&vpsrc=0&ll=49.891235,-97.15369&spn=19.854333,37.353516&z=4&source=embed(approve links)" style="color:#0000FF;text-align:left">Agrandir le plan</a></small>

Caroline Guénette - November 12, 2011

Contributors

Profiles November 25, 2005, at 07:55 PMSmick

  • December 04, 2005, at 20:53 Axel Groll
  • March 13, 2010, at 15:06 Ryan O'Toole
Edit - History - Print - Recent Changes - Search
Page last modified on November 12, 2011, at 07:01 PM