Hi there,
I am yet again standing infront of a problem :') I am currently trying to edit the geometry of $feature by giving it the z-value of an intersecting feature. For this to work I created this code snippet:
var lines = FeatureSetByName($map, "linefeature", ["globalId"], false)
var intersectingLines = Intersects(lines, $feature)
var lines = count(intersectingLines)
if(lines == 1){
var intersectingLine = First(intersectingLines)
var newGeo = Point({
"x": Geometry($feature).x,
"y": Geometry($feature).y,
"z": Geometry(intersectingLine).z,
"spatialReference": Geometry($feature).spatialReference
})
SetGeometry($feature, newGeo)
return true
} else {
return true
}
So far so good, but somehow it won't work. Any Ideas what could be the problem?
Thanks!
Stefan