Select to view content in your preferred language

Feature Layer with labels fails to display

364
4
Jump to solution
a week ago
MichaelWen_Timmons
Regular Contributor

I have an Angular application that used to work just fine with ArcGIS Maps SDK for JavaScript 4.33. After I upgraded Angular 18 however the map would crash whenever it tries to load a feature with label.

This is the error message: 

ERROR TypeError: Cannot destructure property 'vertexStart' of 'f[l]' as it is undefined.

    at N.setEntityRecordRangeVisibility (4382.js:1:63183)

    at s._writeLabelVisibilityToMesh (4382.js:1:37079)

    at s.onMessage (4382.js:1:34990)

    at or._updateTile (2686.js:1:27113)

    at or.update (2686.js:1:25637)

    at dr.renderChildren (2686.js:1:29136)

    at dr.doRender (2406.js:1:10580)

    at dr.doRender (7641.js:1:6773)

    at dr.doRender (2686.js:1:34633)

    at dr.processRender (2406.js:1:15240)

This is the labelingInfo of the feature layer: 

Labeling Info:Label Placement: esriServerPolygonPlacementAlwaysHorizontal
Label Expression: N/A
Use Coded Values: true
Symbol:Color: [0, 0, 0, 255]
Background Color: N/A
Outline Color: N/A
Vertical Alignment: bottom
Horizontal Alignment: left
Right to Left: false
Angle: 0
XOffset: 0
YOffset: 0
Size: 10
Font Family: Arial
Font Style: normal
Font Weight: bold
Font Decoration: none
Min. Scale: 0.0
Max. Scale: 0.0

If I set the feature layer's labelingInfo to null then the map would load just fine, but without labels. If I try to include any label, like with labelExpression of just '1', I got the error above and the map would white out and become nonresponsive. Dev Console would continue to fire the same error.

0 Kudos
1 Solution

Accepted Solutions
MichaelWen_Timmons
Regular Contributor

It works after I upgraded to 4.33.10. Thanks.

View solution in original post

4 Replies
Noah-Sager
Esri Regular Contributor

Hi @MichaelWen_Timmons, thanks for posting your question here. It sounds like the Angular upgrade is the key to this issue. I will do some digging, but in the meantime, can you test a simple FeatureLayer + label app with Angular 18 (and maybe using different browsers) and see if you get different results?

0 Kudos
MichaelWen_Timmons
Regular Contributor

I  tried Edge and got the same result.

As for a simple Angular app for testing do you have a link to something similar? 

0 Kudos
fdeters
Regular Contributor

@MichaelWen_Timmons Did you try updating to the latest patch versions of @arcgis/core and @arcgis/map-components yet? 

I was having a very similar issue (maybe the exact same) and was about to open a support ticket about it, but then I upgraded the packages and the issue seemed to stop.

MichaelWen_Timmons
Regular Contributor

It works after I upgraded to 4.33.10. Thanks.