You can copy the map.cfg from the sample to your mymap directory and edit it, the distributed sample can be seen below.
[map] data = visited.xml type = map width = 800 height = 490 showcountry = 1 showtype = 0 divwidth = 250 [extends] default = "http://maps.google.com/maps?ll=14.604847,57.656250&spn=127.829913,245.812500" sengland = "http://maps.google.co.uk/maps?ll=51.733833,-1.713867&spn=3.471419,7.639893" [controls] mapctrl = 1 typectrl = 1 scalectrl = 1 size = large [types] visit = orange mini transit = blue lived = green [line1] color = #000000 width = 2 opacity = 0.6 [misc] gmapez=http://bluweb.com/chouser/gmapez/gmapez-2.js apikey="yourkey"
[map] section
data |
Path to the XML file with your map points |
type |
Type of map to show: map, satelite or hybrid |
width |
The width in pixels on screen |
height |
The height in pixels on screen |
showcountry |
Display the country information in marker popup text |
showtype |
Display the type of marker in the popup text |
divwidth |
The width of the popup windows, work around for a bug in GMaps with Firefox |
[extends] section
An extend defines the coordinates of the map center and also the zoom level to show when you first load the map.
Since version 1.2 you can define multiple extends in the configuration file, this allows you to create multiple views of your map.
As an example using my visited places map you can either see the default view that shows most of the world or just South England. Same data, html, config etc, just different initial views of the map.
To get the extend url's you need to use Google Maps, open it in a browser and drag and zoom till you get the map to be how you want it to look on your own map, left double click in the center of the map. This will set the link in the top right called 'Link to this page' to the URL you need for the extend. Simply copy that URL and paste it into the configuration file as either default or a named value, you can add as many extends as you like in this manner.
You may notice that your map does not look exactly as you thought it would while positioning it on the Google Maps page, this is probably due to the width and height of your map not being the same as the one displayed by Google Maps, you will need to use some trial and error to get it right.
[controls] section
On each Google Map you will notice there are various buttons you can interact with, these lets you choose map, satelite or highbrid view as well as let you control zoom level. The controls section in the configuration lets you control which of these to display and how large they should be displayed.
mapctrl |
Enable or Disable the map control button, top left of a Google Map |
typectrl |
Enable or Disable the top right buttons that lets the user choose between map, satelite or hybrid |
scalectrl |
Enable or Disable the sliding scale control along the left of the map |
size |
Can be either small or large this will show different sizes of all the above controls |
[types] section
As you will see later on the XML data file supports a type for each point, in the XML file you would simply have a word like visited or lived this would map to this section and instruct Google Maps which color pins to put for your points. For a list of supported colors refer to the GMaps EZ documentation. If you appent the word mini to any color like in the sample above the pin will be a much smaller pin that does not show any text on the pin itself, this is useful for maps with many markers.
There is one special type - none - using it in a point will prevent any comments or markers to be made at this point, it's only really useful when drawing lines. You should therefore consider the type none to be a reserved word and not try and define types matching that, they won't work.
[misc] section
At present the author of GMaps EZ would like you to just use the javascript and images served up from his server, this is not ideal and I've offered to help package the system up into a package that can be hosted by yourselves, until this is done though you can leave the gmapez URL on its default setting, once a versioned package is available you would change this to your own installation URL.
Add your own Google API Key in the apikey property.
[lineX] section
Lines can be drawn between points by using the <linemember> property of a point, simply assining all the points for a given line to the same line number will make a line appear between the points, in order that they are listed in the data file.
color |
A color definition that would be legal in a CSS class |
width |
The thickness of the line |
opacity |
The opacity of the line |
If you need to set special start and end points for your lines, simply create point types for those and set the start and end point to be of that type.
