1. Preface
In the previous article we have already described the creation of the hellomap of the first map application, which we describe the basic map component: How to use the Home Button, the scale bar, and the Eagle Eye chart.
2. Basic Map components
In the ArcGIS Js API for the basic Map component API has been packaged for us, we generally just need to know how to call the module, where it is placed. Below we first put out the basic code of HELLOMAP to facilitate the development of the content later.
<!DOCTYPE HTML><HTML> <Head> <MetaCharSet= "Utf-8"> <title>Helloword</title> <Linkrel= "stylesheet"href= "Http://js.arcgis.com/3.12/esri/css/esri.css"> <Scriptsrc= "http://js.arcgis.com/3.12/"></Script> <Script> varmap; Require (["Esri/map" , "dojo/domready!" ], function(map) {map= NewMap ("Mapdiv", {center: [- 56.049 , 38.485], zoom:3, Basemap:"Streets" }); }); </Script> <style>html, body, #mapDiv{padding:0;margin:0;Height:100%; } </style> </Head> <Body> <DivID= "Mapdiv"></Div> </Body></HTML>
2.1. Home Button
2.2. Scale
2.3. Eagle Eye Chart
3. Reference links
Https://developers.arcgis.com/javascript/jssamples/widget_home.html
An exploration of ArcGIS API for JavaScript development--Basic map component usage