IMapView.ScrollIntoView

Syntax

ScrollIntoView(Shape: IMapTopobaseShape);

Parameters

Shape - map layer region.

Description

The ScrollIntoView method places the specified area of the map layer into the view area.

Example

Executing the example requires a form with the Button1 button, the MapBox component and the UiMap component that is a data source for MapBox.

The example is executed on clicking the button.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);

Var

Map: IMap;

MapView: IMapView;

Layer: IMapLayer;

Shape: IMapTopobaseShape;

Begin

Map := UiMap1.Map;

MapView := Map.View;

Layer := Map.Layers.FindByName("Regions");

Shape := Layer.Shapes.Item(0);

MapView.ScrollIntoView(Shape);

End Sub Button1OnClick;

After executing the example the first area of the Regions layer is placed to the view area.

See also:

IMapView