<?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 MapImageLayer find function in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/mapimagelayer-find-function/m-p/818410#M2741</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying top use the MapImageLayer find function and it will only return data for the top layer. I have changed the layers parameter to "all", but still just get results for the top layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-bert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here's the code I'm using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from arcgis.gis import GIS&lt;BR /&gt;from arcgis.features import FeatureSet, Feature, FeatureLayer, FeatureLayerCollection&lt;BR /&gt;from arcgis.mapping import MapImageLayer&lt;/P&gt;&lt;P&gt;theURL = "https://jcgis.jacksongov.org/arcgis/rest/services/ElectionAdministration/ElectedOfficials/MapServer/0"&lt;BR /&gt;theURL = theURL[:-2]&lt;BR /&gt;mil = MapImageLayer(theURL)&lt;/P&gt;&lt;P&gt;findRes = mil.find("Cleaver","all",return_geometry=True)&lt;/P&gt;&lt;P&gt;print(findRes)&lt;/P&gt;&lt;P&gt;for keyMil, valueMil in findRes.items():&lt;BR /&gt; print(keyMil)&lt;BR /&gt; ##print(valueMil[0])&lt;BR /&gt; print(len(valueMil))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Mar 2019 18:26:59 GMT</pubDate>
    <dc:creator>RobertMEIER</dc:creator>
    <dc:date>2019-03-15T18:26:59Z</dc:date>
    <item>
      <title>MapImageLayer find function</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/mapimagelayer-find-function/m-p/818410#M2741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying top use the MapImageLayer find function and it will only return data for the top layer. I have changed the layers parameter to "all", but still just get results for the top layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-bert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here's the code I'm using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;from arcgis.gis import GIS&lt;BR /&gt;from arcgis.features import FeatureSet, Feature, FeatureLayer, FeatureLayerCollection&lt;BR /&gt;from arcgis.mapping import MapImageLayer&lt;/P&gt;&lt;P&gt;theURL = "https://jcgis.jacksongov.org/arcgis/rest/services/ElectionAdministration/ElectedOfficials/MapServer/0"&lt;BR /&gt;theURL = theURL[:-2]&lt;BR /&gt;mil = MapImageLayer(theURL)&lt;/P&gt;&lt;P&gt;findRes = mil.find("Cleaver","all",return_geometry=True)&lt;/P&gt;&lt;P&gt;print(findRes)&lt;/P&gt;&lt;P&gt;for keyMil, valueMil in findRes.items():&lt;BR /&gt; print(keyMil)&lt;BR /&gt; ##print(valueMil[0])&lt;BR /&gt; print(len(valueMil))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2019 18:26:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/mapimagelayer-find-function/m-p/818410#M2741</guid>
      <dc:creator>RobertMEIER</dc:creator>
      <dc:date>2019-03-15T18:26:59Z</dc:date>
    </item>
    <item>
      <title>Re: MapImageLayer find function</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/mapimagelayer-find-function/m-p/818411#M2742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Playing around with this code in Jupyter Notebook, if I use the layer number it works,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;theURL = "https://jcgis.jacksongov.org/arcgis/rest/services/ElectionAdministration/ElectedOfficials/MapServer/0"&lt;BR /&gt;theURL = theURL[:-2]&lt;BR /&gt;mil = MapImageLayer(theURL)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;findRes = mil.find("z",1,return_geometry=True)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oddly, if I use zero for the layer number, it errors, saying missing 'layers' for find operation. But it works if I use the word "top".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The API doc says there are only 3 options for this parameter and that it is an optional parameter, both are not true!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P class="" style="color: #404040; font-size: 16px; margin: 0px 0px 12px !important 0px;"&gt;optional string. The layers to perform the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="" style="background: #f1c40f; font-weight: bold; padding: 0px 6px;"&gt;identify&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;operation on. There are three ways to specify which layers to identify on:&lt;/P&gt;&lt;BLOCKQUOTE class="" style="color: #404040; margin: 0px 0px 24px 24px;"&gt;&lt;DIV&gt;&lt;UL class="" style="margin: 0px 0px 24px;"&gt;&lt;LI style="margin-left: 24px;"&gt;top: Only the top-most layer at the specified location.&lt;/LI&gt;&lt;LI style="margin-left: 24px;"&gt;visible: All visible layers at the specified location.&lt;/LI&gt;&lt;LI style="margin-left: 24px;"&gt;all: All layers at the specified location.&lt;/LI&gt;&lt;/UL&gt;&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2019 18:44:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/mapimagelayer-find-function/m-p/818411#M2742</guid>
      <dc:creator>RobertMEIER</dc:creator>
      <dc:date>2019-03-15T18:44:08Z</dc:date>
    </item>
  </channel>
</rss>

