Help:Add a Map

From WaterWiki.net

Jump to: navigation, search

Mapping the location of a single project/case study

To add a map of an article you have created/are editing is easy. In edit mode, simply click the option to "add map to this article" below the edit boxes/above the category selection box.


Mapping multiple projects/case studies

You may also want to display a map of a particular set of projects (i.e. in a given region, country, or on a specific topic). You can do this using the DPL function, as follows:





<DPL> category=Mapped category=Project category=UNDP mode=map </DPL>


mode=map is crucial. It tells the wiki to display the results as a google map, rather than a list.

This will map all of UNDP's projects that have been mapped on WaterWiki.


Adding, <mapopts> enables you to alter the map options as follows:

mapopts=type:terrain or mapopts=type:satellite, will display the map as a terrain or satellite image respectively.

In addition, the longitude, latitude, height, width, and zoom of the map can be altered using;

mapopts=width:600px;height:500px;lat:15;lng:40;zoom:2






<DPL> category=Mapped category=Video category=UNDP mode=map mapopts=type:terrain;width:600px;height:300px;lat:-10;lng:80;zoom:2 </DPL>

would display the following map.




The map output can be further adapted to display the most recently edited projects. E.g. the following would map the 20 most recently edited projects in Africa:





<DPL> category=Mapped category=Project category=Africa mode=ordered ordermethod=lastedit order=descending count=20 mode=map mapopts=type:terrain;width:600px;height:300px;lat:0;lng:20;zoom:2 </DPL>

as follows:


Click Here for further DPL functions to include in the DPL to adjust the map output.