Polyliner

Polyliner is a Google map based tool for drawing lines made by Craig Loftus.

This tool allows you to draw lines between points on a map (powered by Google maps), and put the results on your own website. By clicking on the above map in multiple locations, markers will be placed and a sequential line will be drawn between them. You can download Polyliner for use on your own website from my scripts page.

Output

The above is the javascript required to plot the line you have just drawn. You can use my example file, and a file (called draw.js) containing the javascript you have just generated. You will need to register for your own API key, as they are site specific.

You will need to enter your key in example.html (line 12):


<script src="http://maps.google.com/maps?file=api&v=2&key=YOUR_KEY" type="text/javascript"></script>
<script src="draw.js" type="text/javascript"></script>

Problems

This tool is far from perfect, and there are a number of issues I have identified and hope to address:

  • The tool needs to be a lot more configurable,
  • Should you make a mistake you will have to draw the line again,
  • Changes to the map centre point and zoom level need to be set manually: this should be automatic,
  • Only basic infobox support is provided i.e. you have to enter the values in manually.

If you identify any problems not listed above please inform me.

Page info

License
Copyleft 2010 Craig Loftus
Some rights reserved
Last updated
2009-05-13