<?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 Bringing in a service twice in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bringing-in-a-service-twice/m-p/347434#M32103</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a way to bring a service in twice? I am bringing in my service once as a featurelayer. This is where I do most of the work with my map but I also want to run a FindTask on the same service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;findTask = new esri.tasks.FindTask(wellFeatureLayer);&amp;nbsp; findTask = new esri.tasks.FindTask("http://services.azgs.az.gov/ArcGIS/rest/services/....");&amp;nbsp; wellFeatureLayer = new esri.layers.FeatureLayer("http://services.azgs.az.gov/ArcGIS/rest/services/...",{ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mode: esri.layers.FeatureLayer.MODE_ONDEMAND, //data on demand &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infoTemplate: infoTemplate, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFields: ["*"] &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried bringing in the service both ways at the same time and that gives me a domain error. I also tried passing the the wellFeatureLayer&amp;nbsp; variable to the find task. That just gives me an undefined path error.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Aug 2013 21:47:55 GMT</pubDate>
    <dc:creator>KennethRichards</dc:creator>
    <dc:date>2013-08-16T21:47:55Z</dc:date>
    <item>
      <title>Bringing in a service twice</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bringing-in-a-service-twice/m-p/347434#M32103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there a way to bring a service in twice? I am bringing in my service once as a featurelayer. This is where I do most of the work with my map but I also want to run a FindTask on the same service.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;findTask = new esri.tasks.FindTask(wellFeatureLayer);&amp;nbsp; findTask = new esri.tasks.FindTask("http://services.azgs.az.gov/ArcGIS/rest/services/....");&amp;nbsp; wellFeatureLayer = new esri.layers.FeatureLayer("http://services.azgs.az.gov/ArcGIS/rest/services/...",{ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mode: esri.layers.FeatureLayer.MODE_ONDEMAND, //data on demand &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; infoTemplate: infoTemplate, &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outFields: ["*"] &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; });&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tried bringing in the service both ways at the same time and that gives me a domain error. I also tried passing the the wellFeatureLayer&amp;nbsp; variable to the find task. That just gives me an undefined path error.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 21:47:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bringing-in-a-service-twice/m-p/347434#M32103</guid>
      <dc:creator>KennethRichards</dc:creator>
      <dc:date>2013-08-16T21:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: Bringing in a service twice</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bringing-in-a-service-twice/m-p/347435#M32104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The find task expects the url to the map server instead of to a feature layer. For example if I wanted to use the Find Task I'd supply this url: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/MapServer" rel="nofollow" target="_blank"&gt;http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/MapServer&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And if I wanted to add a feature layer from that map service I'd do something like this where I'd add the index of the layer. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/MapServer/0" rel="nofollow" target="_blank"&gt;http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/MapServer/0&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 21:50:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bringing-in-a-service-twice/m-p/347435#M32104</guid>
      <dc:creator>KellyHutchins</dc:creator>
      <dc:date>2013-08-16T21:50:48Z</dc:date>
    </item>
    <item>
      <title>Re: Bringing in a service twice</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bringing-in-a-service-twice/m-p/347436#M32105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The find task expects the url to the map server instead of to a feature layer. For example if I wanted to use the Find Task I'd supply this url: &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/MapServer"&gt;http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/MapServer&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;And if I wanted to add a feature layer from that map service I'd do something like this where I'd add the index of the layer. &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/MapServer/0"&gt;http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/MapServer/0&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I guess I should read over the API Reference a little more carefully next time. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help. That seems to have solved the problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Aug 2013 21:59:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/bringing-in-a-service-twice/m-p/347436#M32105</guid>
      <dc:creator>KennethRichards</dc:creator>
      <dc:date>2013-08-16T21:59:37Z</dc:date>
    </item>
  </channel>
</rss>

