<?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: Click to download a map tile in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680081#M63383</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark,&amp;nbsp; I could be wrong, but I believe the issue you'll find with this use case is that the dom nodes used for the tiled service are below all graphics layers, so normal events will not be raised for them.&amp;nbsp; One possible solution is to compare the 'map click location' with the coordinates of all the dom nodes of the tiled layer.&amp;nbsp; Probably not the most elegant of solutions, but it seems to work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://jsfiddle.net/x74dyowf/27/" title="http://jsfiddle.net/x74dyowf/27/"&gt;Edit fiddle - JSFiddle&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Aug 2014 18:46:53 GMT</pubDate>
    <dc:creator>JohnGrayson</dc:creator>
    <dc:date>2014-08-19T18:46:53Z</dc:date>
    <item>
      <title>Click to download a map tile</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680072#M63374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm building an application where users can click on the map to download a map tile. I can see that the ArcGISTiledMapServiceLayer has a getTileUrl() method, but has anyone got any idea about how I can identify a particular tile beneath a user's map click?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Silverlight API has a TileLoading event, but I can't find anything similar in the ArcGIS Server API for JavaScript. My idea was to attach a click event handler to each tile as it loads, and then use getTileUrl(coords) to locate the required tile.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What would also be great to do is add a feature layer graticule to identify the individual tiles, but I can't figure out a good way to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would really appreciate any suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 13:44:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680072#M63374</guid>
      <dc:creator>MarkLewin</dc:creator>
      <dc:date>2014-08-19T13:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Click to download a map tile</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680073#M63375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you could use the identify task &lt;A href="https://developers.arcgis.com/javascript/jsapi/identifytask-amd.html" title="https://developers.arcgis.com/javascript/jsapi/identifytask-amd.html"&gt;identifytask-amd | API Reference | ArcGIS API for JavaScript&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example: &lt;A href="https://developers.arcgis.com/javascript/jssamples/find_popup.html" title="https://developers.arcgis.com/javascript/jssamples/find_popup.html"&gt;Display identify results in popup | ArcGIS API for JavaScript&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 13:53:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680073#M63375</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2014-08-19T13:53:04Z</dc:date>
    </item>
    <item>
      <title>Re: Click to download a map tile</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680074#M63376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Tim ... but would that help me identify individual map&lt;/P&gt;&lt;P&gt;tiles?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 14:05:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680074#M63376</guid>
      <dc:creator>MarkLewin</dc:creator>
      <dc:date>2014-08-19T14:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: Click to download a map tile</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680075#M63377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I made this fiddle quickly. Here you can click on the map and it returns the tiles for you that you clicked on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://jsfiddle.net/timw1984/q49Lc9L0/" title="http://jsfiddle.net/timw1984/q49Lc9L0/"&gt;Edit fiddle - JSFiddle&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my example a popup appears.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://jsfiddle.net/timw1984/q49Lc9L0/" title="http://jsfiddle.net/timw1984/q49Lc9L0/"&gt; &lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 15:31:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680075#M63377</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2014-08-19T15:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Click to download a map tile</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680076#M63378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Tim, I really appreciate your efforts, but does this&lt;/P&gt;&lt;P&gt;tell me how to access the map tile? I apologize if I'm missing&lt;/P&gt;&lt;P&gt;something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically, I want to be able to click on a tile and see the&lt;/P&gt;&lt;P&gt;individual tile URL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 16:51:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680076#M63378</guid>
      <dc:creator>MarkLewin</dc:creator>
      <dc:date>2014-08-19T16:51:18Z</dc:date>
    </item>
    <item>
      <title>Re: Click to download a map tile</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680077#M63379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my bad, I missunderstood. Let me see if I can figure this out &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 17:07:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680077#M63379</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2014-08-19T17:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: Click to download a map tile</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680078#M63380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Tim - I really appreciate your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 17:11:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680078#M63380</guid>
      <dc:creator>MarkLewin</dc:creator>
      <dc:date>2014-08-19T17:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Click to download a map tile</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680079#M63381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just to understand, this would be an example link that you would like to retrieve?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/0/0/0" title="http://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/0/0/0"&gt;http://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/0/0/0&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 17:18:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680079#M63381</guid>
      <dc:creator>TimWitt2</dc:creator>
      <dc:date>2014-08-19T17:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Click to download a map tile</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680080#M63382</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes! That's just it!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ideally I'd like to be able to retrieve any features within the&lt;/P&gt;&lt;P&gt;tile space too, but let's start with that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If there was an event that got fired when a tile loads, I could&lt;/P&gt;&lt;P&gt;use that to hook up a click event handler, but I can't seem to&lt;/P&gt;&lt;P&gt;find any such event, so I'm at a loss.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 17:29:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680080#M63382</guid>
      <dc:creator>MarkLewin</dc:creator>
      <dc:date>2014-08-19T17:29:42Z</dc:date>
    </item>
    <item>
      <title>Re: Click to download a map tile</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680081#M63383</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Mark,&amp;nbsp; I could be wrong, but I believe the issue you'll find with this use case is that the dom nodes used for the tiled service are below all graphics layers, so normal events will not be raised for them.&amp;nbsp; One possible solution is to compare the 'map click location' with the coordinates of all the dom nodes of the tiled layer.&amp;nbsp; Probably not the most elegant of solutions, but it seems to work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://jsfiddle.net/x74dyowf/27/" title="http://jsfiddle.net/x74dyowf/27/"&gt;Edit fiddle - JSFiddle&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 18:46:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680081#M63383</guid>
      <dc:creator>JohnGrayson</dc:creator>
      <dc:date>2014-08-19T18:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: Click to download a map tile</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680082#M63384</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That's fantastic John! Just what I needed. Thank you very much. And thanks to Tim for his offers of assistance too.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Aug 2014 18:52:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/click-to-download-a-map-tile/m-p/680082#M63384</guid>
      <dc:creator>MarkLewin</dc:creator>
      <dc:date>2014-08-19T18:52:17Z</dc:date>
    </item>
  </channel>
</rss>

