Installation guide
4
As a last step, to edit the appearance of text, write the following code into the style.css file and
change the only <div> element to <div id = "layout"> in the index.html to link the CSS selector
#layout{…} in the style.css file. In CSS, selectors are patterns used to select the element(s) you
want to style (http://www.w3schools.com/cssref/css_selectors.asp).
#layout {
float: center;
font: 13px Verdana;
color: #565656;
padding-bottom: 20px;
}
Part 2 – ArcGIS API for JavaScript
ArcGIS API for JavaScript is a browser-based API for developing high performance, easy to use
mapping applications. The API allows you to easily embed dynamic maps in your webpages;
while map in the first part is based on a linked static image. The JavaScript API is hosted by ESRI
on ArcGIS Online and is available for free use, subject to the terms and conditions. The aim of
this part is to introduce how the ArcGIS API works. There is an ArcGIS resource center that you
can refer to for additional tutorials:
http://help.arcgis.com/en/webapi/javascript/arcgis/index.html.
Use the same method to create one more HTML webpage with the name of
Stockholm.html.
Change the title to <title>Stockholm</title>
In the <head></head>, add the following script code.
<script type="text/javascript">var djConfig = {parseOnLoad: true};</script>
<script type="text/javascript"
src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=3.1"></script>
<script type="text/javascript">
dojo.require("dijit.layout.BorderContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("esri.map");
// create a variable of map
var map;
function init() {
var initExtent = new
//Locate to Stockholm Region
esri.geometry.Extent({"xmin":2012431,"ymin":8244177,"xmax":2012795,"ymax":8
256379,"spatialReference":{"wkid":102100}});
map = new esri.Map("map",{extent:initExtent});