AnsweredAssumed Answered

Impossible configuration: AGOL-hosted map, layers, and .PDF file; local JavaScript???

Question asked by bradleymecham on Jun 19, 2014
Latest reply on Jun 20, 2014 by bradleymecham
Hello,

After several days of combing through tutorials, API docs, and forums, and after many hours of coding and implementing, I've determined it's time to ask the question: is this even possible?

Here's the scenario:
1. I have created a map with the pertinent layers using my organization-access AGOL account.  I have also uploaded several .PDF files to my account.
2. I created a JavaScript app, based on a template downloaded from ArcGIS.com, that should allow me to view the map in various browsers, including mobile browsers.
3. I added a "heatmap" layer to this map using the ESRI-suggested heatmap.js.

All of the above works great.  The app makes you log in, and if you're not me, you can't see anything.  But if you are me, then you get the layers, the heatmap, etc.

4. I would like to add some links to my app.  They DO NOT need to be associated with the fields in my data--they can just be static(ish) links off to the side.  These links need to point to, and open, the .PDF files I have mentioned.

This I do not seem to be able to do.  I believe CORS works fine.  I set up a proxy to circumvent it anyway.  I've successfully stored (and loaded) the credential information used to bring up the map, but that doesn't seem to help.  Perhaps it is not used when looking up files?  Or maybe I haven't associated it correctly.  If I share the PDF files with Everyone, the links work like a charm, but that is not OK.  Currently I get the Error 403 page, with "You do not have permissions to access this resource or perform this operation," when I try to access the file when it's shared only with the organization.  Nothing I have tried seems to get me any further than that.

So my question is, is this even possible?  For example:
a) can I somehow create a JavaScript app that creates a heatmap and links to my files, and that I can upload to arcgis.com so that all files are local and logins are persistent?
b) am I missing something easy--maybe a function that's been written for this purpose?
c) can I somehow pass the login credentials in with my href request, so that permissions to access that resource can be given?

Thoughts?

Or should I just tell the boss that for now, it's just going to be a pretty heatmap? :)

Thanks for all your help!!

Bradley

Outcomes