Google Maps - More Place Levels Mod
|More Place Levels Mod|
|Summary||Adds 4 more placelevels to the Google maps that show on person and place maps|
|Validation||This mod is XHTML compliant.|
|Mod Updated||12 Jan 2015|
|Download link||TNG Google maps More Pins TNG 10.1 for
TNG Google maps More Pins TNG 9 for
TNG Google maps More Pins TNG 8 for
TNG Google maps More Pins TNG 7 for
|Download stats||Roger's Download Stats|
|Homepage||Google Maps - More Place Levels Mod|
|Mod Support||TNG Community Forums|
|Latest Mod||10.1.0.1 for TNG 10.1, 11, and 12|
126.96.36.199 for TNG 9 and 10
8.2.0 for TNG 8
1.1 for TNG 7
|Min TNG V||7.0.0|
|Max TNG V||11.x.x|
You can NOT have both this Mod and the Google Maps - Change Pin Legend Mod installed at the same time.
Purpose of the mod
This mod adds 4 more placelevels to the Google maps that show on getperson.php and places pages, including a new "Region" category for places that are bigger than a country - eg "Europe" or "Africa" or "Pacific Ocean" or "At Sea"
This mod was developed by Roger Moffat
- A working TNG installation. Automated installation has been tested on TNG Version 7.1.x and TNG 8.0.0.
- A backup of the TNG modules involved - see below.
- An installed current version of the Mod Manager (note this is built into TNG 8).
- Download the file from TNG Google maps More Pins TNG 7
- Extract the downloaded .zip file into your admin/mod_folder folder. You should end up with 6 files (google_maps_add_4_placelevels.cfg and 5 new pin images) and a folder (LiberationSans-Regular) that contains a font needed for this mod.
- If you are not using TNG's Config Path, go to the next step. If you are using TNG's Config Path to store your config files outside of the TNG root directory, you will need to edit line 117 of the config file to point to this location before you attempt the install. The config file contains some examples of what you might have to use. See Pre-installation Updates for help with this step.
- If you installed the Google Maps - Change Pin Legend Mod you need to Remove and Delete it.
- Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the google_maps_add_4_placelevels.cfg config file.
TNG 8 and above
|TNG version:||≥ 8.0|
- Download the file from the appropriate link in the Mod Summary section in the upper right hand corner
- Extract the downloaded config file into your mods folder. You should end up with 1 file - gmaps_add_4_placelevels_Vxxxx.cfg and a folder containg 5 new pin images and a TrueType font needed for this mod.
- If you are not using TNG's Config Path, go to the next step. If you are using TNG's Config Path to store your config files outside of the TNG root directory, you will need to edit line 140 of the config file to point to this location before you attempt the install. The config file contains some examples of what you might have to use. See Pre-installation Updates for help with this step.
- If you installed the Google Maps - Change Pin Legend Mod you need to Remove and Delete it before attempting to install this Mod.
- Follow the normal automated installation for Mod Manager, as shown in the example Mod Manager - Installing Config Files to install the gmaps_add_4_placelevels.cfg config file.
Note that the config file only includes the English language changes. If you support multiple languages, you will need to either modify the config file to add the custom text for your other languages, or copy the changes that are made to English/cust_text.php to the cust_text.php file(s) of the language(s) that you support and provide the appropriate translations for them.
|TNG version:||≤ 8.1.3|
After Installation (for TNG 7)
|TNG version:||≤ 7.1.3|
Click the Show Details link below to expand this section.
Changing Place Levels
• Mostly Automatic
Go to TNG Admin ------> Utilities and make a backup of your Places table (while you're there why not back up all the tables?).
Because this mod adds 4 new place levels to the series used by TNG, you will want to re-align the place levels assigned to your places. The new default sequence this mod creates is
Address, Cemetery, Farm, Town, Parish, City, County/Shire, State/Province, Country, Region, Not Set
and so if you have up until now used the default TNG sequence of
Address, Location, City/Town, County/Shire, State/Province, Country, Not Set
If you are happy with this new series, you can achieve this realignment for many of your places by clicking the link in the "To update your current place levels automatically click this link" part of the notes on the Mod Manager page. This will run a script that will edit the placelevel number for County/Shire, State/Province and Country to their new values.
You will need to decide how to split up the places you currently have assigned placelevel2 and placelevel3 (Location and City/Town) to the new placelevel2, placelevel3, placelevel4 and placelevel5, and either apply these changes manually through the TNG Admin ------> Places interface, or perhaps using phpMyAdmin to edit the tng_places table directly as described in the Mass_Updates_of_Place_Level_and_Zoom article.
• Automatic and Manual
If you have already used a different sequence of place levels, or want to now switch to using a different sequence of place levels, there are several things you will need to do.
- Go to English/cust_text.php and find the block of place level lines that have been added at the end of the file, and edit the various entries there to define the new sequence of placelevels that you want to use. Note that if you do make changes directly in cust_text.php after the Mod is installed, it will cause the Mod Manager to say that the Mod is not properly installed. There are 2 possible work arounds for this:
- Copy the lines that you want to change and then paste them into cust_text.php again after the block of lines added by the Mod. Then make your changes there, in the second instance of the lines you want changed
- Edit the .cfg file and make the changes in the .cfg file prior to installing the Mod. This will then let the Mod control what goes in cust_text.php without creating the errors
- If you support other languages, copy this block of text to the cust_text.php file for your other languages and provide translations of the words/phrases
- Note that 1.2 and 2 above here can both be accomplished if you create another Mod that writes the text you want to display into the cust_text.php file for any/all languages. As long as you create this Mod so that it will write the new lines AFTER the lines added by this Mod, your changes will be in effect. Should you remove and reinstall this Mod, you would then need to remove and reinstall your Mod for writing just the lines to cust_text.php AFTER you install this Mod.
- Decide if any of your previous place levels align directly to the new ones - note that place levels are defined by the number you see on each line in the cust_text.ph file - Country used to be Level 6 and is now Level 9 for example.
- If your old sequence of place levels 4, 5 and 6 equate directly to the new levels 7, 8 and 9 you can update these automatically by using the step described above to update the place levels automatically.
- If you have a different alignment of old and new placelevels you can use the capability built into the Mod Manager file to change your place levels 1 at a time. After the Mod is installed,
- Make sure the file update_ChangePlaceLevels.php placed into your TNG folder by this mod is writeable - permissions should be 666.
- click the Edit button that appears in the right most column. By default it will open a window that lets you change current place level 6 (Country) to new place level 9 (Country).
- Click the Confirm Edit button, and this will update the database update script,
- Click this link which will open a new window and run the database update script and update your tng_places table.
- You can then repeat the steps above and change level 5 to 8, then 4 to 7, or any other realignments that suit how you have used the Place Levels in the past and how you might want to use them with the new capabilities. This method is shown in the image below.
|You can also run the Auto Place level update script to change place levels 4,5, and 6 and then Edit the parameters for the individual place level script to change level 3 to level
You will still need to update the exceptions manually within TNG, or using a procedure similar to the one described in the Mass_Updates_of_Place_Level_and_Zoom article, where you
When you have finished updating the place levels, it is recommended that you delete the 2 update_ files that were added by the Mod. These are update_ChangePlaceLevels.php and update_ChangePlaceLevelsAuto.php. Doing this will prevent you from accidentally upgrading all your place levels again when you didn't want to. The Mod Manager in TNG 8 is set to ignore these 2 files if they're missing, so won't generate error messages. The Mod Manager Add-On for TNG 7 will give errors when the 2 files admin/dbupdateChangePlaceLevels.php and admin/dbupdateChangePlaceLevelsAuto.php are deleted.
Even More Pins
If you want to change the pin colours, a complete set of pins, and a handy contact sheet that gives the number and colour matches for all 216 pins can be downloaded here TNG Map Pins - Complete Set
In the event of a problem
- Try using the Mod Manager Remove capability
- Or copy the backup versions of the TNG modules involved.
Visualization of this mod
Turns this (TNG 7):
or this (TNG8):
more pins in less horizontal space.
This mod can be seen in effect here
- William Moffat b. 25 MAY 1829 Blackerstone, Longformacus, Berwickshire, Scotland d. 8 SEP 1895 Balclutha, Otago, New Zealand: Roger's Online Genealogy
- Happiness that your Maps are much more attractive and informative :-)
- As with most source code modifications, these changes will likely be overwritten during your next TNG revision upgrade and will need to be re-implemented. (Using the Mod Manager to remove the mod before the upgrade and re-installing the mod after the upgrade greatly simplifies this process).
Sites using this mod
If you download and install this mod, please add your TNG site to the table below
|Roger's Online Genealogy||Roger Moffat||The mod developer.||188.8.131.52||10.0.0||EN|
|Our Roy and Boucher Family||Ken Roy||I override the $text for the additional place levels.||184.108.40.206||12.0.0||EN, FR|
|AppeltHaus Genealogy||Lawrence Appelt||Not a Public Site.||0.0.0||10.1.0||EN|
|Kemp(e) Family History||Andrew Kemp||see User:Kempons||see User:Kempons||EN|
|Andersson - Hoppe - Sahlin - Thorell||Erik Hoppe||Public / Private||10.1.0.1||11.1.2||SE, EN, DE|
|DJCM.DK||Claus Martinussen||Public site||10.1.0.1||10.1.3||DK, EN|
|The Dutton's of Vermont Genealogy & History||Darrin Dutton||Public site||10.1.0.1||11.1.1||EN|
|Woking Family Tree Project||Pete Smee||Public and private site||10.1.0.1||11.1.1||EN|
TNG modules Involved
In TNG 8 and above
|TNG version:||≥ 8.0|
In TNG V8 and above, this mod
- modifies existing TNG files personlib.php, getperson.php, mapconfig.php, admin_mapconfig.php, admin_updatemapconfig.php
- adds 5 new pins of different colours to the img folder
- adds 2 scripts that can update your current place levels in the tng_places table - update_ChangePlaceLevels.php, update_ChangePlaceLevelsAuto.php
- adds a script google_text_marker.php that superimposes a text string on the bottom of the image of a pin
- adds text to languages/English/cust_text.php and languages/English-UTF8/cust_text.php
- installs a TrueType font - LiberationSans-Regular - that is used to put the text on the pins.
In TNG 7
In TNG V7, this mod
- modifies the personlib.php, getperson.php, mapconfig.php
- adds 5 new pins of different colours to the googlemaps folder,
- adds admin/dbupdateChangePlaceLevels.php, admin/dbupdateChangePlaceLevelsAuto.php, googlemaps/text_marker.php as new scripts
- adds text to English/cust_text.php
- installs a TrueType font - LiberationSans-Regular - that is used to put the text on the pins.