API Docs for: 0.0.8-0
Show:

TmplUtil Class

A set of functions that can be accessed within templates

Item Index

Attributes

Methods

getFeatureName

(
  • feature
  • layerConfig
)
String

Inherited from TmplUtil but overwritten in javascript\src\RAMP\Utils\tmplUtil.js:49

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 designaed "name" field

NOTE: all dependent functions should be wroten as nested functions inside the caller function, otherwise TmplEx templating library won't identify

Parameters:

  • feature Graphic
  • layerConfig Object

Returns:

String:

imageUrl Url to the features symbology image

getGraphicIcon

(
  • feature
  • layerConfig
)
String

Inherited from TmplUtil but overwritten in javascript\src\RAMP\Utils\tmplUtil.js:22

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 wroten as nested functions inside the caller function, otherwise TmplEx templating library won't identify

Parameters:

  • feature Graphic
  • layerConfig Object

Returns:

String:

imageUrl Url to the features symbology image

getObjectId

(
  • feature
)
Integer

Inherited from TmplUtil but overwritten in javascript\src\RAMP\Utils\tmplUtil.js:64

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 wroten as nested functions inside the caller function, otherwise TmplEx templating library won't identify

Parameters:

  • feature Graphic

Returns:

Integer:

objectId

Attributes

getConfigUrl

readonly

Returns a URL that points to the application configuration (JSON format) if it's hosted on a web service. This is not required if the application has a JSON config file in the website's folder