Select to view content in your preferred language

Graphics Layer does not show in Chrome

1877
4
Jump to solution
10-07-2019 07:34 AM
Alaind_Espaignet
Emerging Contributor

I am using ESRI JS API 4.12.

I create geometry for a poly line and add it to a Graphics Layer.

I add the Graphics Layer to the map.

The map has no base map only feature layers.

In Chrome and on my machine only (Windows 10 Pro x64)

  - the layer is listed in layer list widget

  - but the graphics does not show!

My dev machine uses a not so powerful on-board graphics.

Its a DELL Optiplex 9010 SFF.

The layer shows in IE 11 and in Edge.

On my co-worker machine a gamer laptop (but using on board graphics not added graphic card) we have established that we can reproduce the same Chrome specific behavior by turning Use Hardware Acceleration off in Chrome settings. With Hardware Acceleration off the graphics show.

It appears that the problem is related to graphics rendering capabilities and possibly WebGL.

Perhaps on the gamer machine the diminutive graphics capability are still higher than mine and graphics shows with hardware acceleration off. 

It all works in IE and Edge but it is a lot slower but it shows.

Has anyone else experiences this anomaly?

Is there a tweak that can be done to make it work on Chrome?

Its a case of "does not work on my machine"!

That's when you really want to fix it as a developer!

LOL

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Change your JS API url to 4.13 and see if it works for you.

View solution in original post

4 Replies
RobertScheitlin__GISP
MVP Emeritus

Change your JS API url to 4.13 and see if it works for you.

Alaind_Espaignet
Emerging Contributor

Robert thank you very much

Bingo it works!

For those with the same issue especially if you are using the ESRI JS API in the context of a SPA/Framework like Angular and using esri-loader to load modules.

There is a version parameter to loadModules() like so...

      const [
        EsriMap,
        EsriMapView,
        FeatureLayer,
        watchUtils
      ] = await loadModules([
        'esri/Map',
        'esri/views/MapView',
        "esri/layers/FeatureLayer",
        "esri/core/watchUtils"
      ], {
        version: "4.13"
      });
Don't forget to change the css too like...
@import url('https://js.arcgis.com/4.13/esri/css/main.css');
0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Just remember that 4.13 is not officially released yet.

Alaind_Espaignet
Emerging Contributor

Robert,

Yes I know.

I did see somewhere in a trail something mentioned about a fix for this coming in 4.13.

Then I saw that 4.13 is not out yet so I did not go for it.

I am in the middle of a new app development the inconvenience of not having Chrome to debug an Angular app outweighs the fix not being official yet. 

Thanks