Difference between revisions of "World Map Mod"
|Line 358:||Line 358:|
| EN, DE
| EN, DE
Revision as of 00:59, 4 April 2016
|World Map Mod|
|Summary||Displays a world map containing places. Places may be filtered by several criteria (tree, year and type of event that happened at the place). Place markers that are close together are depicted as a single symbol. By clicking on this symbol, individual markers are shown.|
|Download link||World_map_v10.1.0.2.zip for|
|Author(s)||Felipe Miralha da Silveira |
Carlos A Heuser
|Homepage||World_map_mod (This page)|
|Contact Developer||Contact form|
|Latest Mod||10.0.0.1 for TNG v10.0.0|
184.108.40.206 for TNG V9.2.2
|Min TNG V||9.2.2|
|Max TNG V||11.0.0|
Version TNG v11 offers the heat map, a map the shows places resulting from a search for people or places (using Find>Places or Find>Search People). Compared to the heat map, this mod allows the display of places where specific events happened (birth, death, ...) in a specific time frame (from ... to ...), but does not include the display of places where selected individuals lived.
In previous versions, this mod actually consisted of two mods:
world_map_mod_vx.x.x, the main mod and
world_map_menu_mod_vx.x.x, a small companion mod that just creates a menu entry (see details below).
Since TNG v10.1 the world_map_menu_mod is already included into the main mod and doesn't need to be installed separately.
This mod displays places on a Google map. The idea is to allow a site to be browsed by visiting places and seeing the events that happened at these places.
Only geocoded places are displayed.
When the page created by the mod (
events_map_index.php) is opened a world map showing all places contained in the TNG database
The usual Google map markers depict places. If you point the mouse to a place marker, an info-box with the name of the place, its coordinates and the tree it belongs to is shown. If you click on the place marker, you will be taken to the TNG page that shows all events that happened at this place.
The rounded markers depict clusters of adjacent places. The number inside the cluster symbol informs how many places the cluster contains. If you click on the cluster symbol the mod will zoom into the area covered by the cluster. Depending on how the places are geographically distributed, place markers and cluster symbols will be displayed.
Overlaying the map there is a menu with several options. You may choose a specific tree. In this case the mod will display just places where events from this tree have happened. By selecting the menu entry with six hyphens (------) places for all trees are displayed.
The user may also define specific events (e.g. birth or dead) to be considered, by clicking on the event name.
Further, a specific date range in years may be specified. In this case, just events that fall in the selected date range are considered.
By clicking on the "Totals" button event and place counters are displayed.
Finally, the "Reset" button takes all options back to the default values.
Take a look at my site and play around with the mod.
Max database size
All geocoded places that appear in your database and all events that happen at these places are brought to the browser when the map is opened. For large databases this make take a long time or in the worst case, the page may not open at all.
One option for large databases is to disable event handling (see Mod configuration below). However, if your database contains a large number of places (e.g. more than 5,000 places) the Mod will probably not usable for your installation.
The beta version of this Mod required PHP of Version 5.3 or later. Since version 10.0.0.1, the Mod should be compatible with any version in which TNG runs.
Please notice that there are two versions of the mod, one intended for TNGv9 installs and the other for TNGv10 installs. The mod is installed as usual with the Mod Manager:
- If you are using an older version of the Mod, uninstall it first, and remove the Mod files from the TNG mods folder.
- Download the zip file containing the Mod files for your version of TNG and unzip it in the TNG mods folder.
- Install the Mod with the Manager.
- Before accessing the Mod page, clear caches.
If you wish to have a Find menu entry pointing to the map, install also the companion mod (
world_map_menu_mod). See details in the next session.
Integrating the Mod into your site
In order to access the map you must link pages in your site to the file
events_map_index.php. A good place to include a link to this page is your opening page. This must be done manually, as the opening page layout depends on the TNG template you are using.
Another good place for a link to the map is the 'Search' menu that appears at the top of TNG pages. If you wish to create such a menu entry, you may use the companion mod (
world_map_menu_mod). The companion mod is installed as usual with the Mod Manager.
The TNG 10.1 Version of this includes the companion mod, so the menu item is installed into the Find menu when the main mod is installed.
Since version 10.0.0.1, the Mod can be configured directly at the Mod Manager. After the Mod is installed, click the Edit button and you will taken to a page with the parameters described below.
Alternatively, the file '
eventsMap_config.php' may be changed directly. This file may be changed even after the mod was installed.
After changing a parameter, remember to clear caches at your browser.
The most relevant setting regards event handling. Event handling is controlled by the following option:
$eventHandling = 1;
The default value for this option is 1. This means that the map displays only places where at at least an event has happened. It means further that the menu with the event filters is displayed. This is the most complete version of the mod and is probably the best option for smaller trees.
However, in TNG installs with very large trees this option could lead to unacceptable performance. The way the mod is implemented, each time it is called, a vector with all events in the database is sent to the browser. For example, if the TNG database contains 100,000 people and each person has in average two events registered, a vector with 200,000 entries would be sent to the browser.
For such large databases event handling may be turned off by setting
cEventHandling = 0. This means that the mod will not consider events and will display just the places contained in the TNG place table. In this case the map menu contents will depend of how your TNG site is configured, more specifically if places are associated or not to trees. This is controlled by the TNG option Setup >> Configuration >> General Settings >> Miscellaneous >> 'Assign Place records to Trees'.
If places are not assigned to trees, no map menu will be displayed (there are no options to choose from) and all places in the database will be displayed.
On the other side, if places are assigned to trees, a simplified version of the map menu will be displayed. This simplified menu contains a single entry that allows to filter places by the tree they are assigned to.
The remaining values in the
eventsMap_config.php file control the options described below.
The year ranges that appear in the menu are controlled by the following values:
$fromDataMenu = 1300;
$toDataMenu = 2020;
$incrementDataMenu = 60;
The first two values define the lower and the upper bounds for the date range. In the example above, you may select years between 1300 and 2020.
The third value defines the increment that is added to the lower value when creating the menu entries. The values shown above mean that the menu will contain the years 1300, 1360, 1420,..., 2020 as year range boundaries.
To define these value for your database, you may use the earliest birth year that is shown by TNG in the statistics page. For the increment, choose a value that results in 10-15 values between the lower and upper bounds of the year range.
$defaultTree = "------";
defines which tree will be displayed at the beginning. The value shown above (a string with six hyphens) means that all trees are displayed. If you prefer to begin with a specific tree, enter the ID of the tree (not the name of the tree) in the string. If you are using the Mod Manager to change this value, please notice that you must not enter the quotes.
The options below control how the map will be displayed. The values
$mapLatInit = 10;
$mapLngInit = 30;
define the coordinates (latitude, longitude) of the center of the map at the beginning. The values above were used in the map that illustrates this page and are good for a site that covers Europe and America.
The zoom level at the beginning is controlled by the following value:
$mapZoomInit = 2;
The height of the box that contains the map is defined by the value below. The width of the box is automatically adjusted to the page width. If you are using the Mod Manager to change this value, please notice that you must not enter the quotes.
$mapHeight = "600px";
The value below defines the size of the place markers. If "L" (large) is used, place markers have the standard Google Maps size. If "S"(small) is used, smaller markers are used. This is the default value. If you are using the Mod Manager to change this value, please notice that you must not enter the quotes.
$placeMarkerSize = "S";
The Mod already contains translations to Dutch, French, German, Norwegian and Brazilian Portuguese. If you need translation to other languages just change the cfg file accordingly. The French and Dutch translations where made by Henny Savenije. Norwegian translation due to Jan-Thore Solem.
Mod developer is Felipe Miralha da Silveira, with changes/extensions by Carlos Heuser. Several errors in the first version where found and corrected by Ken Roy and Roger Moffat. John Mark Motyer has shown me how to correctly handle users that are logged in. Updated for TNG 10.1 by Roger Moffat.
- genlib.php (changed by the companion Mod)
- events_map_index.php (since version 10.1.0.1 this is named events_map.php)
- eventsmap.php (since version 10.1.0.1 this is named eventsMap_scripting.php)
Sites using this mod
If you download and install this mod, please add your TNG site to the table below.
|http://heuser.pro.br/||Carlos Heuser||Developers site||v220.127.116.11||English, German, Brazilian Portuguese|
|Van der Maarel and many other European and US families||Edward van der Maarel||Public site||10.1.0.1/ TNG 10.1.0||NL, EN|
|MOTYER Family Genealogy||John Mark Motyer||Public site||v10.0.0.1 ~ TNG v10.0.2||EN, DE, RU|
|my family||(no public site)||see User:ojay||D,(NL),(GB)|
|DJCM.DK||Claus Martinussen||Public site||v10.0.0.1 / TNG v10.0.2||DA, EN|
|The Williams Family Tree||Phil Williams||Public site||v10.0.0.1 / TNG v10.0.3||English|
|Wortelboer Genealogy||Bernard Wortelboer||Public Site||10.1.0.1/10.1.3||NL, EN|
|Brady Family Tree in Western Australia||Darryl Brady||Public site||10.1.0.1/10.1.1||EN, DE|