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");
     });
  • 相关阅读:
    Scala-函数
    Scala--循环
    scala(一)
    拦截器filter
    Ajax实现分页二
    并发1
    泛型
    协议protocol
    结构体structure
    类的继承
  • 原文地址:https://www.cnblogs.com/leebokeyuan/p/12166815.html
Copyright © 2011-2022 走看看