Google Maps - Getting Started

From TNG Wiki
Jump to: navigation, search
Ambox notice.png 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.
TNG 11.0


Get a Google Maps Key

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.

Get a browser API key for your web site by going to the Get a Key/Authentication page on the Google Developers site.

Note that keys previously obtains for TNG v6 through v8.1.3 for the V2 API will not work with the v3 API.

Get Google Map key


Create a Project

Create a Project


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

Google map api v3 browser key create.png

Note that some users have reported that they needed to leave the referrer field blank in order to get the map api to work.

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.

Google map api v3 key generated.png

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

Setup your TNG Map Settings

You should save the Google Map API key you obtained for your web site in the Map Key field of Map Settings.

Save your Google Map API

You can set the Map Type display to

  • Map
  • Satellite
  • 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

Localhost key

If you run a local web server on your desktop, such as WampServer, XAMPP, or IIS and you want to test Google Maps on your local web server, you will need to get a 2nd Key for your localhost

Google map api v3 browser key localhost.png

Google map api v3 key generated.png

Geocoding: Getting Latitudes and Longitudes

There are basically three ways to add latitude and longitude to your Places:

Related Links

  • 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