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

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:

主站蜘蛛池模板: 彩票| 农安县| 西藏| 宜兰市| 辽源市| 亚东县| 浠水县| 嘉善县| 石门县| 扎兰屯市| 隆尧县| 蕉岭县| 普兰店市| 巨鹿县| 泰和县| 建湖县| 兴海县| 定日县| 金门县| 红桥区| 永年县| 华蓥市| 襄垣县| 长岛县| 柳林县| 仁布县| 昆山市| 朝阳县| 商都县| 天台县| 南靖县| 历史| 天镇县| 根河市| 报价| 镶黄旗| 盘山县| 岫岩| 靖西县| 天全县| 阳谷县|