Closed Thread Icon

Topic awaiting preservation: Plot points on an image? Pages that link to <a href="https://ozoneasylum.com/backlink?for=8617" title="Pages that link to Topic awaiting preservation: Plot points on an image?" rel="nofollow" >Topic awaiting preservation: Plot points on an image?\

 
Author Thread
Liembo
Obsessive-Compulsive (I) Inmate

From: Earth
Insane since: Apr 2003

posted posted 04-25-2003 00:31


I'm working on a simple script that would allow me to plot/remove points on a map as they mouseover images/links on the page. Basically showing them where that photo was taken on that map image. Can I do this via DHTML or JavaScript? I can't find anything about plotting graphics ON images...

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 04-25-2003 00:46

I'm not sure what you are trying to do here exactly but

What you can do is just wrap the image in a DIV and then control other divs inside of it. for a pointer or whatever.
<div id="imageDIV"><img src="map.gif"></div>


If you want them to be able to mouseover the image and track the position of the mouse on a map you can do this with an imagemap quite well.



.:[ Never resist a perfect moment ]:.

Veneficuz
Paranoid (IV) Inmate

From: A graveyard of dreams
Insane since: Mar 2001

posted posted 04-25-2003 00:46

I don't think you acctually can plot on the image using javascript, only think that is possible using a server side language. The closest you will get is moving (or changing the dispay property) another layer/div around on top of it.


_________________________
"There are 10 kinds of people; those who know binary, those who don't and those who start counting at zero"

Scott
Bipolar (III) Inmate

From: schillmania.com
Insane since: Jul 2002

posted posted 04-25-2003 02:56

You could have a collection of hidden images or DIVs which would then be positioned as the user mouses over certain points, etc. - you'd have to track the locations and "status" of those elements also, but you could do it using Javascript. It'd be easier if there's a finite number of points to put down, but alternately an object-based approach may be more flexible if you don't know the number of points to be used.

RoyW
Bipolar (III) Inmate

From:
Insane since: Aug 2001

posted posted 04-25-2003 21:00

The easiest way is to put the map image as the background image in a table cell then use normal rollovers to put arrow images over the map like this :- http://www.javascript-fx.com/development/linedraw/arrows_img.html

Benefits:Works in practically all browsers, arrows can be very graphical
Pifalls:Need image editor, new image for each arrow, high bandwidth usage for all images.

A more compex solution is to create line drawing routines using "div's" as pixels and then you can draw arrows on the map image like this :- http://www.javascript-fx.com/development/linedraw/arrows.html

Benefits:Can define new arrows at any time
Pitfallsoesn't work in Opera 5, arrows are plain.

Liembo
Obsessive-Compulsive (I) Inmate

From: Earth
Insane since: Apr 2003

posted posted 04-25-2003 22:42

The 2nd example is exactly what I was looking for.

Thanks for all of your assistance with this, all hitns were helpful.

« BackwardsOnwards »

Show Forum Drop Down Menu