<?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: Identify layers with large tolerance in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/identify-layers-with-large-tolerance/m-p/362999#M1825</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marc,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are searching&amp;nbsp;for features you may be able to use the queryFeatures method&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-featuretable.html#queryFeatures" title="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-featuretable.html#queryFeatures"&gt;FeatureTable Class | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;for each of the layers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This method accepts a&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-queryparameters.html" title="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-queryparameters.html"&gt;QueryParameters Class | ArcGIS for Developers&lt;/A&gt;&amp;nbsp; which&amp;nbsp;allows you to set a geometry to query. So, your workflow would be something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 - get the position at which the user clicked&lt;/P&gt;&lt;P&gt;2 - use the buffer method of&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-geometryengine.html#buffer" title="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-geometryengine.html#buffer"&gt;GeometryEngine Class | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;to define your search area&lt;/P&gt;&lt;P&gt;3 - pass the Polygon returned by the buffer operation to a QueryParameters&lt;/P&gt;&lt;P&gt;4 - pass the QueryParameters to start a queryFeatures task for each layer you are interested in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One issue with that approach is that the buffer will be constructed using an absolute distance rather than a number of pixels. If that's an issue you would need to find some way of mapping 200 pixels to a distance for the current map scale etc. You could do something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 - take the users point in screen-space&lt;/P&gt;&lt;P&gt;2 - shift it by 200 along the x-axis&lt;/P&gt;&lt;P&gt;3 - get the map location of that point&lt;/P&gt;&lt;P&gt;4 - then use distance method on&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-geometryengine.html#distance" title="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-geometryengine.html#distance"&gt;GeometryEngine Class | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;to work out the distance between the 2 points (this is what the buffer radius should be).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that helps - please let me know how you get on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Aug 2017 13:58:19 GMT</pubDate>
    <dc:creator>LukeSmallwood</dc:creator>
    <dc:date>2017-08-17T13:58:19Z</dc:date>
    <item>
      <title>Identify layers with large tolerance</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/identify-layers-with-large-tolerance/m-p/362998#M1824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to execute a 'find' command searching for features around the mouse click with a search radius of 200 pixels.&lt;/P&gt;&lt;P&gt;Using identifyLayers and setting tolerance to 200, I get no results. Apparently the maximum tolerance is only 100.&lt;/P&gt;&lt;P&gt;Any ideas how I can increase the search area ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any idea.&lt;/P&gt;&lt;P&gt;Marc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 13:12:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/identify-layers-with-large-tolerance/m-p/362998#M1824</guid>
      <dc:creator>MarcWouters</dc:creator>
      <dc:date>2017-08-17T13:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: Identify layers with large tolerance</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/identify-layers-with-large-tolerance/m-p/362999#M1825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marc,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are searching&amp;nbsp;for features you may be able to use the queryFeatures method&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-featuretable.html#queryFeatures" title="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-featuretable.html#queryFeatures"&gt;FeatureTable Class | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;for each of the layers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This method accepts a&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-queryparameters.html" title="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-queryparameters.html"&gt;QueryParameters Class | ArcGIS for Developers&lt;/A&gt;&amp;nbsp; which&amp;nbsp;allows you to set a geometry to query. So, your workflow would be something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 - get the position at which the user clicked&lt;/P&gt;&lt;P&gt;2 - use the buffer method of&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-geometryengine.html#buffer" title="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-geometryengine.html#buffer"&gt;GeometryEngine Class | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;to define your search area&lt;/P&gt;&lt;P&gt;3 - pass the Polygon returned by the buffer operation to a QueryParameters&lt;/P&gt;&lt;P&gt;4 - pass the QueryParameters to start a queryFeatures task for each layer you are interested in&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One issue with that approach is that the buffer will be constructed using an absolute distance rather than a number of pixels. If that's an issue you would need to find some way of mapping 200 pixels to a distance for the current map scale etc. You could do something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1 - take the users point in screen-space&lt;/P&gt;&lt;P&gt;2 - shift it by 200 along the x-axis&lt;/P&gt;&lt;P&gt;3 - get the map location of that point&lt;/P&gt;&lt;P&gt;4 - then use distance method on&amp;nbsp;&lt;A class="link-titled" href="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-geometryengine.html#distance" title="https://developers.arcgis.com/qt/latest/cpp/api-reference/esri-arcgisruntime-geometryengine.html#distance"&gt;GeometryEngine Class | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;to work out the distance between the 2 points (this is what the buffer radius should be).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope that helps - please let me know how you get on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Luke&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2017 13:58:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/identify-layers-with-large-tolerance/m-p/362999#M1825</guid>
      <dc:creator>LukeSmallwood</dc:creator>
      <dc:date>2017-08-17T13:58:19Z</dc:date>
    </item>
    <item>
      <title>Re: Identify layers with large tolerance</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/identify-layers-with-large-tolerance/m-p/363000#M1826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Luke,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the suggestion !&lt;/P&gt;&lt;P&gt;I wasn't yet aware that you could also use a geometry in the queryFeatures method.&lt;/P&gt;&lt;P&gt;Using the absolute distance instead of pixels is not a real problem, the only problem we have is using the correct SpatialReference:&amp;nbsp;we create a default map before loading our feature tables, therefor the spatial references don't always match. &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We already convert the position of the mouseclick using GeometryEngine::project(), but now I get more results than I expect. The search area is much wider than the buffer (which I showed on the map for confirmation).&lt;/P&gt;&lt;P&gt;Some extra digging into Spatial references is needed, I guess.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2017 12:15:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/identify-layers-with-large-tolerance/m-p/363000#M1826</guid>
      <dc:creator>MarcWouters</dc:creator>
      <dc:date>2017-08-18T12:15:31Z</dc:date>
    </item>
  </channel>
</rss>

