Gets or sets the shape of a MapArea object.
Shape of the area.
Visual Basic (Declaration) | |
---|---|
Public Property Shape As MapAreaShape |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public MapAreaShape Shape {get; set;} |
Return Value
A MapAreaShape enumeration value that determines the shape of a map area object.
The following sample creates a custom image map that has a rectangular shape. We set the shape and coordinates of the MapArea object, and then add it to the MapAreas collection in the Page_Load event.
Visual Basic | Copy Code |
---|---|
Imports Dundas.Charting.WebControl |
This property is usually used to set the shape of a custom map area object, which has a user-defined shape and coordinates.
The shape of the custom map area determines the type of coordinates that must be specified, and available shapes are circles, rectangles and polygons.
When retrieving the shapes of MapArea object's that are stored in the MapAreasCollection any shape that is not a rectangle or a circle will be considered a polygon. For example, a custom map area can be added to the map areas collection using a GraphicsPath object as a parameter, which allows for any type of shape to be used. If the Shape property of this particular MapArea object is retrieved it will return MapAreaShape.Polygon.
Once a map area's shape and coordinates are defined the ToolTip, Href and/or MapAreaAttributes properties can be used to specify some sort of user interaction.
Please note:
- A client-side image map will only be created at run-time if the MapEnabled property of the root Chart object is true (the default).
- To create an image map by adding a MapArea object to the map areas collection the RenderType property of the Chart object MUST be RenderType.ImageTag. It is possible to create an image map when using binary streaming, but a special technique must be used. Refer to the Client-Side Mapping and Binary Streaming topic for further details.
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family