sourceurl和linkurl之间的差异以及如何在1层中显示不同要素的图像附件

时间:2013-12-18 19:07:57

标签: javascript api web mapping arcgis

sourceURL和linkURL有什么区别?

另外,我有一个具有多个功能的图层。每个功能都有一个附加图像。如何设置弹出窗口以查找并显示该功能独有的附件?

  //define a popup template
        var popupTemplate = new esri.dijit.PopupTemplate({
          title: "{BUILDING}",
          fieldInfos: [
          {fieldName: "FLOOR", visible: true, label:"Floor:"},
          {fieldName: "BUILDING", visible: true, label:"Building Name:"},
          {fieldName: "CAMERA", visible: false, label:"Camera:"},
          ],
          mediaInfos: [{
            "title": "Image:",
            "caption": "",
            "type": "image",
            "value": {
              "sourceURL": "http://gis.aoscloud.net/aosmaps/rest/services/Test/Test/FeatureServer/0/1025/attachments/1201",
              }
          }],
        });

        //create a feature layer based on the feature collection
        var featureLayer = new esri.layers.FeatureLayer("http://gis.aoscloud.net/aosmaps/rest/services/Test/Test/MapServer/0", {
          mode: esri.layers.FeatureLayer.MODE_SNAPSHOT,
          infoTemplate: popupTemplate,
          outFields: ["*"],
        });

1 个答案:

答案 0 :(得分:0)

图片的来源网址和相关链接的网址。点击图片即可打开linkUrl。这是可选的。