Practice time
In this exercise you will learn how to create and display graphics on a map. We are going to create a thematic map showing population density by county for the State of Colorado. We will also introduce you to the QueryTask.
As you will learn in a later chapter, tasks are special workflows that the ArcGIS Server can perform, and include things like spatial and attribute queries, identification of features, geocoding, and more. Finally, you will see how you can attach attributes to your graphic features and display them in an InfoWindow
:
- Open the JavaScript Sandbox at https://developers.arcgis.com/javascript/3/sandbox/sandbox.html.
- Remove the JavaScript content from the
<script>
tag that is highlighted as follows:
<script>
var map;
require(["esri/map", "dojo/domReady!"], function(Map) {
map = new Map("map", {
basemap: "topo", //For full list of pre-defined basemaps,
navigate to http://arcg.is/1JVo6Wd
center: [-122.45, 37.75], // longitude...