AnsweredAssumed Answered

What file to edit popup content?

Question asked by franklin.alexander on Apr 2, 2018

I have to admit, when it comes to popups, I am completely lost. I can't figure out which Web Appbuilder javascript file loads the popup info into the map popup. I have looked at the PopupManager.js, the RelatedRecordsPopupProjector.js, the LocalLayer.js, and all of these files seem to have code that primarily deals with the info templates for the layers, and the popup menu, but nothing for loading the actual content of the feature attributes. I have a 'Directions' href link in the popup, that when clicked opens Google Maps in the browser window. Right now the origin destination autofills with the lat/long from the feature attributes, but I want to use coordinates from a map click to autofill the destination. I have done this for the info window in the nearMe widget, so I have the code, I just can't seem to figure out where to put it for the map popup (the one that you see when clicking a feature on the map). 


code snippet from the layer config

//I need to replace 'origin-input' in the href with the coordinates from the map click. 

"description": "{Street_Address}<br>{City}, {ST} {Zip_Code}<br><br><a href=\"tel:{Phone}\">{Phone}</a>&nbsp<a href=\"tel:{Alt_Phone}\">{Alt_Phone}</a><br><br><a href=\" origin-input &daddr={Latitude},{Longitude}\">Directions</a>",


Attached is a screenshot showing the popup for more clarity