ArcGIS for JavaScript use case Learning---createmap__java

Source: Internet
Author: User

Just contact ArcGIS for JavaScript, look at the example, look at the feeling of adding a map is very simple, but some of the content do not know what to do, first to understand

1, need to add ESRI CSS file path such as:

<link rel= "stylesheet" href= "Http://js.arcgis.com/3.8/js/esri/css/esri.css" >
2, need to set the content of the Web page than for example:
HTML, body, #map {
            height:100%;
            width:100%;
            margin:0;
            padding:0;
        }
        Body {
            background-color: #FFF;
            Overflow:hidden;
            font-family: "Trebuchet MS";
        }

3. In addition to adding ESRI's CSS style path, you will need to add Esri's JS API path as follows:

<script src= "http://js.arcgis.com/3.8/" ></script>

4, it is said to use the relevant methods of dojo to load map objects and bottom graphs, such as:
<script>
        var map;

        Require (["Esri/map", "dojo/domready!"], function (map) {
            map = new map ("map", {
                basemap: "Topo",
                Center: [- 122.45,37.75],//long, lat
                zoom:13,
                sliderstyle: "Small"
            }
    ); </script>
Note: Temporarily did not understand how require method is played, later understand, in this way can load some basic bottom diagram.

5. Define DIV Object

<div id= "Map" ></div>


Oh, a simple few steps can be loaded on the bottom of the map is not very simple, but first know the relevant principle is not so simple, waiting for future continuous contact ....







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.