代码之家  ›  专栏  ›  技术社区  ›  nogabemist

创建点、弹出窗口、圆、转换坐标问题(Arcgis JS 4.6 API)

  •  0
  • nogabemist  · 技术社区  · 8 年前

    我想在basemap项目上做一些简单的事情。

    • 例如创建一个圆。
    • 单击创建的点时创建弹出窗口。
    • 将lat long转换为x y

    我该怎么做这些事?

    1 回复  |  直到 8 年前
        1
  •  1
  •   nogabemist    8 年前
        var pt = new Point({
          longitude: 99.909550,
          latitude: 99.751906
    
      });
    
    
    
      var lineAtt = {
          Name: "fill",
          Owner: "fill",
          Length: "999 km"
      };
    
        // Create a graphic and add the geometry and symbol to it
      var pointGraphic = new Graphic({
          geometry: pt,
          symbol: markerSymbol,
          attributes: lineAtt,
          popupTemplate: { // autocasts as new PopupTemplate()
              title: "{Name}",
              content: [{
                  type: "fields",
                  fieldInfos: [{
                      fieldName: "Name"
                  }, {
                      fieldName: "Owner"
                  }, {
                      fieldName: "Length"
                  }]
              }]
          }
      });
    

    我找到了在单击创建的点时打开弹出窗口的解决方案。