IMapView.ImageMap

Syntax

ImageMap(Shape: IMapTopobaseShape; Width: Integer; Height: Integer; Params: String): String;

Parameters

Shape. Topobase element.

Width. Width in pixels.

Height. Height in pixels.

Params. Hyperlink action.

Description

The ImageMap property determines hyperlink parameters on clicking on a region.

Comments

The hyperlink is active only after a map is exported to HTML format.

To get a parent map, use the IMapView.Map property.

Example

Executing the example requires a regular report with the RO_MAP identifier that contains a map.

Add links to the Metabase, Report, Tab, Map system assemblies.

Sub UserProc;
Var
    mb: IMetabase;
    Report: IPrxReport;
    Sheet: IPrxTable;
    Map: IMap;
    ImageMap: String;
    Layer: IMapLayer;
    Shape: IMapTopobaseShape;
Begin
    mb := MetabaseClass.Active;
    Report := mb.ItemById("RO_MAP").Bind As IPrxReport;
    Sheet := Report.Sheets.Item(0As IPrxTable;
    Map := Sheet.TabSheet.Objects.Item(0).Extension As IMap;
    Layer := Map.Layers.FindByName("Regions");
    Shape := Layer.Shapes.Item(0);
    ImageMap := Map.View.ImageMap(Shape, 800600"title=""" + Shape.Description +
        """ href=""javascript:alert('" + Shape.Id.ToString + "')""");
End Sub UserProc;

After executing the example the ImageMap variable contains hyperlink parameters that are used to export a map to HTML format for the specified topobase element.

See also:

IMapView