undefined

API Docs for: 5.4.0
Show:

AttributeLoader Class

Attribute Loader class.

Handles the extraction of attribute data from map services, and transforms it to standard format

Imports RAMP Modules:

EventManager GlobalStorage

Methods

addLayerData

(
  • layerData
  • featureData
)
private

Will generate object id indexes and parent pointers on a layer data object. Assumes data object already has features and object id field defined

Parameters:

  • layerData Object

    layer data object

  • featureData Array

    feature objects to enhance and add to layer data

extractAttributeData

(
  • layer
)
private

Will extract the attribute data from a file based layer.

Parameters:

  • layer Object

    the layer object

loadAttributeData

(
  • layerId
  • layerUrl
  • layerType
)
private

Will download the attribute data for a layer.

Parameters:

  • layerId String

    id of the layer

  • layerUrl String

    the URL of the layer

  • layerType String

    type of the layer. should be a value from GlobalStorage.layerType

loadDataBatch

(
  • maxId
  • maxBatch
  • layerUrl
  • idField
  • layerId
  • callerDef
)
private

Recursive function to load a full set of attributes, regardless of the maximum output size of the service Passes result back on the provided Deferred object

Parameters:

  • maxId Integer

    largest object id that has already been downloaded

  • maxBatch Integer

    maximum number of results the service will return. if -1, means currently unknown

  • layerUrl String

    URL to feature layer endpoint

  • idField String

    name of attribute containing the object id for the layer

  • layerId String

    id of the layer

  • callerDef Dojo/Deferred

    deferred object that resolves when current data has been downloaded

newLayerData

() Object private

Will generate an empty layer data object

Returns:

Object:

empty layer data object