<?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: UniqueValueRenderer does not work on DynamicEntityLayer's track line renderer in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/uniquevaluerenderer-does-not-work-on/m-p/1615081#M5449</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/70678"&gt;@FatmaAkdemir&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Currently only the track id field is supported on track lines with attribute renderers like unique value renderers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also take a look at the attribute values... Possibly the label field is where the field name should be (like "Cat 11" with a value of "Cat 11").&amp;nbsp; If the track id was say, "Category" and the value was "Cat 11", then I would expect something like&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;UniqueValue("Category", "Category", QVariantList() &amp;lt;&amp;lt; "Cat 11", new SimpleLineSymbol(SimpleLineSymbolStyle::Solid, QColor(Qt::darkYellow), 2.0, this), this);&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;to work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 15 May 2025 17:42:45 GMT</pubDate>
    <dc:creator>JamesBallard1</dc:creator>
    <dc:date>2025-05-15T17:42:45Z</dc:date>
    <item>
      <title>UniqueValueRenderer does not work on DynamicEntityLayer's track line renderer</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/uniquevaluerenderer-does-not-work-on/m-p/1613554#M5438</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;auto* uniqueValue1 = new UniqueValue("Cat 11", "Cat 11", QVariantList() &amp;lt;&amp;lt; "Cat 11", new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::X, QColor(Qt::darkYellow), 12.0, this), this);
        auto* uniqueValue2 = new UniqueValue("Cat 20", "Cat 20", QVariantList() &amp;lt;&amp;lt; "Cat 20", new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::X, QColor(Qt::darkGreen), 12.0, this), this);
        auto* uniqueValue3 = new UniqueValue("Cat 21", "Cat 21", QVariantList() &amp;lt;&amp;lt; "Cat 21", new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::X, QColor(Qt::darkBlue), 12.0, this), this);
        auto* uniqueValue4 = new UniqueValue("Cat 48", "Cat 48", QVariantList() &amp;lt;&amp;lt; "Cat 48", new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::X, QColor(Qt::darkMagenta), 12.0, this), this);
        auto* uniqueValue5 = new UniqueValue("Cat 62", "Cat 62", QVariantList() &amp;lt;&amp;lt; "Cat 62", new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::X, QColor(Qt::darkCyan), 12.0, this), this);

        auto* history1 = new UniqueValue("Cat 11", "Cat 11", QVariantList() &amp;lt;&amp;lt; "Cat 11", new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::Circle, QColor(Qt::darkYellow), 4.0, this), this);
        auto* history2 = new UniqueValue("Cat 20", "Cat 20", QVariantList() &amp;lt;&amp;lt; "Cat 20", new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::Circle, QColor(Qt::darkGreen), 4.0, this), this);
        auto* history3 = new UniqueValue("Cat 21", "Cat 21", QVariantList() &amp;lt;&amp;lt; "Cat 21", new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::Circle, QColor(Qt::darkBlue), 4.0, this), this);
        auto* history4 = new UniqueValue("Cat 48", "Cat 48", QVariantList() &amp;lt;&amp;lt; "Cat 48", new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::Circle, QColor(Qt::darkMagenta), 4.0, this), this);
        auto* history5 = new UniqueValue("Cat 62", "Cat 62", QVariantList() &amp;lt;&amp;lt; "Cat 62", new SimpleMarkerSymbol(SimpleMarkerSymbolStyle::Circle, QColor(Qt::darkCyan), 4.0, this), this);

        auto* line1 = new UniqueValue("Cat 11", "Cat 11", QVariantList() &amp;lt;&amp;lt; "Cat 11", new SimpleLineSymbol(SimpleLineSymbolStyle::Solid, QColor(Qt::darkYellow), 2.0, this), this);
        auto* line2 = new UniqueValue("Cat 20", "Cat 20", QVariantList() &amp;lt;&amp;lt; "Cat 20", new SimpleLineSymbol(SimpleLineSymbolStyle::Solid, QColor(Qt::darkGreen), 2.0, this), this);
        auto* line3 = new UniqueValue("Cat 21", "Cat 21", QVariantList() &amp;lt;&amp;lt; "Cat 21", new SimpleLineSymbol(SimpleLineSymbolStyle::Solid, QColor(Qt::darkBlue), 2.0, this), this);
        auto* line4 = new UniqueValue("Cat 48", "Cat 48", QVariantList() &amp;lt;&amp;lt; "Cat 48", new SimpleLineSymbol(SimpleLineSymbolStyle::Solid, QColor(Qt::darkMagenta), 2.0, this), this);
        auto* line5 = new UniqueValue("Cat 62", "Cat 62", QVariantList() &amp;lt;&amp;lt; "Cat 62", new SimpleLineSymbol(SimpleLineSymbolStyle::Solid, QColor(Qt::darkCyan), 2.0, this), this);

        // Add the unique values to the renderer
        auto* uniqueRenderer = new UniqueValueRenderer("", new SimpleMarkerSymbol(this), QStringList() &amp;lt;&amp;lt; "source", QList&amp;lt;UniqueValue*&amp;gt;() &amp;lt;&amp;lt; uniqueValue1 &amp;lt;&amp;lt; uniqueValue2 &amp;lt;&amp;lt; uniqueValue3 &amp;lt;&amp;lt; uniqueValue4 &amp;lt;&amp;lt; uniqueValue5, this);
        auto* uniqueRendererHistory = new UniqueValueRenderer("", new SimpleMarkerSymbol(this), QStringList() &amp;lt;&amp;lt; "source", QList&amp;lt;UniqueValue*&amp;gt;() &amp;lt;&amp;lt; history1 &amp;lt;&amp;lt; history2 &amp;lt;&amp;lt; history3 &amp;lt;&amp;lt; history4 &amp;lt;&amp;lt; history5, this);
        auto* uniqueRendererTrajectory = new UniqueValueRenderer("", new SimpleLineSymbol(this), QStringList() &amp;lt;&amp;lt; "source", QList&amp;lt;UniqueValue*&amp;gt;() &amp;lt;&amp;lt; line1 &amp;lt;&amp;lt; line2 &amp;lt;&amp;lt; line3 &amp;lt;&amp;lt; line4 &amp;lt;&amp;lt; line5, this);
        mpDynamicEntityLayer-&amp;gt;setRenderer(uniqueRenderer);
        mpDynamicEntityLayer-&amp;gt;trackDisplayProperties()-&amp;gt;setPreviousObservationRenderer(uniqueRendererHistory);
        mpDynamicEntityLayer-&amp;gt;trackDisplayProperties()-&amp;gt;setTrackLineRenderer(uniqueRendererTrajectory);&lt;/LI-CODE&gt;&lt;P&gt;At line 25 I'm trying to give different colors to track lines for different categories of tracks, but it does not work. What am I missing?&lt;/P&gt;</description>
      <pubDate>Mon, 12 May 2025 08:15:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/uniquevaluerenderer-does-not-work-on/m-p/1613554#M5438</guid>
      <dc:creator>FatmaAkdemir</dc:creator>
      <dc:date>2025-05-12T08:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer does not work on DynamicEntityLayer's track line renderer</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/uniquevaluerenderer-does-not-work-on/m-p/1615081#M5449</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/70678"&gt;@FatmaAkdemir&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Currently only the track id field is supported on track lines with attribute renderers like unique value renderers.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Also take a look at the attribute values... Possibly the label field is where the field name should be (like "Cat 11" with a value of "Cat 11").&amp;nbsp; If the track id was say, "Category" and the value was "Cat 11", then I would expect something like&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="cpp"&gt;UniqueValue("Category", "Category", QVariantList() &amp;lt;&amp;lt; "Cat 11", new SimpleLineSymbol(SimpleLineSymbolStyle::Solid, QColor(Qt::darkYellow), 2.0, this), this);&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;to work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2025 17:42:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/uniquevaluerenderer-does-not-work-on/m-p/1615081#M5449</guid>
      <dc:creator>JamesBallard1</dc:creator>
      <dc:date>2025-05-15T17:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer does not work on DynamicEntityLayer's track line renderer</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/uniquevaluerenderer-does-not-work-on/m-p/1615428#M5452</link>
      <description>&lt;P&gt;Thank you very much &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/405084"&gt;@JamesBallard1&lt;/a&gt;. In fact track ids are string values starting with 2 digits of category number. Is there a way to render track lines according to the first 2 characters of track ID attribute?&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 13:20:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/uniquevaluerenderer-does-not-work-on/m-p/1615428#M5452</guid>
      <dc:creator>FatmaAkdemir</dc:creator>
      <dc:date>2025-05-16T13:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer does not work on DynamicEntityLayer's track line renderer</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/uniquevaluerenderer-does-not-work-on/m-p/1617559#M5453</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/70678"&gt;@FatmaAkdemir&lt;/a&gt;&amp;nbsp;I checked with our experts in this area, and it doesn't appear possible to do what you're asking about, unfortunately.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;It &lt;EM&gt;might&lt;/EM&gt; be possible to use a&amp;nbsp;&lt;/SPAN&gt;DictionaryRenderer&amp;nbsp;&lt;SPAN&gt;with a custom dictionary style to parse out the category from the field on-the-fly and return different symbols based on that, but I can't say for certain that would work, and it would be a major reworking of how your data is structured to prototype it.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 15:09:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/uniquevaluerenderer-does-not-work-on/m-p/1617559#M5453</guid>
      <dc:creator>JamesBallard1</dc:creator>
      <dc:date>2025-05-22T15:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: UniqueValueRenderer does not work on DynamicEntityLayer's track line renderer</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/uniquevaluerenderer-does-not-work-on/m-p/1617786#M5454</link>
      <description>&lt;P&gt;Hi Fatma,&lt;/P&gt;&lt;P&gt;There is the option to use a Unique Value Renderer but with a `valueExpression` which can parse out the first 2 characters of the track ID and use that to determine the values.&amp;nbsp; &amp;nbsp;Unfortunately we do not yet support setting `valueExpression` in the API, however you can create the renderer from JSON and it will work.&amp;nbsp; (use &lt;A href="https://developers.arcgis.com/qt/cpp/api-reference/esri-arcgisruntime-renderer.html#fromJson" target="_blank" rel="noopener"&gt;renderer.fromJson&lt;/A&gt;();)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Here is a sample JSON that uses the right 4 characters of a track ID to create the unique values:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;{
  "defaultSymbol": {
    "symbol": {
      "symbolLayers": [
        {
          "anchor3D": "Center",
          "capStyle": "Round",
          "color": [ 130, 130, 130, 255 ],
          "colorLocked": false,
          "enable": true,
          "height3D": 1,
          "joinStyle": "Round",
          "lineStyle3D": "Strip",
          "miterLimit": 10.0,
          "type": "CIMSolidStroke",
          "width": 3.0
        }
      ],
      "type": "CIMLineSymbol"
    },
    "type": "CIMSymbolReference"
  },
  "fieldDelimiter": ",",
  "type": "uniqueValue",
  "valueExpression": "RIGHT($feature.vehiclename,4)",
  "valueExpressionTitle": "Custom",
  "uniqueValueInfos": [
    {
      "label": "2043",
      "symbol": {
        "symbol": {
          "symbolLayers": [
            {
              "anchor3D": "Center",
              "capStyle": "Round",
              "color": [ 46, 194, 194, 255 ],
              "colorLocked": false,
              "enable": true,
              "height3D": 1,
              "joinStyle": "Round",
              "lineStyle3D": "Strip",
              "miterLimit": 10.0,
              "type": "CIMSolidStroke",
              "width": 3.0
            }
          ],
          "type": "CIMLineSymbol"
        },
        "type": "CIMSymbolReference"
      },
      "value": "2043"
    },
    {
      "label": "2421",
      "symbol": {
        "symbol": {
          "symbolLayers": [
            {
              "anchor3D": "Center",
              "capStyle": "Round",
              "color": [ 82, 43, 194, 255 ],
              "colorLocked": false,
              "enable": true,
              "height3D": 1,
              "joinStyle": "Round",
              "lineStyle3D": "Strip",
              "miterLimit": 10.0,
              "type": "CIMSolidStroke",
              "width": 3.0
            }
          ],
          "type": "CIMLineSymbol"
        },
        "type": "CIMSymbolReference"
      },
      "value": "2421"
    },
    {
      "label": "3018",
      "symbol": {
        "symbol": {
          "symbolLayers": [
            {
              "anchor3D": "Center",
              "capStyle": "Round",
              "color": [ 198, 48, 60, 255 ],
              "colorLocked": false,
              "enable": true,
              "height3D": 1,
              "joinStyle": "Round",
              "lineStyle3D": "Strip",
              "miterLimit": 10.0,
              "type": "CIMSolidStroke",
              "width": 3.0
            }
          ],
          "type": "CIMLineSymbol"
        },
        "type": "CIMSymbolReference"
      },
      "value": "3018"
    },
    {
      "label": "4008",
      "symbol": {
        "symbol": {
          "symbolLayers": [
            {
              "anchor3D": "Center",
              "capStyle": "Round",
              "color": [ 186, 201, 62, 255 ],
              "colorLocked": false,
              "enable": true,
              "height3D": 1,
              "joinStyle": "Round",
              "lineStyle3D": "Strip",
              "miterLimit": 10.0,
              "type": "CIMSolidStroke",
              "width": 3.0
            }
          ],
          "type": "CIMLineSymbol"
        },
        "type": "CIMSymbolReference"
      },
      "value": "4008"
    }
  ]
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope that helps!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 May 2025 20:57:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/uniquevaluerenderer-does-not-work-on/m-p/1617786#M5454</guid>
      <dc:creator>KerryRobinson</dc:creator>
      <dc:date>2025-05-22T20:57:07Z</dc:date>
    </item>
  </channel>
</rss>

