GraphicExtension Class
GraphicExtension class containing helper functions for graphic objects. Note this class requires the config object.
Item Index
Methods
Properties
Methods
_wrapFileCallInPromise
-
readMethod
Helper function for wrapping File API calls in Promise objects. Used for building a series of helpers which call different file read methods.
Parameters:
-
readMethod
Stringa string indicating the FileReader method to call
Returns:
a function which accepts a {File} object and returns a Promise
getGraphicTitle
-
graphic
Returns the content of the name field of the provided graphic object
Parameters:
-
graphic
Esri/Graphica graphic object or a feature object
Returns:
getLayerConfigWithId
-
id
Returns the feature layer config for the given id
Parameters:
-
id
Stringlayer id string
getOid
-
graphic
Returns the oid of the given graphic object
Parameters:
-
graphic
Esri/Graphic
getServiceURL
-
rampService
-
mapID
-
language
This method builds a complete service URL callout for a map configuration. The URL is built using a base URL and map ID, and a language culture code.
getSymbolForFeature
-
feature
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:
-
feature
Object
Returns:
The default icon used to represent the feature layer
getTextContent
-
graphic
Get popup content for a graphic (i.e. a point) This logic is customized per project
Parameters:
-
graphic
Object
Returns:
found graphic object
loadStrings
()
Updates some of the Strings on the HTML page using the config string resources
Properties
config
Object
The RAMP application config, it should be treated as read only by all modules other than globalStorage and bootstrapper
configServiceURL
String
Contains 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
plugins
Object
A registry of plugins for RAMP code to reference, these should be loaded and registered by bootstrapper.js