I have added image in attribute table. It looks like this:
Now I want to display this image into infotemplate.
so far I am doing like this:
var content = "<b>Name</b>: ${name}" + "<br><b>Picture</b>: ${Pic}" + "<br><b>Last Name</b>: ${lname}" ; var infoTemplate = new InfoTemplate("${FIELD_NAME}", content);
But it does not display image. It is empty. image is showing in identity window in ArcGis. but not in infotemplate
What version of the JS API are you using? If 4x, here is a really nice sample that shows how to use various elements in a popup: Multiple popup elements | ArcGIS API for JavaScript 4.15
i am using 3.20 version.
how we display image in info template from attribute table of the feature layer?
This sample shows how to use the InfoWindowBase class to create a custom info window.
Custom info window | ArcGIS API for JavaScript 3.32
This sample shows how to format the content of an info window using formatting functions.
Format info window content | ArcGIS API for JavaScript 3.32
This sample creates and use a popup template that references fields from a relationship.
thanks for your reply . but it seems nobody understand my problem. all these examples shows manual adding of images in infotemplate. my problem is this i have to add image in attribute table then show that image in infotemplate along with attributes of the feature layer
This thread may help: