How can i add additional link to popup window in WebAppBuilder application beside "Zoom To" link?
Thank you very much for the reference;
It is working for me by adding the following code to the PopupManager.js line 91 onwords:
var link = html.create("a", { "class": "action", "id": "submitBidLink", "innerHTML": "Submit Bid", //text that appears in the popup for the link "href": "javascript: void(0);" }, query(".actionList", this.popupUnion.bigScreen.domNode)[0]);
//when the link is clicked register a function that will run on(link, "click", lang.hitch(this, this.redirectFunc));
//the redirection function
redirectFunc: function () { var feature = this.mapManager.map.infoWindow.getSelectedFeature(); var fs = feature.attributes.ProjectNo; var xCoord = feature.attributes.Latitude; var yCoord = feature.attributes.Longitude; window.location.href = "http://----------------------/index.html?id=" + fs+"&x="+xCoord+"&y="+yCoord;},
Here is a link where I have answered this question already:
https://community.esri.com/thread/204319-adding-a-link-to-a-popup-and-getting-a-value-from-the-selected-feature
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.