Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - Segments will not display due to "New Line" labeling #251

Closed
pjdohertygis opened this issue Mar 21, 2024 · 7 comments
Closed

[BUG] - Segments will not display due to "New Line" labeling #251

pjdohertygis opened this issue Mar 21, 2024 · 7 comments
Assignees
Labels
ArcGIS Online Related to ArcGIS Online (Web Map Viewer, not app specific) Bug Something isn't working

Comments

@pjdohertygis
Copy link
Owner

pjdohertygis commented Mar 21, 2024

Which app?

Dashboards

Describe the Device, Operating System, and Browser

Laptop, Windows, Edge

Describe the bug

Search segments (polygon feature layer) will not display unless Segment Name field is filled out. This fields is used as a label on the map so it is potentially a labeling issue bug.

Expected Behavior

The search segment features should display even when these fields are not filled out.

Reproduction Steps & Sample

  1. Go to https://experience.arcgis.com/experience/9051a07ffd1947bbb395e9f9b4088f85/page/Intel-Manager-1_0/
  2. Using the Smart Editor, add a new search segment (any kind) and leave the Segment Name field blank

image

  1. Go to the Tactical Dashboard, navigate to the segments you added
  2. Notice the segments where Search Segment Name is blank, they do not display.

image

Other Relevant Info

This appears to have started AFTER the ArcGIS Online release. Here is the version of Edge I am using
image

Also on Chrome, I will try the update next
image

Confirmed that this is not caused by Dashboard embedded in Experience Builder, tested on stand alone Dashboard
https://napsg.maps.arcgis.com/apps/dashboards/a6637762c84a47a7958a4e3601cd071f

Confirmed that this is not caused by Dashboard applications, tested in the web map
https://napsg.maps.arcgis.com/apps/mapviewer/index.html?webmap=ae14c820e00d492d90428aefaa01422a

Confirmed that this is not caused by web map viewer, happens even in the Visualization tab, so I think this is a Javascript API issue https://napsg.maps.arcgis.com/home/item.html?id=5f67f852d0f043799d7509efdaa16ad2&sublayer=5#visualize

image

The arcade expression being used is $feature["segment_designation"] + TextFormatting.NewLine + $feature["team_name"]. Perhaps it is an issue with "new line" expression? When I turn lables off - the issue disappears. Also if I keep the expression simple without NewLine, it goes away.

image

Priority impact

p1 - time sensitive

Impact

This will be confusing for end users who are quickly drawing search segments and intend to go back later to name them.

@pjdohertygis pjdohertygis added the Bug Something isn't working label Mar 21, 2024
@pjdohertygis
Copy link
Owner Author

Reported to Esri, you have successfully submitted your support request. Your new case number is: 03585008.

@pjdohertygis pjdohertygis added the ArcGIS Online Related to ArcGIS Online (Web Map Viewer, not app specific) label Mar 21, 2024
@pjdohertygis pjdohertygis changed the title [BUG] - Segments will not display in Tactical Dashboard unless given a segment name or team name in Intel Manager [BUG] - Segments will not due to "New Line" labeling Mar 22, 2024
@pjdohertygis
Copy link
Owner Author

Just finished an Esri Support call. We confirmed that we can replicate the issue if we clone the SARCOP feature layer, but she is not able to replicate from a fresh layer itself. We were able to get some error codes and am sending her a HAR file for now. We will go ahead and fix our web map labels for now and Esri will use this cloned feature layer for testing.

https://napsg.maps.arcgis.com/home/item.html?id=b61eff6326204d20b69aeee6f89687cf#overview

@avezina
Copy link
Collaborator

avezina commented Mar 22, 2024

Web Map used in WAB: https://napsg.maps.arcgis.com/home/item.html?id=904575e13cf04ebfb9bdfc4ee0f48cbb
Loaded in MV Classic (downgraded to JS 3.x) vs. new MV (JS 4.x)
image

Compare for location Owensboro, KY

JS SDK 4.28: https://codepen.io/avezina/pen/MWRmogd
image

JS SDK 4.29: https://codepen.io/avezina/pen/GRLmEKO
image

Confirms that it looks like may be regression for JS SDK between 4.28 and 4.29

@pjdohertygis
Copy link
Owner Author

pjdohertygis commented Mar 22, 2024

Workaround for now.

  1. Get rid of the Arcade expression in segment label.
  2. Create two labels. One is Segment, One is Team Name.
  3. Drag Team Name below Segment, then match the format of Segment.
  4. Save the web map. Save to the layer as well.
  5. DO NOT do this for Intel Manager 1.0 web map because WAB / old JS cannot handle it.

Format should look like this.

image

image

@pjdohertygis pjdohertygis changed the title [BUG] - Segments will not due to "New Line" labeling [BUG] - Segments will not display due to "New Line" labeling Mar 25, 2024
@pjdohertygis
Copy link
Owner Author

pjdohertygis commented Mar 27, 2024

  1. Create a new feature layer from Content. Polygon only.
  2. Add two fields (Field 1 and Field 2) as text, 256 limit.
  3. In visualization tab create label with expression $feature.Field1 + TextFormatting.NewLine + $feature.Field2
  4. In web map viewer add 4 polygon features.
  • Add text to Field 1 and Field 2
  • Add text to Field 1 only
  • Add text to Field 2 only
  • Add no text to either

Here is the result. https://napsg.maps.arcgis.com/home/item.html?id=b491ee06d5d94183956ced157b35d004

At this point in time, I see that the fourth feature with neither Field 1 or 2 filled out, is entirely blank on screen but does show up in the data table. And after returning the map, I know see only partial drawing.

In the below "1" is with both fields filled out. "4" is with no fields filled out. It seems really inconsistent, but I can definitely observe the issue.

image
image

Here is the error I am picking up in the console
image
image

If I turn off labels, everything displays as expected.
image

and no relevant errors
image

@pjdohertygis
Copy link
Owner Author

This now logged as a defect, will monitor until fixed and then close this issue. We will have to go back and fix our maps with the new script. Field Maps and QuickCapture can't read the "two label" workaround implemented above.
BUG-000166346 - Polygons display incorrectly in JS API 4.29 when using TextFormatting.NewLine expression in the labels.

@oviera-napsg
Copy link
Collaborator

Addressed by ESRI - closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ArcGIS Online Related to ArcGIS Online (Web Map Viewer, not app specific) Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants