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

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:

主站蜘蛛池模板: 双城市| 建瓯市| 尉氏县| 贞丰县| 洪雅县| 茶陵县| 兰西县| 西乡县| 万宁市| 广丰县| 柳林县| 垣曲县| 乌鲁木齐市| 清苑县| 贵定县| 三门峡市| 朝阳市| 定结县| 上饶市| 南岸区| 运城市| 郴州市| 专栏| 莱西市| 甘肃省| 杂多县| 汾阳市| 宿州市| 东海县| 乐至县| 怀宁县| 济源市| 内乡县| 商城县| 南宁市| 茌平县| 河东区| 洪江市| 恩平市| 奉节县| 汶上县|