zoukankan      html  css  js  c++  java
  • ArcgisServerJS固件位置

    地图自带位置

    示例指北针

    var compassWidget = new Compass({ view: view });
    view.ui.add(compassWidget, "top-left");

    绑定到自定义DIV中

    var compassWidget = new Compass({ view: view }
     , document.getElementById("divPrintContainer"));

    比例尺

     //比例尺
     var scaleBar = new ScaleBar({
         view: view,
         unit: "dual" // The scale bar displays both metric and non-metric units.
     });
     // Add the widget to the bottom left corner of the view
     view.ui.add(scaleBar, {
         position: "bottom-left"
     });

    画图

      //画图
      var sketch = new Sketch({
          layer: graphics,
          view: view,
          // graphic will be selected as soon as it is created
          creationMode: "update"
      });
      view.ui.add(sketch, "top-right");

     图例

     view.when(function () {
         // get the first layer in the collection of operational layers in the WebMap
         // when the resources in the MapView have loaded.
         var featureLayer = mymap.layers.getItemAt(0);
    
         var legend = new Legend({
             view: view,
             layerInfos: [
               {
            layer: featureLayer,
            title: "图例信息"
               }
             ]
         });
    
         // Add widget to the bottom right corner of the view
         view.ui.add(legend, "bottom-right");
     });
  • 相关阅读:
    S2dao 简单Demo(转)
    Iphone SDK textField 打开和关闭键盘
    s2dao 入门知识2
    Eclipse tomcat Web页面调试
    s2dao 入门知识1
    java 面试
    Iphone SDK ActionSheet 在当前窗口弹出时间选择
    杭电2044
    杭电2076
    杭电2077
  • 原文地址:https://www.cnblogs.com/leebokeyuan/p/12166815.html
Copyright © 2011-2022 走看看