<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Impossible configuration: AGOL-hosted map, layers, and .PDF file; local JavaScrip in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/impossible-configuration-agol-hosted-map-layers/m-p/436244#M22045</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oh, wow!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If that isn't the most beautiful thing I've seen all week, I don't know what is!&amp;nbsp; That works PERFECTLY.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;THANK YOU!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bradley&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jun 2014 17:22:13 GMT</pubDate>
    <dc:creator>BradleyMecham</dc:creator>
    <dc:date>2014-06-20T17:22:13Z</dc:date>
    <item>
      <title>Impossible configuration: AGOL-hosted map, layers, and .PDF file; local JavaScript???</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/impossible-configuration-agol-hosted-map-layers/m-p/436242#M22043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;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?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the scenario:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. I have created a map with the pertinent layers using my organization-access AGOL account.&amp;nbsp; I have also uploaded several .PDF files to my account.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;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.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. I added a "heatmap" layer to this map using the ESRI-suggested heatmap.js.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All of the above works great.&amp;nbsp; The app makes you log in, and if you're not me, you can't see anything.&amp;nbsp; But if you are me, then you get the layers, the heatmap, etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4. I would like to add some links to my app.&amp;nbsp; They DO NOT need to be associated with the fields in my data--they can just be static(ish) links off to the side.&amp;nbsp; These links need to point to, and open, the .PDF files I have mentioned.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This I do not seem to be able to do.&amp;nbsp; I believe CORS works fine.&amp;nbsp; I set up a proxy to circumvent it anyway.&amp;nbsp; I've successfully stored (and loaded) the credential information used to bring up the map, but that doesn't seem to help.&amp;nbsp; Perhaps it is not used when looking up files?&amp;nbsp; Or maybe I haven't associated it correctly.&amp;nbsp; If I share the PDF files with Everyone, the links work like a charm, but that is not OK.&amp;nbsp; 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.&amp;nbsp; Nothing I have tried seems to get me any further than that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So my question is, is this even possible?&amp;nbsp; For example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;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?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;b) am I missing something easy--maybe a function that's been written for this purpose?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;c) can I somehow pass the login credentials in with my href request, so that permissions to access that resource can be given?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thoughts?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or should I just tell the boss that for now, it's just going to be a pretty heatmap? &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for all your help!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bradley&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jun 2014 23:32:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/impossible-configuration-agol-hosted-map-layers/m-p/436242#M22043</guid>
      <dc:creator>BradleyMecham</dc:creator>
      <dc:date>2014-06-19T23:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: Impossible configuration: AGOL-hosted map, layers, and .PDF file; local JavaScrip</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/impossible-configuration-agol-hosted-map-layers/m-p/436243#M22044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Bradley,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are a few ways to accomplish this but here's one that I think will work for your situation. You mentioned that users are already logged in to your application. If the credentials to log-in are the same as those needed to access the pdf then the code below will get the token from the credential and append it to the pdf download link. &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;!DOCTYPE html&amp;gt; &amp;nbsp; &amp;lt;html&amp;gt; &amp;nbsp; &amp;lt;head&amp;gt; &amp;nbsp; &amp;lt;title&amp;gt;Create a Web Map&amp;lt;/title&amp;gt; &amp;nbsp; &amp;lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&amp;gt; &amp;nbsp; &amp;lt;meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no"&amp;gt; &amp;nbsp; &amp;lt;link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dijit/themes/claro/claro.css"&amp;gt; &amp;nbsp; &amp;lt;link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.9/js/esri/css/esri.css"&amp;gt; &amp;nbsp; &amp;lt;style&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; html,body,#mapDiv,.map.container{ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding:0; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; margin:0; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; height:100%; &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp; #linkDiv{ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; position: absolute; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; top:4px; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; right:20px; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; background-color: #fff; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; border: solid 1px #333; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; border-radius:4px; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; padding:10px; &amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp; &amp;lt;/style&amp;gt;&amp;nbsp; &amp;nbsp; &amp;lt;script&amp;gt;var dojoConfig = { parseOnLoad:true };&amp;lt;/script&amp;gt; &amp;nbsp; &amp;lt;script src="http://js.arcgis.com/3.9/"&amp;gt;&amp;lt;/script&amp;gt; &amp;nbsp; &amp;lt;script&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; require([ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri/map", &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri/arcgis/utils", &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri/IdentityManager", &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri/request", &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "dojo/dom-construct", &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "dojo/domReady!" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ], function (Map, arcgisUtils, IdentityManager, esriRequest, domConstruct) { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcgisUtils.createMap("c1f07f8344284500b770bc36ee6f5d1d", "mapDiv");&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //create links&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; var pdfUrl = "http://www.arcgis.com/sharing/rest/content/items/de2f584ecb77473985e6d0ae37a58713/data"; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; esri.id.getCredential(pdfUrl).then(function(credential){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(credential.token){ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pdfUrl += "?token=" + credential.token; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //create and add the download link to the page&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; domConstruct.create("a", { &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; href: pdfUrl, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; target: "_blank", &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; innerHTML: "Capitol Forest PDF" &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },"linkDiv");&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }); &amp;nbsp; &amp;lt;/script&amp;gt;&amp;nbsp; &amp;nbsp; &amp;lt;/head&amp;gt;&amp;nbsp; &amp;nbsp; &amp;lt;body class="claro"&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="mapDiv"&amp;gt;&amp;lt;/div&amp;gt; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="linkDiv"&amp;gt;&amp;lt;/div&amp;gt; &amp;nbsp; &amp;lt;/body&amp;gt; &amp;nbsp; &amp;lt;/html&amp;gt;&amp;nbsp; &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 17:09:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/impossible-configuration-agol-hosted-map-layers/m-p/436243#M22044</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2014-06-20T17:09:04Z</dc:date>
    </item>
    <item>
      <title>Re: Impossible configuration: AGOL-hosted map, layers, and .PDF file; local JavaScrip</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/impossible-configuration-agol-hosted-map-layers/m-p/436244#M22045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Oh, wow!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If that isn't the most beautiful thing I've seen all week, I don't know what is!&amp;nbsp; That works PERFECTLY.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;THANK YOU!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Bradley&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 17:22:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/impossible-configuration-agol-hosted-map-layers/m-p/436244#M22045</guid>
      <dc:creator>BradleyMecham</dc:creator>
      <dc:date>2014-06-20T17:22:13Z</dc:date>
    </item>
  </channel>
</rss>

