RAMP Class
RAMP class.
Module for shared code that need the global configuration object. For code that can be of use to any javascript program and do not require the global configuration object, place the code in util.js
Item Index
Methods
Attributes
Methods
_getSymbolConfig
-
layerUrl
Gets the defined symbology from a layer's web service
Parameters:
-
layerUrl
StringA URL to the feature layer service
Returns:
The defined symbology from the layer definition
_getSymbolConfig
-
layer
Gets the default symbology icon from a layer's web service
Parameters:
-
layer
ObjectA feature layer
Returns:
The default icon from the layer's symbology
getFeatureName
-
feature
-
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 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:
imageUrl Url to the features symbology image
getGraphicIcon
-
feature
-
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 wroten as nested functions inside the caller function, otherwise TmplEx templating library won't identify
Parameters:
-
feature
Graphic -
layerConfig
Object
Returns:
imageUrl Url to the features symbology image
getObjectId
-
feature
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:
objectId
getSymbolForFeature
-
feature
Given a feature object or a graphic object (or any object that has a getLayer method and an attributes field) return the object containing the image URL and legend text for that feature/graphic object.
Parameters:
-
feature
Object
Returns:
The default icon used to represent the feature layer
loadStrings
()
Updates some of the Strings on the HTML page using the config string resources