new AttrRecord(esriRequest, apiRef, config, esriLayer, epsgLookup)
- Source:
Create a layer record with the appropriate geoApi layer type. Layer config should be fully merged with all layer options defined (i.e. this constructor will not apply any defaults).
Parameters:
Name | Type | Description |
---|---|---|
esriRequest |
Object | the ESRI api object for making web requests with proxy support |
apiRef |
Object | object pointing to the geoApi. allows us to call other geoApi functions. |
config |
Object | layer config values |
esriLayer |
Object | an optional pre-constructed layer |
epsgLookup |
function | an optional lookup function for EPSG codes (see geoService for signature) |
Methods
aliasedFieldName(attribName) → {Promise}
- Source:
Get the best user-friendly name of a field. Uses alias if alias is defined, else uses the system attribute name.
Parameters:
Name | Type | Description |
---|---|---|
attribName |
String | the attribute name we want a nice name for |
Returns:
resolves to the best available user friendly attribute name
- Type
- Promise
attributesToDetails(attribs, fields) → {Array}
- Source:
Transforms esri key-value attribute object into key value array with format suitable for consumption by the details pane.
Parameters:
Name | Type | Description |
---|---|---|
attribs |
Object | attribute key-value mapping, potentially with aliases as keys |
fields |
Array | optional. fields definition array for layer. no aliasing done if not provided |
Returns:
attribute data transformed into a list, with potential field aliasing applied
- Type
- Array
getFormattedAttributes() → {Promise}
- Source:
Retrieves attributes from a layer for a specified feature index
Returns:
promise resolving with formatted attributes to be consumed by the datagrid and esri feature identify
- Type
- Promise