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: ["*"],
});
图像的源 url 和相关链接的 url。单击图像将打开
linkUrl
。这是可选的。