Affht.AffhtScalePickerController Class
A class that is responsible for controlling the button for Local vs State scale.
Item Index
Methods
- adjustDotDensityRenderer
- authenticateUserToken
- createDotDensityRenderer
- drawJurisdiction
- drawRegion
- getAllStates
- getGraphicsLayer
- getMapCollection
- getSelectedAffhtMap
- getSelectedAffhtMap
- getSelectedJurisdiction
- getSelectedRegion
- hideDotDensitySelect
- initialize
- loadMap
- queryJurisdictionById
- queryJurisdictionsByState
- queryRegionById
- refreshDotDensityTools
- renderLegend
- saveMap
- setConfig
- setSelectedJurisdiction
- setSelectedRegion
- showDotDensitySelect
- toggleVisibility
- updateDotDensity
- zoomToJurisdiction
- zoomToRegion
Methods
adjustDotDensityRenderer
()
Calls the AffhtMap to update the dot density renderer based on the HTML input.
authenticateUserToken
-
url
-
token
Validate the application input token against the specified authentication service.
Parameters:
-
url
String -
token
String
Returns:
d
createDotDensityRenderer
-
dotValue
-
fields
-
dotSize
-
dotShape
-
valueUnit
A utility method that builds and returns an Esri JS API DotDensityRenderer object.
Returns:
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
Query all the states from the ArcGIS Server rest endpoint.
Parameters:
-
url
String
Returns:
r
getGraphicsLayer
()
GraphicsLayer
Returns the graphics layer used by the custom affht components.
Returns:
getMapCollection
-
url
Query all the web map json records from the ArcGIS Server rest endpoint.
Parameters:
-
url
String
Returns:
r
getSelectedAffhtMap
()
Object
Returns the object that represents the currently selected AFFHT map.
Returns:
getSelectedAffhtMap
()
Object
Sets the local property to an object that represents the currently selected AFFHT map.
Returns:
getSelectedJurisdiction
()
Object
Returns an Esri JS API feature object representing the selected AFFHT grantee.
Returns:
getSelectedRegion
()
Object
Returns an Esri JS API feature object representing the selected AFFHT CBSA.
Returns:
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
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:
def
queryJurisdictionById
-
jurisdictionId
Queries the ArcGIS Server rest endpoint for a grantee feature with the matching ID.
Parameters:
-
jurisdictionId
String
Returns:
d
queryJurisdictionsByState
-
stateAbbr
Queries the ArcGIS Server rest endpoint for a list of AFFHT grantees within the specified state.
Parameters:
-
stateAbbr
String
Returns:
d
queryRegionById
-
regionId
Queries the ArcGIS Server rest endpoint for a CBSA feature with the matching ID.
Parameters:
-
regionId
String
Returns:
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:
d
saveMap
-
url
-
input
Posts a web map json defintion to the specified service endpoint.
Parameters:
-
url
String -
input
Object
Returns:
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:
zoomToRegion
()
Deferred
Zooms the live map to the extent of the currently selected AFFHT CBSA.