Cannot export layer with own expression

159
0
02-17-2022 07:53 AM
Labels (3)
artur
by
New Contributor

Hello to all dear users of the arcgis community.
I have this problem:

I put my own expression in the attribute (popup) in the point layer. This expression automatically creates a link to a point on the map. It works great, but then I cannot export the layer from the map created in the web mapping application. The expression below:

 

var PointGeometry = Centroid (Geometry ($ feature));
var ArcadeX = PointGeometry.x;
var ArcadeY = PointGeometry.y;
var ArcadeSr = PointGeometry.spatialReference.wkid;
var Latitude, Longitude;
function AuxSphereToLatLon (x, y) {
var rMajor = 6378137;
var shift = PI * rMajor;
Longitude = x / shift * 180.0;
Latitude = y / shift * 180.0;
Latitude = 180 / PI * (2 * Atan (Exp (Latitude * PI / 180.0)) - PI / 2.0);
}
if (ArcadeSr == 4326) {
Latitude = ArcadeY;
Longitude = ArcadeX;
} else if (ArcadeSr == 102100) {
AuxSphereToLatLon (ArcadeX, ArcadeY);
}
var url = "https://my-organization.maps.arcgis.com/apps/webappviewer/index.html?id=xxx=" + text (Longitude) + "," + text (Latitude) + "," + text (Longitude) + "," + text (Latitude);
return url;

 

Anyone have any ideas?

0 Kudos
0 Replies