Description
Class hierarchy
esri.Graphic
Constructor
Properties
Methods
Constructor Detail
esri.Graphic(geometry, symbol, attributes, infoTemplate)
Creates a new Graphic object. All parameters are required and must be specified in the order given.
Parameters:
|
<Geometry>
geometry |
Required |
The geometry that defines the graphic.
|
|
<Symbol>
symbol |
Required |
Symbol used for drawing the graphic.
|
|
<Object>
attributes |
Required |
Name value pairs of fields and field values associated with the graphic.
|
|
<InfoTemplate>
infoTemplate |
Required |
The content for display in an InfoWindow.
|
Creates a new Graphic object using a JSON object.
Parameters:
|
<Object>
json |
Required |
JSON object representing the graphic.
|
Properties Detail
Name value pairs of fields and field values associated with the graphic.
The geometry that defines the graphic.
The content for display in an InfoWindow.
The symbol for the graphic.
Methods Detail
Returns the content string based on attributes and infoTemplate values.
Return value: String
Returns the Dojo gfx shape of the ESRI graphic.
Returns the title string based on attributes and infoTemplate values.
Return value: String
Hides the graphic.
Return value: none
setAttributes(attributes)
Defines the attributes of the graphic.
Input Parameters:
|
<Object> attributes |
Required |
The name value pairs of fields and field values associated with the graphic. |
Defines the geometry of the graphic.
Input Parameters:
|
<Geometry> geometry |
Required |
The geometry that defines the graphic. |
setInfoTemplate(infoTemplate)
Defines the InfoTemplate for the InfoWindow of the graphic. When a user clicks a graphic, the InfoWindow opens with this template.
Input Parameters:
|
<InfoTemplate> infoTemplate |
Required |
The content for display in an InfoWindow. |
Sets the symbol of the graphic.
Input Parameters:
|
<Symbol> symbol |
Required |
The symbol for the graphic. |
Shows the graphic.
Return value: none
Converts object to its ArcGIS Server JSON representation.
Return value: Object