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
PointMapObject ->Rectangle with width and height of zero
PolylineMapObject ->Polyline
PolygonMapObject ->Polygon
RectangleMapObject ->Rectangle
TextMapObject ->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