Example: Dynamic Data Layer

Integration with ArcGIS Online | GeoDesign | Mobile | FAQ       About Us | Contact Us

Dynamic Data Layer Overlay

There are several steps that you'll need to follow to create any GIS web application with the ArcGIS API for JavaScript.

  1. Creating the HTML code for the page.
  2. Referencing the ArcGIS API for JavaScript and stylesheets.
  3. Loading modules (Dojo AMD style of coding uses the require() function).
  4. Making sure the DOM is available (you can use the dojo/domReady! plugin).
  5. Creating the map (Create a JSON object to define various map setup options).
  6. Defining the page content.
  7. Styling the page.

Dynamic layer added to the map

Dynamic map service layers-As the name suggests, the ArcGISDynamicMapServiceLayer class is used to create dynamic maps served by ArcGIS Server. Just as with ArcGISTiledMapServiceLayer, the constructor for ArcGISDynamicMapServiceLayer takes a URL that points to the map service along with optional parameters that are used to assign an ID to the service, determine the transparency of the map image, and a visibility option that sets the initial visibility of the layer to true or false. The class name ArcGISDynamicMapServiceLayer can be somewhat misleading. Although it appears to reference an individual data layer, this is in fact not the case. It refers to a map service rather than a data layer. Individual layers inside the map service can be turned on/off through the setVisibleLayers() method.