<?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: How to Buddy Up AGO Tiled Service with AGO Feature Service? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-buddy-up-ago-tiled-service-with-ago-feature/m-p/49583#M4365</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This blog post is one of my initial sources :&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://blogs.esri.com/esri/arcgis/2013/02/19/about-features-and-feature-services/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://blogs.esri.com/esri/arcgis/2013/02/19/about-features-and-feature-services/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;This is one of the comments:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;Eventually I took some training and found how to do this. When you enable a popup on a tile service, it gives you an option to point to a feature service for the popups. The feature service should match the features that were cached in the tile service, of course.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;This leads me to believe that the magic is inside the JavaScript API. But that's only useful for a developer who wants the InfoWindow. If we're not using the webmap popup, we have to do something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
onclick:
&amp;nbsp;&amp;nbsp; loop through all layers on the map
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if the layer is a map service 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if the layer is visible then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; perform an identify
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if the layer is a feature service, or if the layer a tiled service with a feature service url, then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; loop through each layer in the service
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if the layer is in scale then
&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; perform a query on the layer
&amp;nbsp;&amp;nbsp; when all of those deferreds return
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; normalize the Query results and Identify results into a common format
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do something with the results
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not only is that a lot identifies and queries running asynchronously, but that's a lot of code. How could that possibly be the right way to do this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 21:54:51 GMT</pubDate>
    <dc:creator>deleted-user-Jie3eyjOl9XM</dc:creator>
    <dc:date>2021-12-10T21:54:51Z</dc:date>
    <item>
      <title>How to Buddy Up AGO Tiled Service with AGO Feature Service?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-buddy-up-ago-tiled-service-with-ago-feature/m-p/49582#M4364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I've got a map, and I've added a hosted tile service. I did NOT create the map from a webmap like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;arcgisUtils.createMap(webmap,"map")&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;Rather, I just added the layer using the AGO endpoint for the tiled layer, like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;map.addLayer(
&amp;nbsp;&amp;nbsp; new ArcGISTiledMapServiceLayer("http://tiles.arcgis.com/tiles/...", {})
);
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I realize that I can't identify on a hosted tile service. But, upon map click, I'd like to access the underlying feature data. I don't want to display the popup, because I need to do more than that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I certainly don't want to add the Feature Service to my map, because I don't want to render all of those vectors, and I need to use the cached service for display.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've read about how you can "buddy up" a hosted tile service with a hosted feature service. I've published both to AGO. But, what am I missing? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I might expect that when those two are buddies, it might expose a "Query" operation on the Tiled layer. But, that's not happening.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I might expect the Tiled service to have special constructor parameter that allows me to specify the URL for the Dynamic service. But, there's nothing in the documentation.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, what does it mean to "buddy up" these layers, and how can I take advantage of that to execute a query against the feature data that underlies my tiled layer?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2014 14:21:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-buddy-up-ago-tiled-service-with-ago-feature/m-p/49582#M4364</guid>
      <dc:creator>deleted-user-Jie3eyjOl9XM</dc:creator>
      <dc:date>2014-06-10T14:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to Buddy Up AGO Tiled Service with AGO Feature Service?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-buddy-up-ago-tiled-service-with-ago-feature/m-p/49583#M4365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This blog post is one of my initial sources :&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://blogs.esri.com/esri/arcgis/2013/02/19/about-features-and-feature-services/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://blogs.esri.com/esri/arcgis/2013/02/19/about-features-and-feature-services/&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;This is one of the comments:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;Eventually I took some training and found how to do this. When you enable a popup on a tile service, it gives you an option to point to a feature service for the popups. The feature service should match the features that were cached in the tile service, of course.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;This leads me to believe that the magic is inside the JavaScript API. But that's only useful for a developer who wants the InfoWindow. If we're not using the webmap popup, we have to do something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
onclick:
&amp;nbsp;&amp;nbsp; loop through all layers on the map
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if the layer is a map service 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if the layer is visible then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; perform an identify
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if the layer is a feature service, or if the layer a tiled service with a feature service url, then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; loop through each layer in the service
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if the layer is in scale then
&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; perform a query on the layer
&amp;nbsp;&amp;nbsp; when all of those deferreds return
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; normalize the Query results and Identify results into a common format
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; do something with the results
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Not only is that a lot identifies and queries running asynchronously, but that's a lot of code. How could that possibly be the right way to do this?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:54:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-buddy-up-ago-tiled-service-with-ago-feature/m-p/49583#M4365</guid>
      <dc:creator>deleted-user-Jie3eyjOl9XM</dc:creator>
      <dc:date>2021-12-10T21:54:51Z</dc:date>
    </item>
  </channel>
</rss>

