The Google Maps and Google Earth File Maker

Home View Menu Web Menus Data Menu Tools Menu Data Centre Services Alerts Tool

This is a PRO only topic

Input file formats Output file format Schemes & Placemarks
Balloon text formatting Doc title formatting Folder control
Field mapping Doc title formatting Output location and type
Icon Source (Not defined yet) Icon schemes

Creates KML/KMZ files for Google Earth and/or Google Maps. You can load CSV or TAB delimited files and also will soon be able to import FIXED Column format files and other KML/KMZ files. You can also extract information direct from the QVS Database based on data providers for whom you have collected the information. On opening the screen looks like this.

Again, coming very soon, is the ability to send listings direct from the display screen to the Map Maker. When this is available this will be the preferred method of creating KML/KMZ files for grouped information and a launch query will be added if the QVS Map Maker detects input from the display screens.

Although this may look complicated it actually is very simple in its most basic form and requires only a couple of clicks to create a map file once it has been set up for the first time. Even the initial set up does not have to be too onerous.

First you need a file. This can be a CSV file

Or it can be a TAB delimited file

Or it can be a fixed column format

If you do not have a scheme saved then once you have selected your file you must set the file type and then click on 'Read File/Data'

Once the file is loaded you then set up the various elements (and save it for next time!)

If you already have a scheme saved (see formatting below this) and you wish to use it you do not need to set any of the options as selecting the scheme with set all options for that file. This includes the field mappings and output values. It will remember the output folder as well, but you will have to supply the file name!

Data coming from the database tables – the option 'From Program Data' – works almost exactly the same as selecting data on the display forms, or when creating charts. There are some minor differences however. Firstly anywhere at least one of the possible criteria values must be filled. Here you do not have to so to show all Magnitude 5+ quakes for example you would select your provider, set the minimum magnitude to 5 and that is it. Click on 'Read File/Data' and the data tab will be filled AND all the field mappings will be done for you. Hey, why have a computer if you are going to set everything yourself? Basically I am lazy and any lazy features I can implement, I will.

Output Format
Click on the Get button for the file and select your file, and then select the type of output – a KML file or the compressed (zipped) version called a KMZ file.

Yes a KMZ file is simply a KML file that has been zipped and then had the extension changed from ZIP to KMZ. There are two ways to get at the contents. The first is change the extension to ZIP and then unzip the file in Windows or using a proprietary program. The second is to unzip it directly (no extension change needed) using 7zip.

Schemes & Placemarks

Placemarks, also referred to as way-points when mapping GPS routes, are the points on the map for the earthquake event. Please remember throughout that the mapping tool is designed for use with earthquake data and is NOT suitable for other purposes. (You can try but don’t blame me if it does not work!)

The orb / button / paddle or dot – or whichever icon you are using to mark the position of the quake is usually associated with some text that may or may not be visible depending whether you are in Google Earth or Google Maps.

First I should say that you do not have any need to understand how icons are displayed, or the labels or anything else much as I have tried to make this as easy as possible (despite the look of it!) You do need to know what to set.

The 'Current Map Maker scheme' displayed in the box will be manual when you first use the program. When you save a scheme using the save button bottom left this saved scheme will subsequently appear in the drop down. It is a speed thing! Select file, select scheme, output. The default icon scheme uses the QVSData orbs that you see in the Google Earth output. If you look below this area you will see two further icon controls. These are discussed shortly.

If you are interested in the mechanics of the file carry on reading below otherwise jump to the next part.

In order to display the icon and information the map (where I say map also includes Google Earth) needs to know which icon to use, some text associated with the icon and some more text that pops-up when you click the icon. This is handles using Styles – and this is what they do , set the style of the elements.

OK now you can take a look at some style information from a standard QVSData KMZ file. Take a look at the larger image as some explanations are on the image.

For Google Maps you do not need the pairs as they are not used. A file without those looks like this

You can get this file here if you want to have a play.

In Google Maps this unpaired file looks exactly the same as the paired one.

It is very different in Google Earth however as all the labels show on every event dot.

Setting the label for the event – the placemark or waypoint text.

Normally for earthquakes this will comprise the magnitude and date/time and that is the default that is presented in the box.

For any of these boxes that take codes such as {MAG1} you don’t need to learn them. You will find the codes discussed later but in the meantime if you want to add an element place the cursor at the insertion point and right click and select the item you want. Say you wanted to add the depth to that line immediately after the magnitude type. Place the cursor after {M1TYPE} and right click and select the code…

If you select Depth the depth tag will be added at the cursor point. All you need to do is add "km" after and a space before to finish up like this.

This tag menu is available for all boxes where codes are used.

If you are just using Google Maps you don’t have the mapped pairs as Google Maps does not use them, and I do not add them to the file as there can be other problems from doing so. In essence a file produced for Google Maps is not compatible with Google Earth, but there is a chance that a file produced for Google Earth will run on Google Maps.

To use a single style in Google Earth leave the 'Use Highlight' checkbox unticked.

Note to those more familiar with KML: The <color> and <colorMode> variables are not used. Hotspot locations are used and are set in the Icon data.

Formatting (Balloon text / pop-up boxes)

Click 'Set up icons' to select the files you wish to use. Note: These icon file MUST be in an Internet location such as Dropbox which provides free online storage up to 2GB.

OK back to the formats. Balloon text formatting. Looks complicated but it is not really. The best advice, until you have delved into KML programming, is to use the 'default' set of formatting for the balloon text line (the popup screen with details) is provided but you can change that to suit. This works well enough for most earthquake related boxes. Do NOT use the CDATA tag in this section. (See below for a link to a definition of what CDATA does)

‹b›‹font color="#CC0000" size="+2"›$[name]‹/font›‹/b›‹br/›‹br/›$[description]

This gives a box containing for example:

Magnitude 5.9 Mw

Details line
Details line
Details line
Details line

A 'default' set of formatting for the contents of the balloon text lines is provided but you can change that to suit.

‹table width="250"›
‹tr›‹td›ID: {QID}‹/td›‹/tr›
‹tr›‹td›Mag {MAG1} {MAGTYPE1}‹/td›‹/tr›
‹tr›‹td›Date: {DATETIME} UTC‹/td›‹/tr›
‹tr›‹td›Lat: {LAT} / Lon: {LON}‹/td›‹/tr›
‹tr›‹td›Depth: {DEPTH}‹/td›‹/tr›
‹tr›‹td›Number of Stns: {M1STA}‹/td›‹/tr›
‹tr›‹td›Location: {LOCATION}‹/td›‹/tr›
‹tr›‹td›Revised: {REVFLAG} (Version: {VERSION})‹/td›‹/tr›

The details this produces look like this

Document Title and Snippet.

This is the second tab of the middle block

On this image of a document title the black text is the title and the snippet text is in grey. Snippets can contain hyperlinks. Note that this file opened with the elements not being shown and the check box un-ticked. I will come to those settings in a moment.

Type in the title, and if you don’t want a snippet just remove the text. Here you can use {FILENAME} in the title to have the program insert the name only of the file with no path or extension. This is suitable for re-use in a scheme.

Generally the title will be plain text, but the snippet may require use of the CDATA tag to prevent formatting being misinterpreted, so if it does you need to provide it in this section.

Two check boxes are provided which control the open/closed and visibility states. If a document is open and visible then all the elements are shown in the Google Earth or Google Maps sidebar.

Now we hit one of the differences between Google Earth and Google Maps. You can see in the image above that the title is given, and the snippet, and the document is not opened out or the elements made visible (on the map)

The code that does that is this.

You can see that Open = 0 (zero) and Visibility = 0 (zero). But that file in Google Maps looks like this:

I just wanted to make sure that you are aware of this so you can deal with the unexpected!

Folder control

This is the third tab in the block

Folder options will be as follows (only the three asterisked are currently available):

  • ‹Only one folder›* – Creates a single folder inside the document.
  • {DATE}* – Creates a folder for each distinct date found.
  • {DATE/MAGBAND} – Creates a folder for each distinct date found. Within each date folder a folder is created for each Magnitude band.(1,2,3,4,5,6,7,8,9)
  • {MAGBAND}* – A folder is created for each Magnitude band.(1,2,3,4,5,6,7,8,9)
  • {MAGBAND/DATE} – A folder is created for each Magnitude band.(1,2,3,4,5,6,7,8,9). Within each magnitude band a folder is created for each distinct date.
  • {LATBAND} – A folder is created for each Latitude band in steps of 1 i.e. -1,0,1,2,3,4 etc
  • {LATBAND10} – A folder is created for each Latitude band in steps of 10 i.e. -10,0,10,20 etc
  • {LONBAND} – A folder is created for each Longitude band in steps of 1 i.e. -1,0,1,2,3,4 etc
  • {LONBAND10} – A folder is created for each Longitude band in steps of 10 i.e. -10,0,10,20 etc
  • {LATBAND10/LONBAND10} – A folder is created for each Latitude band in steps of 10 i.e. -10,0,10,20 and within each Latitude band folder a folder is created for each Longitude band in steps of 10 i.e. -10,0,10,20 etc
  • {LOCATION} – Creates a folder for each distinct location found.
  • {DEPTHS(10,20,30 etc)} – A folder is created for each Depth band in steps of 10 i.e. 10,20,30,40 etc

Mapping the fields to the data

The program has a bunch of field 'placeholders' which I hope you will find sufficient, but if they are not just ask and more can be added. The placeholders are as follows: (Grey ones are levels)

First level placeholder Second level placeholder
Date and Time Fields Date & Time {EVDATETIME}
  Date Only {EVDATE}
  Day {EVDAY}
  Month {EVMONTH}
  Year {EVYEAR}
  Time Only {EVTIME}
  Hour {EVHOUR}
  Minute {EVMIN}
  Second {EVSECS}
Latitude {LAT}  
Longitude {LON}  
Depth {DEPTH}  
Location (Place) {PLACE}  
Other Information Fields Economic Cost {ECONCOST}
  Number of Deaths {DEATHS}
  Number of Injuries {INJURED}
  Number Of Displaced Persons {DISPLACED}
  Other Information Field 1 {OTHERINFO1}
  Other Information Field 2 {OTHERINFO2}
Felt Indicator {FELT}  
More Info Indicator {INFO}  
Magnitude 1 Magnitude {MAG1}
  Magnitude Type {M1TYPE}
  Nuber Of Stations {M1STNS}
  Source {M1SRC}
Magnitude 2 Magnitude {MAG2}
  Magnitude Type {M2TYPE}
  Nuber Of Stations {M2STNS}
  Source {M2SRC}
Magnitude 3 Magnitude {MAG3}
  Magnitude Type {M3TYPE}
  Nuber Of Stations {M3STNS}
  Source {M3SRC}
Magnitude 4 Magnitude {MAG4}
  Magnitude Type {M4TYPE}
  Nuber Of Stations {M4STNS}
  Source {M4SRC}
Magnitude 5 Magnitude {MAG5}
  Magnitude Type {M5TYPE}
  Nuber Of Stations {M5STNS}
  Source {M5SRC}
Icon Field {ICON}  

The mapping stuff tab
Once all the elements are set up you have to tell the system how to display the map in Google Maps or the data in Google Earth. Many of the features are common to both, but are used differently. All files will contain the 'LookAt' information if specified, but it will be ignored by Google Maps. The HTML code tells Google Maps how big the map should be and what the zoom level is.

This is all set up on the 'Mapping Stuff' tab

First the system needs to know the centre of the map. This applies to both. Decimal values only please and negative for South and West.

Next the values are different for Google Maps and Google Earth. Google Maps needs to know the spread in degrees of latitude and longitude from which it calculates the zoom level. In Google Earth this is normally specified as the altitude (in metres) above either the surface or sea level (that is determined by another control)

This link takes you to the Google KML developers guide for LookAt which goes into details if you are interested.

You will find there this diagram which explains the parameters.

The first (latitude) box is used for the altitude part of the LookAt when using Google Earth but BOTH parts must be specified in order to create the LookAt for Google Maps. If you do not specify one of other of these parameters then for Google Earth the value of 200,000 will be used (200Km above the point) and for Google Maps values of 2.5 degrees will be used.

Range, Tilt and Altitude Mode are only used in Google Earth and will be ignored if selecting maps.

Altitude mode can be either:

  • Relative to ground – if you specify 5000 metres and the ground is 2000 metres then altitude will be 7000 metres
  • Absolute (above sea level) – if you specify 2000 metres and the ground is 3000 metres at that point you will be inside the mountain! Usng the example above you would be at 5000 metres altitude but 3000 metres above the ground.
  • Clamped to ground – Does what it says on the box. Seriously NOT recommended for earthquake work.

The final tab called 'Places' deals with place names that may need to be added to the file/KMZ/KML output as the output file is created. The tab looks like this: (Click this image for the topic details)

Map Maker Tab - Places

Icon Source
This may not be what you think it is!

Icon information in file format: If this is selected then there should be an icon field in the file that points to the required icon for the event. If blank the default will be used.

Assign icons based on magnitude information: Assigns the selected icon for the magnitude band either from your icon scheme or from the defaults icons.

Most Important: Whilst for Google Earth it is possible to supply the icons with the KMZ file this is NOT possible with Google Maps therefore I have taken the view that all icons should be web based. What is being assigned above is the web address of the icons.

Output, Output Location and Filename

Here you select your output folder for the KML / KMZ file. This can be on your hard disk, but if you want to use the file in Google Maps or distribute to other it must be in a suitable location such as Dropbox.

Click on Get to select the folder for the output file. Type in the name for the file WITHOUT any extension – any you add will be stripped off anyway. Finally select from the three types of output.

Dimensions – the width and height of the box on the page in pixels. This only applies to Google Maps. If nothing is specified 640 x 480 will be assumed.

HTML iFrame – suitable for all web sites (including WordPress). The output will be like this:

‹iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src=",-95.677068&sspn=55.586984,79.013672&t=m&ie=UTF8&ll=27.78375,-18.17845&spn=0.4297,0.3299&output=embed"›‹/iframe›‹br /›‹small›‹a href=",-95.677068&sspn=55.586984,79.013672&t=m&ie=UTF8&ll=27.78375,-18.17845&spn=0.4297,0.3299&source=embed" style="color:#0000FF;text-align:left"›View Larger Map‹/a›‹/small›

WordPress – Whilst the above works perfectly well with wordpress it gets converted to their own format:


The advantage is that all the view larger map part is built in so less to go wrong!.

Google Earth – This produces a KML / KMZ file for Google Earth and places it in the specified folder. It does not launch Google Earth.

Comments policy

Please feel free to leave a reply. (All comments are moderated)

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.