官术网_书友最值得收藏!

Referencing the ArcGIS API for JavaScript

To begin working with the ArcGIS API for JavaScript you need to add references to the style sheet and API. In the Sandbox the following lines of code have been added inside the <head> tag:

<link rel="stylesheet" > 
... 
<script src="https://js.arcgis.com/3.21/"></script> 

The <script> tag loads the ArcGIS API for JavaScript. At the time of this writing the version is currently 3.21. When new versions of the API are released you'll want to update this number accordingly. The <link> tag loads the esri.css style sheet which contains styles specific to ESRI widgets and components.

Optionally, you can include a reference to one of the style sheets for a Dojo dijit theme. The ArcGIS API for JavaScript is built directly on the Dojo JavaScript framework. Dojo comes with four pre-defined themes that control the look of user interface widgets that are added to your application: claro, tundra, soria, and nihilo. In the following code example we are referencing the claro theme:

<link rel="stylesheet" > 

The other available style sheets can be referenced as seen in the following code example. You don't have to use any of these style sheets, but if you intend to add Dojo user interface components (dijit) then you'll want to load a corresponding style sheet to control the styling of those components:

<link rel="stylesheet" > 
<link rel="stylesheet" > 
<link rel="stylesheet" >
In version 3.16 of the API, ESRI added a new theme called Calcite. At the time of writing, it is still in beta and does not support all the Dojo components included in the API. If you want to include it in your applications despite its limitations, check out the documentation here: https://developers.arcgis.com/javascript/3/jshelp/css.html.

The Dojo Toolkit provides a theme tester that you can use to get a feel for how each of the themes affect the display of the user interface components. The theme tester is located at https://archive.dojotoolkit.org/nightly/dojotoolkit/dijit/themes/themeTester.html:

主站蜘蛛池模板: 金寨县| 阿巴嘎旗| 莱阳市| 来安县| 巴林左旗| 神木县| 长葛市| 阳原县| 壤塘县| 涞水县| 莱阳市| 兰州市| 博罗县| 平顺县| 万州区| 台南县| 多伦县| 河南省| 佛山市| 普宁市| 长宁县| 大港区| 万荣县| 龙泉市| 信阳市| 武冈市| 通城县| 临清市| 蕉岭县| 武冈市| 南城县| 监利县| 文登市| 香河县| 页游| 达孜县| 大埔县| 宁海县| 平谷区| 铜梁县| 萍乡市|