<?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: Custom PositionInfoSource on MacOS in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/custom-positioninfosource-on-macos/m-p/1557351#M5370</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/290397"&gt;@JustinSteventon&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which version of Qt 6 are you migrating to?&lt;/P&gt;
&lt;P&gt;Have you tried using `SimulatedLocationDataSource` instead of `DefaultLocationDataSource` ?&lt;/P&gt;
&lt;P&gt;`DefaultLocationDataSource` will internally check (but not request) for location permissions with the latest versions of our SDK. The default result of that permission check will vary between platforms. On Windows, it always comes back as `Granted` for me, but on macOS, it will come back `Undetermined` and need to be requested explicitly. This may explain the differing behavior you are seeing on Windows vs macOS.&lt;/P&gt;
&lt;P&gt;Further on macOS, if you're requesting permissions you'll need to make sure you have the correct entries in your `info.plist` file.&lt;/P&gt;
&lt;P&gt;If you haven't already, you may benefit from checking out our `ShowLocationHistory` &lt;A href="https://github.com/Esri/arcgis-maps-sdk-samples-qt/blob/main/CppSamples/Maps/ShowLocationHistory/README.md" target="_blank" rel="noopener"&gt;sample&lt;/A&gt;, which uses a `&lt;SPAN&gt;SimulatedLocationDataSource`.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I've attached an example that the Qt company provides to observe the behavior of requesting permissions among different platforms. (You'll need to modify it to request Location permissions and not Bluetooth permissions).&lt;/P&gt;</description>
    <pubDate>Tue, 12 Nov 2024 17:24:16 GMT</pubDate>
    <dc:creator>bnoble0110</dc:creator>
    <dc:date>2024-11-12T17:24:16Z</dc:date>
    <item>
      <title>Custom PositionInfoSource on MacOS</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/custom-positioninfosource-on-macos/m-p/1557198#M5369</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;&lt;P&gt;I am migrating to Qt 6 and ran into an issue while changing the location source on MacOS. This works fine on Windows.&lt;/P&gt;&lt;P&gt;I do the following:&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;    auto dataSource = new DefaultLocationDataSource(this);
    dataSource-&amp;gt;setPositionInfoSource(new MyPositionInfoSource(this));
    m_mapView-&amp;gt;locationDisplay-&amp;gt;setDataSource(dataSource);
    m_mapView-&amp;gt;locationDisplay-&amp;gt;start();&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;"MyPositionInfoSource" provides simulated data and does not touch the actual GPS.&lt;/P&gt;&lt;P&gt;On MacOS, I get a debug message about requiring location permissions and then it does not work. I have tried requesting permissions in the usual way, but still no luck.&lt;/P&gt;&lt;P&gt;Could you guys check it out?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 11 Nov 2024 05:38:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/custom-positioninfosource-on-macos/m-p/1557198#M5369</guid>
      <dc:creator>JustinSteventon</dc:creator>
      <dc:date>2024-11-11T05:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: Custom PositionInfoSource on MacOS</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/custom-positioninfosource-on-macos/m-p/1557351#M5370</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/290397"&gt;@JustinSteventon&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which version of Qt 6 are you migrating to?&lt;/P&gt;
&lt;P&gt;Have you tried using `SimulatedLocationDataSource` instead of `DefaultLocationDataSource` ?&lt;/P&gt;
&lt;P&gt;`DefaultLocationDataSource` will internally check (but not request) for location permissions with the latest versions of our SDK. The default result of that permission check will vary between platforms. On Windows, it always comes back as `Granted` for me, but on macOS, it will come back `Undetermined` and need to be requested explicitly. This may explain the differing behavior you are seeing on Windows vs macOS.&lt;/P&gt;
&lt;P&gt;Further on macOS, if you're requesting permissions you'll need to make sure you have the correct entries in your `info.plist` file.&lt;/P&gt;
&lt;P&gt;If you haven't already, you may benefit from checking out our `ShowLocationHistory` &lt;A href="https://github.com/Esri/arcgis-maps-sdk-samples-qt/blob/main/CppSamples/Maps/ShowLocationHistory/README.md" target="_blank" rel="noopener"&gt;sample&lt;/A&gt;, which uses a `&lt;SPAN&gt;SimulatedLocationDataSource`.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;I've attached an example that the Qt company provides to observe the behavior of requesting permissions among different platforms. (You'll need to modify it to request Location permissions and not Bluetooth permissions).&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 17:24:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/custom-positioninfosource-on-macos/m-p/1557351#M5370</guid>
      <dc:creator>bnoble0110</dc:creator>
      <dc:date>2024-11-12T17:24:16Z</dc:date>
    </item>
    <item>
      <title>Re: Custom PositionInfoSource on MacOS</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/custom-positioninfosource-on-macos/m-p/1557388#M5371</link>
      <description>&lt;P&gt;Thanks, I did not notice that you have this amount of structure around the location system. For the record, I am migrating to 6 from 5.15.2. Fairly smooth so far.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Nov 2024 04:23:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/custom-positioninfosource-on-macos/m-p/1557388#M5371</guid>
      <dc:creator>JustinSteventon</dc:creator>
      <dc:date>2024-11-12T04:23:40Z</dc:date>
    </item>
  </channel>
</rss>

