Having grown up in a military family, I have never claimed anywhere as my hometown. Even though I only lived there for a few years, I chose Fortuna, California for this assignment because that is where I graduated from high school. Part One of this assignment required us to adjust the code from the lesson example in order to move both the map marker and map center to our chosen location. I added constants to the Javascript file for the new latitude and longitude so the hard-coded values only occur once.
In Part Two, we added a popup window to the map that triggers upon clicking the map marker. This required more research on how to implement and format the popup. As hinted in the assignment description, I referred to Esri’s Intro to Graphics. Based on the sample code, I added a new constant to hold the town attribute data, and I added the popup template to the graphic constant. I looked up Esri’s doc page on Popup Template Content to learn how to add text in addition to the fields. The data about my town was retrieved from the Geographic Names Information System on the US Geological Survey website except for population, which was found on the US Census Bureau website.