Some layers are not rendering after upgrading JS API from 2.23 to 3.30

708
10
Jump to solution
01-25-2020 04:20 PM
GaneshmoorthiMylsamy
New Contributor II

Hi All,

 

After upgrading ArcGIS JS API from 3.23 to 3.30 (referring https://github.com/Esri/jsapi-resources for upgrade).

Some map service layers are not rendering on map(Mostly point and Line features).

If I run my application locally, refereeing arcgis js api online. The app works fine  and all layers are rendering without any issue.  

But, deploying the app,  most of the point and line features are not rendering on map.

Please let me know if you require any additional information.

Below is the screen shot of the app:

 Point features are rendered if i refer Online API:

Point features are not rendered after deploying app. 

Thanks,

Ganesh 

1 Solution

Accepted Solutions
GaneshmoorthiMylsamy
New Contributor II

After disabling webgl, i am able to view the layers.

 

"esri-featurelayer-webgl": 0

View solution in original post

10 Replies
Noah-Sager
Esri Regular Contributor

What errors are you seeing in the browser console? Can you post a link to the app, or share it via codepen?

Reply
0 Kudos
GaneshmoorthiMylsamy
New Contributor II

Thanks for the reply.

 

I am not getting any error in console. Also not seeing any error during the build. If I down grade the API version to 3.23 the app works fine.

If I try to upgrade to 3.24 or 3.25 then this problem occurs. Unfortunately, I can’t share app code. I am trying to create small app with same grunt and app profile.  

Reply
0 Kudos
Noah-Sager
Esri Regular Contributor

I'm sorry, I'm a little confused. You've mentioned many different versions of the API. The current 3x version of the API is 3.31, and the current 4x version of the API is 4.14. 

Choose between version 3.x and 4.x | ArcGIS API for JavaScript 4.14 

It looks like you are using this sample as a starting point?

ArcGIS API for JavaScript Sandbox 

There should be some information either in the browser console or network traffic. Please create a simple, reproducible test app (a one page html file is sufficient, no need for grunts). And host it someplace like codepen or jsfiddle.

Reply
0 Kudos
GaneshmoorthiMylsamy
New Contributor II

Please find the attached code (dojo.zip in original post).

If I run the app from source folder. It works fine and I am able to see the point layer in map.

After build,  The point layer is not appearing in map. if i execute the app from dist folder. There is no error message in console and network tab.

Reply
0 Kudos
GaneshmoorthiMylsamy
New Contributor II

Sorry for the confusion. I just updated my last reply. 

Reply
0 Kudos
Noah-Sager
Esri Regular Contributor

Thank you for posting that code. It looks like all the API and SDK references are to locally hosted files. Perhaps there is something going on with the build process, as the layer and the JS API versions seem fine from my end:

JS API version 3.31

https://codepen.io/noash/pen/KKwjJYe

JS API version 3.30

https://codepen.io/noash/pen/dyPBaEY 

JS API version 3.25

https://codepen.io/noash/pen/GRgbzar 

Can you describe your workflow for how you are building the app? And what you are using? I'm not sure how else to help troubleshoot, as everything looks fine from an API perspective.

Reply
0 Kudos
GaneshmoorthiMylsamy
New Contributor II

I took this sample (jsapi-resources/3.x/bower/dojo at master · Esri/jsapi-resources · GitHub )and just modified app code . 

Used following steps to build application.

  • npm install -g bower 
  • npm install 
  • npm run clean 
  • npm run build or grunt build 
Reply
0 Kudos
GaneshmoorthiMylsamy
New Contributor II

I added all the below layers in the sample application.

After build, i am able to see only the below two layers in map.

https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/superflightsWPoints/FeatureServer/0

But the below layer is not visible in map.

https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/socal_precincts_points_2008/Featur...

I used same steps, that i have mentioned in my last post to build the app.

PFA updated code.

Reply
0 Kudos
GaneshmoorthiMylsamy
New Contributor II

After disabling webgl, i am able to view the layers.

 

"esri-featurelayer-webgl": 0

View solution in original post