<?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: CSS not properly loading, buttons &amp;amp; widget not rendering correctly in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-not-properly-loading-buttons-amp-widget-not/m-p/1095231#M74546</link>
    <description>&lt;P&gt;Hi Andy, at 4.17 it worked with AMD and for 4.20 I used ES modules, so only import statements and assets changed, core code is the same. I am in a security environment with no internet connection and own GIS Server. After copying the assets there are no exceptions or warnings so i have no clue why the rendering not like in 4.17&lt;/P&gt;</description>
    <pubDate>Fri, 03 Sep 2021 09:05:54 GMT</pubDate>
    <dc:creator>KevinWrona</dc:creator>
    <dc:date>2021-09-03T09:05:54Z</dc:date>
    <item>
      <title>CSS not properly loading, buttons &amp; widget not rendering correctly</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-not-properly-loading-buttons-amp-widget-not/m-p/1094939#M74532</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;I am using ArcGIS API for JavaScript 4.20 ES modules and I am trying to add a Sketch Widget to the top right corner. The standard buttons like Zoom in and Zoom out and the widget are not rendering properly. All I am getting is the following:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KevinWrona_0-1630595757032.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/22295i033459CA97C3376F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KevinWrona_0-1630595757032.png" alt="KevinWrona_0-1630595757032.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Like in the documentation i am adding CSS resource with&amp;nbsp;@import "@arcgis/core/assets/esri/themes/light/main.css";&lt;/P&gt;&lt;P&gt;Nearly the same Code worked with 4.17.&lt;/P&gt;&lt;P&gt;My angular component below.&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;import MapView from '@arcgis/core/views/MapView';
import BaseMap from '@arcgis/core/Basemap';
import WMSLayer from "@arcgis/core/layers/WMSLayer";
import Map from "@arcgis/core/Map";
import esriConfig from "@arcgis/core/config";
import Sketch from "@arcgis/core/widgets/Sketch";
import GraphicsLayer from "@arcgis/core/layers/GraphicsLayer";

@Injectable()
export class AppComponent{
  // The &amp;lt;div&amp;gt; where we will place the map
  @ViewChild('mapViewNode', { static: true }) private mapViewEl: ElementRef | undefined;

  constructor() {
    esriConfig.assetsPath = "assets/@arcgis/core/assets";
  }

  public initializeMap() {
    const graphicsLayer = new GraphicsLayer();
    const basemap = new BaseMap({
      baseLayers: [
        new WMSLayer({
          url: '&amp;lt;URL to WMS Server&amp;gt;?SERVICE=WMS&amp;amp;VERSION=1.3.0&amp;amp;REQUEST=GetCapabilities'
        })
      ]
    });
    const map = new Map({
      basemap: basemap,
      layers: [graphicsLayer]
    });

    const view = new MapView({
      container: this.mapViewEl?.nativeElement,
      map: map,
      zoom: 5,
      center: [90, 45]
    });

    view.when(() =&amp;gt; {
      const sketch = new Sketch({
        layer: graphicsLayer,
        view: view
      });
      view.ui.add(sketch, "top-right");
    });
  }

  public ngOnInit(): void {
    // Initialize MapView and return an instance of MapView
    this.initializeMap();
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 15:29:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-not-properly-loading-buttons-amp-widget-not/m-p/1094939#M74532</guid>
      <dc:creator>KevinWrona</dc:creator>
      <dc:date>2021-09-02T15:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: CSS not properly loading</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-not-properly-loading-buttons-amp-widget-not/m-p/1094944#M74534</link>
      <description>&lt;P&gt;What does you build set up look like? Are you using webpack or some other framework build?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 15:24:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-not-properly-loading-buttons-amp-widget-not/m-p/1094944#M74534</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-09-02T15:24:04Z</dc:date>
    </item>
    <item>
      <title>Re: CSS not properly loading</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-not-properly-loading-buttons-amp-widget-not/m-p/1094951#M74535</link>
      <description>&lt;P&gt;Thanks for quick answer! Only installed ArcGIS JS API with npm ang run my angular app with "ng serve" ...&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 15:31:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-not-properly-loading-buttons-amp-widget-not/m-p/1094951#M74535</guid>
      <dc:creator>KevinWrona</dc:creator>
      <dc:date>2021-09-02T15:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: CSS not properly loading, buttons &amp; widget not rendering correctly</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-not-properly-loading-buttons-amp-widget-not/m-p/1094954#M74536</link>
      <description>&lt;P&gt;Hi Kevin, I'm not sure I understand, we didn't have ES modules (@arcgis/core) at 4.17. Is there a reason why you want to host the assets locally? They'll automatically pull from CDN, here's some additional info:&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/es-modules/#working-with-assets" target="_blank"&gt;https://developers.arcgis.com/javascript/latest/es-modules/#working-with-assets&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 15:36:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-not-properly-loading-buttons-amp-widget-not/m-p/1094954#M74536</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2021-09-02T15:36:39Z</dc:date>
    </item>
    <item>
      <title>Re: CSS not properly loading, buttons &amp; widget not rendering correctly</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-not-properly-loading-buttons-amp-widget-not/m-p/1095231#M74546</link>
      <description>&lt;P&gt;Hi Andy, at 4.17 it worked with AMD and for 4.20 I used ES modules, so only import statements and assets changed, core code is the same. I am in a security environment with no internet connection and own GIS Server. After copying the assets there are no exceptions or warnings so i have no clue why the rendering not like in 4.17&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 09:05:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-not-properly-loading-buttons-amp-widget-not/m-p/1095231#M74546</guid>
      <dc:creator>KevinWrona</dc:creator>
      <dc:date>2021-09-03T09:05:54Z</dc:date>
    </item>
    <item>
      <title>Re: CSS not properly loading, buttons &amp; widget not rendering correctly</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-not-properly-loading-buttons-amp-widget-not/m-p/1095307#M74548</link>
      <description>&lt;P&gt;Okay, that's kind of what I figured, thanks for clarifying. It is odd that there are no 404, or even 504, errors when the app tries to retrieve the assets. One likely possibility is your assetsPath setting, the example above isn't what I would expect to see. Have you tried something like this:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;esriConfig.assetsPath = "./assets";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If that doesn't work, send us a snippet of how you are copying the assets, such as your npm script, etc.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Sep 2021 14:31:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-not-properly-loading-buttons-amp-widget-not/m-p/1095307#M74548</guid>
      <dc:creator>AndyGup</dc:creator>
      <dc:date>2021-09-03T14:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: CSS not properly loading, buttons &amp; widget not rendering correctly</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-not-properly-loading-buttons-amp-widget-not/m-p/1095588#M74561</link>
      <description>&lt;P&gt;I tried in 2 seperate projects. In one project I use the:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;"copyEsriAssets": "xcopy .\\node_modules\\@arcgis\\core\\assets .\\apps\\vwa\\src\\assets\\@arcgis\\core\\assets /sy"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a second blank Angular project for testing I copied the assets (esri and components folder) manually to my-app\src\assets\@arcgis\core\assets and use&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;esriConfig.assetsPath = "./assets/@arcgis/core/assets";&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sure the path is correct becauce if I change it I get a 404 for widget-assets not found and so on ...&lt;/P&gt;&lt;P&gt;So I am not sure about what is important next to the asset folder and the import of main.css&lt;/P&gt;</description>
      <pubDate>Sun, 05 Sep 2021 12:37:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/css-not-properly-loading-buttons-amp-widget-not/m-p/1095588#M74561</guid>
      <dc:creator>KevinWrona</dc:creator>
      <dc:date>2021-09-05T12:37:07Z</dc:date>
    </item>
  </channel>
</rss>

