<?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: Definition Query for Service Layers? in ArcGIS Explorer Desktop Questions</title>
    <link>https://community.esri.com/t5/arcgis-explorer-desktop-questions/definition-query-for-service-layers/m-p/193677#M1222</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shannon,&lt;/P&gt;&lt;P&gt;Sorry for the delay, I have been out of pocket for a while.&amp;nbsp; Just wanted to replay let you know that I did not get this to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Apr 2015 21:09:48 GMT</pubDate>
    <dc:creator>JonBarlett</dc:creator>
    <dc:date>2015-04-28T21:09:48Z</dc:date>
    <item>
      <title>Definition Query for Service Layers?</title>
      <link>https://community.esri.com/t5/arcgis-explorer-desktop-questions/definition-query-for-service-layers/m-p/193672#M1217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;According to build 1500, you can create a defnition query for a service layer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://blogs.esri.com/esri/arcgis/2010/08/24/what-s-new-in-arcgis-explorer-build-1500/"&gt;http://blogs.esri.com/esri/arcgis/2010/08/24/what-s-new-in-arcgis-explorer-build-1500/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"�?�Definition query on feature and service layers"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have figure out how to apply a definition query to a feature layer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim theMap As Map = Application.ActiveMapDisplay.Map&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim fLayer As FeatureLayer = TryCast(theMap.FindByName("CrimePart1_28Days"), FeatureLayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;fLayer.QueryDefinition = "DIVISION = 'NORTH CENTRAL'"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just haven't figured out how to apply a definition query to a service child service layer.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Very new to ArcExplorer SDK- any help would be appreciated&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jon Barlett&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GIS Analyst&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dallas Police&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 12:48:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-explorer-desktop-questions/definition-query-for-service-layers/m-p/193672#M1217</guid>
      <dc:creator>JonBarlett</dc:creator>
      <dc:date>2013-08-01T12:48:05Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Query for Service Layers?</title>
      <link>https://community.esri.com/t5/arcgis-explorer-desktop-questions/definition-query-for-service-layers/m-p/193673#M1218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Not sure - your query looks okay, but try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Dim theMap As MapDisplay = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay
Dim fLayer As FeatureLayer = TryCast(theMap.Map.FindByName("CrimePart1_28Days"), FeatureLayer)
fLayer.QueryDefinition = "DIVISION = 'NORTH CENTRAL'"
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...provided the text provided in your example is 'good'.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Got this directly from the .NET example here, so at least you'll have a webhelp point of reference:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisexplorer/1500/sdk/componenthelp/index.html#//000300000sn9000000" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/arcgisexplorer/1500/sdk/componenthelp/index.html#//000300000sn9000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Enjoy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Wayne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 09:42:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-explorer-desktop-questions/definition-query-for-service-layers/m-p/193673#M1218</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2021-12-11T09:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Query for Service Layers?</title>
      <link>https://community.esri.com/t5/arcgis-explorer-desktop-questions/definition-query-for-service-layers/m-p/193674#M1219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks Wayne,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yes, the code included works for a feature layer.&amp;nbsp; I am trying to figure out how to construct code to perform a definition query on a service layer.&amp;nbsp; Maybe this is not possible?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As a backup plan, I am trying to create a query from the service layer and add it to the map as a featurelayer.&amp;nbsp; The following code creates the feature layer and adds it to AE, but the source is broken.&amp;nbsp; I just want the ability ot query a "service layer" and view it in AE with its native symbology, which seems to be limited to a featurelayer.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim player As ServiceChildLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;player = theMap.FindByName("Reporting_Areas")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim WhereClause As String&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;whereClause = "RA = '1002'"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim featureLayer As FeatureLayer = player.Query(WhereClause)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;theMap.ChildItems.Add(featureLayer)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jon&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 15:21:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-explorer-desktop-questions/definition-query-for-service-layers/m-p/193674#M1219</guid>
      <dc:creator>JonBarlett</dc:creator>
      <dc:date>2013-08-01T15:21:09Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Query for Service Layers?</title>
      <link>https://community.esri.com/t5/arcgis-explorer-desktop-questions/definition-query-for-service-layers/m-p/193675#M1220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Looks possible, although I haven't tried any code.&amp;nbsp; See this doc below for 2500 and try cobbling something similar together for yours.&amp;nbsp; Actually, this is stated available for 1500 so I haven't a clue why it wouldn't be in the 1500 webhelp --- after the 'this is new' header, there's the statement:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"The API has not been changed for the latest release. This topic lists the new API types and members which were introduced in ArcGIS Explorer 1500."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;New API Types and Members&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisexplorer/2500/sdk/conceptualhelp/index.html#//000200000060000000"&gt;http://help.arcgis.com/en/arcgisexplorer/2500/sdk/conceptualhelp/index.html#//000200000060000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Search the page for the phrase, "ServiceChildLayer supports queries" which includes this listing for props/methods and you'll probably want to use CanQuery to verify if it's possible:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;public sealed class ESRI.ArcGISExplorer.Mapping.ServiceChildLayer&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Property: bool CanQuery { public get; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Method (i): public MapItem Clone ()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Property: ColumnCollection Columns { public get; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Method: public bool Contains (MapItem item)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Method: public MapItem FindById (Guid id)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Method: public MapItem FindByName (string name)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Method: public ReadOnlyCollection GetMapItems (T)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Property: IEnumerable { Type } Descendants { public get; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Property: IEnumerable { Type } DescendantsBottomUp { public get; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Property: Bitmap Icon { public get; public set; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Property: int QueryFeatureLimit { public get; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Method: public FeatureLayer Query (string whereClause)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Method: public int QueryFeatureCount (string whereClause)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that steers you correctly!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Wayne&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 18:10:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-explorer-desktop-questions/definition-query-for-service-layers/m-p/193675#M1220</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-08-01T18:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Query for Service Layers?</title>
      <link>https://community.esri.com/t5/arcgis-explorer-desktop-questions/definition-query-for-service-layers/m-p/193676#M1221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jon. Did you ever find a solution to this problem? I am trying to accomplish the same feat.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Shannon&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Dec 2014 21:00:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-explorer-desktop-questions/definition-query-for-service-layers/m-p/193676#M1221</guid>
      <dc:creator>ShannonDeArmond</dc:creator>
      <dc:date>2014-12-02T21:00:29Z</dc:date>
    </item>
    <item>
      <title>Re: Definition Query for Service Layers?</title>
      <link>https://community.esri.com/t5/arcgis-explorer-desktop-questions/definition-query-for-service-layers/m-p/193677#M1222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shannon,&lt;/P&gt;&lt;P&gt;Sorry for the delay, I have been out of pocket for a while.&amp;nbsp; Just wanted to replay let you know that I did not get this to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Apr 2015 21:09:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-explorer-desktop-questions/definition-query-for-service-layers/m-p/193677#M1222</guid>
      <dc:creator>JonBarlett</dc:creator>
      <dc:date>2015-04-28T21:09:48Z</dc:date>
    </item>
  </channel>
</rss>

