Multiple stacked pop-ups only display first value

651
2
Jump to solution
02-08-2021 11:47 AM
RyanBohan
Occasional Contributor III

I am having a display issue with stacked pop-ups.  My first pop-up displays correct.  However if I use the arrow to go to the next pop-up it does not display.

Thank you for the help

 

const popupTemplate_PTS = new PopupTemplate({
        title: "<h2>Project Title: " + "{project_title}" + "</h2>",
        content: function popupTemplate_PTS() {
          var PTSdisplayString = "";
          PTSdisplayString += ("<b>Project Number: </b>");
          var myProject_link = ("https://opendsd.sandiego.gov/Web/Projects/Details/" + "{project_id }");
          var myProject_text = ("{project_id}");
          var URLmyProject_link = myProject_text.link(myProject_link);
          PTSdisplayString += (URLmyProject_link);
          PTSdisplayString += "<br>";
          PTSdisplayString += ("<b>Project Created: </b>" + "{ date_project_create }" + '</br>');
          PTSdisplayString += ("<b>Project Scope: </b>" + "{project_scope}" + '</br></br>');
          PTSdisplayString += '<b>Job address: </b>' + '{address_job}' + '</br>';
          PTSdisplayString += '<b>Job APN: </b>' + '{job_apn}' + '</br>';
          PTSdisplayString += '<b>Job Drawing Number: </b>' + '{job_drawing_number}' + '</br>';
          var myApproval_link = ("https://opendsd.sandiego.gov/Web/Approvals/Details/" + '{approval_id}');
          var myApproval_text = ("" + "{approval_id}");
          var URLmyApproval_link = myApproval_link.link(myApproval_link);
          var URLmyApproval_link2 = myApproval_text.link(myApproval_link);
          PTSdisplayString += "<ul>";
          PTSdisplayString += '<li><b>Approval Type: </b>' + '{approval_type}' + '<br /></li>';
          PTSdisplayString += '<li><b>Approval Number: </b>'
          PTSdisplayString += (URLmyApproval_link2);
          PTSdisplayString += '</li>'
          PTSdisplayString += '<li><b>Approval Status: </b>' + '{approval_status}';// + "<br/>";
          PTSdisplayString += "</ul>";
          return PTSdisplayString
        },//end of function
      });
 
RyanBohan_0-1612813436248.pngRyanBohan_1-1612813455660.png

 

 

 

0 Kudos
1 Solution

Accepted Solutions
RyanBohan
Occasional Contributor III

Great catch Jeff, that is just sloppy on my end.

I figured it out! Just had to add

outFields: ["*"],  //fixed now shows multiple points

View solution in original post

0 Kudos
2 Replies
by Anonymous User
Not applicable

It looks like you are using the same name 'popupTemplate_PTS' as a variable and as a function name:

const popupTemplate_PTS = new PopupTemplate({
        title: "<h2>Project Title: " + "{project_title}" + "</h2>",
        content: function popupTemplate_PTS() {

 

I know javascript is weird and maybe its a not an issue but it could be a starting point.

RyanBohan
Occasional Contributor III

Great catch Jeff, that is just sloppy on my end.

I figured it out! Just had to add

outFields: ["*"],  //fixed now shows multiple points
0 Kudos