<?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: Change scale of polygons / polylines based on zoom in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-scale-of-polygons-polylines-based-on-zoom/m-p/1001203#M70805</link>
    <description>&lt;P&gt;Good Day&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply, the issue is in ArcGIS API JavaScript 4.17, although I've seen this in 4.15 and 4.16.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I tried playing around with the createRenderer function like so:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.smartMapper.createRenderer({
    layer: this._layers[prop].polygons,
    view: this._view,
    outlineOptimizationEnabled: true,
    sizeOptimizationEnabled: true
}).then((res) =&amp;gt; {
    console.log('Res from Smart Mapper');
    console.log(res);

    const renderOverride = true;
    if (renderOverride) {
        const renderer = res.renderer;
        const rgbObj = this.hexToRGB(colour);

        renderer.symbol.color = 'dodgerblue';
        renderer.symbol.color = [rgbObj.r, rgbObj.g, rgbObj.b, 0.3];
        renderer.symbol.outline.color = [rgbObj.r, rgbObj.g, rgbObj.b, 1];

        this._layers[prop].polygons.renderer = renderer;
    }
}).catch((error) =&amp;gt; {
    console.log('Smart Mapper Render Error');
    console.log(error);
})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it didn't work, at least my polygons never scaled properly with the zoom.&amp;nbsp; The default render settings I use are:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;type: 'simple',
symbol: {
    type: 'simple-fill',
    size: 30,
    opacity: .7,
    color: [rgbObj.r, rgbObj.g, rgbObj.b, 0.3],
    outline: {
        width: 2,
        color: [rgbObj.r, rgbObj.g, rgbObj.b, 1],
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the points I use basically the same settings with the render using a simple / picture marker and a few of the internal settings changed, but essentially the same.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Fri, 13 Nov 2020 14:32:47 GMT</pubDate>
    <dc:creator>AndrewMurdoch1</dc:creator>
    <dc:date>2020-11-13T14:32:47Z</dc:date>
    <item>
      <title>Change scale of polygons / polylines based on zoom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-scale-of-polygons-polylines-based-on-zoom/m-p/447106#M41293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good Day&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to change the polygon / polyline size based on zoom?&amp;nbsp; When I have points and I zoom out they're still visible, but when I have polygons / polylines they disappear when I zoom out, which is no ideal, as I have data spread over Canada.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/513022_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/513047_pastedImage_2.png" /&gt;&lt;BR /&gt;&lt;BR /&gt;At this zoom level the polygon data should appear by Toronto, and get more accurate when we zoom in.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2020 22:00:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-scale-of-polygons-polylines-based-on-zoom/m-p/447106#M41293</guid>
      <dc:creator>AndrewMurdoch1</dc:creator>
      <dc:date>2020-11-10T22:00:43Z</dc:date>
    </item>
    <item>
      <title>Re: Change scale of polygons / polylines based on zoom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-scale-of-polygons-polylines-based-on-zoom/m-p/1001061#M70799</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/51173"&gt;@AndrewMurdoch1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Are there are scale visibility range set on your feature points?&lt;/P&gt;&lt;P&gt;If yes, then it will affect on what scale they display in your web app, when you zoom in or zoom out.&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;A href="https://doc.arcgis.com/en/arcgis-online/create-maps/set-visibility.htm" target="_self"&gt;https://doc.arcgis.com/en/arcgis-online/create-maps/set-visibility.htm&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/help/mapping/layer-properties/display-layers-at-certain-scales.htm" target="_self"&gt;https://pro.arcgis.com/en/pro-app/help/mapping/layer-properties/display-layers-at-certain-scales.htm&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;&lt;A href="https://desktop.arcgis.com/en/arcmap/10.3/map/working-with-layers/displaying-layers-at-certain-map-scales.htm" target="_self"&gt;https://desktop.arcgis.com/en/arcmap/10.3/map/working-with-layers/displaying-layers-at-certain-map-scales.htm&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Also, is the issue getting reproduced on ArcGIS Online or ArcGIS Pro? If yes, then it is a scale visibility issue, as given above.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 05:56:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-scale-of-polygons-polylines-based-on-zoom/m-p/1001061#M70799</guid>
      <dc:creator>KavishGhime3</dc:creator>
      <dc:date>2020-11-13T05:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Change scale of polygons / polylines based on zoom</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-scale-of-polygons-polylines-based-on-zoom/m-p/1001203#M70805</link>
      <description>&lt;P&gt;Good Day&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply, the issue is in ArcGIS API JavaScript 4.17, although I've seen this in 4.15 and 4.16.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I tried playing around with the createRenderer function like so:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;this.smartMapper.createRenderer({
    layer: this._layers[prop].polygons,
    view: this._view,
    outlineOptimizationEnabled: true,
    sizeOptimizationEnabled: true
}).then((res) =&amp;gt; {
    console.log('Res from Smart Mapper');
    console.log(res);

    const renderOverride = true;
    if (renderOverride) {
        const renderer = res.renderer;
        const rgbObj = this.hexToRGB(colour);

        renderer.symbol.color = 'dodgerblue';
        renderer.symbol.color = [rgbObj.r, rgbObj.g, rgbObj.b, 0.3];
        renderer.symbol.outline.color = [rgbObj.r, rgbObj.g, rgbObj.b, 1];

        this._layers[prop].polygons.renderer = renderer;
    }
}).catch((error) =&amp;gt; {
    console.log('Smart Mapper Render Error');
    console.log(error);
})&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it didn't work, at least my polygons never scaled properly with the zoom.&amp;nbsp; The default render settings I use are:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;type: 'simple',
symbol: {
    type: 'simple-fill',
    size: 30,
    opacity: .7,
    color: [rgbObj.r, rgbObj.g, rgbObj.b, 0.3],
    outline: {
        width: 2,
        color: [rgbObj.r, rgbObj.g, rgbObj.b, 1],
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the points I use basically the same settings with the render using a simple / picture marker and a few of the internal settings changed, but essentially the same.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 13 Nov 2020 14:32:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/change-scale-of-polygons-polylines-based-on-zoom/m-p/1001203#M70805</guid>
      <dc:creator>AndrewMurdoch1</dc:creator>
      <dc:date>2020-11-13T14:32:47Z</dc:date>
    </item>
  </channel>
</rss>

