[Go to Previous] [Go to Next]


Modify the Display Object

annotate - Writes text to a panel

Usage: panel[0].annotate(keywords)
Keywords - required:
text= annotation string. This string can contain HTML tags such as paragraph <p>, line break <br>, emphasize/italicize <em>, and bold <b>
lat=, lon= center text string at specified latitude and longitude (must be used together) -or-
line=, element= center text string at specified panel line and element (must be used together)
Keywords - optional:
font= name of font; default is system dependent, this uses the default defined in User Preferences
size= size of font; default = size of font defined in user preferences
style= style of font; default = style of font defined in user preferences
'BOLD'
'ITALIC'
'NONE'
color= sets the color of the text. There are two ways this can be set:
'color name'; default = 'red'
-or-
[R,G,B] fractional scaling factor for each red, green and blue value (0 to 255). For example, [255,0,0]
alignment= sets the location of the text with respect to the latitude/longitude or line/element combination entered. The format is alignment=(horizontal,vertical). For horizontal, values of "left", "right", and "center" can be used. For vertical, values of "top", "bottom" and "center" can be used. The default is alignment=("center","center") which means the text will be centered at the location of the latitude/longitude or line/element values.
bgColor= sets the background color of the text. default=None
There are two ways this can be set:
'color name'. For example, 'green' -or-
[R,G,B] fractional scaling factor for each red, green and blue value (0 to 255). For example, [0,255,0]
Example:
panel[0].annotate('EQUATOR',size=20, font='SansSerif.bold', lat=0, lon=-90, color='Green',alignment=("left","top"))

setCenter -  Centers the display on a specified latitude/longitude and sets a scaling factor

Usage: panel[0].setCenter(keywords)
Keywords - required:
lat= centers the display at the specified latitude (no default, required parameter)
lon= centers the display at the specified longitude (no default, required parameter)
Keywords - optional:
scale= scale factor for map; default = current scale factor
Remarks:
Scale factors between 0 and 1 zoom out centered on the specified latitude/longitude and scale factors greater than 1 zoom in.
Example:
panel[0].setCenter(45, -75, scale=20)

setProjection - Sets the projection of a panel

Usage: panel[0].setProjection(keywords)
Keywords - required:
projection= string specifying the projection; e.g., 'US>Southeastern U.S.' or the name of the layer returned from createLayer, which uses the default projection of that data. Alternatively, a layer object can be passed through this keyword. For example, if a layer was defined as myLayer when running createLayer, passing 'myLayer' through the projection keyword would set the projection to the native projection of the myLayer layer.
Example:
panel[0].setProjection(projection='US>States>N-Z>Pennsylvania')

setViewpoint - Sets the viewpoint of a panel

Usage: panel[0].setViewpoint(keywords)
Keywords - required:
viewpointName= string specifying the viewpoint; e.g., 'Viewpoint1'. This works in conjunction with the Projections->Viewpoints menu item in the Main Display window.
Example:
panel[0].setViewpoint(viewpointName='Viewpoint1')

setWireframe - Turns wire frame box on or off

Usage: panel[0].setWireframe(keywords)
Keywords - required:
visible= sets the visibility of the wireframe box
True - displays the wireframe box
False - does not display the wireframe box
Examples:
panel[0].setWireframe(False)
panel[0].setWireframe(True)

setMapVisibilityByDescription - Sets the visibility of individual maps in the display

Usage: panel[0].setMapVisibilityByDescription(keywords)
Keywords - required:
description= the map to be added or removed from the display. The description matches the names of the maps in the Layer Controls.
visibility= sets the visibility of the map defined in the description keyword
True - displays the map
False - does not display the map
Examples:
panel[0].setMapVisibilityByDescription(description='World Coastlines', visibility=False)
panel[0].setMapVisibilityByDescription(description='U.S. County Outlines', visibility=True)

[Go to Previous] [Go to Next]