LayerBase.RectangleClip Property
Specifies a rectangle that limits the layer’s displayed area.
Namespace: DevExpress.XtraMap
Assembly: DevExpress.XtraMap.v24.1.dll
NuGet Package: DevExpress.Win.Map
Declaration
Property Value
Type | Description |
---|---|
Rectangle | A rectangle that limits the layer’s displayed area. |
Remarks
The following example creates two layers within the Map Control and limits the displayed area of the second layer:
private void Form1_Load(object sender, EventArgs e) {
ImageLayer imageLayer1 = new ImageLayer();
BingMapDataProvider bingMapProvider1 = new BingMapDataProvider();
bingMapProvider1.BingKey = "Your bing key here";
bingMapProvider1.Kind = BingMapKind.Road;
imageLayer1.DataProvider = bingMapProvider1;
mapControl1.Layers.Add(imageLayer1);
ImageLayer imageLayer2 = new ImageLayer();
BingMapDataProvider bingMapProvider2 = new BingMapDataProvider();
bingMapProvider1.BingKey = "Your bing key here";
bingMapProvider2.Kind = BingMapKind.Hybrid;
imageLayer2.DataProvider = bingMapProvider2;
imageLayer2.RectangleClip = new Rectangle(200, 50, 170, 130);
mapControl1.Layers.Add(imageLayer2);
}
The related API members:
Name | Description |
---|---|
Displays map images obtained from map image data providers. | |
The class that loads map images from the Bing Maps data provider. | |
Get or sets the key that is required to connect to the Bing Maps data provider. | |
Specifies the type of images that the map displays. | |
Gets or sets the provider used to obtain images from an external source. | |
Contains the collection of layers displayed within the MapControl. |