additional link beside Zoomto link in popup

358
2
Jump to solution
11-10-2017 03:00 AM
MuhammadFayaz
Occasional Contributor

How can i add additional link to popup window in WebAppBuilder application beside "Zoom To" link?

0 Kudos
1 Solution

Accepted Solutions
MuhammadFayaz
Occasional Contributor

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;},

View solution in original post

0 Kudos
2 Replies
RobertScheitlin__GISP
MVP Emeritus
MuhammadFayaz
Occasional Contributor

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;},

0 Kudos