<?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 image in expand widget not rendered correctly in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-image-in-expand-widget-not-rendered/m-p/1400314#M84114</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/583259"&gt;@StephM&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Can you please share the code snippet where you add your icons? In that way it will be easier for the community to provide suggestions on what to change to make it work (again) in the 4.29 version of the ArcGIS Maps SDK for JavaScript.&lt;/P&gt;&lt;P&gt;I can provide you with an example - using an svg instead of base64, so maybe not completely what you are looking for... - that works fine in 4.29:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function createZoomEntireCountryBtn() {
  const zoomEntireCountryBtnDiv = document.createElement('div');
  zoomEntireCountryBtnDiv.innerHTML = `
    &amp;lt;div id="zoomEntireCountryBtn" class="esri-component esri-widget--button esri-widget" role="button"&amp;gt;
      &amp;lt;span title="Zoom uit op heel Nederland"&amp;gt;&amp;lt;calcite-action&amp;gt;&amp;lt;img src="nederland.svg" style="width:25px;height:25px;" alt="nederland"&amp;gt;&amp;lt;/calcite-action&amp;gt;&amp;lt;/span&amp;gt;
    &amp;lt;/div&amp;gt;`;
  document.body.appendChild(zoomEntireCountryBtnDiv);
  document.getElementById("zoomEntireCountryBtn").addEventListener("click", zoomEntireCountry);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The actual file nederland.svg is 924x924 pixels in size, but renders perfectly on my custom button:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EggeJan_Poll_0-1711373159011.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/98969i58D238C92B94E7AF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EggeJan_Poll_0-1711373159011.png" alt="EggeJan_Poll_0-1711373159011.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope you will find a solution (and - maybe - share it here to the benefit of the community :-))&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Egge-Jan&lt;/P&gt;</description>
    <pubDate>Mon, 25 Mar 2024 13:27:35 GMT</pubDate>
    <dc:creator>Egge-Jan_Pollé</dc:creator>
    <dc:date>2024-03-25T13:27:35Z</dc:date>
    <item>
      <title>Custom image in expand widget not rendered correctly</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-image-in-expand-widget-not-rendered/m-p/1400261#M84109</link>
      <description>&lt;P&gt;Hello everybody,&lt;BR /&gt;I hope that you will be able to help me on a tricky bug...&lt;BR /&gt;&lt;BR /&gt;I have a web application based on custom widgets.&lt;BR /&gt;That widgets are openend using "expand" help tool ... Everything is ok ... but.&lt;BR /&gt;I recently upgraded to the latest SDK version and my previous implementation is not correct anymore.&lt;BR /&gt;&lt;BR /&gt;I use a custom IconClass that render an image in the expand button.&lt;BR /&gt;Now, my picture is "cropped"...&lt;BR /&gt;&lt;BR /&gt;Do you have any suggestion to avoid that ?&lt;BR /&gt;&lt;BR /&gt;I see that in the css there is a calculated css rule...&lt;BR /&gt;&lt;BR /&gt;Many thaks in advance.&lt;BR /&gt;I share with you what I mean:&lt;/P&gt;&lt;P&gt;Basically it's only base64 url behind a css class&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="9433d27d-844c-4e7e-9a1b-2a0b5599544b.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/98961i01BA13B0607C2E73/image-size/medium?v=v2&amp;amp;px=400" role="button" title="9433d27d-844c-4e7e-9a1b-2a0b5599544b.png" alt="9433d27d-844c-4e7e-9a1b-2a0b5599544b.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="correctIcon.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/98960i0F407004FE764FE4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="correctIcon.png" alt="correctIcon.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 10:23:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-image-in-expand-widget-not-rendered/m-p/1400261#M84109</guid>
      <dc:creator>StephM</dc:creator>
      <dc:date>2024-03-25T10:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Custom image in expand widget not rendered correctly</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-image-in-expand-widget-not-rendered/m-p/1400314#M84114</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/583259"&gt;@StephM&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Can you please share the code snippet where you add your icons? In that way it will be easier for the community to provide suggestions on what to change to make it work (again) in the 4.29 version of the ArcGIS Maps SDK for JavaScript.&lt;/P&gt;&lt;P&gt;I can provide you with an example - using an svg instead of base64, so maybe not completely what you are looking for... - that works fine in 4.29:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;function createZoomEntireCountryBtn() {
  const zoomEntireCountryBtnDiv = document.createElement('div');
  zoomEntireCountryBtnDiv.innerHTML = `
    &amp;lt;div id="zoomEntireCountryBtn" class="esri-component esri-widget--button esri-widget" role="button"&amp;gt;
      &amp;lt;span title="Zoom uit op heel Nederland"&amp;gt;&amp;lt;calcite-action&amp;gt;&amp;lt;img src="nederland.svg" style="width:25px;height:25px;" alt="nederland"&amp;gt;&amp;lt;/calcite-action&amp;gt;&amp;lt;/span&amp;gt;
    &amp;lt;/div&amp;gt;`;
  document.body.appendChild(zoomEntireCountryBtnDiv);
  document.getElementById("zoomEntireCountryBtn").addEventListener("click", zoomEntireCountry);
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The actual file nederland.svg is 924x924 pixels in size, but renders perfectly on my custom button:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="EggeJan_Poll_0-1711373159011.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/98969i58D238C92B94E7AF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="EggeJan_Poll_0-1711373159011.png" alt="EggeJan_Poll_0-1711373159011.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Hope you will find a solution (and - maybe - share it here to the benefit of the community :-))&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Egge-Jan&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2024 13:27:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/custom-image-in-expand-widget-not-rendered/m-p/1400314#M84114</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2024-03-25T13:27:35Z</dc:date>
    </item>
  </channel>
</rss>

