Hi!
In ArcGIS Online: I have a set of Arcade labels that works fine in the map viewer classic but they don't display at all in the new map viewer. Testing the expression in the new map viewer gives the correct (expected) output results. But nothing displays on the map or on the experience builder app that is using this web map. Here is the Arcade expression:
// Get the geometry of the feature
var geom = Geometry($feature);
// Extract the latitude and longitude
var lat = Round(geom.y, 6);
var lon = Round(geom.x, 6);
// Combine latitude and longitude into a label
return "Lat: " + Text(lat, "#.######") + "°, Lon: " + Text(lon, "#.######") + "°";
Anybody knows why this happens?
Thanks for reporting this. This looks to be an issue in the JS Maps SDK. I'll shoot this over to the team
Hi! Sharing directly as a webmap keeps the arcade expression (minus the newline, but well...) and displays in the new map viewer. This however does not solve the problem because I need my feature layer to be editable, but not enabled for public data collection.
Hi @bogdanpalade2 I have just tested this arcade script and experience the same thing you are reporting, even in ArcGIS Pro the expression validates but there is nothing displaying when applied. I would recommend raising a support case with your distributor to determine if there is a bug for this matter or how they can help further.
Hi Daniel,
In my case, everything works fine in ArcGIS Pro. I have a feeling it is about how the different coordinate systems are treated in the new map viewer because this problem shows only when using the geometry property.
Going deeper in the topic, looks like the problem is related to maps that are using GCS, i.e. not projected.