Friends of the mighty Javascript API-
I have been working with this example in my source:
History API to track selected feature | ArcGIS API for JavaScript
I have been trying many things to keep the Email link to not show up multiple times when it hits query(.actionlist.
I am loading a different single layer each Map Click of a Treeview control. Its always named "theLayer".
I have tried many other Map events and also checking if the emailLink is already created...without any luck.
map.on("layer-add-result", function (result) { if (result.layer === theLayer) { console.log('THE layer'); // Add a link into the InfoWindow Actions panel //if (!dom.byId("emailLink")) { // domConstruct.create("span", { // id: "emailLink" // }, query(".actionList", this.map.infoWindow.domNode)[0]); //} var emailLink = domConstruct.create("a", { "class": "action", "innerHTML": "Email Map", "href": "javascript:void(0);" }, query(".actionList", map.infoWindow.domNode)[0]); //}, "emailLink", "only");
Any suggestions would be grateful
Thanks
Keith
Keith,
I have added a second layer programmatically to that sample and I am only getting one email link... Can you share more of your code?