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: ["*"],
});
答案 0 :(得分:0)
图片的来源网址和相关链接的网址。点击图片即可打开linkUrl
。这是可选的。