Description
An InfoTemplate contains a title and content template string used to transform
Graphic.attributes into an HTML representation. The Dojo syntax ${<key>} performs the parameter substitution. In addition, a wildcard ${*} can be used as the template string. The wildcard prints out all of the attribute's name value pairs. The default behavior on a Graphic is to show the Map's
InfoWindow after a click on the
Graphic. An InfoTemplate is required for this default behavior.
Class hierarchy
esri.InfoTemplate
Constructor
Properties
| content |
String
|
The template for defining how to format the content used in an InfoWindow. |
| title |
String
|
The template for defining how to format the title used in an InfoWindow. |
Methods
Constructor Detail
Creates a new empty InfoTemplate object.
esri.InfoTemplate(title, content)
Creates a new InfoTemplate object. All parameters are required and must be specified in the order given.
Parameters:
|
<String>
title |
Required |
The template for defining how to format the title used in an InfoWindow.
|
|
<String>
content |
Required |
The template for defining how to format the content used in an InfoWindow.
|
Creates a new InfoTemplate object using a JSON object.
Parameters:
|
<Object>
json |
Required |
JSON object representing the InfoTemplate.
{title:"Test Title", content:"Test Content"}
|
Properties Detail
The template for defining how to format the content used in an
InfoWindow.
The template for defining how to format the title used in an
InfoWindow.
Methods Detail
Sets the content template.
Input Parameters:
|
<String> template |
Required |
The template for the content. |
Sets the title template.
Input Parameters:
|
<String> template |
Required |
The template for the title. |
Converts object to its ArcGIS Server JSON representation.
Return value: Object