Google Maps - Getting Started
| As of June 2016, you must get a map key from Google in order to use Google Maps on your site. TNG V11 download page contains a Maps Patch for those whose Google Maps do not work because no key was provided. Some background to this change is on the Google Geo Developers Blog.
As of 16 July 2018, you must enable billing to use the Google Maps Platform
Get a Google Maps Key
As of July 2018
You must have a User ID on Google in order to get a browser API key for the Google Maps Platform. If you are already signed up for Google Mail, you can use that User ID, otherwise you will need to create a User ID.
|Get Maps API Step||Screen Capture|
|1. To get a Google Maps API key use the following link||Additional instructions can be found in the setup guide|
|2. Create or select your project|
|4. Once your API keys are enabled, go to credentials to set the right application and API restrictions
Note: Instead of using the HTTP referrer, it might work better to use the IP addresses of your server instead of the HTTP referrer. Mind to use both your the IPv4 and IPv6 addresses when existing. This helped me to improve the success rate of doing batch geocoding lookups. Still looking into this for a better fix.
|5. Copy your API key.
You will need to paste this into your TNG configuration later, see instructions below "TNG Map Settings"
|6. you will also need to enable billing. Depending on the amount of visitors to your site / API requests being made you might get invoiced by Google for the API usage. Most users have learned that their usage stays well below the minimum thresholds, meaning the invoice you receive monthly will be for $0.|
|Get Maps API Step||Screen Capture|
|1. When you click the Get Started button, you will be presented a screen to Enable Google Maps Platform.
You will need to select Maps and Places as the options
|2. You will then need to select a project or create a new project|
| 3. You will also need to enable billing
You must have a User ID on Google in order to get a browser API key. If you are already signed up for Google Mail, you can use that User ID, otherwise you will need to create a User ID.
To use Google Maps with TNG, get a browser API key for your web site by going to the Get API Key page on the Google Developers site.
- Note that keys previously obtained for TNG v6 through v8.1.3 for the V2 API will not work with the v3 API.
Create a Project
It is recommended that you name your project so you can find your Google Maps API keys later.
It is recommend that you not use the www in your URL when requesting your browser key, so that the key will also work with subdomains, such as tng11beta.useract.com You should also use /* after your domain name so that the maps will work for all sub folders on your site.
NOTE: You must request your key for a Browser API key
Note - you need to click the Create button twice - once to enter the details of your domain, and a second time to submit it when the line to enter a second domain is empty.
See Using Google Maps with TNG on Steve Davis' site for an expanded explanation.
TNG Map Settings
Settings for Google maps in TNG are in your mapconfig.php configuration file, which is created & updated by going to Admin >> Setup >> Configuration >> Map Settings
You should save the Google Map API key you obtained for your web site in the Map Key field of Map Settings.
You can set the Map Type display to
- Hybrid (Satellite with location names)
Set option for Hide Admin Maps to Start:
- No - means the Admin Place Edit will show the map
- Yes - means the Admin Place Edit will show the Show / Hide Clickable Map button
Set option for Consolidate Duplicate Pins:
- No - means each event will get a separate pin number
- Yes - means that events at the same place location will be combined to a single number
Geocoding: Getting Latitudes and Longitudes
There are basically three ways to add latitude and longitude to your Places:
- Import them from Legacy or from RootsMagic or other desktop genealogy program that provides geocodes
- Use the Map Search function in the Place Editor at Admin>>Places to geocode one place. See Google_Maps_-_Geocoding_Places
- The Geocode Function at Admin>>Places>>Geocode allows you to geocode 100 places at a time.
- Managing Latitude and Longitude How to manage Latitude and Longitude in Legacy and TNG
- How Event Map displays on Individual's page
- Maintenance - Places with no maps provides an SQL Report for Places with no latitude and longitude sorted in descending order of event references with links to Admin Places to help geocode
- Maintenance - Places - Zoom & Place_Levels provides an SQL Report for Places with no Zoom or Place Levels sorted in descending order of event references with links to Admin Places to help geocode