A class that is responsible for controlling the button for Local vs State scale.

Methods

adjustDotDensityRenderer

()

Calls the AffhtMap to update the dot density renderer based on the HTML input.

authenticateUserToken

(
  • url
  • token
)
Deferred

Validate the application input token against the specified authentication service.

Parameters:

  • url String
  • token String

Returns:

Deferred:

d

createDotDensityRenderer

(
  • dotValue
  • fields
  • dotSize
  • dotShape
  • valueUnit
)
DotDensityRenderer

A utility method that builds and returns an Esri JS API DotDensityRenderer object.

Parameters:

  • dotValue Number
  • fields Array
  • dotSize Number
  • dotShape String
  • valueUnit String

    (optional)

Returns:

DotDensityRenderer:

drawJurisdiction

()

Draws the currently selected AFFHT grantee boundary on the live map.

drawRegion

()

Draws the currently selected AFFHT CBSA boundary on the live map.

getAllStates

(
  • url
)
Deferred

Query all the states from the ArcGIS Server rest endpoint.

Parameters:

  • url String

Returns:

Deferred:

r

getGraphicsLayer

() GraphicsLayer

Returns the graphics layer used by the custom affht components.

Returns:

GraphicsLayer:

getMapCollection

(
  • url
)
Deferred

Query all the web map json records from the ArcGIS Server rest endpoint.

Parameters:

  • url String

Returns:

Deferred:

r

getSelectedAffhtMap

() Object

Returns the object that represents the currently selected AFFHT map.

Returns:

Object:

getSelectedAffhtMap

() Object

Sets the local property to an object that represents the currently selected AFFHT map.

Returns:

Object:

getSelectedJurisdiction

() Object

Returns an Esri JS API feature object representing the selected AFFHT grantee.

Returns:

Object:

getSelectedRegion

() Object

Returns an Esri JS API feature object representing the selected AFFHT CBSA.

Returns:

Object:

hideDotDensitySelect

()

Hides the HTML input controls for adjusting the dot density dot value.

initialize

(
  • options
)

Initializes the AFFHT sidebar by injecting the DOM elements and assiging the event handlers.

Parameters:

  • options Object

loadMap

(
  • dotValue
  • fields
)
Deferred

Loads an Esri JS API map from a JSON definiton object. Returns a deferred that resolves when the map is loaded.

Parameters:

  • dotValue String
  • fields Array

Returns:

Deferred:

def

queryJurisdictionById

(
  • jurisdictionId
)
Deferred

Queries the ArcGIS Server rest endpoint for a grantee feature with the matching ID.

Parameters:

  • jurisdictionId String

Returns:

Deferred:

d

queryJurisdictionsByState

(
  • stateAbbr
)
Deferred

Queries the ArcGIS Server rest endpoint for a list of AFFHT grantees within the specified state.

Parameters:

  • stateAbbr String

Returns:

Deferred:

d

queryRegionById

(
  • regionId
)
Deferred

Queries the ArcGIS Server rest endpoint for a CBSA feature with the matching ID.

Parameters:

  • regionId String

Returns:

Deferred:

d

refreshDotDensityTools

(
  • dotValue
)

Sets the HTML input to the current dot value of the dot density renderer.

Parameters:

  • dotValue String

renderLegend

() Deferred

Creates an AFFHT map legend and injects the HTML into the DOM. An AFFHT map legend has enhanced features to show custom dot density renderer fields based on configuration.

Returns:

Deferred:

d

saveMap

(
  • url
  • input
)
Deferred

Posts a web map json defintion to the specified service endpoint.

Parameters:

  • url String
  • input Object

Returns:

Deferred:

d

setConfig

()

Sets the module config to the input.

setSelectedJurisdiction

()

Sets the local property to an Esri JS API feature object representing the selected AFFHT grantee.

setSelectedRegion

()

Sets the local property to an Esri JS API feature object representing the selected AFFHT CBSA.

showDotDensitySelect

()

Shows the HTML input controls for adjusting the dot density dot value.

toggleVisibility

(
  • map
)

Toggle the visibility of the side bar.

Parameters:

  • map Esri/Map

updateDotDensity

(
  • dotDensity
)

A utitility method to update all dot density layers in the map with the input dot density ratio value.

Parameters:

  • dotDensity String

zoomToJurisdiction

() Deferred

Zooms the live map to the extent of the currently selected AFFHT grantee.

Returns:

Deferred:

zoomToRegion

() Deferred

Zooms the live map to the extent of the currently selected AFFHT CBSA.

Returns:

Deferred: