Guys, I'm new here, so I'm asking this before I get my head around things just to find out its not possible and spent hours and hours for nothing... so, please, could someone give me a hand?
I need to create a map that adjusts itself, this is easy, but I also need to be able to click on it and know which section I clicked. Is this possible?
What I will create is an Iridology map. (eye exam chart)
Thank you for any help.
Best Regards, WilliamK
Creating a vector image with on-mouse hot spots?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Creating a vector image with on-mouse hot spots?
ImageMagic doesn't contain tools that capture mouse clicks.
Other systems, such as Web languages, do contain such tools.
Other systems, such as Web languages, do contain such tools.
snibgo's IM pages: im.snibgo.com
Re: Creating a vector image with on-mouse hot spots?
Yes, I'm aware of that, but I wonder if via PHP I could detect if I'm hitting a vector area or not, something like that. Like games does.
For example, I have 4 circles in my vector, and I want to know if a X/Y position hits one of those circles and which one.
For example, I have 4 circles in my vector, and I want to know if a X/Y position hits one of those circles and which one.
Re: Creating a vector image with on-mouse hot spots?
Yes you can do it with php ( will give you the x and y cordinates in the URL ) but the page will reload. You may be able to do it with javascript and not have the page reload - I do not use javascript and so can not confirm this.
I did have a couple of php examples on my website but I have removed one and this one http://www.rubblewebs.co.uk/imagemagick/trials/imap.php is broken; I will try and have a look at it later if I remember.
I did have a couple of php examples on my website but I have removed one and this one http://www.rubblewebs.co.uk/imagemagick/trials/imap.php is broken; I will try and have a look at it later if I remember.
Re: Creating a vector image with on-mouse hot spots?
My example seems to be working OK now - when you click on a colour on the first page and go to the second page you can see the co-ordinates of the click in the URL.
Re: Creating a vector image with on-mouse hot spots?
Thanks Bonzo, I will check out things pretty soon. Just to speed things up, could you please show me how you did that?
Re: Creating a vector image with on-mouse hot spots?
Never mind, I saw the "click here to download the code" link....
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Creating a vector image with on-mouse hot spots?
Doesn't work for me (firefox v16 under linux)Bonzo wrote:My example seems to be working OK now - when you click on a colour on the first page and go to the second page you can see the co-ordinates of the click in the URL.
Actually I liked you older example where you create a colored map of areas within an image, take the users click coordinates and look up the color in that color map to determine what area the user selected. Is that online somewhere?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Creating a vector image with on-mouse hot spots?
Strange as it works in Firefox 17.0.1 on Windows.Doesn't work for me (firefox v16 under linux)
No I do not think it is, last thing I used it for was an imagemap on my gallery. I will look it out again and make another demo when I get time.Actually I liked you older example where you create a colored map of areas within an image, take the users click coordinates and look up the color in that color map to determine what area the user selected. Is that online somewhere?
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Creating a vector image with on-mouse hot spots?
It works for me on Firefox 3.5.16 under Windows 7. As I moved the mouse around, it continuously showed the coordinates in the address bar.
Is Firefox now on v17? About time I upgraded, I suppose.
Is Firefox now on v17? About time I upgraded, I suppose.
snibgo's IM pages: im.snibgo.com