How do you set the image map coordinates and what are their use please. I tried to put
[rectangle]:10,10,10,10 //does not work
10,10,10,10 //does not work

the README does not explain and I can not find any help about it on Drupal.org. Please help

Comments

kirie’s picture

Hey there!

The image map coordinates works like any other <map> tag in HTML - see here for a full explanation/example: http://www.w3schools.com/tags/tag_map.asp

In your case, using 10,10,10,10 will not work - because then you have no rectangle. Remember coordinates are 0,0 at the top left corner of the screen, then X increases horizontally to the right, and Y increases vertically down. If I had a 640x480 monitor, top left corner would be 0,0 and bottom right corner would be 639,479.

Does that help?

vip_sa’s picture

Thank you for the quick response

I have a 1280x1024 resolution and I tried every single setting I can think of.
1280,100,1280,100
1280,0,1280,0
0,0
0,1280,0,1280

and every time I get the map coordinates invalid. What exactly is valid coordinates and what should be in the field [rectangle]:100,20,100,20 or just the coordinates 100,20,100,20 or what?

Your help is really appreciated thx

kirie’s picture

Just use the coordinates, i.e. "0,0,10,10" for a polygon, without the quotes. The coordinates are relative to the image itself, so if you have a banner that is say, 1280 wide by 100 high, to make that whole banner a image map use these coordinates: "0,0, 1280, 100". However, if you just have a rectangular banner to be displayed along the top/bottom of the page, there isn't really any need to use a image map - as just providing a "Corner link URI" will make the banner into a link.

kirie’s picture

Sorry - meant to write: "0,0,10,10" for a rectangle

vip_sa’s picture

Ok don't worry I have eventually figured it out and it works Thanks

kirie’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.