An exploration of ArcGIS API for JavaScript development--Basic map component usage

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.