Lesson 5 explores symbols, renderers, and visual variables. Numerous code examples provide the foundation for learning how to symbolize maps with JavaScript. Unlike ArcGIS Pro or ArcGIS Online where symbology can be easily deployed through graphic user interfaces, many lines of code are needed to achieve symbolization within JavaScript. This lesson was the gateway to understanding the many coding options for adding marker symbols, lines, and polygons.
The Lesson 5 map symbolizes earthquakes from 1970 to 2009. Data for the map comes from one of Esri’s sample REST services (https://sampleserver6.arcgisonline.com/arcgis/rest/services/Earthquakes_Since1970/FeatureServer/0)).
The map has the following major components:
The most challenging part of the project was adding the filter. I used an ArcGIS code sample called “Filter features by attribute” (https://developers.arcgis.com/javascript/latest/sample-code/featurefilter-attributes/)) and this got me started. The filter allows user interaction and restores the data to the original status when the filter is closed.
As the course has emphasized, it is best to use non-coding options whenever possible. This exercise highlights the benefits of using "easy-to-deploy" methods over coding. At the same time, the lesson highlights circumstances where coding can be used successfully to deploy interesting visualizations.