Tuesday 23 April 2013

Image Map

Image Map is used to divide the image into different hotspots and allow the user to navigate to different pages by clicking on different hotspot or execute different code when user clicks on different hotspot or execute different code when user clicks on different hotspot based on the hotspot on which user clicked. It has thee property image URL to specify the image to display within the ImageMap and the property hotspots to specify different hotspots required within the image map.

Three different types of hotspots you can create within the Imagemap and they are circle hotspot, rectangle hotspot and polygon hotspot. The rectangle hotspot has the properties bottom,left, right and top to specify position and size of the rectangle hotspot and circle hotspot has the properties radius x and y to specify the radius and center point of the circle and polygon hotspot and circle hotspot has the property co ordinates to specify the points using which you want to draw the polygon.

All the types of hotspots have the following three properties :-
  • Hotspot Mode:-  Used to specify the mode of hotspot and it has the options like not set, inactive, navigate and postback.
  • Navigate Url:- Used to specify Url of the page to navigate when hotspot mode is set to navigate and user click on the hotspot.
  • Target :- When Hotspot Mode is set to navigate then this property is used to specify the target when to display the navigate URL.