完整代码如下:

<html>

    <head>

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

        <title>地图-Test </title>

         <link href="arcgis_js_v39_api/arcgis_js_api/library/3.9/3.9compact/js/dojo/dijit/themes/tundra/tundra.css"

                rel="stylesheet" type="text/css" />

            <link href="arcgis_js_v39_api/arcgis_js_api/library/3.9/3.9compact/js/esri/css/esri.css"

                rel="stylesheet" type="text/css" />

                <script type="text/javascript">                    var dojoConfig = { parseOnLoad: true };</script>

                <script src="arcgis_js_v39_api/arcgis_js_api/library/3.9/3.9compact/init.js" type="text/javascript"></script>

        <style type="text/css"> .MapClass { width:900px; height:600px; border:1px solid #000;} </style>

    <style>

      html, body {

        height: 100%; width: 100%;

        margin: 0; padding: 0;

      }

      body{

        background-color: #fff; overflow:hidden;

        font-family: sans-serif;

      }

      #header {

        padding-top: 4px;

        padding-right: 15px;

        background-color:#444;

        color:#fff;

        font-size:16pt; text-align:right;font-weight:bold;

        height:55px;

      }

      #subheader {

        font-size:small;

        color: #cfcfcf;

        text-align:right;

      }

      #leftPane{

        margin: 0;

        padding: 5px;

        width: 250px;

        color: #3C1700;

        background-color: #fff;

      }

      .ds { background: #000; overflow: hidden; position: absolute; z-index: 2; }

      #ds-h div { width: 100%; }

      #ds-l div { height: 100%; }

      #ds .o1 { filter: alpha(opacity=10); opacity: .1; }

      #ds .o2 { filter: alpha(opacity=8); opacity: .08; }

      #ds .o3 { filter: alpha(opacity=6); opacity: .06; }

      #ds .o4 { filter: alpha(opacity=4); opacity: .04; }

      #ds .o5 { filter: alpha(opacity=2); opacity: .02; }

      #ds .h1 { height: 1px; }

      #ds .h2 { height: 2px; }

      #ds .h3 { height: 3px; }

      #ds .h4 { height: 4px; }

      #ds .h5 { height: 5px; }

      #ds .v1 { width: 1px; }

      #ds .v2 { width: 2px; }

      #ds .v3 { width: 3px; }

      #ds .v4 { width: 4px; }

      #ds .v5 { width: 5px; }

    </style>

    <style>

        html, body {

          height: 97%;

          width: 98%;

          margin: 1%;

        }

        #rightPane {

          width: 20%;

        }

        #legendPane {

          border: solid #97DCF2 1px;

        }

  </style>

    <script type="text/javascript">

        dojo.require("dijit.layout.BorderContainer");

        dojo.require("dijit.layout.ContentPane");

        dojo.require("esri.map");

        dojo.require("esri.layers.FeatureLayer");

        dojo.require("esri.dijit.Bookmarks");

        dojo.require("esri.dijit.OverviewMap");

        dojo.require("esri.dijit.Scalebar");

        dojo.require("esri.dijit.Legend");

        var map;

        var editorWidget;

        dojo.addOnLoad(function () {

            map = new esri.Map("map");

            var layer = new esri.layers.ArcGISTiledMapServiceLayer("http://localhost:6080/arcgis/rest/services/test/MapServer");

                map.addLayer(layer);

            // Create the bookmark widget

            // specify "editable" as true to enable editing

            var bookmark = new esri.dijit.Bookmarks({

                map: map,

                bookmarks: [],

                editable: true

            }, dojo.byId('bookmark'));

            var scalebar = new esri.dijit.Scalebar({

                map: map,

                // "dual" displays both miles and kilmometers

                // "english" is the default, which displays miles

                // use "metric" for kilometers

                scalebarUnit: "dual"

            });

            var overviewMapDijit = new esri.dijit.OverviewMap({

                map: map,

                visible: true

            });

            overviewMapDijit.startup();

            var legendLayers = [];

            legendLayers.push({ layer: layer, title: 'test' });

            map.on('layers-add-result', function () {

                var legend = new Legend({

                    map: map,

                    layerInfos: legendLayers

                }, "legendDiv");

                legend.startup();

            });

    </script>

  </head>

  <body class="claro">

    <div id="mainWindow"

         data-dojo-type="dijit.layout.BorderContainer"

         data-dojo-props="design:'headline',gutters:false"

         style="width: 1200px; height: 800px; margin: 0;">

      <div id="leftPane"

           data-dojo-type="dijit.layout.ContentPane"

           data-dojo-props="region:'left'">

        <div id="bookmark"></div>       

      </div>

      <div id="rightPane"

       data-dojo-type="dijit/layout/ContentPane"

       data-dojo-props="region:'right'">

    <div data-dojo-type="dijit/layout/AccordionContainer">

      <div data-dojo-type="dijit/layout/ContentPane" id="legendPane"

           data-dojo-props="title:'图例', selected:true">

        <div id="legendDiv"></div>

      </div>

    </div>

  </div>

      <div id="map" class="shadow"

           data-dojo-type="dijit.layout.ContentPane"

           data-dojo-props="region:'center'">

        <div id="ds"> <!-- drop shadow divs -->

          <div id="ds-h">

            <div class="ds h1 o1"></div>

            <div class="ds h2 o2"></div>

            <div class="ds h3 o3"></div>

            <div class="ds h4 o4"></div>

            <div class="ds h5 o5"></div>

          </div>

          <div id="ds-l">

            <div class="ds v1 o1"></div>

            <div class="ds v2 o2"></div>

            <div class="ds v3 o3"></div>

            <div class="ds v4 o4"></div>

            <div class="ds v5 o5"></div>

          </div>

        </div> <!-- end drop shadow divs -->

      </div>

    </div>

  </body>

</html>

ArcGIS Server开发教程系列(8)ArcGIS API for Javascript-控件(小部件)(续)纯代码的更多相关文章

  1. ArcGIS Server开发教程系列(1) Arcgis server 10.1 的安装

    本系列所使用的软件版本如下: Windows 7 X64 / Windows server 2008 X64 Arcgis for Desktop 10.1 Arcgis 10.1 for serve ...

  2. ArcGIS Server开发教程系列(7)使用ArcGIS API for Javascript-Hello World

    ArcGIS API for Javascript  API下载地址:http://support.esrichina-bj.cn/2011/0223/960.html 选择最新的下载就好了,目前是3 ...

  3. ArcGIS Server开发教程系列(8)ArcGIS API for Javascript-控件(小部件)

    1.     鹰眼 OverviewMap小部件用于在其关联的主地图内较清楚的当前鸟瞰图的范围.当主地图范围变化时,鹰眼图会自动在其空间内更新范围以保持和地图的当前范围保持一致,当鹰眼图空间的地图范围 ...

  4. ArcGIS Server开发教程系列(2)配置ARCMAP和ARCCatalog发布服务

    1.       Arc catalog的配置 打开catalog,如图新增刚刚创建的server 1. Use GIS services: 用户身份连接 使用此种连接,可以浏览.使用站点内发布的所有 ...

  5. ArcGIS Server开发教程系列(3)切片

    切片工作,我们可以一级一级的切,也可以,所有的一块切,Recreate All Tiles这项是说,在没有进行任何的切片工作时,可以选用这项:Recreate Empty Tiles这项是说,如果之前 ...

  6. arcgis engine 开发教程系列

    版权声明:        <ArcGIS Engine+C#实例开发教程>为3SDN(http://www.3sdn.net)原创教程,版权所有.禁止商业用途转载(如需请联系作者),非商业 ...

  7. 【ArcGIS Server 开发系列】Flyingis六大系列讲座精品PDF奉献

    转自:http://www.cnblogs.com/gispeng/archive/2008/07/24/1250116.html [ArcGIS Server 开发系列]Flyingis六大系列讲座 ...

  8. ArcPy开发教程1-面向ArcGIS的Python语言基础

    ArcPy开发教程1-面向ArcGIS的Python语言基础 联系方式:谢老师,135-4855-4328,xiexiaokui#qq.com 第一节课 时间2019年2月26日 上午第一节 讲解:A ...

  9. ArcGIS Server学习之问题:ArcGIS Server10.5发布地图显示空白

    一.安装ArcGIS10.5 参考ArcGIS 10.5 for Desktop 完整安装教程(含win7/8/10 32/64位+下载地址+亲测可用) | 麻辣GIS 二.安装ArcGIS Serv ...

随机推荐

  1. MySQL Workbench使用及教程

    MySQL Workbench是一款专为MySQL设计的ER/数据库建模工具.它是著名的数据库设计工具DBDesigner4的继任者.你可以用MySQL Workbench设计和创建新的数据库图示,建 ...

  2. “Ceph浅析”系列之七——关于Ceph的若干想法

    本篇文章的内容,主要是笔者在调研分析Ceph过程中产生的一些思考.因为其中的内容比较自由发散,且大多是笔者的个人见解,故此另启一文进行讨论. 关于Ceph的性能 目前为止,本系列的文章中没有涉及到Ce ...

  3. this Activity.this Activity.class

    1. this 与 Activity.this this是你当前对象的引用,在你的例子中你肯定在内部类ClickEvent里面实现intent,他指向的是ClickEvent,而不是你要传入的Acti ...

  4. jQuery报 SyntaxError: expected expression, got '<'错误

    这有什么可奇怪的,这个问题是表达式未能按照预期结束,说白了就是你少写分号了. 你肯定是语法错了,仔细查看一下提示错误的那一行和它的附近,是不是因为疏忽大意出错了. 再给你的建议,不要觉得某个分号可以省 ...

  5. C#-面向对象的三大特性——多态(虚方法与重写、抽象类、接口)

    多态 同一操作作用于不同的对象,可以有不同的解释,产生不同的执行结果.在运行时,可以通过指向基类的指针,来调用实现派生类中的方法. 编译时的多态性:编译时的多态性是通过重载来实现的.对于非虚的成员来说 ...

  6. 【Codeforces 723B】Text Document Analysis 模拟

    求括号外最长单词长度,和括号里单词个数. 有限状态自动机处理一下. http://codeforces.com/problemset/problem/723/B Examples input 37_H ...

  7. Java面试题(全)

    JAVA部分 什么是反射机制?反射机制应用(Struts中反射机制的应用) 答:运行状态中,对于任意一个类,都可以知道它的所有属性和方法,对于任意一个对象都可以调用它的任意一个方法,这种动态获取信息以 ...

  8. NameNode & DataNode

    NameNode类位于org.apache.hadoop.hdfs.server.namenode包下. NameNode serves as both directory namespace man ...

  9. 【BZOJ-1131】Sta 树形DP

    1131: [POI2008]Sta Time Limit: 10 Sec  Memory Limit: 162 MBSubmit: 1150  Solved: 378[Submit][Status] ...

  10. 【bzoj2245】 SDOI2011—工作安排

    http://www.lydsy.com/JudgeOnline/problem.php?id=2245 (题目链接) 题意 n个产品,每个需要造C[i]件:m个员工,每个员工可以制造一些产品:每个员 ...