ArcGIS Explorer Component Help |
ImageOverlay..::.ChangeImage Method (String) |
ImageOverlay Class Example See Also |
Changes the image displayed for the image overlay.
Namespace:
ESRI.ArcGISExplorer.MappingAssembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
C# |
---|
public void ChangeImage( string path ) |
Visual Basic (Declaration) |
---|
Public Sub ChangeImage ( _ path As String _ ) |
Parameters
- path
- Type: System..::.String
The path to the .PNG file displayed for the image overlay.
Remarks
Changes the image displayed for the image overlay. All settings that have been applied to the image overlay, such as the size, location, and transparency, are maintained.
Examples
The code below illustrates how to use this method to change the image of an existing Image Overlay.
CopyC#
Map myMap = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Map; ImageOverlay imgOverlay = new ImageOverlay("Logo", "C:\\Images\\Logo.png"); //Create a new bitmap and use to change the ImageOverlay image. Bitmap myBmp = new Bitmap("C:\\Images\\BitmapTest.bmp"); imgOverlay.ChangeImage(myBmp); //Change the ImageOverlay using the string path to a PNG file. imgOverlay.ChangeImage("C:\\Images\\NewImage.png");
CopyVB.NET
Dim myMap As Map = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Map Dim imgOverlay As ImageOverlay = New ImageOverlay("Logo", "C:\Images\Logo.png") 'Create a new bitmap and use to change the ImageOverlay image. Dim myBmp As Bitmap = New Bitmap("C:\Images\BitmapTest.bmp") imgOverlay.ChangeImage(myBmp) 'Change the ImageOverlay using the string path to a PNG file. imgOverlay.ChangeImage("C:\Images\NewImage.png")