Difference

Compute the geometric difference of two polygons. Use the static method GeometryEngine::difference(), one of several methods in the GeometryEngine class that create a new geometry through a geometric calculation on one or more existing geometries. The first polygon is displayed. Draw a second polygon. Subtract the second polygon from the first, and the difference is highlighted as a new blue polygon. If the two polygons do not intersect, the difference is equal to the original polygon.