I was wondering how do I add a video to be played in the popup template?
I've looked at the documentation here: https://developers.arcgis.com/javascript/jssamples/widget_extendInfowindow.html
and can't seem to find any information on it?
I was wondering how do I add a video to be played in the popup template?
I've looked at the documentation here: https://developers.arcgis.com/javascript/jssamples/widget_extendInfowindow.html
and can't seem to find any information on it?
The last line of the getTextContent function in that sample shows how an infoWindow can contain HTML:
return "<b>" + commName + "</b><br /><a target='_blank' href=http://en.wikipedia.org/wiki/" + sciName +">Wikipedia Entry</a>";
You can set this using infoWindow.setContent, and point to the location of the video.
From this point you can use standard HTML video tags, or the embed link from YouTube, Vimeo, etc.
code var popupTemplate = PopupTemplate(); popupTemplate.setTitle("<h2>YOLO</h2>"); popupTemplate.setContent(loadVideo); popupTemplate.setContent("<div><p>Testing 123</p></div>");/code
Do something like this...
//works Template
var template = new PopupTemplate();
template.setTitle("<b>Works Point</b>");
template.setContent(getContent); //this will call the getContent function where you can custom build your fields and add video
function getContent(graphic){
Content = "Project Name:" + graphic.attributes.NAME + "<br> Prov:" + graphic.attributes.PROV;
Hyperlink = "Hyperlink: <a href='http://www.youtube.com'>Project Link</a>"
return Content + Hyperlink;
}