tags:

views:

139

answers:

1

Hi,

I would like to have some points defined in the map and would like to join the 2 points by clicking on them. Basically, the functionality is to identify the locations in the map and connect them by a single line. For some reason, I am not able to use google map API and would like to achieve this using JavaScript.

Thanks in advance, Milan

+1  A: 

Javascript with use of HTML itself cannot produce a line (in any angle) between two points . But this is possible by:

  • using Javascript with some vector graphics available around (SVG and VML), google maps actually use this technology to do some graphic like routing etc. (link)
  • HTML5 CANVAS element (with excanvas extension to get this work in IE), (link)
  • simply by "fake" lines as a html small elements position very close to each other (link)
Wilq32