Reusable Accessible Mapping Platform

API Docs for: 3.0.0
Show:

TmplUtil Class

A set of functions that can be accessed within templates

Methods

getFeatureName

(
  • graphic
  • layerConfig
)
String

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:

String:

imageUrl Url to the features symbology image

getGraphicIcon

(
  • graphic
  • layerConfig
)
String

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:

String:

imageUrl Url to the features symbology image

getObjectId

(
  • graphic
)
Integer

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:

Integer:

objectId