Select to view content in your preferred language

Data Bug: Sample Code: Visualize all features with the same symbol

229
2
Jump to solution
4 weeks ago
AntonioMedrano
Occasional Contributor

Howdy, I'm teaching an ArcGIS Maps SDK for JavaScript college course, and this week we're covering rendering. One of the Rendering sample codes doesn't seem to render properly though, loading incredibly slowly and never completely even though the datasets are pretty small and simple (Edit: as of 12/3/25 the Sample Code seems to have been removed from the Esri website. My codepen below still has it, I assume that it will be updated soon and returned to the Esri sample code website). I even tried converting it over to components (https://codepen.io/antoniomedrano/pen/PwNmwNB?editors=1000), but no improvement (Edit: the CodePen works now with the new Feature Layer provided below by @UndralBatsukh). Then I opened up the highways feature layer in ArcGIS Online and found that it loaded really slowly there too, so I'm guessing the problem is something with the data itself. Is this buggy sample code something that Esri is aware of? I would love for it to work smoothly, thanks!

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
UndralBatsukh
Esri Regular Contributor

Hi there, 

Thanks for letting us know. This sample is using deprecated service that is not longer being updated. We will update the sample to use the latest service. Please use the first layer in this feature layer portal item in your app instead - https://jsapi.maps.arcgis.com/home/item.html?id=f42ecc08a3634182b8678514af35fac3

Here is the direct link to the first layer - https://services2.arcgis.com/FiaPA4ga0iQKduv3/ArcGIS/rest/services/Transportation_v1/FeatureServer/0

 

View solution in original post

2 Replies
UndralBatsukh
Esri Regular Contributor

Hi there, 

Thanks for letting us know. This sample is using deprecated service that is not longer being updated. We will update the sample to use the latest service. Please use the first layer in this feature layer portal item in your app instead - https://jsapi.maps.arcgis.com/home/item.html?id=f42ecc08a3634182b8678514af35fac3

Here is the direct link to the first layer - https://services2.arcgis.com/FiaPA4ga0iQKduv3/ArcGIS/rest/services/Transportation_v1/FeatureServer/0

 

AntonioMedrano
Occasional Contributor

Thank you @UndralBatsukh for the better feature layer, I have updated my CodePen with this and it works great now. You are welcome to use my component code version if you would like to update the Sample Code on the Esri website, and I welcome any feedback on how to improve it. Thanks again!