AnsweredAssumed Answered

Custom Popup container or how do I put content elsewhere?

Question asked by Liz.Eidsness_aafc on May 23, 2018
Latest reply on May 24, 2018 by Liz.Eidsness_aafc

I'm working with JSAPI 4.7

I really like Popup Templates for what they do out of the box - attribute substitution/functions/promises/actions.  However, I would really like to place my popup contents somewhere else on my page (not on map).  Like I do with LayerList and Legend widgets.  However, when I set the container property for my popups, instead of putting my contents in it, it removes that element from it's parent node, and still floats it over the map.  Not what I was expecting.



var view = new MapView({
container: "viewDiv", // Reference to the DOM node that will contain the view
map: map, // References the map object created in step 3
center: [-90,50],
zoom: 5,
popup: "queryResults"

And later in my view.on click event{
title: "Results",
content: "This is some content"

So my question is - am I doing this wrong? I am assuming this behaviour is as designed, and I'm asking too much. However, I'd like to be pleasantly surprised.


Alternatively, is there a way to obtain the rendered content without the popup popping up, so I can insert it in the DOM myself? I'm hoping to use the popup templates for identify query task results.