Constructs an ImageLayer object.
Syntax
Parameters
- id
- ID of the constructed ImageLayer.
- dataset
- Dataset of the constructed ImageLayer.
Example
The following example creates a new ImageLayer from an image file on disk and adds it to the map. It assumes a pre-existing MapView object.
C# | Copy Code |
---|
// Create a new ImageLayer from a new image workspace and data set
ImageWorkspace newImageWS = new ImageWorkspace("worldWs", @"C:\Data\World");
ImageDataset newDataset = new ImageDataset("world_img.gif", newImageWS);
ImageLayer dynamicLayer = new ImageLayer("worldImage", newDataset);
dynamicLayer.Name = "World Image";
// Insert the dynamic layer into the map layers and draw the map
mapView.Layers.Insert(3, dynamicLayer); |
Visual Basic | Copy Code |
---|
' Create a new ImageLayer from a new image workspace and data set
Dim newImageWS As New ImageWorkspace("worldWs", "C:\Data\World")
Dim newDataset As New ImageDataset("world_img.gif", newImageWS)
Dim dynamicLayer As New ImageLayer("worldImage", newDataset)
dynamicLayer.Name = "World Image"
' Insert the dynamic layer into the map layers and draw the map
mapView.Layers.Insert(3, dynamicLayer) |
Remarks
Requirements
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
See Also