TmplUtil Class
A set of functions that can be accessed within templates
Item Index
Methods
Methods
getFeatureName
-
graphic
-
layerConfig
Given a feature object or a graphic object (or any object that has a getLayer method and an attributes field) return the attribute value for its designed "name" field
NOTE: all dependent functions should be written as nested functions inside the caller function, otherwise TmplEx templating library won't identify
Parameters:
-
graphic
Graphic -
layerConfig
Object
Returns:
imageUrl Url to the features symbology image
getGraphicIcon
-
graphic
-
layerConfig
Given a feature object or a graphic object (or any object that has a getLayer method and an attributes field) return the image URL for that feature/graphic object.
NOTE: all dependent functions should be written as nested functions inside the caller function, otherwise TmplEx templating library won't identify
Parameters:
-
graphic
Graphic -
layerConfig
Object
Returns:
imageUrl Url to the features symbology image
getObjectId
-
graphic
Given a feature object return the objectid for that item. This will likely fail on a non-feature object (e.g. a plain graphic)
NOTE: all dependent functions should be written as nested functions inside the caller function, otherwise TmplEx templating library won't identify
Parameters:
-
graphic
Graphic
Returns:
objectId