<?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: Can I highlight a selected feature in a map ?  in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-i-highlight-a-selected-feature-in-a-map/m-p/772504#M787</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No comments so far - here my workaround if anyone stumbles across it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I select the one feature I'd like to highlight using its ObjectID to create a "one-element-feature-set":&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;My_fset = MyLayer.query(where ='objectid = '+str(TheObjectID))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I can add that FeatureSet to the map as a draw-element and even (answer to my second question below) give it a basic popup:&lt;/P&gt;&lt;P&gt;For the popup I first need access to a feature (also there is only one in the Set):&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;My_feature = My_fset[0]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now I can add it to the map and define the popup in one go&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;MyMap.draw(My_fset,{"title":"Popup-Title" , 'content': str(My_feature.attributes['field_a'])+" "+str(My_feature.attributes['field_b'])+': '+str(My_feature.attributes['field_c'])})&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Hope this is helpful to anyone else - and still if there is an answer to my initial question - let me know &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Jun 2017 12:14:11 GMT</pubDate>
    <dc:creator>GünterDörffel</dc:creator>
    <dc:date>2017-06-27T12:14:11Z</dc:date>
    <item>
      <title>Can I highlight a selected feature in a map ?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-i-highlight-a-selected-feature-in-a-map/m-p/772503#M786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have no problems adding&amp;nbsp;a feature layer to a gis.map('MyMap') and then make a selection from that feature layer. I can zoom to the single feature fine, query its attributes, update, delete ... but there are two things I cant find that I would like to do&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;MOST perfect would be to open the defined popup for the feature immediately after zooming to it! (the get_html_popup doesnt do that, right?)&lt;/LI&gt;&lt;LI&gt;Second best would be to just select/highlight the feature in the map like I had interactively selected it in the map itself&lt;/LI&gt;&lt;LI&gt;Third best would be to add a label made up out of its attributes ...&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;I have too many features in a map extent to just change the extent ... I need to show the element better ..&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Any help appreciated. I work in a jupyter notebook ...&lt;BR /&gt;Guenter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Jun 2017 08:41:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/can-i-highlight-a-selected-feature-in-a-map/m-p/772503#M786</guid>
      <dc:creator>GünterDörffel</dc:creator>
      <dc:date>2017-06-23T08:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Can I highlight a selected feature in a map ?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/can-i-highlight-a-selected-feature-in-a-map/m-p/772504#M787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No comments so far - here my workaround if anyone stumbles across it:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I select the one feature I'd like to highlight using its ObjectID to create a "one-element-feature-set":&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;My_fset = MyLayer.query(where ='objectid = '+str(TheObjectID))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I can add that FeatureSet to the map as a draw-element and even (answer to my second question below) give it a basic popup:&lt;/P&gt;&lt;P&gt;For the popup I first need access to a feature (also there is only one in the Set):&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;My_feature = My_fset[0]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Now I can add it to the map and define the popup in one go&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier, monospace;"&gt;MyMap.draw(My_fset,{"title":"Popup-Title" , 'content': str(My_feature.attributes['field_a'])+" "+str(My_feature.attributes['field_b'])+': '+str(My_feature.attributes['field_c'])})&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif;"&gt;Hope this is helpful to anyone else - and still if there is an answer to my initial question - let me know &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jun 2017 12:14:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/can-i-highlight-a-selected-feature-in-a-map/m-p/772504#M787</guid>
      <dc:creator>GünterDörffel</dc:creator>
      <dc:date>2017-06-27T12:14:11Z</dc:date>
    </item>
  </channel>
</rss>

