- Create a <div> element to hold the map
- Initialize the map ojbect from the dojo.addOnLoad method
Obviously you’ll also want to add some layers to your map and this can be accomplished through either the ArcGISTiledMapServiceLayer or ArcGISDynamicMapServiceLayer. Below you’ll see how code examples for both types of layer.
The result of these few simple lines of code can be viewed here. I’d like to point out two additional things that you may have noticed. First, we did not specify any code to add map navigation controls or functionality. This is because the navigation tools are built into the API including a zoom control slider and the ability to use your mouse and keyboard for panning and zooming. I should also point out that it is not necessary to have ArcGIS Server loaded on your server. You simply need access to an existing map service somewhere on the web. In this case, we’re accessing web mapping services provided by one of ESRI’s sample ArcGIS Servers.