Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

GoogleMapsInterface

Summary: Interface to the Google Maps web application
Version: Alpha 1.0.2
Prerequisites:
Status: Development
Maintainer: Craige Leeder from ~InternetAdvisor
Categories: Google

Description

The PmWiki Google Maps Interface(GMI) was originally designed as a way to insert maps into a wiki page, without the limitation of having to use latitudes and longitudes, as is required by the GoogleMapAPI recipe. However, I also have intentions of adding more functionality, as well as making the recipe highly customizable.

It should be noted that this recipe has no intention of competing with the GoogleMapAPI recipe, but rather add functionality for those who require it. If you do not require the extra functionality, then it may in fact be better for you to use the GoogleMapAPI recipe.

Currently, as this recipe has yet to make it's way out of the alpha stages, it still has limited functions. I am slowly adding more as I am able, and would be happy to take suggestions for future additions. Currently on the development list:

  • Complete by-page customizations markup
  • Add maximum defaults configuration variable
  • Useraddress field, for mapping users address(useful for directions)
  • ...

Usage:

GMI has two markup tags (and one closing tag) that are available. I will explain each of them here:

(:map ''(address="address" | location="lon,lat")'' ''zoom="1-13"'':)

With the map tag, only the address or the location parameter is required (if both are entered, only the address parameter will be used) This parameter controls the center of the map. You can also insert the zoom parameter, with is the zoom level you wish for the map. The level ranges from 1-13. (More parameters being added)

(:map-location ''(address="address" | location="lon,lat")'':)

The map-location tag is used to add a point to the map. Currently, it only accepts one parameter, which is again address or location. (once again, if both are entered, only the address parameter will be used).

(:mapend:)

This tag is required to display the map. It controls a destruct function, which is in charge of flushing the html headers to the page, this displaying the map.

Template Modifications:

To be able to display the map, you need to first edit your template file to include 'onload="load()"' in the body tag. This will later be replaced with a variable, but I haven't got that far.

As you can see, GMI is currently in rough shape. Remember though, it is alpha. I decided to release it at this stage to get user input as I am coding it, as opposed to after.

Notes

Their are many bugs with the current version of GMI. It is not advised that you use this recipe on any production sites. I will compile a list of known bugs later and publish them here.

Release Notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

Comments

Dear Russ, dear Craig,

first let me thank you for the idea to create another gmap plugin for PmWiki. Although GoogleMapAPI still matures and lot's and lot's of work has been done, it's geared to one direction and it's currently focussed on the 2.0 Google MAP API.

Since it's concept creation a few things concerning the API have changed and improved.

Standard features right out of the box with v. 2.5.x:

Furthermore the GoogleMapAPI limits currently itself by not enabling infowindows to contain an iframe and/or css. By simply enabling the infowindows html to contain an iframe, anything could be displayed in them:

  • another gmap
  • any wiki page (enabling wiki editing of infowindows!)
  • any external page
  • This example on my page uses css in it's Cape Town marker, it uses an iframe with a link to another webpage in it's Durban marker. :)

Warning: Allowing users to add <iframe> is a security flaw. (See "The Ghost in the Browser, Analysis of Web-Based Malware.")

Then, some really useful extensions have been published:

See Also

Contributors

~InternetAdvisor

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.

Edit - History - Print - Recent Changes - Search
Page last modified on September 10, 2011, at 11:42 AM