API Docs for: 0.0.8-0
Show:

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

Methods

_getSymbolConfig

(
  • layerUrl
)
Esri/layer/symbology

Gets the defined symbology from a layer's web service

Parameters:

  • layerUrl String

    A URL to the feature layer service

Returns:

Esri/layer/symbology:

The defined symbology from the layer definition

_getSymbolConfig

(
  • layer
)
Icon

Gets the default symbology icon from a layer's web service

Parameters:

  • layer Object

    A feature layer

Returns:

Icon:

The default icon from the layer's symbology

getFeatureName

(
  • feature
  • 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 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

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

getLayerConfig

(
  • url
)

Returns the feature layer config for the given url

Parameters:

getObjectId

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

Parameters:

  • feature Graphic

Returns:

Integer:

objectId

getSymbolForFeature

(
  • feature
)
Icon

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:

Returns:

Icon:

The default icon used to represent the feature layer

loadStrings

()

Updates some of the Strings on the HTML page using the config string resources

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