What is the difference between the sourceURL and linkURL?
Also, I have a layer that has multiple features. Each feature has an attached image. How would I set up the popup to find and show the attachment unique to the feature?
//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: ["*"],
});
The source url of the image and the url of a related link. Clicking on the image opens the linkUrl
. It's optional.