shape
Extension method to retrieve the Shape2D instance of a MapObject. Depending on the type of the object a different shape will be returned:
CircleMapObject ->Circle
EllipseMapObject ->Ellipse
PolylineMapObject ->Polyline
PolygonMapObject ->Polygon
RectangleMapObject ->Rectangle
Note that objects that do not have any shape like TextureMapObject will throw a MissingShapeException
Throws
If the object does not have any shape