The information in this wiki hasn't been maintained for a good while. Some of the projects described have since been deprecated.

In particular, the "Ushahidi Platform v3.x" section contains information that is often misleading. Many details about this version of Platform have changed since.

This website is an extraction of the original Ushahidi wiki into a static form. Because of that, functions like logging in, commenting or searching will not work.

For more documentation, please refer to

Skip to end of metadata
Go to start of metadata

Ushahidi v2.X has maps on the front page and on the report create/edit page.  Sometimes you'll want to add a map to a different page (e.g. part of a plugin view).  This is where the map code lives...

In the view file:

If you look at file \themes\default\views\main\layout.php, you'll see

<div class="map-container">
echo $div_map;
echo $div_timeline;

This code adds the map and timeline blocks to the main page.  If you're using a different theme, e.g. theme xxx, look for \themes\xxx\views\main\layout.php to see if there's anything different in there.

In the controller file: 

If you look in application/controllers/main.php, you'll see:

This creates the map and timeline, filters them, and adds them to the current view (see above).  The map file is in themes\default\views\main\map.php


To activate the map, you'll need to add the following lines to the controller file:

The script above looks for a map on the main/my_map_js.php file. We suggest you copy the JS from default/views/main/main_js.php and start customizing it as you wish.




To be continued...


  • No labels