i used query and querytask and return of type point(only one point), I showed this point with infowindown on the map
how to show the image of a point in the infowindown from the results returned by querytask ?
Solved! Go to Solution.
Hi Ia,
You need to set mediaInfos in popup template, in the below sample IMAGEURL will be the attribute which contains the url of the associated image for your points.
var template = new PopupTemplate({
title: "Boston Marathon 2013",
description: "{STATE_NAME}: {Percent_Fi} of starters finished",
fieldInfos: [{ //define field infos so we can specify an alias
fieldName: "Number_Ent",
label: "Entrants"
},{
fieldName: "Number_Sta",
label: "Starters"
},{
fieldName: "Number_Fin",
label: "Finishers"
}],
mediaInfos:[{ //define the bar chart
caption: "",
type:"image",
value: {
sourceURL: "{IMAGEURL}"
}
}]
});
Hi Ia,
What do you mean by showing image of the point, is it an image associated to the point or image of the point location on the map?
Thanks Riyas!!!! showing image of the point which is an image associated to the point!!!. examples I have 5 image associated to the point. how to show image with infowindow
Hi Ia,
You need to set mediaInfos in popup template, in the below sample IMAGEURL will be the attribute which contains the url of the associated image for your points.
var template = new PopupTemplate({
title: "Boston Marathon 2013",
description: "{STATE_NAME}: {Percent_Fi} of starters finished",
fieldInfos: [{ //define field infos so we can specify an alias
fieldName: "Number_Ent",
label: "Entrants"
},{
fieldName: "Number_Sta",
label: "Starters"
},{
fieldName: "Number_Fin",
label: "Finishers"
}],
mediaInfos:[{ //define the bar chart
caption: "",
type:"image",
value: {
sourceURL: "{IMAGEURL}"
}
}]
});
thanks Riyas so much
Hi Ia,
If your image is an attachment, you can do this using the AttachmentEditor class. You can see an example of this here.
thanks jake!!
storing image data as to how to best access in this case
please give me a proposal
I prefer storing my images within a folder in my web site and storing relative location URL as an attribute in feature class.
This way I have flexibility to update / replace the images anytime without touching my data or code.
Is attribute in feature class while map editor with ArcGIS desktop?