- Building Web and Mobile ArcGIS Server Applications with JavaScript(Second Edition)
- Eric Pimpler Mark Lewin
- 298字
- 2021-07-02 15:48:58
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" >
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:

- Node.js+Webpack開發(fā)實(shí)戰(zhàn)
- Unity 2020 Mobile Game Development
- Web開發(fā)的貴族:ASP.NET 3.5+SQL Server 2008
- Django:Web Development with Python
- Java深入解析:透析Java本質(zhì)的36個(gè)話題
- JSP開發(fā)案例教程
- AutoCAD VBA參數(shù)化繪圖程序開發(fā)與實(shí)戰(zhàn)編碼
- Python機(jī)器學(xué)習(xí)經(jīng)典實(shí)例
- 組態(tài)軟件技術(shù)與應(yīng)用
- 微信小程序開發(fā)與實(shí)戰(zhàn)(微課版)
- Creating Data Stories with Tableau Public
- Puppet 5 Beginner's Guide(Third Edition)
- Java EE 7 Development with WildFly
- Learn C Programming
- Swift編程實(shí)戰(zhàn):iOS應(yīng)用開發(fā)實(shí)例及完整解決方案