cogShows the location of a given point on a Google Map
TypePlugin
Category
Developed by

xwiki:XWiki.ganji, Cristina Lopes

Rating
0 Votes
LicenseGNU Lesser General Public License 2.1

Description

A plugin that shows the location of a given point on a Google Map.

Installation

Apply for a Google Map API Key.

Edit your WEB-INF/xwiki.cfg file as follows:

xwiki.plugins=[...],edu.uci.ics.mondego.wiki.plugin.map.MapPlugin
GoogleMapAPIKey=ABQIAAAAr49IzmOYGFMU4Y9yosQssxQLFvgphtu0uU9uKgDGzM3LXgn_VRQaZh4SI5A0OVhzYMpxpnC-PBeWrQ

(Note that the above key is a fake API key).

Copy the plugin jar to the %xwikipath%/WEB-INF/lib/ directory of your xwiki installation.

Restart your XWiki instance

Usage

$xwiki.MapPlugin.getPointMap($latitude, $longitude, $zoom, $title)

The first parameter specifies the latitude of the location, the second parameter specifies the longitude of the location, the third parameter specifies the zoom level (a value between 1 and 19), and finally the last parameter specifies the title of the location.

Example

$xwiki.MapPlugin.getPointMap(33.655016, -117.844766, 8, "Irvine, CA, USA")

Result

(The following is only an image, the real result would be interactive)

irvine.jpg

Acknowledgment

The development of this plugin was in part supported by award no. OCI-0724806 from the National Science Foundation.

Prerequisites & Installation Instructions

Follow these steps:

  • Add the JAR in your container classpath (WEB-INF/lib)
  • Edit xwiki.cfg and add the following line to the list of plugins :
    xwiki.plugins=\
          [...]
           ... ,\
         <plugin package>
  • Restart your container
  • Verify the plugin is properly installed by typing the following in a wiki page :
    {{velocity}}
    $xwiki.<plugin name>.name
    {{/velocity}}

    If the installation has been successful, you will see <plugin name>.

Tags: google
Created by ganji on 2008/01/17 07:54
    

Get Connected