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;
</div>
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...