This example GP tool in popup uses an ArcGIS Online map and the popup only comes up when clicking on specific features from that map. I just want to have a basic map with no features, click on any point on the map, grab the x/y coordinates and use those as inputs for a geoprocessing tool that returns a chart. I've modified this example get x/y on mouse click to return lat/lon coordinates and display them.

I'd like to be able to combine these two examples and have the popup display the coordinates and a link to one or more GP tools to return charts to the user. Has anyone used the GP tool in popup example in a similar way? Does this only work with ArcGIS online maps? I've tried to replace the map ID with a basic map div but it hasn't worked.