This is a reference to an annotation layer object. Use ENVIView::CreateLayer to create a new annotation object.

Example


; Start the application
e = ENVI()
 
; Open an input file
file = FILEPATH('qb_boulder_msi', $
  ROOT_DIR=e.ROOT_DIR, SUBDIRECTORY = ['data'])
raster = e.OpenRaster(file)
 
; Display the raster layer
View = e.GetView()
RasterLayer = View.CreateLayer(raster)
 
; Create an annotation set using Geographic Lat/Lon
; WGS-84 as the spatial reference
annotation = ENVIAnnotationSet(/GEOGRAPHIC)
 
; Label the community park
annotation.AddCircle, $
  -105.22101050, 39.9917, $ ; X and Y coordinates
  [300.0, 200.0], $ ; ellipse axes (m)
  LINE_COLOR='lime green', NAME='Park polygon'
 
annotation.AddText, $
  -105.22118409, 39.99424191, $ ; X and Y coordinates
  'East Boulder!C Community Park', $
  GLYPH_COLOR='lime green', NAME='Park label'
 
; Label the reservoir
annotation.AddText, $
  -105.20407487, 39.99911740, $ ; X and Y coordinates
  'Baseline!C Reservoir', $
  GLYPH_COLOR='light sky blue', $
  NAME='Reservoir label'
 
; Save the annotation set
outFile = e.GetTemporaryFilename()
annotation.Save, outFile
 
; Display the annotation layer
AnnLayer = View.CreateLayer(annotation)

Return Value


This function returns a reference to an ENVIAnnotationLayer object.

Methods


Close

MoveDown

MoveToBottom

MoveToTop

MoveUp

Properties


DATA (Get)

The ENVIAnnotationSet contained by the annotation layer.

HIDE (Get, Set)

Set this property to 1 to hide the layer, and to 0 to display it. The default value is 0.

TRANSPARENCY (Get, Set)

Specify a floating-point value between 0 (opaque) and 100 (invisible) that defines the transparency of the layer. The default value is 0.

VIEW (Get)

The ENVIView where the annotation layer resides.

Version History


ENVI 5.6.1

Introduced

API Version


4.2

See Also


ENVIAnnotationSet, ENVIRasterLayer, ENVIVectorLayer, ENVIROILayer, ENVIRasterSeriesLayer, ENVIGridLinesLayer