Extension:Tetherless Map

What does this extension do?
In this extension, we provide a parser function, #map_objects, that will accomplish following tasks:


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


 * Navigation:
 * Provide a list of coordinates' name(page name), user 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 extension we also provide another parser function, #insert_map, that will display the limited information of coordinate:


 * Only the coordinate of location and an info-window contain the information user provide

Note: This map will always center at the last point pass to the the parser function.

Some Screen Shot
RPI Map1 RPI Map2

Download and installation
You can download code at:


 * TetherlessMap

In order to use this extension, you must obtain a Google Maps API Key for your wiki. 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 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=
 * Semantic MediaWiki
 * Semantic Forms

=Usage=

Display Points and Related Information
This parser function is able to display the coordination on the map, and present the information about the coordinate(picture, properties, etc.) in corresponding coordinate's info-window.

One way user can pass information by input a HTML table: sample syntax:

Note: This parser function is order sensitive, structure sensitive and first three parameters are required. In other word, table structure is required and the order of sending information to the parser function can't change. However, user can skip any piece of information(not first three) by leave it empty, e.g.,

The order of parameters are:
 * Name of coordinate
 * Latitute,Longitute
 * Link to the coordinate's page
 * Coordinate's name on the map
 * any information for semantic group e.g., coordinate's property/service.
 * relative link to image

Another way user can pass information to the parser function is use semantic query. A sample syntax:

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

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

The fifth parameter (?Has service in this case) is where user can pass information about coordinate for generate Semantic Group. So if you would like to add more layers. You need to identify at least one location to be in that layer. In the above case, result of query '?Has service' will be use to generate layers. You can add more layers by edit/add a page to include that property. Skip it if you want (as above example).

The sixth parameter (?FOAF:page in this case, should be a relative link) is where user can provide picture of coordinate and only the picture of the coordinate to be displayed on coordinate info-window, skip it if necessary.

Display Points or Lines use KML
User can also pass links of KML files to display KML files' information on google map. See more information on KML KML Documentation Introduction

sample syntax for passing one KML file:

In this example, "Route;http://shuttles.rpi.edu/data/route.kml" is where user pass the KML file. Where "Route" is a semantic group controller name of the information provided in this KML file. And "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 same as passing only one KML file, but using space to separate them.

Note: to present KML information on this map, we need at least one coordinate on the map provided by first semantic query

Change Dimensions and Controls of Map
The default parameters of the map is set as follows: 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:
 * zoom level
 * map type
 * map control
 * css class attribute
 * width
 * height

Sample syntax:

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

Usage of #insert_map
As described, this parser function will provide the limited information of a coordinate on map.

A sample syntax:

The order of these parameters are:
 * zoom level
 * map type
 * map control
 * css class attribute
 * width
 * height
 * css style attribute
 * a html formated string to be displayed on info-window
 * marker's label name

=Bugs, new feature request and contact information= If you found any bug encounters in current version of extension, or you would like to request new feature, or any feedback are welcome. My email is zhengj3-at-rpi.edu

= Sites that use this extension=
 * RPI Campus Map

=Other Resources=
 * Sourceforge Project Site for Tetherless Map
 * Poster for RPI Map
 * Powerpoint Presentation on RPI Map