Extension:Tetherless Map

=What does this extension do?= In this extension, we provide a parser function, #map_objects, that can generate a map based on results from a semantic query. This extension requires the Semantic Mediawiki extension and uses Google Map API.

The extension will accomplish the following tasks:


 * Data presentation:
 * Displays coordinate and information related to the corresponding coordinate.
 * Displays information provided in a KML file.
 * Provides a Semantic Group Control, a group of checkboxes represent properties of coordinates for users to filter query result, and display the result on the map.
 * Shows the number of objects displayed on the map after filtering (All information provided by KML file will be consider as One object).


 * Navigation:
 * Provides a list of coordinates' name(page name); users can click on coordinate's name to adjust the center of the map at that coordinate.
 * A search bar to filter the names of coordinates on the list.

In this extens ion we also provide another parser function, #insert_map, that will display limited information of a coordinate:
 * Only the coordinate of location and an info-window contain the information user provided.

Note: A map will always be centered at the last point passed to the parser function.

=Download and installation=

You can download the code at:


 * TetherlessMap

In order to use this extension, you must obtain a Google Maps API Key for your wiki. You may get your key here. Please read Google Map terms and service.

After you get your Google Maps API Key and downloaded code, place the 'TetherlessMap' directory within your MediaWiki 'extensions' directory. Then, add the following code to your LocalSetting.php after the line that installs Semantic MediaWiki (and after the line that installs Semantic Forms, if you use it)

$wgGoogleMapsKey = "...enter your Google Maps API key here..."; $wgLocalPath= "...enter your host server address...";

require_once ("$IP/extensions/TetherlessMap/Individual_Location.php"); require_once ("$IP/extensions/TetherlessMap/GoogleMapClick.php"); require_once ("$IP/extensions/TetherlessMap/GoogleMapMultiObjects.php");

=Dependencies=

This extension requires Semantic MediaWiki.

The extension can also be optionally used with Semantic Forms for a user-friendly interface of map editing.

=Usage=

Passing map information via a table
This parser function is able to display a set of coordinates on the map, and present information about those coordinates (e.g., picture, properties, etc.) in corresponding coordinate's info-window.

User can pass information by inputting a HTML table. This type of usage does not require the installation of the Semantic Mediawiki. Sample syntax:

Note: This parser function is order sensitive, and the first 3 parameters are required. User can skip the remaining parameters, e.g.,

The order of parameters in each row of the table is:
 * 1st: Name of coordinate
 * 2nd: Latitute, Longitute
 * 3rd: Link to the coordinate's page
 * 4th (optional): Coordinate's name on the map
 * 5th (optional): any information for semantic group e.g., coordinate's property/service.
 * 6th (optional): relative link to image

Passing the map information via a semantic query
Another way which is more commonly used, is that user can pass map information to the parser function is using a semantic query.

A sample syntax:

Important: First three parameters (page name, Latitue Longitude, and URL to the page)are required in order to display coordinates properly on map, where LatLong is latitute and longitute of a coordinate in this format: lat,long. The order of parameters is the same as in the table way.

If a user would like to provide a shorter name or any string to label the marker on the map, user can pass this information in the 4th parameter. User can skip this parameter by leave it empty, e.g.:

The 5th parameter (?Has type in this case) is where the user can pass information about coordinate for generating Semantic Group. To show a group, the group should have a least one location.

The 6th parameter (?FOAF:page in this case) is where a user can provide a picture of the location, which will be displayed on a pop-up window. The picture must be a hyperlink to the picture file.

Display information using KML files
User can also pass links of KML files to display KML files' information on the map. Please see more information on KML Documentation Introduction.

Sample syntax for passing one KML file:

In this example, "Route;http://shuttles.rpi.edu/data/route.kml" is where user can pass the KML file. Where "Route" is a semantic group controller name of the information provided in this KML file. "http://shuttles.rpi.edu/data/route.kml" is the link to the KML file. Important Note: notice that "Route" and "http://shuttles.rpi.edu/data/route.kml" is separated by ";"

Sample syntax for passing more than one KML file:

The syntax for passing multiple KML file is almost the same as passing only one KML file, but space is used to separate multiple KML files.

Note: to present KML information on this map, we need at least one coordinate on the map provided by first semantic query or a table. (TO DO: this restriction will be removed)

Change Dimensions and Controls of Map
The default parameters of the map is set as the following: width= 800 height= 600 zoom= 16 map type= G_HYBRID_MAP map control= GSmallMapControl

You can change any of above parameter. The order of these parameters are:
 * 1) (Map data: a table or a semantic query)
 * 2) (KML files)
 * 3) zoom level
 * 4) map type
 * 5) map control
 * 6) css class attribute
 * 7) width
 * 8) height

More details about map control and map type can be found at http://code.google.com/apis/maps/documentation/controls.html

Sample syntax:

Note: dimension and control of map start at the third parameter.

Usage of #insert_map
This parser function will provide limited information of a single coordinate on map.

A sample syntax:

The order of these parameters are:
 * 1) coordinate
 * 2) zoom level
 * 3) map type
 * 4) map control
 * 5) css class attribute
 * 6) width
 * 7) height
 * 8) css style attribute
 * 9) a html formated string to be displayed on info-window
 * 10) marker's label name

Note: The coordinate can be a value returned by a semantic query.

Note: this function was modified from a similar function provided in Extension:Semantic Google Maps

=Bugs, new feature request and contact information=

Please reports bug, feature requests, or any feedback to zhengj3-at-rpi.edu

= Sites that use this extension=
 * RPI (Campus) Map

=Other Resources=
 * Project site for Semantic Map on Sourceforge
 * RPI Map Project page on the Tetherless World Wiki
 * Poster for RPI Map
 * Powerpoint Presentation on RPI Map

=Release Log=


 * Date: 2008-11-19, version number:0.1.1, Version Description: initial version, download link:TetherlessMap