PlotUK - User Documentation

Please read through the Licence agreement before using the software.


v1.00

PlotUK

PlotUK frees web designers from many of the annoyances associated with producing and maintaining location maps.

Using PlotUK, designers can quickly, easily and accurately place graphical markers and logos onto maps. Each graphic can act as a hyperlink to another page or an email address. Maintenance of location positioning is easy! Locations can be plotted using simple co-ordinates or, if the map is for a location with the UK, Ordnance Survey National Grid references obtained from Post Code databases or paper maps – giving designers confidence that each point is marked in the correct place - no more guessing!

Currently, this applet supports only the British Ordnance Survey National Grid system, however a global version is under development. Please check the DanCity site.


Getting Started

To begin with, we suggest that both novice and experienced web page designers practice writing definitions files using the map of the whole UK that is supplied with this applet. Once you have mastered that, you can move on to using your own maps. You could modify the sample definitions file which is used to produce the PlotUK map on the example page.


How To Specify Locations

The definitions File

Locations are specified by creating a 'Definitions' file which PlotUK reads. The definitions file is a plain text file and must be referenced within the <APPLET> tag. For each point that you want to be plotted, create an entry in the definitions file.

A very simple definitions file could look like this:

  
// Any lines beginning with double forward slashes
// are ignored and can be used to insert comments

// These locations are plotted using (x,y) co-ordinates
Southampton {location : "(70,35)"}
Holyhead    {location : "(108,196)"}

// These locations are plotted using OS Grid References from a Road Atlas
Penzance    {location : "SW4730"}
Manchester  {location : "SJ8497"}

// If place names include spaces, enclose them within "double quotes"
"Branch 22" {location : "SS6592"}
"Branch 23" {location : "SX9292"}

// This definitions file does not use any special
// graphics, just the built in coloured markers

Assuming that PlotUK has been set up correctly, this file would place the default marker at the each of the locations specified and assign the specified name to each marker. There are several methods of specifying each marker's 'location', these are discussed later.

If you want to change the size and/or colour of a location's marker, add it to the location definition. The value you assign to the 'size' parameter should be the radius of the circle in pixels. 

"Head Office" {
   location : "SX9292"
       size : "15"
  mouseover : "#999999"
   mouseoff : "#00FF00"
}

Note that the whole location definition must be enclosed within {curly braces} and all values must be surrounded by "double quotes". The 'mouseover' and 'mouseoff' values specify the colour of the circle while the mouse is over or off the marker respectively. These colours must be set if the 'size' parameter is set.

PlotUK allows much more flexibility than this. You can change the default image to be displayed over the whole map in the <APPLET> tag. If you wish, you may override this setting and use a different image for any location. Every location can have an associated hyperlinks.

Here is a single location entry using:

"The name you wish to associate with the image" {
    location : "SJ8497"
    mouseoff : "images/manchesterLogo.gif"
   mouseover : "images/manchesterSelected.gif"
        href : "http://www.dancity.com/"
      target : "_new"
      offset : "-5,2"
// Any line beginning with two forward slashes will be ignored; great for comments!
}

Note that the name you wish to associate with a location must be enclosed within double quotes, unless it is a single word with no spaces.

Where:

location : Specifies the location on the map where the image will be plotted. The supplied image is centred around this location. There are three methods by which one may specify the location of points plotted onto the map area; these are detailed below.
size : [optional] Specified the radius of the marker in pixels. By default, this 5 pixels.
mouseoff : [optional] Specifies the colour of the marker or the image to be displayed at this point, while the mouse pointer is not over the image. If this is not specified, the default marker colour is used or the image specified within the <PARAM> tag will be displayed. The path to the image is relative to the location of the definitions file.
mouseover : [optional] Specifies the colour of the marker or the image to be displayed at this point, while the mouse pointer is over the image. If this is not specified, the default marker colour is used or the image specified within the <PARAM> tag will be displayed. The path to the image is relative to the location of the definitions file.
href : [optional] A valid href as defined by html protocols. The href may be relative (e.g. "../branches/london.html"), absolute (e.g. http://www...) or a mailto: ref. Relative hrefs are relative to the location of definitions file.
target : [optional] Specifies the window in which the href will be opened. If this is not specified, the href will replace the page containing the PlotUK applet. Use valid html format to specify the target frame.
offset : [optional] The location will be moved by the specified distance in the x and y directions. This is useful if any points are so close together that they overlap, confusing the viewer, while allowing the web designer to keep the original OS reference intact. The units used are the same as those used in the location value, i.e. metres for OS references and pixels for (x,y) co-ordinates 

The 'Location' Value Explained

X and Y Co-ordinate

Points may be plotted onto your map using a simple (x,y) co-ordinate system, where the x value is the number of pixels from the left of the image and y is the number of pixels from the top. Almost every graphics programs will display these co-ordinates while you are editing a graphic. Simply move your mouse over the desired location and read off the value from your graphics program:

Values must be enclosed within parentheses and double quotes, e.g. VALUE="(91,17)"

OS ‘Military’ Grid System

PlotUK has the facility to plot points based on the OS Military Grid System. This system is widely used on many road atlases, hill walkers and climbers maps (e.g. Ordnance Survey Pathfinder and Landranger series) and some UK street maps. Each location is referenced by two letters and an even number of numerical digits e.g. the approximate location of Tower Bridge, London is XX12341234. The system is easy to learn and can be very accurate. If you are not familiar with this system, the educational section of the Ordnance Survey website gives further details, or simply talk to a keen hill walker!

There are many methods of finding the OS National Grid for any location with the UK. Examples include:

OS Absolute Location

This system is similar to the OS ‘Military’ Grid System, except the format does not include the two letter prefix, but instead locates the point in absolute distance from the OS National Grid Origin e.g. Tower Bridge, London would be 1234567,1234567.

Although rarely used by walkers, some postcode databases store the location of the postcode area in this format. See www.streetmap.co.uk as an example. Please note as a postcode area can include a dozen or more houses, and the grid reference will be an average for the whole area, this method may not be suitable for very large scale maps.


The <APPLET> Tag

If you are new to using Java applets within HTML documents, please read this section carefully. Experienced users can relax until they reach the Using Your Own Maps section!

The easiest method of doing this is to copy all of the text between and including the <APPLET> and </APPLET> tags from the example page into your own html. For this to work, the PlotUK.jar file, mapUK.gif image and definitions.txt file must also be copied to the same directory as your html page. You can then change the definitions.txt file to your own liking. If you decide to change the map image, you will need to calibrate PlotUK so that it knows the scale of your map. Please see the Using Your Own Maps section for more information on this.

For better understanding, here is some more information.

<APPLET ARCHIVE="PlotUK.jar"   CODE="PlotUK.class" WIDTH=200 HEIGHT=500>
    <PARAM NAME="copyright"   VALUE="(c) 1999 Dan MacFarlane. http://www.dancity.com/">
    <PARAM NAME="definitions" VALUE="path/fileName.txt">
    <PARAM NAME="image"       VALUE="path/imageName.gif">
</APPLET>

The HEIGHT and WIDTH values should be the height and width of the map image that you are intending to display. The "copyright" line is required. The value of the "definitions" parameter should be the path and name of the text file that contains the location definitions file. The value of the "image" parameter should be the path and name of a map image in either GIF or JPEG format.


Optional Parameters within the <APPLET> tag

Default Markers

By default, PlotUK uses small circles to mark each point specified within the definitions file. The circles are blue when the mouse is over the location and red at other times. You can change the default colour of these circles or replace them with default images from within the <APPLET> tag. To change the colour or images displayed for individual location markers, see the definitions file section.

The two applet parameters are "defaultOFFimage" and "defaultOVERimage" to represent the default markers shown while the mouse is off the location marker or over the marker respectively. The VALUE should the path and file name of a GIF or JPEG image. e.g.

<PARAM NAME="defaultOFFimage"  VALUE="path/imageName.gif">
<PARAM NAME="defaultOVERimage" VALUE="path/imageName.gif">

The /path/ to the image file is relative to the location of the .html page which contains the <APPLET> tag.


Using Your Own Maps

PlotUK will display images in either GIF or JPEG format. If you plan to use a map image which has been produced by someone else, or even trace or modify someone else's map, you should check out the copyright situation, as failure to do so could lead to prosecution and/or civil proceedings.

If you plan to use PlotUK's Ordnance Survey grid plotting feature, it is important that any map you use is drawn so that the scale is the same across the whole map i.e. one inch across the image represents the same physical distance no matter where the inch is measured over your map. Ordnance Survey maps tend to be drawn this way. Some maps are drawn using other projection methods and may result in PlotUK plotting markers in the wrong place. 

Here are some sites that you may find useful (all of the maps are copyright, however you may be granted permission to use or buy these maps if you enquire):

Okay - so you are still with me. Hold tight, here goes... 

KnownPointA & KnownPointB

These values are needed only if the definitions file uses Ordnance Survey National Grid references to identify where a point should be plotted.

The accuracy of the KnownPoint values influences the accuracy with which PlotUK displays the points. If the you hurry this bit, your markers may be plotted in the wrong places!

If you are intending to use PlotUK with an existing map image, you will need to calibrate PlotUK to the scale of this map. Firstly, find two obvious points on your map. The two points should be as far away from each other as possible, both horizontally and vertically.

If you look at our example showing the whole of the UK, we chose Dover in Kent and Stornoway on the Isle of Lewis, Scotland. This is because they are easily identifiable, even on an outline map that does not identify the positions of the towns and cities. If towns are marked on your map, all the better. On a street map, road junctions in two opposite corners should be suitable; on regional branch maps, towns in two opposite corners would be good choices.

Next, find out the OS reference for these two points. Dover, for example, is at TR3241 and Stornoway is at NB4232. You will need to choose an accuracy level suitable for your map. If you use a very large scale map, you will need to use very accurate grid references.

Once you have these, locate the two points within your image using a graphics package and record the x and y co-ordinate of your two known points.

Finally, insert the two KnownPoint parameters into your applet tag. The value of the KnownPoint parameter is:

VALUE="OS Reference : x value , y value" (with no spaces)

e.g.

<PARAM NAME="KnownPointA" VALUE="TR3241:290,392">
<PARAM NAME="KnownPointB" VALUE="NB4232:75,59">

Reversing the Process - for good graphics people!

Once you are comfortable using PlotUK you can try reversing this whole operation. Start with a completely blank image of the appropriate size. Calibrate it by choosing OS grid references of two opposite corners and specifying the pixel co-ordinates of those two corners. Set up your definitions file as appropriate and display the applet. You will now see the exact locations of the points you wish to display. You can then use a graphics package to draw in any detail you wish to appear on the blank map image!


Purchase

If you wish to use PlotUK for purposes other than evaluation you must purchase the commercial version. For further information, visit the DanCity site, or email plotuk.support@dancity.com.


Licence

Please read through the following Licence agreement before using the software.


PlotUK ("the software") Copyright © 1999 Dan MacFarlane.

Licence Restrictions
At all times the software remains Copyright © 1999 Dan MacFarlane. The licensee shall not modify, decompile, disassemble, decrypt, extract, or otherwise reverse engineer the software. Any work derived from the software may not be distributed without the explicit permission of the author. The licensee shall not use the software for any purposes other than evaluation.

Disclaimer of Warranty
THE AUTHOR MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT.

Liability
IN NO EVENT WILL THE AUTHOR BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.