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

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:

主站蜘蛛池模板: 孙吴县| 华安县| 怀仁县| 延吉市| 抚远县| 太仆寺旗| 元氏县| 桐梓县| 溆浦县| 郓城县| 土默特左旗| 通河县| 广河县| 来凤县| 古交市| 黔江区| 巨野县| 甘泉县| 沧源| 体育| 和平区| 永城市| 商水县| 阿拉善盟| 乌鲁木齐县| 阿拉善右旗| 灌阳县| 中西区| 巴林右旗| 新民市| 都昌县| 浠水县| 博爱县| 广丰县| 长兴县| 高邮市| 财经| 堆龙德庆县| 托克逊县| 临洮县| 鄱阳县|