Hi
This may be an extremely simple answer but I can't work out how to get it to work (I'm very new to this so apologies if this is something very simple) .
I have a Web Map in ArcGIS Online and in there I am able to add custom HTML into the popup that provides a URL link to a 3rd party system (and it also passes data via URL params). That works great as a customer clicks on the link in the popup and it passes the feature data over.
I have a ArcGIS JS map that I've developed and I'd like to put the URL link into that popup also but I can't work out how to do it. My popup in JS is customised as well so it can pick up X/Y coordinates of where a customer puts their marker (it's to report potholes on a street).
How do I add the URL link (and params) into my existing code?
// Define pop-up for Streets layer
const popupStreets = {
"title": "Click to report an issue:",
"content": [{
type: "text",
text: "<b>Street:</b> {SITE_NAME}<br><b>Town:</b> {TOWN_NAME}<br>"
}, {
type: "custom",
creator: (graphic) => {
const location = view.popup.location;
return `X: ${location.x.toFixed (0) }<br>Y: ${location.y.toFixed (0)}`; //gets x/y coordinates
}
}]
}
This is code from the Online popup and I'm guessing I only need the part boxed in red.
How do I get that to work in my JS code please? Thanks